innodb中,每条语句都运行在事务中

autocommit下,每条语句组成一个事务:

"In InnoDB, all user activity occurs inside a transaction. If autocommit mode is enabled, each SQL statement forms a single transaction on its own"

"By default, MySQL starts the session for each new connection with autocommit enabled, so MySQL does a commit after each SQL statement if that statement did not return an error."

http://dev.mysql.com/doc/refman/5.5/en/innodb-transaction-model.html

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.