diff options
author | Alexander Nozdrin <alik@sun.com> | 2009-11-05 15:08:37 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2009-11-05 15:08:37 +0300 |
commit | d476bbb0becb27d7d3cb1fc5cc0ac4d401622893 (patch) | |
tree | 64caab6e7d4a7167ee56b4f7d6572bb07c30750a /mysql-test/t/log_state.test | |
parent | 1a8f08b006616b0bb2a9e9e13969ebe406e9e3f2 (diff) | |
parent | 16b603a8b0c2bba16cb66b1769f21c0185435d33 (diff) | |
download | mariadb-git-d476bbb0becb27d7d3cb1fc5cc0ac4d401622893.tar.gz |
Auto-merge from mysql-next-mr.
Diffstat (limited to 'mysql-test/t/log_state.test')
-rw-r--r-- | mysql-test/t/log_state.test | 97 |
1 files changed, 36 insertions, 61 deletions
diff --git a/mysql-test/t/log_state.test b/mysql-test/t/log_state.test index e40dd1e3491..4d8c8fc6e74 100644 --- a/mysql-test/t/log_state.test +++ b/mysql-test/t/log_state.test @@ -1,16 +1,5 @@ ### t/log_state.test ### # -# This test suffers from server -# Bug#38124 "general_log_file" variable silently unset when using expression -# In short: -# SET GLOBAL general_log_file = @<whatever> -# SET GLOBAL slow_query_log = @<whatever> -# cause that the value of these server system variables is set to default -# instead of the assigned values. There comes no error message or warning. -# If this bug is fixed please -# 1. try this test with "let $fixed_bug38124 = 0;" -# 2. remove all workarounds if 1. was successful. -let $fixed_bug38124 = 0; --source include/not_embedded.inc --source include/have_csv.inc @@ -166,16 +155,6 @@ SET @@global.general_log = @old_general_log; SET @@global.general_log_file = @old_general_log_file; SET @@global.slow_query_log = @old_slow_query_log; SET @@global.slow_query_log_file = @old_slow_query_log_file; -if(!$fixed_bug38124) -{ - --disable_query_log - let $my_var = `SELECT @old_general_log_file`; - eval SET @@global.general_log_file = '$my_var'; - let $my_var = `SELECT @old_slow_query_log_file`; - eval SET @@global.slow_query_log_file = '$my_var'; - --enable_query_log -} - ########################################################################### @@ -278,15 +257,6 @@ SET GLOBAL slow_query_log_file= NULL; # Reset to initial values in case a setting above was successful. SET GLOBAL general_log_file= @old_general_log_file; SET GLOBAL slow_query_log_file= @old_slow_query_log_file; -if(!$fixed_bug38124) -{ - --disable_query_log - let $my_var = `SELECT @old_general_log_file`; - eval SET @@global.general_log_file = '$my_var'; - let $my_var = `SELECT @old_slow_query_log_file`; - eval SET @@global.slow_query_log_file = '$my_var'; - --enable_query_log -} ########################################################################### @@ -307,15 +277,6 @@ SHOW VARIABLES LIKE '%log_file'; --echo SET GLOBAL general_log_file = @old_general_log_file; SET GLOBAL slow_query_log_file = @old_slow_query_log_file; -if(!$fixed_bug38124) -{ - --disable_query_log - let $my_var = `SELECT @old_general_log_file`; - eval SET @@global.general_log_file = '$my_var'; - let $my_var = `SELECT @old_slow_query_log_file`; - eval SET @@global.slow_query_log_file = '$my_var'; - --enable_query_log -} --echo --echo # -- End of Bug#32748. @@ -351,19 +312,43 @@ SET @@global.general_log = @old_general_log; SET @@global.general_log_file = @old_general_log_file; SET @@global.slow_query_log = @old_slow_query_log; SET @@global.slow_query_log_file = @old_slow_query_log_file; -if(!$fixed_bug38124) -{ - --disable_query_log - let $my_var = `SELECT @old_general_log_file`; - eval SET @@global.general_log_file = '$my_var'; - let $my_var = `SELECT @old_slow_query_log_file`; - eval SET @@global.slow_query_log_file = '$my_var'; - --enable_query_log -} - --echo End of 5.1 tests + +########################################################################### + +--echo +--echo # -- +--echo # -- Bug#38124: "general_log_file" variable silently unset when +--echo # -- using expression +--echo # -- + +# Store away the special DEFAULT value so we +# can compare it later, then try to set the +# general_log_file using different functions +# and expressions. + +SET GLOBAL general_log_file = DEFAULT; +SELECT @@general_log_file INTO @my_glf; + +SET GLOBAL general_log_file = 'BUG38124.LOG'; +SELECT @@general_log_file; + +SET GLOBAL general_log_file = concat('BUG38124-2.LOG'); +SELECT @@general_log_file; + +SET GLOBAL general_log_file = substr('BUG38124-2.LOG',3,6); +SELECT @@general_log_file; + +SET GLOBAL general_log_file = DEFAULT; +SELECT @@general_log_file = @my_glf; + + +## Reset to initial values +SET GLOBAL general_log_file = @old_general_log_file; + + --enable_ps_protocol # @@ -380,17 +365,7 @@ SET global general_log = @old_general_log; SET global general_log_file = @old_general_log_file; SET global slow_query_log = @old_slow_query_log; SET global slow_query_log_file = @old_slow_query_log_file; -if(!$fixed_bug38124) -{ - --disable_query_log - let $my_var = `SELECT @old_general_log_file`; - eval SET @@global.general_log_file = '$my_var'; - let $my_var = `SELECT @old_slow_query_log_file`; - eval SET @@global.slow_query_log_file = '$my_var'; - --enable_query_log -} - -# Remove the log files that was created in the "default location" + +# Remove the log file that was created in the "default location" # i.e var/run ---remove_file $MYSQLTEST_VARDIR/run/mysqld.log --remove_file $MYSQLTEST_VARDIR/tmp/log.master |