[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
SET TRANSACTION
Syntax
SET [GLOBAL | SESSION] TRANSACTION ISOLATION LEVEL { READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE } |
Sets the transaction isolation level for the global, whole session, or the next transaction.
The default behavior is to set the isolation level for the next (not
started) transaction. If you use the GLOBAL
keyword, the statement
sets the default transaction level globally for all new connections
created from that point on (but not existing connections).
You need the SUPER
privilege to do this. Using the SESSION
keyword sets the
default transaction level for all future transactions performed on the
current connection.
For description of each InnoDB
transaction isolation level, see
14.4.9.1 InnoDB and SET ... TRANSACTION ISOLATION LEVEL ...
. InnoDB supports each of these levels
from MySQL 4.0.5 on. The default level is REPEATABLE READ
.
You can set the default global isolation level for mysqld
with
--transaction-isolation=...
. See section 5.2.1 mysqld
Command-line Options.