Note
This variable is available starting with in V2.2.77.
Description
transaction_isolation is used to set the transaction isolation level. It works the same as the system variable tx_isolation. Setting either one is sufficient.
Privilege requirements
Query variables
Global level
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (in Oracle-compatible mode) or theinformation_schema.GLOBAL_VARIABLESview (in MySQL-compatible mode) to query the value of a global system variable.Session level
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (in Oracle-compatible mode) or theinformation_schema.SESSION_VARIABLESview (in MySQL-compatible mode) to query the value of a session variable.
Modify variables
Global level
The
systenant can directly modify the value of a global system variable.MySQL-compatible tenants must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.Oracle-compatible tenants must have the
ALTER SYSTEMprivilege to modify the value of a global system variable.
Session variables
The
systenant and all user tenants can directly modify the value of a session system variable in their respective tenant.
Attributes
| Attribute | Description |
|---|---|
| Parameter type | Varchar |
| Default value | READ-COMMITTED |
| Valid values |
|
| Effective scope |
|
| Modifiable | Yes. You can modify this variable by using the SET statement. |
Examples
Set the isolation level of a transaction to READ-COMMITTED.
Session level
obclient> SET transaction_isolation = 'READ-COMMITTED';Global level
obclient> SET GLOBAL transaction_isolation = 'READ-COMMITTED';
References
For more information about transaction isolation levels, see Overview of transaction isolation levels.