mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Made sql_log_slow a session variable
mysqldump: - Added --log-queries to allow one to disable logging for the dump sql/log_event.cc: - Removed setting of enable_slow_log as it's not required anymore. sql/sql_parse.cc: - Set enable_slow_log to value of thd->variables.sql_log_slow as this will speed up tests if slow log is disabled. - opt_log_slow_admin_statements can now only disable slow log, not enable it. sql/sql_explain.cc: - Minor cleanup Other things: - Added sql_log_slow to system variables. - Changed opt_slow_log to global_system_variables.sql_log_slow in all files - Updated tests to reflect changes
This commit is contained in:
@ -42,10 +42,17 @@ ERROR 42000: Variable 'slow_query_log' can't be set to the value of ' '
|
||||
SET @@global.slow_query_log = '';
|
||||
ERROR 42000: Variable 'slow_query_log' can't be set to the value of ''
|
||||
'#-------------------FN_DYNVARS_004_04----------------------------#'
|
||||
SET @@session.slow_query_log = OFF;
|
||||
ERROR HY000: Variable 'slow_query_log' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SET @@global.slow_query_log = ON;
|
||||
SET @@session.slow_query_log = ON;
|
||||
SELECT @@session.slow_query_log;
|
||||
ERROR HY000: Variable 'slow_query_log' is a GLOBAL variable
|
||||
@@session.slow_query_log
|
||||
1
|
||||
SET @@session.slow_query_log = OFF;
|
||||
SELECT @@session.slow_query_log;
|
||||
@@session.slow_query_log
|
||||
0
|
||||
SET @@global.slow_query_log = OFF;
|
||||
SET @@session.slow_query_log = ON;
|
||||
'#----------------------FN_DYNVARS_004_05------------------------#'
|
||||
SELECT IF(@@global.slow_query_log, "ON", "OFF") = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
@ -72,12 +79,11 @@ SELECT @@global.slow_query_log;
|
||||
0
|
||||
'#---------------------FN_DYNVARS_004_08----------------------#'
|
||||
SET @@global.slow_query_log = ON;
|
||||
SET @@local.slow_query_log = OFF;
|
||||
SELECT @@slow_query_log = @@global.slow_query_log;
|
||||
@@slow_query_log = @@global.slow_query_log
|
||||
1
|
||||
0
|
||||
'#---------------------FN_DYNVARS_004_09----------------------#'
|
||||
SET slow_query_log = ON;
|
||||
ERROR HY000: Variable 'slow_query_log' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SET local.slow_query_log = OFF;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'slow_query_log = OFF' at line 1
|
||||
SELECT local.slow_query_log;
|
||||
|
Reference in New Issue
Block a user