Oracle 5.0 Reference Manual page 1132

Table of Contents

Advertisement

START
Note
Within all stored programs (stored procedures and functions, and triggers), the
parser treats
Begin a transaction in this context with
Beginning with MySQL 5.0.3, the optional
are the
and
CHAIN
RELEASE
transaction completion. The value of the
default completion behavior. See
The
clause causes a new transaction to begin as soon as the current one ends, and the
AND CHAIN
new transaction has the same isolation level as the just-terminated transaction. The
causes the server to disconnect the current client session after terminating the current transaction.
Including the
keyword suppresses
NO
[444]
completion_type
Beginning a transaction causes any pending transaction to be committed. See
"Statements That Cause an Implicit
Beginning a transaction also causes table locks acquired with
you had executed
UNLOCK
acquired with
FLUSH TABLES WITH READ
For best results, transactions should be performed using only tables managed by a single transaction-
safe storage engine. Otherwise, the following problems can occur:
• If you use tables from more than one transaction-safe storage engine (such as
and the transaction isolation level is not
transaction commits, another ongoing transaction that uses the same tables will see only some of the
changes made by the first transaction. That is, the atomicity of transactions is not guaranteed with
mixed engines and inconsistencies can result. (If mixed-engine transactions are infrequent, you can
use
SET TRANSACTION ISOLATION LEVEL
a per-transaction basis as necessary.)
• If you use tables that are not transaction-safe within a transaction, changes to those tables are
stored at once, regardless of the status of autocommit mode.
• If you issue a
ROLLBACK
ER_WARNING_NOT_COMPLETE_ROLLBACK
tables are rolled back, but not changes to nontransaction-safe tables.
Each transaction is stored in the binary log in one chunk, upon COMMIT. Transactions that are rolled
back are not logged. (Exception: Modifications to nontransactional tables cannot be rolled back. If a
transaction that is rolled back includes modifications to nontransactional tables, the entire transaction
is logged with a
ROLLBACK
tables are replicated.) See
You can change the isolation level for transactions with the
Section 13.3.6,
"SET TRANSACTION
Rolling back can be a slow operation that may occur implicitly without the user having explicitly asked
for it (for example, when an error occurs). Because of this,
in the
column for the session, not only for explicit rollbacks performed with the
back
State
statement but also for implicit rollbacks.
Note
Beginning with MySQL 5.0.84, BEGIN, COMMIT, and
affected by
[1457]
db
TRANSACTION, COMMIT, and
BEGIN [WORK]
keyword is supported for
WORK
clauses.
and
CHAIN
completion_type
Section 5.1.4, "Server System
or
CHAIN
RELEASE
system variable is set to cause chaining or release completion by default.
Commit", for more information.
TABLES. Beginning a transaction does not release a global read lock
LOCK.
SERIALIZABLE
statement after updating a nontransactional table within a transaction, an
[2923]
statement at the end to ensure that modifications to the nontransactional
Section 5.2.3, "The Binary
Syntax".
--replicate-do-db
rules. (Bug #43263)
1112
Syntax
ROLLBACK
as the beginning of a
BEGIN ... END
START TRANSACTION
can be used for additional control over
RELEASE
[444]
system variable determines the
Variables".
completion, which can be useful if the
LOCK TABLES
[1121], it is possible that when one
to set the isolation level to
warning occurs. Changes to transaction-safe
Log".
SET TRANSACTION
SHOW PROCESSLIST
[1457]
or
--replicate-ignore-
block.
instead.
and ROLLBACK, as
COMMIT
clause
RELEASE
Section 13.3.3,
to be released, as though
and BDB),
InnoDB
[1121]
SERIALIZABLE
statement. See
displays
Rolling
ROLLBACK
are no longer
ROLLBACK
on

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents