mirror of
https://github.com/MariaDB/server.git
synced 2025-05-07 04:01:59 +03:00
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
101 lines
4.0 KiB
Plaintext
101 lines
4.0 KiB
Plaintext
SET @start_value = @@global.slow_query_log;
|
|
SELECT @start_value;
|
|
@start_value
|
|
1
|
|
'#---------------------FN_DYNVARS_004_01-------------------------#'
|
|
SET @@global.slow_query_log = DEFAULT;
|
|
SELECT @@global.slow_query_log = 0;
|
|
@@global.slow_query_log = 0
|
|
1
|
|
'#--------------------FN_DYNVARS_004_02------------------------#'
|
|
SET @@global.slow_query_log = ON;
|
|
SELECT @@global.slow_query_log;
|
|
@@global.slow_query_log
|
|
1
|
|
SET @@global.slow_query_log = OFF;
|
|
SELECT @@global.slow_query_log;
|
|
@@global.slow_query_log
|
|
0
|
|
'#--------------------FN_DYNVARS_004_03-------------------------#'
|
|
SET @@global.slow_query_log = 2;
|
|
ERROR 42000: Variable 'slow_query_log' can't be set to the value of '2'
|
|
SET @@global.slow_query_log = -1;
|
|
ERROR 42000: Variable 'slow_query_log' can't be set to the value of '-1'
|
|
SET @@global.slow_query_log = TRUEF;
|
|
ERROR 42000: Variable 'slow_query_log' can't be set to the value of 'TRUEF'
|
|
SET @@global.slow_query_log = TRUE_F;
|
|
ERROR 42000: Variable 'slow_query_log' can't be set to the value of 'TRUE_F'
|
|
SET @@global.slow_query_log = FALSE0;
|
|
ERROR 42000: Variable 'slow_query_log' can't be set to the value of 'FALSE0'
|
|
SET @@global.slow_query_log = OON;
|
|
ERROR 42000: Variable 'slow_query_log' can't be set to the value of 'OON'
|
|
SET @@global.slow_query_log = ONN;
|
|
ERROR 42000: Variable 'slow_query_log' can't be set to the value of 'ONN'
|
|
SET @@global.slow_query_log = OOFF;
|
|
ERROR 42000: Variable 'slow_query_log' can't be set to the value of 'OOFF'
|
|
SET @@global.slow_query_log = 0FF;
|
|
ERROR 42000: Variable 'slow_query_log' can't be set to the value of '0FF'
|
|
SET @@global.slow_query_log = ' ';
|
|
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 ' '
|
|
SET @@global.slow_query_log = '';
|
|
ERROR 42000: Variable 'slow_query_log' can't be set to the value of ''
|
|
'#-------------------FN_DYNVARS_004_04----------------------------#'
|
|
SET @@global.slow_query_log = ON;
|
|
SET @@session.slow_query_log = ON;
|
|
SELECT @@session.slow_query_log;
|
|
@@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
|
|
WHERE VARIABLE_NAME='slow_query_log';
|
|
IF(@@global.slow_query_log, "ON", "OFF") = VARIABLE_VALUE
|
|
1
|
|
'#---------------------FN_DYNVARS_004_06----------------------#'
|
|
SET @@global.slow_query_log = 0;
|
|
SELECT @@global.slow_query_log;
|
|
@@global.slow_query_log
|
|
0
|
|
SET @@global.slow_query_log = 1;
|
|
SELECT @@global.slow_query_log;
|
|
@@global.slow_query_log
|
|
1
|
|
'#---------------------FN_DYNVARS_004_07----------------------#'
|
|
SET @@global.slow_query_log = TRUE;
|
|
SELECT @@global.slow_query_log;
|
|
@@global.slow_query_log
|
|
1
|
|
SET @@global.slow_query_log = FALSE;
|
|
SELECT @@global.slow_query_log;
|
|
@@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
|
|
0
|
|
'#---------------------FN_DYNVARS_004_09----------------------#'
|
|
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;
|
|
ERROR 42S02: Unknown table 'local' in field list
|
|
SET global.slow_query_log = ON;
|
|
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 = ON' at line 1
|
|
SELECT global.slow_query_log;
|
|
ERROR 42S02: Unknown table 'global' in field list
|
|
SELECT slow_query_log = @@session.slow_query_log;
|
|
ERROR 42S22: Unknown column 'slow_query_log' in 'field list'
|
|
SET @@global.slow_query_log = @start_value;
|
|
SELECT @@global.slow_query_log;
|
|
@@global.slow_query_log
|
|
1
|