How do I find out which statement is out of sync when I get error 2014 with Multi-Statements?
I am calling libmysql.mysql_query
with a SQL Connection with SupportsMultiStatements, passing a string of commands separated by ;
.
This code runs all day without errors. But every few days (with no regularity) my application throws:
2014 - Commands out of sync; you can't run this command now.
Retry always works.
The error message does not specify which of the multiple commands is "out of sync". Is there any way to know?
This question is not how to fix my specific problem, so I haven't included the list of commands. (I suspect the intermittent problem is caused by a timeout waiting for table lock.) This question is about how error 2014 applies to multi-statements.