Commit 1ad9d235 authored by Tatiana A. Nurnberg's avatar Tatiana A. Nurnberg
Browse files

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.
parents 0b097b77 c1ed70d3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5,8 +5,8 @@ INIT_VALUE
SELECT @@log AS INIT_VALUE;
INIT_VALUE
1
SET @@global.log = ON;
SET global log = 0;
SET @@global.general_log = ON;
SET global general_log = 0;
'Bug# 34832: log is a system but it is not accessible using SET @@global.log;'
'SET GLOBAL log; and SELECT @@global.log. SHOW VARIABLES shows the value of log.'
'#--------------------FN_DYNVARS_062_02-------------------------#'
+13 −13
Original line number Diff line number Diff line
@@ -5,17 +5,17 @@ SELECT @start_global_value;
'#--------------------FN_DYNVARS_064_01-------------------------#'
SET @@global.log_bin_trust_routine_creators = TRUE;
Warnings:
Warning	1287	The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning	1287	The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SET @@global.log_bin_trust_routine_creators = DEFAULT;
Warnings:
Warning	1287	The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning	1287	The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators;
@@global.log_bin_trust_routine_creators
0
'#--------------------FN_DYNVARS_064_02-------------------------#'
SET @@global.log_bin_trust_routine_creators = DEFAULT;
Warnings:
Warning	1287	The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning	1287	The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators = 'FALSE';
@@global.log_bin_trust_routine_creators = 'FALSE'
1
@@ -24,37 +24,37 @@ Warning 1292 Truncated incorrect DOUBLE value: 'FALSE'
'#--------------------FN_DYNVARS_064_03-------------------------#'
SET @@global.log_bin_trust_routine_creators = ON;
Warnings:
Warning	1287	The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning	1287	The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators;
@@global.log_bin_trust_routine_creators
1
SET @@global.log_bin_trust_routine_creators = OFF;
Warnings:
Warning	1287	The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning	1287	The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators;
@@global.log_bin_trust_routine_creators
0
SET @@global.log_bin_trust_routine_creators = 0;
Warnings:
Warning	1287	The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning	1287	The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators;
@@global.log_bin_trust_routine_creators
0
SET @@global.log_bin_trust_routine_creators = 1;
Warnings:
Warning	1287	The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning	1287	The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators;
@@global.log_bin_trust_routine_creators
1
SET @@global.log_bin_trust_routine_creators = TRUE;
Warnings:
Warning	1287	The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning	1287	The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators;
@@global.log_bin_trust_routine_creators
1
SET @@global.log_bin_trust_routine_creators = FALSE;
Warnings:
Warning	1287	The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning	1287	The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators;
@@global.log_bin_trust_routine_creators
0
@@ -70,7 +70,7 @@ SET @@global.log_bin_trust_routine_creators = "OFFF";
ERROR 42000: Variable 'log_bin_trust_routine_creators' can't be set to the value of 'OFFF'
SET @@global.log_bin_trust_routine_creators = OF;
Warnings:
Warning	1287	The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning	1287	The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators;
@@global.log_bin_trust_routine_creators
0
@@ -96,14 +96,14 @@ ERROR HY000: Variable 'log_bin_trust_routine_creators' is a GLOBAL variable
'#---------------------FN_DYNVARS_064_07----------------------#'
SET @@global.log_bin_trust_routine_creators = TRUE;
Warnings:
Warning	1287	The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning	1287	The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@log_bin_trust_routine_creators = @@global.log_bin_trust_routine_creators;
@@log_bin_trust_routine_creators = @@global.log_bin_trust_routine_creators
1
'#---------------------FN_DYNVARS_064_08----------------------#'
SET @@global.log_bin_trust_routine_creators = TRUE;
Warnings:
Warning	1287	The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning	1287	The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@log_bin_trust_routine_creators;
@@log_bin_trust_routine_creators
1
@@ -115,7 +115,7 @@ SELECT log_bin_trust_routine_creators = @@session.log_bin_trust_routine_creators
ERROR 42S22: Unknown column 'log_bin_trust_routine_creators' in 'field list'
SET @@global.log_bin_trust_routine_creators = @start_global_value;
Warnings:
Warning	1287	The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning	1287	The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
SELECT @@global.log_bin_trust_routine_creators;
@@global.log_bin_trust_routine_creators
1
+28 −0
Original line number Diff line number Diff line
@@ -187,6 +187,8 @@ SELECT @@general_log, @@log;
@@general_log	@@log
1	1
SET GLOBAL log = 0;
Warnings:
Warning	1287	The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
SHOW VARIABLES LIKE 'general_log';
Variable_name	Value
general_log	OFF
@@ -216,6 +218,8 @@ SELECT @@slow_query_log, @@log_slow_queries;
@@slow_query_log	@@log_slow_queries
0	0
SET GLOBAL log_slow_queries = 0;
Warnings:
Warning	1287	The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
SHOW VARIABLES LIKE 'slow_query_log';
Variable_name	Value
slow_query_log	OFF
@@ -270,4 +274,28 @@ SET GLOBAL general_log_file = @general_log_file_saved;
SET GLOBAL slow_query_log_file = @slow_query_log_file_saved;

# -- End of Bug#32748.
deprecated:
SET GLOBAL log = 0;
Warnings:
Warning	1287	The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
SET GLOBAL log_slow_queries = 0;
Warnings:
Warning	1287	The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
SET GLOBAL log = DEFAULT;
Warnings:
Warning	1287	The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
SET GLOBAL log_slow_queries = DEFAULT;
Warnings:
Warning	1287	The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
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;
End of 5.1 tests
+1 −1
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ max_error_count 10
drop table t1;
set table_type=MYISAM;
Warnings:
Warning	1287	The syntax 'table_type' is deprecated and will be removed in MySQL 5.2. Please use 'storage_engine' instead
Warning	1287	The syntax '@@table_type' is deprecated and will be removed in MySQL 5.2. Please use '@@storage_engine' instead
create table t1 (a int);
insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
update t1 set a='abc';
+1 −1
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ end|
ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
set global log_bin_trust_routine_creators=1;
Warnings:
Warning	1287	The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
Warning	1287	The syntax '@@log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use '@@log_bin_trust_function_creators' instead
set global log_bin_trust_function_creators=0;
set global log_bin_trust_function_creators=1;
set global log_bin_trust_function_creators=1;
Loading