You have likely run into this bug in MySQL Connector/NET.
What triggers this bug:
- Code calls for execution of query A
- Transaction 1 for query A is started
- Query A is executed and causes an error in MySQL
- Transaction 1 is NOT rolled back
- Code calls for execution of query B
- Transaction 2 for query B is started
- MySQL Connector/NET throws the exception
The bug is point 4: transaction 1 is left open after an error (or at least the connector is still convinced it's left open). Because of connection pooling, the code calling for query A and query B can be completely unrelated. Also, if the time between point 4 and 5 is long enough, the transaction is rolled back, hence the rareness and randomness.
Unfortunately there's no fix by MySQL yet. The only workaround that I know of is downloading the source code of Connector/NET and fixing/building it yourself.
Otherwise, stick to the older stable version 6.8.7
Thanks: AronVanAmmers
Reference: http://stackoverflow.com/a/29265962/1931848
No comments:
Post a Comment