New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
State exception when executing procedure with runtime error #423
Comments
Are you able to copy the Which version of MySQL Server are you using? |
It happens whenever there is a runtime error in the procedure(such as duplicate key)
If the procedure it called twice with the same primary key(nameparam) then the exception accours. MySQL version: |
FWIW there is a bug in your first code snippet:
The second parameter to |
You probably wanted |
Right. What about raising the exception on C# level? |
Your sample code calls
This looks like it's working as expected to me; can you please update to 0.34.0 and let me know if you can still reproduce the problem with that version? And, if so, post a complete example to reproduce it? |
Never mind, I just saw that you posted above:
In that case, a self-contained repro would be greatly appreciated. |
I don't even know where to start. What could cause the session to become in an invalid state? |
Once I have a repro, I can figure that out. I'm just not able to write code that reproduces the exception you're reporting. |
Can you show me the definition of the |
I changed The code I use for calling create project is here:
|
I believe I've identified the cause of this bug. |
Something I can do to prevent it? |
AFAICT, this happens when executing the stored procedure or function causes an exception (which is then masked by the exception you reported in the original bug report). So the only workaround I can think of is: "don't cause that exception in the first place". To find out what it is, you'd need to debug with "Break on all first-chance exceptions", then look at it in the debugger. A real fix should be shipping soon. |
I'll just make the procedures return a "magic" number for now. Thanks for your support! |
Fixed in 0.34.1. |
Hi. I've been using MySQLConnector for some time now. However, I've run into an exception
System.InvalidOperationException : 'Expected state to be Failed but was Connected.'
which fires on the last line of the following:Stack trace:
Any suggestions for what the cause might be or how to prevent it?
The text was updated successfully, but these errors were encountered: