mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
MDEV-11825: Make session variables TRACKING enabled by default
This commit is contained in:
parent
ebe47c3442
commit
f89a5c9a25
4 changed files with 20 additions and 26 deletions
mysql-test
r
suite/sys_vars/r
sql
|
@ -937,11 +937,7 @@ The following options may be given as the first argument:
|
|||
--session-track-state-change
|
||||
Track changes to the session state.
|
||||
--session-track-system-variables=name
|
||||
Track changes in registered system variables. For
|
||||
compatibility with MySQL defaults this variable should be
|
||||
set to "autocommit, character_set_client,
|
||||
character_set_connection, character_set_results,
|
||||
time_zone"
|
||||
Track changes in registered system variables.
|
||||
--session-track-transaction-info=name
|
||||
Track changes to the transaction attributes. OFF to
|
||||
disable; STATE to track just transaction state (Is there
|
||||
|
@ -1457,7 +1453,7 @@ secure-file-priv (No default value)
|
|||
server-id 1
|
||||
session-track-schema TRUE
|
||||
session-track-state-change FALSE
|
||||
session-track-system-variables
|
||||
session-track-system-variables autocommit,character_set_client,character_set_connection,character_set_results,time_zone
|
||||
session-track-transaction-info OFF
|
||||
show-slave-auth-info FALSE
|
||||
silent-startup FALSE
|
||||
|
|
|
@ -5,25 +5,25 @@
|
|||
# Global - default
|
||||
SELECT @@global.session_track_system_variables;
|
||||
@@global.session_track_system_variables
|
||||
|
||||
autocommit,character_set_client,character_set_connection,character_set_results,time_zone
|
||||
# Session - default
|
||||
SELECT @@session.session_track_system_variables;
|
||||
@@session.session_track_system_variables
|
||||
|
||||
autocommit,character_set_client,character_set_connection,character_set_results,time_zone
|
||||
|
||||
# via INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'session_track%' ORDER BY VARIABLE_NAME;
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
SESSION_TRACK_SCHEMA ON
|
||||
SESSION_TRACK_STATE_CHANGE OFF
|
||||
SESSION_TRACK_SYSTEM_VARIABLES
|
||||
SESSION_TRACK_SYSTEM_VARIABLES autocommit,character_set_client,character_set_connection,character_set_results,time_zone
|
||||
SESSION_TRACK_TRANSACTION_INFO OFF
|
||||
# via INFORMATION_SCHEMA.SESSION_VARIABLES
|
||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'session_track%' ORDER BY VARIABLE_NAME;
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
SESSION_TRACK_SCHEMA ON
|
||||
SESSION_TRACK_STATE_CHANGE OFF
|
||||
SESSION_TRACK_SYSTEM_VARIABLES
|
||||
SESSION_TRACK_SYSTEM_VARIABLES autocommit,character_set_client,character_set_connection,character_set_results,time_zone
|
||||
SESSION_TRACK_TRANSACTION_INFO OFF
|
||||
SET @global_saved_tmp = @@global.session_track_system_variables;
|
||||
|
||||
|
@ -34,7 +34,7 @@ SELECT @@global.session_track_system_variables;
|
|||
autocommit
|
||||
SELECT @@session.session_track_system_variables;
|
||||
@@session.session_track_system_variables
|
||||
|
||||
autocommit,character_set_client,character_set_connection,character_set_results,time_zone
|
||||
|
||||
# Altering session variable's value
|
||||
SET @@session.session_track_system_variables='autocommit';
|
||||
|
@ -72,25 +72,25 @@ SET @@session.session_track_system_variables = DEFAULT;
|
|||
|
||||
SELECT @@global.session_track_system_variables;
|
||||
@@global.session_track_system_variables
|
||||
|
||||
autocommit,character_set_client,character_set_connection,character_set_results,time_zone
|
||||
SELECT @@session.session_track_system_variables;
|
||||
@@session.session_track_system_variables
|
||||
|
||||
autocommit,character_set_client,character_set_connection,character_set_results,time_zone
|
||||
|
||||
# Variables' values in a new session (con2).
|
||||
connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,;
|
||||
SELECT @@global.session_track_system_variables;
|
||||
@@global.session_track_system_variables
|
||||
|
||||
autocommit,character_set_client,character_set_connection,character_set_results,time_zone
|
||||
SELECT @@session.session_track_system_variables;
|
||||
@@session.session_track_system_variables
|
||||
|
||||
autocommit,character_set_client,character_set_connection,character_set_results,time_zone
|
||||
|
||||
# Altering session should not affect global.
|
||||
SET @@session.session_track_system_variables = 'sql_mode';
|
||||
SELECT @@global.session_track_system_variables;
|
||||
@@global.session_track_system_variables
|
||||
|
||||
autocommit,character_set_client,character_set_connection,character_set_results,time_zone
|
||||
SELECT @@session.session_track_system_variables;
|
||||
@@session.session_track_system_variables
|
||||
sql_mode
|
||||
|
@ -104,7 +104,7 @@ SELECT @@global.session_track_system_variables;
|
|||
sql_mode
|
||||
SELECT @@session.session_track_system_variables;
|
||||
@@session.session_track_system_variables
|
||||
|
||||
autocommit,character_set_client,character_set_connection,character_set_results,time_zone
|
||||
|
||||
# Switching to the default connection.
|
||||
connection default;
|
||||
|
|
|
@ -3930,13 +3930,13 @@ ENUM_VALUE_LIST OFF,ON
|
|||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME SESSION_TRACK_SYSTEM_VARIABLES
|
||||
SESSION_VALUE
|
||||
GLOBAL_VALUE
|
||||
SESSION_VALUE autocommit,character_set_client,character_set_connection,character_set_results,time_zone
|
||||
GLOBAL_VALUE autocommit,character_set_client,character_set_connection,character_set_results,time_zone
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE
|
||||
DEFAULT_VALUE autocommit,character_set_client,character_set_connection,character_set_results,time_zone
|
||||
VARIABLE_SCOPE SESSION
|
||||
VARIABLE_TYPE VARCHAR
|
||||
VARIABLE_COMMENT Track changes in registered system variables. For compatibility with MySQL defaults this variable should be set to "autocommit, character_set_client, character_set_connection, character_set_results, time_zone"
|
||||
VARIABLE_COMMENT Track changes in registered system variables.
|
||||
NUMERIC_MIN_VALUE NULL
|
||||
NUMERIC_MAX_VALUE NULL
|
||||
NUMERIC_BLOCK_SIZE NULL
|
||||
|
|
|
@ -5472,12 +5472,10 @@ static Sys_var_ulonglong Sys_max_thread_mem(
|
|||
|
||||
static Sys_var_sesvartrack Sys_track_session_sys_vars(
|
||||
"session_track_system_variables",
|
||||
"Track changes in registered system variables. "
|
||||
"For compatibility with MySQL defaults this variable should be set to "
|
||||
"\"autocommit, character_set_client, character_set_connection, "
|
||||
"character_set_results, time_zone\"",
|
||||
"Track changes in registered system variables. ",
|
||||
CMD_LINE(REQUIRED_ARG), IN_SYSTEM_CHARSET,
|
||||
DEFAULT(""),
|
||||
DEFAULT("autocommit,character_set_client,character_set_connection,"
|
||||
"character_set_results,time_zone"),
|
||||
NO_MUTEX_GUARD);
|
||||
|
||||
static bool update_session_track_schema(sys_var *self, THD *thd,
|
||||
|
|
Loading…
Add table
Reference in a new issue