Syntax:
START TRANSACTION [WITH CONSISTENT SNAPSHOT] | BEGIN [WORK]
COMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]
ROLLBACK [WORK] [AND [NO] CHAIN] [[NO] RELEASE]

The START TRANSACTION and BEGIN statement begin a new transaction.
COMMIT commits the current transaction, making its changes permanent.
ROLLBACK rolls back the current transaction, canceling its changes. The
mode for the current connection.

Beginning with MySQL 5.0.3, the optional WORK keyword is supported for
COMMIT and ROLLBACK, as are the CHAIN and RELEASE clauses. CHAIN and
RELEASE can be used for additional control over transaction completion.
The value of the completion_type system variable determines the default
completion behavior. See
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html.

The AND CHAIN clause causes a new transaction to begin as soon as the
current one ends, and the new transaction has the same isolation level
as the just-terminated transaction. The RELEASE clause causes the
server to disconnect the current client connection after terminating
the current transaction. Including the NO keyword suppresses CHAIN or
RELEASE completion, which can be useful if the completion_type system
variable is set to cause chaining or release completion by default.

By default, MySQL runs with autocommit mode enabled. This means that as
soon as you execute a statement that updates (modifies) a table, MySQL
stores the update on disk.

If you are using a transaction-safe storage engine (such as InnoDB,
BDB, or NDB Cluster), you can disable autocommit mode with the
following statement:


After disabling autocommit mode by setting the AUTOCOMMIT variable to
zero, you must use COMMIT to store your changes to disk or ROLLBACK if
you want to ignore the changes you have made since the beginning of
your transaction.

To disable autocommit mode for a single series of statements, use the
START TRANSACTION statement:

URL: http://dev.mysql.com/doc/refman/5.0/en/commit.html

