Overview
session_track_state_change specifies whether to include information about session state changes in the returned OK packet.
Note
This variable is supported only in MySQL-compatible mode.
Privilege requirements
Query variables
Global level
The
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.GLOBAL_VARIABLESview (in MySQL-compatible mode) to view the values of global system variables.Session level
The
systenant and all user tenants can use theSHOW VARIABLESstatement or theinformation_schema.SESSION_VARIABLESview (in MySQL-compatible mode) to view the values of session system variables.
Modify variables
Set the variable at the 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.
Set the variable at the session level
The
systenant and all user tenants can directly modify the values of session system variables for their own tenants.
Attributes
Attribute |
Description |
|---|---|
| Type | bool |
| Default value | 0 |
| Value range |
|
| Applicable scope |
|
| Modifiable | Yes. You can modify it by using the SET statement. |
Configuration example
Set the returned OK packet to include information about session status changes.
Set the variable at the session level
obclient> SET session_track_state_change = 1;Effective globally
obclient> SET GLOBAL session_track_state_change = 1;
