Note
This variable was introduced in OceanBase Database V1.4.
Description
The wait_timeout variable specifies the number of seconds the server waits for activity before closing a noninteractive connection.
Privilege requirements
Query variables
- Global level
The sys tenant and all user tenants can execute the SHOW VARIABLES statement or view the SYS.TENANT_VIRTUAL_GLOBAL_VARIABLE view (in Oracle mode) or the information_schema.GLOBAL_VARIABLES view (in MySQL mode) to query the value of a global system variable.
* Session level
The sys tenant and all user tenants can execute the SHOW VARIABLES statement or view the SYS.TENANT_VIRTUAL_SESSION_VARIABLE view (in Oracle mode) or the information_schema.SESSION_VARIABLES view (in MySQL mode) to query the value of a session system variable.
Modify variables
Global level
The
systenant can directly modify the value of a global system variable.MySQL user tenants must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
For V4.x, Oracle user tenants must have the
ALTER SYSTEMprivilege to modify the value of a global system variable, starting from V4.2.0.- Session level
The sys tenant and all user tenants can directly modify the value of a session system variable in their own tenant.
Attributes
| Attribute | Description |
|---|---|
| Type | int |
| Default value | 28800 |
| Value range | [1, 31536000] |
| Effective scope |
| Modifiable | Yes. You can modify the value by using the SET statement.|
Considerations
The session wait_timeout value is initialized to the value of the global wait_timeout variable or the global interactive_timeout variable when the session is started, depending on the client type. The client type is defined by the CLIENT_INTERACTIVE option of the mysql_real_connect function. For more information about the interactive_timeout variable, see interactive_timeout.
Examples
Session level
obclient> SET wait_timeout = 28800;Global level
obclient> SET GLOBAL wait_timeout = 28800;
