Note
This variable was introduced in OceanBase Database V2.2.77.
Description
ob_trx_lock_timeout specifies the lock wait timeout period for transactions.
Privilege requirements
Query variables
Global level
In both Oracle and MySQL modes, the
systenant and all user tenants can query the value of a global system variable by executing theSHOW VARIABLESstatement or querying the viewsSYS.TENANT_VIRTUAL_GLOBAL_VARIABLE(for Oracle mode) andinformation_schema.GLOBAL_VARIABLES(for MySQL mode).Session level
The
systenant and all user tenants can use theSHOW VARIABLESstatement or viewSYS.TENANT_VIRTUAL_SESSION_VARIABLE(Oracle mode) or viewinformation_schema.SESSION_VARIABLES(MySQL mode) to view the values of session system variables.
Modify variables
Global level
The
systenant can directly change the values of Global system variables.A MySQL user tenant needs the
SUPERorALTER SYSTEMprivilege to change the value of a global system variable.An Oracle user tenant needs the
ALTER SYSTEMprivilege to change the value of global system variables.
Session level
The
systenant and each user tenant can directly modify values of the Session system variables of the tenant.
Attributes
| Attribute | Description |
|---|---|
| Parameter type | Int |
| Default value | -1, in μs, which indicates that the setting does not take effect. |
| Value range | [0, +∞)
NoteThe value |
| Effective scope | |
| Modifiable | Yes. You can use the SET statement to modify the variable. |
Examples
Set the transaction wait timeout to 3000 microseconds.
Session-level operation
obclient> SET ob_trx_lock_timeout = 3000;Global-level operation
obclient> SET GLOBAL ob_trx_lock_timeout = 3000;