| |
13.4.3. Statements That Cause an Implicit Commit
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
TABLE, UNLOCK TABLES.
UNLOCK TABLES commits a transaction only
if any tables currently are locked.
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.
|
|