views:

128

answers:

3

Hello everyone,

I heard MySQL has no transaction support at all? Is that true? If yes, how could people write reliable code to make sure data consistency and reliable compared to other commercial database (e.g. Oracle/SQL Server)?

thanks in advance, George

+6  A: 

Actually MySQL does include support for transactions through the InnoDB storage engine which is bundled with MySQL. It's not the default storage engine but that setting can be changed. Or you can simply specify the engine when creating your tables.

create table mytable (...) engine=innodb;
Asaph
Thanks! Question answered!
George2
+3  A: 

Pre-4.0, MySQL did not support transactions. That is no longer the case. Transactional support now exists through InnoDB, one of the available storage engines.

MyISAM supports data integrity through essentially autocommit and atomic operations, a different route, and sometimes less effective, but not nothing.

phoebus
+1  A: 

Yes, MySQL has currently support for transactions. See here: http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-transactions.html

Konamiman