From 7ce32c91ba07d9b53cacbca2beb6d64064624aaf Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 20 May 2008 22:23:58 +0400 Subject: [PATCH] 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. --- mysql-test/r/general_log_file_basic.result | 3 ++- mysql-test/r/log_output_basic.result | 7 +++++-- mysql-test/r/slow_query_log_file_basic.result | 3 ++- mysql-test/t/general_log_file_basic.test | 5 ++++- mysql-test/t/log_output_basic.test | 3 +++ mysql-test/t/slow_query_log_file_basic.test | 4 +++- tests/mysql_client_test.c | 1 - 7 files changed, 19 insertions(+), 7 deletions(-) diff --git a/mysql-test/r/general_log_file_basic.result b/mysql-test/r/general_log_file_basic.result index 0c1cb9b64f4..6847d92688e 100644 --- a/mysql-test/r/general_log_file_basic.result +++ b/mysql-test/r/general_log_file_basic.result @@ -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 diff --git a/mysql-test/r/log_output_basic.result b/mysql-test/r/log_output_basic.result index 2b0c2409c41..481d5862074 100644 --- a/mysql-test/r/log_output_basic.result +++ b/mysql-test/r/log_output_basic.result @@ -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 diff --git a/mysql-test/r/slow_query_log_file_basic.result b/mysql-test/r/slow_query_log_file_basic.result index e29fc7824ff..a62f3e21ef2 100644 --- a/mysql-test/r/slow_query_log_file_basic.result +++ b/mysql-test/r/slow_query_log_file_basic.result @@ -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 diff --git a/mysql-test/t/general_log_file_basic.test b/mysql-test/t/general_log_file_basic.test index 50fe89fd0ce..639e6619ef9 100644 --- a/mysql-test/t/general_log_file_basic.test +++ b/mysql-test/t/general_log_file_basic.test @@ -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------------------------#' ############################################################################## diff --git a/mysql-test/t/log_output_basic.test b/mysql-test/t/log_output_basic.test index 046b71900bd..45998e85480 100644 --- a/mysql-test/t/log_output_basic.test +++ b/mysql-test/t/log_output_basic.test @@ -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; diff --git a/mysql-test/t/slow_query_log_file_basic.test b/mysql-test/t/slow_query_log_file_basic.test index 80323fdac3e..2620cd5eabc 100644 --- a/mysql-test/t/slow_query_log_file_basic.test +++ b/mysql-test/t/slow_query_log_file_basic.test @@ -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------------------------#' ############################################################################## diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index cda7c75ba14..aafa22bdf7f 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -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");