Description:
http://dev.mysql.com/doc/refman/5.0/en/innodb-implicit-commit.html says:
"Each of the following statements (and any synonyms for them) implicitly end a transaction, as if you had done a COMMIT before executing the statement:
- ALTER TABLE, BEGIN, CREATE INDEX, DROP INDEX, DROP TABLE, LOAD MASTER DATA, LOCK TABLES, LOAD DATA INFILE, RENAME TABLE, SET AUTOCOMMIT=1, START TRANSACTION, UNLOCK TABLES."
At the same time, this page, http://dev.mysql.com/doc/refman/5.0/en/set-option.html, says:
"- AUTOCOMMIT = {0 | 1}
Set the autocommit mode. If set to 1, all changes to a table take effect immediately. If set to 0 you have to use COMMIT to accept a transaction or ROLLBACK to cancel it. By default, client connections begin with AUTOCOMMIT set to 1. If you change AUTOCOMMIT mode from 0 to 1, MySQL performs an automatic COMMIT of any open transaction. Another way to begin a transaction is to use a START TRANSACTION or BEGIN statement. See Section 12.4.1, “START TRANSACTION, COMMIT, and ROLLBACK Syntax”."
Note "If you change AUTOCOMMIT mode from 0 to 1, MySQL performs an automatic COMMIT of any open transaction.". In other case, when AUTOCOMMIT=1 already, SET AUTOMMIT=1 does NOT perform implicit commit.
So, looks like we should change http://dev.mysql.com/doc/refman/5.0/en/innodb-implicit-commit.html accordingly.
How to repeat:
SET AUTOCOMMIT=1;
BEGIN
change data...
SET AUTOCOMMIT=1;
Check that data changes are NOT commited.
Suggested fix:
Clarify http://dev.mysql.com/doc/refman/5.0/en/innodb-implicit-commit.html and similar pages for other versions.