Note
This variable is available starting with V1.4.
Description
tx_isolation specifies the transaction isolation level. It has the same function as the system variable transaction_isolation. You can set either variable.
Privilege requirements
Query variables
Global level
You can execute the
SHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL mode) to get the value of a global system variable. This operation is supported for thesystenant and all user tenants of the MySQL mode and Oracle mode.Session level
You can execute the
SHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (Oracle mode) or theinformation_schema.SESSION_VARIABLESview (MySQL mode) to get the value of a session system variable. This operation is supported for thesystenant and all user tenants of the MySQL mode and Oracle mode.
Modify variables
Global level
The
systenant can directly modify the value of a global system variable.A MySQL user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.An Oracle user tenant must have the
ALTER SYSTEMprivilege to modify the value of a global system variable.
Session level
The
systenant and all user tenants can directly modify the value of a session system variable.
Attributes
| Attribute | Description |
|---|---|
| Type | Varchar |
| Default value | READ-COMMITTED |
| Value range |
|
| Scope |
|
| Modifiable | Yes. You can execute the SET statement to modify the value. |
Examples
Set the transaction isolation level to READ-COMMITTED.
Session level
obclient> SET tx_isolation = 'READ-COMMITTED';Global level
obclient> SET GLOBAL tx_isolation = 'READ-COMMITTED';
References
For more information about transaction isolation levels, see Overview.