summaryrefslogtreecommitdiff
path: root/mysql-test/r/log_state.result
diff options
context:
space:
mode:
authorunknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru>2007-10-16 17:19:07 +0500
committerunknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru>2007-10-16 17:19:07 +0500
commitfaf0f9fb21397a7270ce9072a87643d30eee7157 (patch)
tree245931429002eb1336d341e8027736e728753c78 /mysql-test/r/log_state.result
parent8b7ee0d67aa1d43b229b10b56c5a9362571c5802 (diff)
downloadmariadb-git-faf0f9fb21397a7270ce9072a87643d30eee7157.tar.gz
Fix bug #31604: server crash when setting slow_query_log_file/global general_log_file variable
Problem: we don't evaluate given expression checking values of the slow_query_log_file/general_log_file, don't check it for NULL. Fix: evaluate the expression, check result returned. mysql-test/r/log_state.result: Fix bug #31604: server crash when setting slow_query_log_file/global general_log_file variable - test result. mysql-test/t/log_state.test: Fix bug #31604: server crash when setting slow_query_log_file/global general_log_file variable - test case. sql/set_var.cc: Fix bug #31604: server crash when setting slow_query_log_file/global general_log_file variable - evaluate var->value calling val_str() method; - check for null values returned; - return proper errors if any.
Diffstat (limited to 'mysql-test/r/log_state.result')
-rw-r--r--mysql-test/r/log_state.result13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/log_state.result b/mysql-test/r/log_state.result
index 3a3ef584ce3..407d93cf321 100644
--- a/mysql-test/r/log_state.result
+++ b/mysql-test/r/log_state.result
@@ -175,3 +175,16 @@ SET GLOBAL slow_query_log = ON;
SET GLOBAL READ_ONLY = OFF;
SET GLOBAL general_log = @old_general_log_state;
SET GLOBAL slow_query_log = @old_slow_log_state;
+set @old_general_log_file= @@global.general_log_file;
+set @old_slow_query_log_file= @@global.slow_query_log_file;
+set global general_log_file= concat('/not exiting path/log.maste', 'r');
+ERROR 42000: Variable 'general_log_file' can't be set to the value of '/not exiting path/log.master'
+set global general_log_file= NULL;
+ERROR 42000: Variable 'general_log_file' can't be set to the value of 'NULL'
+set global slow_query_log_file= concat('/not exiting path/log.maste', 'r');
+ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of '/not exiting path/log.master'
+set global slow_query_log_file= NULL;
+ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of 'NULL'
+set global general_log_file= @old_general_log_file;
+set global slow_query_log_file= @old_slow_query_log_file;
+End of 5.1 tests