Archive for March 15th, 2007

Beware: MySQL - Implicit Transaction Commit and Rollback

Thursday, March 15th, 2007

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