summaryrefslogtreecommitdiff
path: root/mysql-test/t/log_state.test
diff options
context:
space:
mode:
authorunknown <anozdrin/alik@quad.opbmk>2008-03-28 21:46:18 +0300
committerunknown <anozdrin/alik@quad.opbmk>2008-03-28 21:46:18 +0300
commitbae7b2672ea2f8f9273b32ee52d63a21b1a11aaf (patch)
treea7a7b9849eaa03a893a0af9fd51cb3f72ed17382 /mysql-test/t/log_state.test
parentfba9e7c878359b0808e0f656d72aceedf34f0f56 (diff)
downloadmariadb-git-bae7b2672ea2f8f9273b32ee52d63a21b1a11aaf.tar.gz
Fix for Bug#32748: Inconsistent handling of assignments to
general_log_file/slow_query_log_file. The problem was that log file path was rejected if directory path was empty. The fix is to reject log file path only if it is entirely empty. mysql-test/r/log_state.result: Update result file. mysql-test/t/log_state.test: A test case for Bug#32748: Inconsistent handling of assignments to general_log_file/slow_query_log_file. sql/set_var.cc: Accept file path if dirname is empty. Reject file path if it is empty.
Diffstat (limited to 'mysql-test/t/log_state.test')
-rw-r--r--mysql-test/t/log_state.test28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/t/log_state.test b/mysql-test/t/log_state.test
index a340238b724..2fd2cabc97c 100644
--- a/mysql-test/t/log_state.test
+++ b/mysql-test/t/log_state.test
@@ -231,6 +231,34 @@ set global slow_query_log_file= NULL;
set global general_log_file= @old_general_log_file;
set global slow_query_log_file= @old_slow_query_log_file;
+###########################################################################
+
+--echo
+--echo # --
+--echo # -- Bug#32748: Inconsistent handling of assignments to
+--echo # -- general_log_file/slow_query_log_file.
+--echo # --
+
+--echo
+SET @general_log_file_saved = @@global.general_log_file;
+SET @slow_query_log_file_saved = @@global.slow_query_log_file;
+
+--echo
+SET GLOBAL general_log_file = 'bug32748.query.log';
+SET GLOBAL slow_query_log_file = 'bug32748.slow.log';
+
+--echo
+SHOW VARIABLES LIKE '%log_file';
+
+--echo
+SET GLOBAL general_log_file = @general_log_file_saved;
+SET GLOBAL slow_query_log_file = @slow_query_log_file_saved;
+
+--echo
+--echo # -- End of Bug#32748.
+
+###########################################################################
+
--echo End of 5.1 tests
--enable_ps_protocol