Description
The tx_isolation variable sets the transaction isolation level. It has the same effect as the transaction_isolation system variable, and setting either is sufficient.
Privilege requirements
Query variables
Global level
systenants and all user tenants can use theSHOW VARIABLESstatement or theSYS.TENANT_VIRTUAL_GLOBAL_VARIABLE(Oracle-compatible mode) andinformation_schema.GLOBAL_VARIABLES(MySQL-compatible mode) views to view the values of global system variables.Session level
The
systenant and all user tenants can query session system variables by using theSHOW VARIABLESstatement or by querying theSYS.TENANT_VIRTUAL_SESSION_VARIABLEview in Oracle mode or theinformation_schema.SESSION_VARIABLESview in MySQL mode.
Modify variables
Global level
The
systenant can directly change the value of a global system variable.A MySQL user tenant must have the
SUPERorALTER SYSTEMpermission to change the value of a global system variable.In V4.x from V4.2.0, Oracle user tenants must have the
ALTER SYSTEMprivilege to modify the value of global system variables.
Session level
The
systenant and all user tenants can directly modify the values of system variables in their own tenant sessions.
Attributes
| Attribute | Description |
|---|---|
| Parameter Type | Varchar |
| Default value | READ-COMMITTED |
| Value |
|
| 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 the transaction isolation levels, see Overview.