Why I don't like MySQL ! Transaction suck because of the Implicit Commit !!!

Well, MySQL is a simple database with a lot of feature now. It is easy to find a host and have a database like this. You can connect to MySQL with all languages out there. But sometime I hate it because I can't do what I need to do properly :

I have a case, I create a new action, I want to create a table to save all data for this action in the table and I want to like all of this to a product specific action. I need a transaction like this :

BEGIN TRANSACTION

  • create action
  • create table for this action
  • create product action and link it to the previous action

END OF TRANSACTION

If one of those task fail, I support everything is cancel. And of course if 2 process try to create the action, one wait and take the action that the other has created.

It's simple ? Well, not really thanks to implicit commit with MySQL.

Take a look there : http://dev.mysql.com/doc/refman/5.6/en/implicit-commit.html

"CREATE TABLE" do an implicit commit. So I can't do that ! And it sucks to handle this, it's like transaction is useless here.

It's one of the reason I don't like MySQL.

Short URL

Comments