1SET @start_value = @@global.slow_query_log; 2SELECT @start_value; 3@start_value 41 5'#---------------------FN_DYNVARS_004_01-------------------------#' 6SET @@global.slow_query_log = DEFAULT; 7SELECT @@global.slow_query_log = 0; 8@@global.slow_query_log = 0 91 10'#--------------------FN_DYNVARS_004_02------------------------#' 11SET @@global.slow_query_log = ON; 12SELECT @@global.slow_query_log; 13@@global.slow_query_log 141 15SET @@global.slow_query_log = OFF; 16SELECT @@global.slow_query_log; 17@@global.slow_query_log 180 19'#--------------------FN_DYNVARS_004_03-------------------------#' 20SET @@global.slow_query_log = 2; 21ERROR 42000: Variable 'slow_query_log' can't be set to the value of '2' 22SET @@global.slow_query_log = -1; 23ERROR 42000: Variable 'slow_query_log' can't be set to the value of '-1' 24SET @@global.slow_query_log = TRUEF; 25ERROR 42000: Variable 'slow_query_log' can't be set to the value of 'TRUEF' 26SET @@global.slow_query_log = TRUE_F; 27ERROR 42000: Variable 'slow_query_log' can't be set to the value of 'TRUE_F' 28SET @@global.slow_query_log = FALSE0; 29ERROR 42000: Variable 'slow_query_log' can't be set to the value of 'FALSE0' 30SET @@global.slow_query_log = OON; 31ERROR 42000: Variable 'slow_query_log' can't be set to the value of 'OON' 32SET @@global.slow_query_log = ONN; 33ERROR 42000: Variable 'slow_query_log' can't be set to the value of 'ONN' 34SET @@global.slow_query_log = OOFF; 35ERROR 42000: Variable 'slow_query_log' can't be set to the value of 'OOFF' 36SET @@global.slow_query_log = 0FF; 37ERROR 42000: Variable 'slow_query_log' can't be set to the value of '0FF' 38SET @@global.slow_query_log = ' '; 39ERROR 42000: Variable 'slow_query_log' can't be set to the value of ' ' 40SET @@global.slow_query_log = " "; 41ERROR 42000: Variable 'slow_query_log' can't be set to the value of ' ' 42SET @@global.slow_query_log = ''; 43ERROR 42000: Variable 'slow_query_log' can't be set to the value of '' 44'#-------------------FN_DYNVARS_004_04----------------------------#' 45SET @@session.slow_query_log = OFF; 46ERROR HY000: Variable 'slow_query_log' is a GLOBAL variable and should be set with SET GLOBAL 47SELECT @@session.slow_query_log; 48ERROR HY000: Variable 'slow_query_log' is a GLOBAL variable 49'#----------------------FN_DYNVARS_004_05------------------------#' 50SELECT IF(@@global.slow_query_log, "ON", "OFF") = VARIABLE_VALUE 51FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES 52WHERE VARIABLE_NAME='slow_query_log'; 53IF(@@global.slow_query_log, "ON", "OFF") = VARIABLE_VALUE 541 55'#---------------------FN_DYNVARS_004_06----------------------#' 56SET @@global.slow_query_log = 0; 57SELECT @@global.slow_query_log; 58@@global.slow_query_log 590 60SET @@global.slow_query_log = 1; 61SELECT @@global.slow_query_log; 62@@global.slow_query_log 631 64'#---------------------FN_DYNVARS_004_07----------------------#' 65SET @@global.slow_query_log = TRUE; 66SELECT @@global.slow_query_log; 67@@global.slow_query_log 681 69SET @@global.slow_query_log = FALSE; 70SELECT @@global.slow_query_log; 71@@global.slow_query_log 720 73'#---------------------FN_DYNVARS_004_08----------------------#' 74SET @@global.slow_query_log = ON; 75SELECT @@slow_query_log = @@global.slow_query_log; 76@@slow_query_log = @@global.slow_query_log 771 78'#---------------------FN_DYNVARS_004_09----------------------#' 79SET slow_query_log = ON; 80ERROR HY000: Variable 'slow_query_log' is a GLOBAL variable and should be set with SET GLOBAL 81SET local.slow_query_log = OFF; 82ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'local.slow_query_log = OFF' at line 1 83SELECT local.slow_query_log; 84ERROR 42S02: Unknown table 'local' in field list 85SET global.slow_query_log = ON; 86ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'global.slow_query_log = ON' at line 1 87SELECT global.slow_query_log; 88ERROR 42S02: Unknown table 'global' in field list 89SELECT slow_query_log = @@session.slow_query_log; 90ERROR 42S22: Unknown column 'slow_query_log' in 'field list' 91SET @@global.slow_query_log = @start_value; 92SELECT @@global.slow_query_log; 93@@global.slow_query_log 941 95