DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(mysql.info) innodb-implicit-command-or-rollback

Info Catalog (mysql.info) innodb-locks-set (mysql.info) innodb-transaction-model (mysql.info) innodb-deadlock-detection
 
 14.2.10.9 Implicit Transaction Commit and Rollback
 ..................................................
 
 By default, MySQL begins each client connection with autocommit mode
 enabled. When autocommit is enabled, MySQL does a commit after each SQL
 statement if that statement did not return an error. If an SQL
 statement returns an error, the commit or rollback behavior depends on
 the error. See  innodb-error-handling.
 
 If you have the autocommit mode off and close a connection without
 explicitly committing the final transaction, MySQL rolls back that
 transaction.
 
 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 FUNCTION', `ALTER PROCEDURE', `ALTER TABLE', `BEGIN',
      `CREATE DATABASE', `CREATE FUNCTION', `CREATE INDEX', `CREATE
      PROCEDURE', `CREATE TABLE', `DROP DATABASE', `DROP FUNCTION',
      `DROP INDEX', `DROP PROCEDURE', `DROP TABLE', `LOAD MASTER DATA',
      `LOCK TABLES', `RENAME TABLE', `SET AUTOCOMMIT=1', `START
      TRANSACTION', `TRUNCATE', `UNLOCK TABLES'.
 
    * `UNLOCK TABLES' commits a transaction only if any tables are
      currently locked.
 
    * The `CREATE TABLE', `CREATE DATABASE' `DROP DATABASE', and
      `TRUNCATE TABLE' statements cause an implicit commit beginning
      with MySQL 5.0.8. The `ALTER FUNCTION', `ALTER PROCEDURE', `CREATE
      FUNCTION', `CREATE PROCEDURE', `DROP FUNCTION', and `DROP
      PROCEDURE' statements cause an implicit commit beginning with MySQL
      MySQL 5.0.13.
 
    * The `CREATE TABLE' statement in `InnoDB' is processed as a single
      transaction. This means that a `ROLLBACK' from the user does not
      undo `CREATE TABLE' statements the user made during that
      transaction.
 
 Transactions cannot be nested. This is a consequence of the implicit
 `COMMIT' performed for any current transaction when you issue a `START
 TRANSACTION' statement or one of its synonyms.
 
Info Catalog (mysql.info) innodb-locks-set (mysql.info) innodb-transaction-model (mysql.info) innodb-deadlock-detection
automatically generated byinfo2html