Commit 87a75bdf authored by kostja@bodhi.(none)'s avatar kostja@bodhi.(none)
Browse files

A number of fixes after a merge from the main 5.1 tree:

the local tree contains a fix for 
Bug#32748 "Inconsistent handling of assignments to 
general_log_file/slow_query_log_file",
which changes output of a number of tests.
parent a7464118
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -9,7 +9,8 @@ log_file
master.log
'#--------------------FN_DYNVARS_004_02------------------------#'
SET @@global.general_log_file = mytest.log;
ERROR 42000: Variable 'general_log_file' can't be set to the value of 'log'
SET @@global.general_log_file = 12;
ERROR 42000: Incorrect argument type to variable 'general_log_file'
'#----------------------FN_DYNVARS_004_03------------------------#'
SELECT @@global.general_log_file = VARIABLE_VALUE 
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES 
+5 −2
Original line number Diff line number Diff line
@@ -15,9 +15,10 @@ FILE
SET @@global.log_output = NULL;
ERROR 42000: Variable 'log_output' can't be set to the value of 'NULL'
SET @@global.log_output = "";
ERROR 42000: Variable 'log_output' can't be set to the value of ''
SELECT @@global.log_output;
@@global.log_output

FILE
'Bug# 34838: Empty value is allowed where as it is not specified in';
'documentation';
'#--------------------FN_DYNVARS_065_03------------------------#'
@@ -117,6 +118,7 @@ WHERE VARIABLE_NAME='log_output';
1
'#---------------------FN_DYNVARS_065_07-------------------------#'
SET @@global.log_output = 0;
ERROR 42000: Variable 'log_output' can't be set to the value of '0'
SELECT @@global.log_output;
@@global.log_output

@@ -156,9 +158,10 @@ SELECT @@global.log_output;
@@global.log_output
NONE
SET @@global.log_output = FALSE;
ERROR 42000: Variable 'log_output' can't be set to the value of '0'
SELECT @@global.log_output;
@@global.log_output

NONE
'#---------------------FN_DYNVARS_065_09----------------------#'
SET log_output = ON;
ERROR HY000: Variable 'log_output' is a GLOBAL variable and should be set with SET GLOBAL
+2 −1
Original line number Diff line number Diff line
@@ -9,7 +9,8 @@ RIGHT(@@global.slow_query_log_file,15)
master-slow.log
'#--------------------FN_DYNVARS_004_02------------------------#'
SET @@global.slow_query_log_file = mytest.log;
ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of 'log'
SET @@global.slow_query_log_file = 12;
ERROR 42000: Incorrect argument type to variable 'slow_query_log_file'
'#----------------------FN_DYNVARS_004_03------------------------#'
SELECT @@global.slow_query_log_file = VARIABLE_VALUE 
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES 
+4 −1
Original line number Diff line number Diff line
@@ -52,8 +52,11 @@ SELECT RIGHT(@@global.general_log_file,10) AS log_file;
#        Change the value of general_log_file to a invalid value      #
#######################################################################

--Error ER_WRONG_VALUE_FOR_VAR
# Assumed text if no quotes or numbers.
SET @@global.general_log_file = mytest.log;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.general_log_file = 12;


--echo '#----------------------FN_DYNVARS_004_03------------------------#'
############################################################################## 
+3 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ SELECT @@global.log_output;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.log_output = NULL;

--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.log_output = "";
SELECT @@global.log_output;
--echo 'Bug# 34838: Empty value is allowed where as it is not specified in';
@@ -171,6 +172,7 @@ WHERE VARIABLE_NAME='log_output';
################################################################### 

# test if variable accepts 0,1,2
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.log_output = 0;
SELECT @@global.log_output;

@@ -206,6 +208,7 @@ SET @@global.log_output = 8;

SET @@global.log_output = TRUE;
SELECT @@global.log_output;
--Error ER_WRONG_VALUE_FOR_VAR
SET @@global.log_output = FALSE;
SELECT @@global.log_output;

Loading