Note
This variable is available starting with V2.2.77.
Description
transaction_isolation specifies the transaction isolation level. It has the same functionality as the system variable tx_isolation. You can set either of them.
Privilege requirements
Query variables
Global level
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLEview (Oracle-compatible mode) or theinformation_schema.GLOBAL_VARIABLESview (MySQL-compatible mode) to obtain the values of global system variables.Session level
The
systenant and all user tenants can execute theSHOW VARIABLESstatement or query theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview (Oracle-compatible mode) or theinformation_schema.SESSION_VARIABLESview (MySQL-compatible mode) to obtain the values of session system variables.
Modify variables
Global level
The
systenant can directly modify the values of global system variables.MySQL user tenants must have the
SUPERorALTER SYSTEMprivilege to modify the values of global system variables.Oracle user tenants must have the
ALTER SYSTEMprivilege to modify the values of global system variables.
Session level
The
systenant and all user tenants can directly modify the values of session system variables in their own tenants.
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 transaction_isolation = 'READ-COMMITTED';Global level
obclient> SET GLOBAL transaction_isolation = 'READ-COMMITTED';
References
For more information about transaction isolation levels, see Overview.