DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(mysql.info.gz) InnoDB implicit command or rollback

Info Catalog (mysql.info.gz) InnoDB Locks set (mysql.info.gz) InnoDB transaction model (mysql.info.gz) InnoDB Deadlock detection
 
 15.11.8 When Does MySQL Implicitly Commit or Roll Back a Transaction?
 ---------------------------------------------------------------------
 
 MySQL begins each client connection with autocommit mode enabled by
 default.  When autocommit is enabled, MySQL does a commit after each
 SQL statement if that statement did not return an error.
 
 If you have the autocommit mode off and close a connection without
 calling an explicit commit of your transaction, then MySQL will roll
 back your transaction.
 
 If an SQL statement returns an error, the commit/rollback behavior
 depends on the error.   InnoDB Error handling.
 
 The following SQL statements (and any synonyms for them) cause an
 implicit commit of the current transaction in MySQL:
 
    * `ALTER TABLE', `BEGIN', `CREATE INDEX', `DROP DATABASE', `DROP
      INDEX', `DROP TABLE', `LOAD MASTER DATA', `LOCK TABLES', `RENAME
      TABLE', `SET AUTOCOMMIT=1', `START TRANSACTION', `TRUNCATE',
      `UNLOCK TABLES'.
 
    * `CREATE TABLE' (this commits only if before MySQL 4.0.13 and MySQL
      binary logging is used).
 
    * 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.
 
Info Catalog (mysql.info.gz) InnoDB Locks set (mysql.info.gz) InnoDB transaction model (mysql.info.gz) InnoDB Deadlock detection
automatically generated byinfo2html