MySQL Variables tx_isolation 数据库 参数变量解释及正确配置使用
本站中文解释
变量名:tx_isolation
用途:控制MySQL中空间隔离级别的变量,用来对处理同时发生的多个事务操作提供指导依据,从而确保数据的一致性。
设置方式:
1.可以在MySQL启动时,设置–tx-isolation=LEVEL参数,LEVEL可以是READ-UNCOMMITTED、READ-COMMITTED、REPEATABLE-READ、SERIALIZABLE和SNAPSHOT四个空间隔离级别之一。
2.可以通过set tx-isolation=LEVEL语句,或者系统变量 tx_isolation。
官方英文解释
tx_isolation
Deprecated | 5.7.20 |
---|---|
System Variable | tx_isolation |
Scope | Global, Session |
Dynamic | Yes |
Type | Enumeration |
Default Value | REPEATABLE-READ |
Valid Values |
|
The default transaction isolation level. Defaults to
REPEATABLE-READ
.
transaction_isolation
was
added in MySQL 5.7.20 as a synonym for
tx_isolation
, which is now
deprecated and is removed in MySQL 8.0.
Applications should be adjusted to use
transaction_isolation
in
preference to tx_isolation
.
See the description of
transaction_isolation
for
details.