pero on anything

Beware: MySQL – Implicit Transaction Commit and Rollback

Today I had a hard time dealing with mysql and transactions. Somehow my transaction has been committed in the middle of the statements. A short look into the manual revealed that there are SQL command that implicit commit a transaction. While I do understand that CREATE TABLE commits a transaction, I was surprised that LOAD DATA INFILE does it too!

And since I use the nice REPLACE INTO SELECT ... workaround found on mysqlperformanceblog (Hint: Always a great resource!) I had to upgrade my development mysql server because since version 5.0.28 LOAD DATA INFILE does not commit a transaction.

MySQL manual

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">