MySQL Variables session_track_system_variables 数据库 参数变量解释及正确配置使用
本站中文解释
MySQL参数变量session_track_system_variables用来指定在记录会话信息时,是否要记录系统变量值。该参数可以设置为off、read-only或者 read-write三个值:
off:表示禁用,即不记录系统变量值
read-only:表示只读,即只记录系统变量的只读值
read-write:表示可读写,即记录系统变量的可读写值
要设置session_track_system_variables变量,可以使用如下SQL语句:
set @@session.session_track_system_variables=value;
其中,value 可以为off、read_only或者read_write中的任意一个值。
官方英文解释
session_track_system_variables
Command-Line Format | --session-track-system-variables=# |
---|---|
System Variable | session_track_system_variables |
Scope | Global, Session |
Dynamic | Yes |
Type | String |
Default Value | time_zone, autocommit, character_set_client, character_set_results, character_set_connection |
Controls whether the server tracks assignments to session
system variables and notifies the client of the name and value
of each assigned variable. The variable value is a
comma-separated list of variables for which to track
assignments. By default, notification is enabled for
time_zone
,
autocommit
,
character_set_client
,
character_set_results
, and
character_set_connection
.
(The latter three variables are those affected by
SET NAMES
.)
The special value *
causes the server to
track assignments to all session variables. If given, this
value must be specified by itself without specific system
variable names.
To disable notification of session variable assignments, set
session_track_system_variables
to the empty string.
If session system variable tracking is enabled, notification
occurs for all assignments to tracked session variables, even
if the new values are the same as the old.
For more information about session state tracking, see
Section 5.1.15, “Server Tracking of Client Session State”.