开发者

MySQL has no transaction support?

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


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;


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜