Commit df2bdd60 authored by Martin Hansson's avatar Martin Hansson

Bug#14498355: DEPRECATION WARNINGS SHOULD NOT CONTAIN MYSQL VERSION

NUMBERS

If a system variable was declared as deprecated without mention of an
alternative, the message would look funny, e.g. for @@delayed_insert_limit:

Warning 1287 '@@delayed_insert_limit' is deprecated and
will be removed in MySQL .

The message was meant to display the version number, but it's not
possible to give one when declaring a system variable.

The fix does two things:

1) The definition of the message
ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT is changed so that it does
not display a version number. I.e. in English the message now reads:

Warning 1287 The syntax '@@delayed_insert_limit' is deprecated and
will be removed in a future version.

2) The message ER_WARN_DEPRECATED_SYNTAX_WITH_VER is discontinued in
favor of ER_WARN_DEPRECATED_SYNTAX for system variables. This change
was already done in versions 5.6 and above as part of wl#5265. This
part is simply back-ported from the worklog.
parent 17695cb4
......@@ -199,7 +199,7 @@ SELECT @@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
Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead
SHOW VARIABLES LIKE 'general_log';
Variable_name Value
general_log OFF
......@@ -230,7 +230,7 @@ SELECT @@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
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SHOW VARIABLES LIKE 'slow_query_log';
Variable_name Value
slow_query_log OFF
......@@ -283,16 +283,16 @@ SET GLOBAL slow_query_log_file = @old_slow_query_log_file;
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
Warning 1287 '@@log' is deprecated and will be removed in a future release. 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
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. 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
Warning 1287 '@@log' is deprecated and will be removed in a future release. 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
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. 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;
......
......@@ -545,7 +545,7 @@ Warning 1292 Truncated incorrect read_buffer_size value: '100'
set read_rnd_buffer_size=100;
set global rpl_recovery_rank=100;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
set global server_id=100;
set global slow_launch_time=100;
set sort_buffer_size=100;
......@@ -1068,7 +1068,7 @@ set global query_cache_limit =@my_query_cache_limit;
set global query_cache_type =@my_query_cache_type;
set global rpl_recovery_rank =@my_rpl_recovery_rank;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
set global server_id =@my_server_id;
set global slow_launch_time =@my_slow_launch_time;
set global default_storage_engine =@my_storage_engine;
......
......@@ -8,10 +8,10 @@ INIT_VALUE
1
SET @@global.log = ON;
Warnings:
Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead
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
Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead
'#--------------------FN_DYNVARS_062_02-------------------------#'
SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
......@@ -20,4 +20,4 @@ VARIABLE_VALUE
OFF
SET @@global.log= @start_log;
Warnings:
Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead
......@@ -5,20 +5,20 @@ SELECT @start_value;
'#---------------------FN_DYNVARS_004_01-------------------------#'
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
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries = 0;
@@global.log_slow_queries = 0
1
'#--------------------FN_DYNVARS_004_02------------------------#'
SET @@global.log_slow_queries = ON;
Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
1
SET @@global.log_slow_queries = OFF;
Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
0
......@@ -61,7 +61,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
'#---------------------FN_DYNVARS_004_06----------------------#'
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
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
0
......@@ -72,7 +72,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
1
SET @@global.log_slow_queries = 1;
Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
1
......@@ -84,7 +84,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
'#---------------------FN_DYNVARS_004_07----------------------#'
SET @@global.log_slow_queries = TRUE;
Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
1
......@@ -95,7 +95,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
1
SET @@global.log_slow_queries = FALSE;
Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
0
......@@ -107,7 +107,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
'#---------------------FN_DYNVARS_004_08----------------------#'
SET @@global.log_slow_queries = ON;
Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@log_slow_queries = @@global.log_slow_queries;
@@log_slow_queries = @@global.log_slow_queries
1
......@@ -126,7 +126,7 @@ SELECT log_slow_queries = @@session.log_slow_queries;
ERROR 42S22: Unknown column 'log_slow_queries' in 'field list'
SET @@global.log_slow_queries = @start_value;
Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries;
@@global.log_slow_queries
1
......@@ -5,42 +5,42 @@ SELECT @start_global_value;
'#--------------------FN_DYNVARS_142_01-------------------------#'
SET @@global.rpl_recovery_rank = 500000;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SET @@global.rpl_recovery_rank = DEFAULT;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
0
'#--------------------FN_DYNVARS_142_02-------------------------#'
SET @@global.rpl_recovery_rank = 0;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
0
SET @@global.rpl_recovery_rank = 1024;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
1024
SET @@global.rpl_recovery_rank = 123456789;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
123456789
SET @@global.rpl_recovery_rank = 2147483648*2;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
Warning 1292 Truncated incorrect rpl_recovery_rank value: '4294967296'
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
4294967295
SET @@global.rpl_recovery_rank = 2147483648*1024;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
Warning 1292 Truncated incorrect rpl_recovery_rank value: '2199023255552'
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
......@@ -50,7 +50,7 @@ SELECT @@global.rpl_recovery_rank;
4294967295
SET @@global.rpl_recovery_rank = 2147483648*2147483648;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
Warning 1292 Truncated incorrect rpl_recovery_rank value: '4611686018427387904'
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
......@@ -65,21 +65,21 @@ ERROR HY000: Variable 'rpl_recovery_rank' is a GLOBAL variable and should be set
'#------------------FN_DYNVARS_142_04-----------------------#'
SET @@global.rpl_recovery_rank = -1;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
Warning 1292 Truncated incorrect rpl_recovery_rank value: '-1'
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
0
SET @@global.rpl_recovery_rank = -2147483648;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483648'
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
0
SET @@global.rpl_recovery_rank = -2147483649;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483649'
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
......@@ -93,7 +93,7 @@ ERROR 42000: Incorrect argument type to variable 'rpl_recovery_rank'
'#------------------FN_DYNVARS_142_05-----------------------#'
SET @@global.rpl_recovery_rank = 3000;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='rpl_recovery_rank';
......@@ -108,20 +108,20 @@ count(VARIABLE_VALUE)
'#------------------FN_DYNVARS_142_07-----------------------#'
SET @@global.rpl_recovery_rank = TRUE;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
1
SET @@global.rpl_recovery_rank = FALSE;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
0
'#---------------------FN_DYNVARS_001_08----------------------#'
SET @@global.rpl_recovery_rank = 512;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@rpl_recovery_rank = @@global.rpl_recovery_rank;
@@rpl_recovery_rank = @@global.rpl_recovery_rank
1
......@@ -135,10 +135,10 @@ SELECT @@rpl_recovery_rank;
512
SET global rpl_recovery_rank = 64;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SET @@global.rpl_recovery_rank = @start_global_value;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
0
......@@ -5,41 +5,41 @@ SELECT @start_global_value;
'#--------------------FN_DYNVARS_142_01-------------------------#'
SET @@global.rpl_recovery_rank = 500000;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SET @@global.rpl_recovery_rank = DEFAULT;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
0
'#--------------------FN_DYNVARS_142_02-------------------------#'
SET @@global.rpl_recovery_rank = 0;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
0
SET @@global.rpl_recovery_rank = 1024;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
1024
SET @@global.rpl_recovery_rank = 123456789;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
123456789
SET @@global.rpl_recovery_rank = 2147483648*2;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
4294967296
SET @@global.rpl_recovery_rank = 2147483648*1024;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
2199023255552
......@@ -48,7 +48,7 @@ SELECT @@global.rpl_recovery_rank;
2199023255552
SET @@global.rpl_recovery_rank = 2147483648*2147483648;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
4611686018427387904
......@@ -62,21 +62,21 @@ ERROR HY000: Variable 'rpl_recovery_rank' is a GLOBAL variable and should be set
'#------------------FN_DYNVARS_142_04-----------------------#'
SET @@global.rpl_recovery_rank = -1;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
Warning 1292 Truncated incorrect rpl_recovery_rank value: '-1'
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
0
SET @@global.rpl_recovery_rank = -2147483648;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483648'
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
0
SET @@global.rpl_recovery_rank = -2147483649;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483649'
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
......@@ -90,7 +90,7 @@ ERROR 42000: Incorrect argument type to variable 'rpl_recovery_rank'
'#------------------FN_DYNVARS_142_05-----------------------#'
SET @@global.rpl_recovery_rank = 3000;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='rpl_recovery_rank';
......@@ -105,20 +105,20 @@ count(VARIABLE_VALUE)
'#------------------FN_DYNVARS_142_07-----------------------#'
SET @@global.rpl_recovery_rank = TRUE;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
1
SET @@global.rpl_recovery_rank = FALSE;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
0
'#---------------------FN_DYNVARS_001_08----------------------#'
SET @@global.rpl_recovery_rank = 512;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@rpl_recovery_rank = @@global.rpl_recovery_rank;
@@rpl_recovery_rank = @@global.rpl_recovery_rank
1
......@@ -132,10 +132,10 @@ SELECT @@rpl_recovery_rank;
512
SET global rpl_recovery_rank = 64;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SET @@global.rpl_recovery_rank = @start_global_value;
Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank
0
......@@ -5,7 +5,7 @@ SET @session_max_join_size = @@SESSION.max_join_size;
SET @global_max_join_size = @@GLOBAL.max_join_size;
SET SQL_MAX_JOIN_SIZE=9;
Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
CREATE TEMPORARY TABLE t1(a varchar(20) not null, b varchar(20));
CREATE TEMPORARY TABLE t2(a varchar(20) null, b varchar(20));
INSERT INTO t1 VALUES('aa','bb');
......
......@@ -22,10 +22,10 @@ VARIABLE_NAME VARIABLE_VALUE
SQL_MAX_JOIN_SIZE 18446744073709551615
set global sql_max_join_size=10;
Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
set session sql_max_join_size=20;
Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
select @@global.sql_max_join_size;
@@global.sql_max_join_size
10
......@@ -55,19 +55,19 @@ select @@sql_big_selects;
0
set sql_max_join_size=cast(-1 as unsigned int);
Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
select @@sql_big_selects;
@@sql_big_selects
1
set sql_max_join_size=100;
Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
select @@sql_big_selects;
@@sql_big_selects
0
SET @@global.sql_max_join_size = @start_global_value;
Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
SELECT @@global.sql_max_join_size;
@@global.sql_max_join_size
18446744073709551615
......@@ -17,7 +17,7 @@ INSERT INTO t2 VALUES('aa4','bb');
'#--------------------FN_DYNVARS_161_01-------------------------#'
SET SESSION sql_max_join_size=9;
Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
SELECT * FROM t1 INNER JOIN t2 ON t1.a = t2.a;
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
Expected error The SELECT would examine more than MAX_JOIN_SIZE rows.
......@@ -33,7 +33,7 @@ aa4 bb aa4 bb
This should work
SET SESSION sql_max_join_size=DEFAULT;
Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
DELETE FROM t2 WHERE a = 'aa4';
SELECT * FROM t1 INNER JOIN t2 ON t1.a = t2.a;
a b a b
......@@ -45,7 +45,7 @@ This should work
'#----------------------------FN_DYNVARS_136_05-------------------------#'
SET GLOBAL sql_max_join_size = 4;
Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
** Connecting con_int1 using root **
** Connection con_int1 **
SELECT @@SESSION.sql_max_join_size;
......@@ -54,7 +54,7 @@ SELECT @@SESSION.sql_max_join_size;
4 Expected
SET SESSION sql_max_join_size = 2;
Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
** Connecting con_int2 using root **
** Connection con_int2 **
SELECT @@SESSION.sql_max_join_size;
......@@ -63,7 +63,7 @@ SELECT @@SESSION.sql_max_join_size;
4 Expected
SET SESSION sql_max_join_size = 10;
Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
** Connection con_int2 **
SELECT @@SESSION.sql_max_join_size;
@@SESSION.sql_max_join_size
......@@ -82,10 +82,10 @@ SELECT @@GLOBAL.sql_max_join_size;
Disconnecting Connections con_int1, con_int2
SET @@SESSION.sql_max_join_size = @session_max_join_size;
Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
SET @@GLOBAL.sql_max_join_size = @global_max_join_size ;
Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
SET @@SESSION.sql_big_selects = @session_sql_big_selects;
DROP TABLE t1;
DROP TABLE t2;
......@@ -134,9 +134,9 @@ void sys_var_end()
put your additional checks here
@param on_update_func a function to be called at the end of sys_var::update,
any post-update activity should happen here
@param deprecated_version if not 0 - when this variable will go away
@param substitute if not 0 - what one should use instead when this
deprecated variable
@param substitute If non-NULL, this variable is deprecated and the
string describes what one should use instead. If an empty string,
the variable is deprecated but no replacement is offered.
@param parse_flag either PARSE_EARLY or PARSE_NORMAL
*/
sys_var::sys_var(sys_var_chain *chain, const char *name_arg,
......@@ -146,12 +146,12 @@ sys_var::sys_var(sys_var_chain *chain, const char *name_arg,
PolyLock *lock, enum binlog_status_enum binlog_status_arg,
on_check_function on_check_func,
on_update_function on_update_func,
uint deprecated_version, const char *substitute,
int parse_flag) :
const char *substitute, int parse_flag) :
next(0),
binlog_status(binlog_status_arg),
flags(flags_arg), m_parse_flag(parse_flag), show_val_type(show_val_type_arg),
guard(lock), offset(off), on_check(on_check_func), on_update(on_update_func),
deprecation_substitute(substitute),
is_os_charset(FALSE)
{
/*
......@@ -177,12 +177,6 @@ sys_var::sys_var(sys_var_chain *chain, const char *name_arg,
option.value= (uchar **)global_var_ptr();
option.def_value= def_val;
deprecated.version= deprecated_version;
deprecated.substitute= substitute;
DBUG_ASSERT((deprecated_version != 0) || (substitute == 0));
DBUG_ASSERT(deprecated_version % 100 == 0);
DBUG_ASSERT(!deprecated_version || MYSQL_VERSION_ID < deprecated_version);
if (chain->last)
chain->last->next= this;
else
......@@ -277,21 +271,24 @@ bool sys_var::set_default(THD *thd, enum_var_type type)
void sys_var::do_deprecated_warning(THD *thd)
{
if (deprecated.version)
if (deprecation_substitute != NULL)
{
char buf1[NAME_CHAR_LEN + 3], buf2[10];
char buf1[NAME_CHAR_LEN + 3];
strxnmov(buf1, sizeof(buf1)-1, "@@", name.str, 0);
my_snprintf(buf2, sizeof(buf2), "%d.%d", deprecated.version/100/100,
deprecated.version/100%100);
uint errmsg= deprecated.substitute
? ER_WARN_DEPRECATED_SYNTAX_WITH_VER
: ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT;
/*
if deprecation_substitute is an empty string,
there is no replacement for the syntax
*/
uint errmsg= deprecation_substitute[0] == '\0'
? ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT
: ER_WARN_DEPRECATED_SYNTAX;
if (thd)
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_DEPRECATED_SYNTAX, ER(errmsg),
buf1, buf2, deprecated.substitute);
buf1, deprecation_substitute);
else
sql_print_warning(ER_DEFAULT(errmsg), buf1, buf2, deprecated.substitute);
sql_print_warning(ER_DEFAULT(errmsg), buf1, deprecation_substitute);
}
}
......
......@@ -82,7 +82,7 @@ class sys_var
ptrdiff_t offset; ///< offset to the value from global_system_variables
on_check_function on_check;
on_update_function on_update;
struct { uint version; const char *substitute; } deprecated;
const char *const deprecation_substitute;
bool is_os_charset; ///< true if the value is in character_set_filesystem
public:
......@@ -91,7 +91,7 @@ class sys_var
enum get_opt_arg_type getopt_arg_type, SHOW_TYPE show_val_type_arg,
longlong def_val, PolyLock *lock, enum binlog_status_enum binlog_status_arg,
on_check_function on_check_func, on_update_function on_update_func,
uint deprecated_version, const char *substitute, int parse_flag);
const char *substitute, int parse_flag);
virtual ~sys_var() {}
......
......@@ -6343,8 +6343,8 @@ ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_BINLOG_FORMAT
ER_PATH_LENGTH
eng "The path specified for %.64s is too long."
ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT
eng "The syntax '%s' is deprecated and will be removed in MySQL %s."
ger "Die Syntax '%s' ist veraltet und wird in MySQL %s entfernt."
eng "'%s' is deprecated and will be removed in a future release."
ger "'%s' ist veraltet und wird in einer zukünftigen Version entfernt werden."
ER_WRONG_NATIVE_TABLE_STRUCTURE
eng "Native table '%-.64s'.'%-.64s' has the wrong structure"
......
......@@ -223,7 +223,7 @@ class sys_var_pluginvar: public sys_var
(plugin_var_arg->flags & PLUGIN_VAR_THDLOCAL ? SESSION : GLOBAL) |
(plugin_var_arg->flags & PLUGIN_VAR_READONLY ? READONLY : 0),
0, -1, NO_ARG, pluginvar_show_type(plugin_var_arg), 0, 0,
VARIABLE_NOT_IN_BINLOG, 0, 0, 0, 0, PARSE_NORMAL),
VARIABLE_NOT_IN_BINLOG, NULL, NULL, NULL, PARSE_NORMAL),
plugin_var(plugin_var_arg), orig_pluginvar_name(plugin_var_arg->name)
{ plugin_var->name= name_arg; }
sys_var_pluginvar *cast_pluginvar() { return this; }
......
......@@ -142,7 +142,7 @@ static bool update_keycache_param(THD *thd, KEY_CACHE *key_cache,
#define PFS_TRAILING_PROPERTIES \
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL), ON_UPDATE(NULL), \
0, NULL, sys_var::PARSE_EARLY
NULL, sys_var::PARSE_EARLY
static Sys_var_mybool Sys_pfs_enabled(
"performance_schema",
......@@ -1288,7 +1288,7 @@ static Sys_var_harows Sys_sql_max_join_size(
SESSION_VAR(max_join_size), NO_CMD_LINE,
VALID_RANGE(1, HA_POS_ERROR), DEFAULT(HA_POS_ERROR), BLOCK_SIZE(1),
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(fix_max_join_size), DEPRECATED(70000, 0));
ON_UPDATE(fix_max_join_size), DEPRECATED(""));
static Sys_var_ulong Sys_max_long_data_size(
"max_long_data_size",
......@@ -1707,7 +1707,7 @@ static Sys_var_ulong Sys_rpl_recovery_rank(
GLOBAL_VAR(rpl_recovery_rank), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(0, ULONG_MAX), DEFAULT(0), BLOCK_SIZE(1),
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0),
DEPRECATED(70000, 0));
DEPRECATED(""));
static Sys_var_ulong Sys_range_alloc_block_size(
"range_alloc_block_size",
......@@ -2288,7 +2288,7 @@ static Sys_var_mybool Sys_engine_condition_pushdown(
CMD_LINE(OPT_ARG, OPT_ENGINE_CONDITION_PUSHDOWN),
DEFAULT(TRUE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL),
ON_UPDATE(fix_engine_condition_pushdown),
DEPRECATED(70000, "'@@optimizer_switch'"));
DEPRECATED("'@@optimizer_switch'"));
static Sys_var_plugin Sys_default_storage_engine(
"default_storage_engine", "The default storage engine for new tables",
......@@ -2963,7 +2963,7 @@ static Sys_var_mybool Sys_log(
"log", "Alias for --general-log. Deprecated",
GLOBAL_VAR(opt_log), NO_CMD_LINE,
DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(fix_log_state), DEPRECATED(70000, "'@@general_log'"));
ON_UPDATE(fix_log_state), DEPRECATED("'@@general_log'"));
static Sys_var_mybool Sys_slow_query_log(
"slow_query_log",
......@@ -2980,7 +2980,7 @@ static Sys_var_mybool Sys_log_slow(
"Alias for --slow-query-log. Deprecated",
GLOBAL_VAR(opt_slow_log), NO_CMD_LINE,
DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(fix_log_state), DEPRECATED(70000, "'@@slow_query_log'"));
ON_UPDATE(fix_log_state), DEPRECATED("'@@slow_query_log'"));
static bool fix_log_state(sys_var *self, THD *thd, enum_var_type type)
{
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment