summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorTatiana A. Nurnberg <azundris@mysql.com>2008-10-06 16:22:07 +0200
committerTatiana A. Nurnberg <azundris@mysql.com>2008-10-06 16:22:07 +0200
commit980f04e0c60e994e63863435d91564935c84de73 (patch)
tree503286e11632ec75f3e2395bdc945ecb2e7f9d7a /mysql-test/t
parenteb656b216468c2739f22f1df0f828054ea6bf1cd (diff)
parent07953513edc3e5956d485bec0e6067f5e864a7db (diff)
downloadmariadb-git-980f04e0c60e994e63863435d91564935c84de73.tar.gz
WL#4403 deprecate @log and @slow_log_queries variables
Adds --general-log-file, --slow-query-log-file command- line options to match system variables of the same names. Deprecates --log, --log-slow-queries command-line option and log, log_slow_queries system-variables for v7.0; they are superseded by general_log/general_log_file and slow_query_log/slow_query_log_file, respectively. mysql-test/r/log_basic.result: Change deprecated system variable "log" to general log. mysql-test/r/log_bin_trust_routine_creators_basic.result: Change deprecation warning so it's more obvious we're referring to a variable. mysql-test/r/log_state.result: Show that all log-related server variables that should throw deprecation warnings do, and the others don't. mysql-test/r/warnings.result: Change deprecation warning so it's more obvious we're referring to a variable. mysql-test/suite/rpl/r/rpl_sp.result: Change deprecation warning so it's more obvious we're referring to a variable. mysql-test/t/log_basic.test: Change deprecated system variable "log" to general log. mysql-test/t/log_state.test: Show that all log-related server variables that should throw deprecation warnings do, and the others don't. sql/mysqld.cc: Add command-line options --general-log-file and --slow-query-log-file to match server options of the same name. Deprecated --log and --log-slow-queries command-line options; they are superseded by --general-log/ --general-log-file and --slow-query-log/--slow-query-log-file, respectively sql/set_var.cc: Deprecate system-variables log in favour of general_log, log_slow_queries in favour of slow_query_log for 7.0, both for value- and DEFAULT-setting.
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/log_basic.test4
-rw-r--r--mysql-test/t/log_state.test26
2 files changed, 28 insertions, 2 deletions
diff --git a/mysql-test/t/log_basic.test b/mysql-test/t/log_basic.test
index 16d7a4bfe7f..b9a64f8981b 100644
--- a/mysql-test/t/log_basic.test
+++ b/mysql-test/t/log_basic.test
@@ -38,9 +38,9 @@ SELECT @@global.log AS INIT_VALUE;
SELECT @@log AS INIT_VALUE;
-SET @@global.log = ON;
+SET @@global.general_log = ON;
-SET global log = 0;
+SET global general_log = 0;
--echo 'Bug# 34832: log is a system but it is not accessible using SET @@global.log;'
--echo 'SET GLOBAL log; and SELECT @@global.log. SHOW VARIABLES shows the value of log.'
diff --git a/mysql-test/t/log_state.test b/mysql-test/t/log_state.test
index 2fd2cabc97c..977b74aa1e3 100644
--- a/mysql-test/t/log_state.test
+++ b/mysql-test/t/log_state.test
@@ -259,6 +259,32 @@ SET GLOBAL slow_query_log_file = @slow_query_log_file_saved;
###########################################################################
+
+
+## WL#4403 - deprecate @log and @slow_log_queries variables
+
+## these are all deprecated -- show for command-line as well!
+--echo deprecated:
+SET GLOBAL log = 0;
+SET GLOBAL log_slow_queries = 0;
+SET GLOBAL log = DEFAULT;
+SET GLOBAL log_slow_queries = DEFAULT;
+
+## these are NOT deprecated
+--echo not deprecated:
+SELECT @@global.general_log_file INTO @my_glf;
+SELECT @@global.slow_query_log_file INTO @my_sqlf;
+SET GLOBAL general_log = 0;
+SET GLOBAL slow_query_log = 0;
+SET GLOBAL general_log_file = 'WL4403_G.log';
+SET GLOBAL slow_query_log_file = 'WL4403_SQ.log';
+SET GLOBAL general_log_file = @my_glf;
+SET GLOBAL slow_query_log_file = @my_sqlf;
+SET GLOBAL general_log = DEFAULT;
+SET GLOBAL slow_query_log = DEFAULT;
+
+
+
--echo End of 5.1 tests
--enable_ps_protocol