Commit 7ce32c91 authored by unknown's avatar unknown

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.


mysql-test/r/general_log_file_basic.result:
  Update results (Bug#32748)
mysql-test/r/log_output_basic.result:
  Update the test with results of the fix for Bug#32748
mysql-test/r/slow_query_log_file_basic.result:
  Update the test with results of the fix for Bug#32748
mysql-test/t/general_log_file_basic.test:
  Adjust to take into account the fix for Bug#32748 
  (a port from 6.0-bugteam)
mysql-test/t/log_output_basic.test:
  Adjust to take into account the fix for Bug#32748 
  (a port from 6.0-bugteam)
mysql-test/t/slow_query_log_file_basic.test:
  Adjust to take into account the fix for Bug#32748 
  (a port from 6.0-bugteam)
tests/mysql_client_test.c:
  Fix a compilation warning.
parent 3587539f
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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------------------------#'
##############################################################################
......
......@@ -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;
......
......@@ -52,8 +52,10 @@ SELECT RIGHT(@@global.slow_query_log_file,15);
# Change the value of slow_query_log_file to a invalid value #
#######################################################################
--Error ER_WRONG_VALUE_FOR_VAR
# Assumed text if no quotes or numbers.
SET @@global.slow_query_log_file = mytest.log;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.slow_query_log_file = 12;
--echo '#----------------------FN_DYNVARS_004_03------------------------#'
##############################################################################
......
......@@ -17511,7 +17511,6 @@ static void test_wl4166_2()
MYSQL_TIME d_date;
MYSQL_BIND bind_out[2];
int rc;
int i;
myheader("test_wl4166_2");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment