Skip to content

Commit cc75833

Browse files
committed
ER_VARIABLE_DELETED fix typos, adjust wording, fix plugins.
plugins can have unused variables too. If they use a literal "Unused" string a compiler might or might not merge two identical strings into one (-fmerge-constants) and depending on that the server will or will not issue a "variable is ignored" warning.
1 parent ae9a479 commit cc75833

File tree

8 files changed

+39
-38
lines changed

8 files changed

+39
-38
lines changed

mysql-test/main/mysql_tzinfo_to_sql_symlink.result

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ execute immediate if(@wsrep_cannot_replicate_tz, concat('ALTER TABLE time_zone_t
105105
execute immediate if(@wsrep_cannot_replicate_tz, concat('ALTER TABLE time_zone_transition_type ENGINE=', @time_zone_transition_type_engine, ', ORDER BY Time_zone_id, Transition_type_id'), 'do 0');
106106
SET session alter_algorithm=@old_alter_alg;
107107
Warnings:
108-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
108+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
109109
Warnings:
110-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
110+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
111111
SELECT COUNT(*) FROM time_zone;
112112
COUNT(*)
113113
2
@@ -166,9 +166,9 @@ SET SESSION SQL_LOG_BIN=@save_sql_log_bin;
166166
execute immediate if(@wsrep_is_on, 'SET SESSION WSREP_ON=@save_wsrep_on', 'do 0');
167167
SET session alter_algorithm=@old_alter_alg;
168168
Warnings:
169-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
169+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
170170
Warnings:
171-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
171+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
172172
SELECT COUNT(*) FROM time_zone;
173173
COUNT(*)
174174
2
@@ -490,9 +490,9 @@ execute immediate if(@wsrep_is_on, 'SET SESSION WSREP_ON=@save_wsrep_on', 'do 0'
490490
#
491491
set sql_mode=only_full_group_by;
492492
Warnings:
493-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
493+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
494494
Warnings:
495-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
495+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
496496
SELECT COUNT(*) FROM time_zone;
497497
COUNT(*)
498498
2

mysql-test/main/repair.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,16 +287,16 @@ COMMAND_LINE_ARGUMENT OPTIONAL
287287
GLOBAL_VALUE_PATH NULL
288288
set alter_algorithm=COPY;
289289
Warnings:
290-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
290+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
291291
select @@alter_algorithm;
292292
@@alter_algorithm
293293
DEFAULT
294294
set statement alter_algorithm=COPY FOR SELECT @@alter_algorithm;
295295
@@alter_algorithm
296296
DEFAULT
297297
Warnings:
298-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
299-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
298+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
299+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
300300
# restart: --alter-algorithm=COPY
301301
select @@alter_algorithm;
302302
@@alter_algorithm

mysql-test/main/secondary_key_costs.result

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ explain select * from t1 where nm like '500%' AND fl2 = 0;
2929
id select_type table type possible_keys key key_len ref rows Extra
3030
1 SIMPLE t1 range idx1,idx2 idx1 35 NULL 1 Using index condition; Using where
3131
Warnings:
32-
Warning 4200 The variable '@@optimizer_adjust_secondary_key_costs' is deleted and ignored. It it only exists for compatiblity with old installations
33-
Warning 4200 The variable '@@optimizer_adjust_secondary_key_costs' is deleted and ignored. It it only exists for compatiblity with old installations
32+
Warning 4200 The variable '@@optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
33+
Warning 4200 The variable '@@optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
3434
set @trace=(select trace from information_schema.optimizer_trace);
3535
select json_detailed(json_extract(@trace, '$**.considered_access_paths'));
3636
json_detailed(json_extract(@trace, '$**.considered_access_paths'))
@@ -97,8 +97,8 @@ explain select * from t1 where nm like '500%' AND fl2 = 0;
9797
id select_type table type possible_keys key key_len ref rows Extra
9898
1 SIMPLE t1 range idx1,idx2 idx1 35 NULL 1 Using index condition; Using where
9999
Warnings:
100-
Warning 4200 The variable '@@optimizer_adjust_secondary_key_costs' is deleted and ignored. It it only exists for compatiblity with old installations
101-
Warning 4200 The variable '@@optimizer_adjust_secondary_key_costs' is deleted and ignored. It it only exists for compatiblity with old installations
100+
Warning 4200 The variable '@@optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
101+
Warning 4200 The variable '@@optimizer_adjust_secondary_key_costs' is ignored. It only exists for compatibility with old installations and will be removed in a future release
102102
set @trace=(select trace from information_schema.optimizer_trace);
103103
select json_detailed(json_extract(@trace, '$**.considered_access_paths'));
104104
json_detailed(json_extract(@trace, '$**.considered_access_paths'))

mysql-test/suite/galera/r/mariadb_tzinfo_to_sql.result

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ SET @save_wsrep_mode=@@WSREP_MODE;
2121
# Apply on node_1
2222

2323
Warnings:
24-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
24+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
2525
Warnings:
26-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
26+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
2727
'binlog stationary as expected'
2828
SELECT @wsrep_is_on, @wsrep_cannot_replicate_tz, @save_wsrep_on, @save_sql_log_bin, @@WSREP_ON, @@SQL_LOG_BIN;
2929
@wsrep_is_on @wsrep_cannot_replicate_tz @save_wsrep_on @save_sql_log_bin @@WSREP_ON @@SQL_LOG_BIN
@@ -78,9 +78,9 @@ COUNT(*)
7878
connection node_1;
7979
SET GLOBAL WSREP_MODE='REPLICATE_ARIA,REPLICATE_MYISAM';
8080
Warnings:
81-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
81+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
8282
Warnings:
83-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
83+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
8484
'binlog stationary as expected'
8585
SELECT @wsrep_is_on, @wsrep_cannot_replicate_tz, @save_wsrep_on, @save_sql_log_bin, @@WSREP_ON, @@SQL_LOG_BIN;
8686
@wsrep_is_on @wsrep_cannot_replicate_tz @save_wsrep_on @save_sql_log_bin @@WSREP_ON @@SQL_LOG_BIN
@@ -137,9 +137,9 @@ COUNT(*)
137137

138138
connection node_1;
139139
Warnings:
140-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
140+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
141141
Warnings:
142-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
142+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
143143
'binlog advanced as expected'
144144
SELECT @wsrep_is_on, @wsrep_cannot_replicate_tz, @save_wsrep_on, @save_sql_log_bin, @@WSREP_ON, @@SQL_LOG_BIN;
145145
@wsrep_is_on @wsrep_cannot_replicate_tz @save_wsrep_on @save_sql_log_bin @@WSREP_ON @@SQL_LOG_BIN
@@ -199,9 +199,9 @@ TRUNCATE TABLE time_zone_leap_second;
199199
connection node_1;
200200
SET GLOBAL WSREP_MODE='';
201201
Warnings:
202-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
202+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
203203
Warnings:
204-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
204+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
205205
'binlog advanced as expected'
206206
SELECT @wsrep_is_on, @wsrep_cannot_replicate_tz, @save_wsrep_on, @save_sql_log_bin, @@WSREP_ON, @@SQL_LOG_BIN;
207207
@wsrep_is_on @wsrep_cannot_replicate_tz @save_wsrep_on @save_sql_log_bin @@WSREP_ON @@SQL_LOG_BIN

mysql-test/suite/sys_vars/r/alter_algorithm_basic.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SELECT @@global.alter_algorithm;
44
DEFAULT
55
SET GLOBAL alter_algorithm=2;
66
Warnings:
7-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
7+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
88
SELECT @@global.alter_algorithm;
99
@@global.alter_algorithm
1010
DEFAULT
@@ -15,7 +15,7 @@ SELECT @@global.alter_algorithm;
1515
DEFAULT
1616
SET SESSION alter_algorithm=INSTANT;
1717
Warnings:
18-
Warning 4200 The variable '@@alter_algorithm' is deleted and ignored. It it only exists for compatiblity with old installations
18+
Warning 4200 The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
1919
SHOW SESSION VARIABLES LIKE 'alter_algorithm';
2020
Variable_name Value
2121
alter_algorithm DEFAULT

mysql-test/suite/sys_vars/r/innodb_purge_rseg_truncate_frequency_basic.result

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ SELECT @global_start_value;
55
'#--------------------FN_DYNVARS_046_01------------------------#'
66
SET @@global.innodb_purge_rseg_truncate_frequency = 1;
77
Warnings:
8-
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
8+
Warning 4200 The variable '@@innodb_purge_rseg_truncate_frequency' is ignored. It only exists for compatibility with old installations and will be removed in a future release
99
SET @@global.innodb_purge_rseg_truncate_frequency = DEFAULT;
1010
Warnings:
11-
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
11+
Warning 4200 The variable '@@innodb_purge_rseg_truncate_frequency' is ignored. It only exists for compatibility with old installations and will be removed in a future release
1212
SELECT @@global.innodb_purge_rseg_truncate_frequency;
1313
@@global.innodb_purge_rseg_truncate_frequency
1414
128
@@ -22,40 +22,40 @@ SELECT local.innodb_purge_rseg_truncate_frequency;
2222
ERROR 42S02: Unknown table 'local' in field list
2323
SET global innodb_purge_rseg_truncate_frequency = 1;
2424
Warnings:
25-
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
25+
Warning 4200 The variable '@@innodb_purge_rseg_truncate_frequency' is ignored. It only exists for compatibility with old installations and will be removed in a future release
2626
SELECT @@global.innodb_purge_rseg_truncate_frequency;
2727
@@global.innodb_purge_rseg_truncate_frequency
2828
1
2929
'#--------------------FN_DYNVARS_046_03------------------------#'
3030
SET @@global.innodb_purge_rseg_truncate_frequency = 1;
3131
Warnings:
32-
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
32+
Warning 4200 The variable '@@innodb_purge_rseg_truncate_frequency' is ignored. It only exists for compatibility with old installations and will be removed in a future release
3333
SELECT @@global.innodb_purge_rseg_truncate_frequency;
3434
@@global.innodb_purge_rseg_truncate_frequency
3535
1
3636
SET @@global.innodb_purge_rseg_truncate_frequency = 1;
3737
Warnings:
38-
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
38+
Warning 4200 The variable '@@innodb_purge_rseg_truncate_frequency' is ignored. It only exists for compatibility with old installations and will be removed in a future release
3939
SELECT @@global.innodb_purge_rseg_truncate_frequency;
4040
@@global.innodb_purge_rseg_truncate_frequency
4141
1
4242
SET @@global.innodb_purge_rseg_truncate_frequency = 128;
4343
Warnings:
44-
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
44+
Warning 4200 The variable '@@innodb_purge_rseg_truncate_frequency' is ignored. It only exists for compatibility with old installations and will be removed in a future release
4545
SELECT @@global.innodb_purge_rseg_truncate_frequency;
4646
@@global.innodb_purge_rseg_truncate_frequency
4747
128
4848
'#--------------------FN_DYNVARS_046_05-------------------------#'
4949
SET @@global.innodb_purge_rseg_truncate_frequency = -1;
5050
Warnings:
51-
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
51+
Warning 4200 The variable '@@innodb_purge_rseg_truncate_frequency' is ignored. It only exists for compatibility with old installations and will be removed in a future release
5252
Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_fr... value: '-1'
5353
SELECT @@global.innodb_purge_rseg_truncate_frequency;
5454
@@global.innodb_purge_rseg_truncate_frequency
5555
1
5656
SET @@global.innodb_purge_rseg_truncate_frequency = -1024;
5757
Warnings:
58-
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
58+
Warning 4200 The variable '@@innodb_purge_rseg_truncate_frequency' is ignored. It only exists for compatibility with old installations and will be removed in a future release
5959
Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_fr... value: '-1024'
6060
SELECT @@global.innodb_purge_rseg_truncate_frequency;
6161
@@global.innodb_purge_rseg_truncate_frequency
@@ -113,20 +113,20 @@ SELECT @@global.innodb_purge_rseg_truncate_frequency;
113113
'#---------------------FN_DYNVARS_046_08----------------------#'
114114
SET @@global.innodb_purge_rseg_truncate_frequency = TRUE;
115115
Warnings:
116-
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
116+
Warning 4200 The variable '@@innodb_purge_rseg_truncate_frequency' is ignored. It only exists for compatibility with old installations and will be removed in a future release
117117
SELECT @@global.innodb_purge_rseg_truncate_frequency;
118118
@@global.innodb_purge_rseg_truncate_frequency
119119
1
120120
SET @@global.innodb_purge_rseg_truncate_frequency = FALSE;
121121
Warnings:
122-
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
122+
Warning 4200 The variable '@@innodb_purge_rseg_truncate_frequency' is ignored. It only exists for compatibility with old installations and will be removed in a future release
123123
Warning 1292 Truncated incorrect innodb_purge_rseg_truncate_fr... value: '0'
124124
SELECT @@global.innodb_purge_rseg_truncate_frequency;
125125
@@global.innodb_purge_rseg_truncate_frequency
126126
1
127127
SET @@global.innodb_purge_rseg_truncate_frequency = @global_start_value;
128128
Warnings:
129-
Warning 1287 '@@innodb_purge_rseg_truncate_frequency' is deprecated and will be removed in a future release
129+
Warning 4200 The variable '@@innodb_purge_rseg_truncate_frequency' is ignored. It only exists for compatibility with old installations and will be removed in a future release
130130
SELECT @@global.innodb_purge_rseg_truncate_frequency;
131131
@@global.innodb_purge_rseg_truncate_frequency
132132
128

sql/set_var.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,9 @@ void sys_var::do_deprecated_warning(THD *thd)
430430
char buf1[NAME_CHAR_LEN + 3];
431431
strxnmov(buf1, sizeof(buf1)-1, "@@", name.str, 0);
432432

433-
if (option.comment == UNUSED_HELP)
434-
my_error(ER_VARIABLE_DELETED, MYF(ME_WARNING), buf1);
433+
if (option.comment == UNUSED_HELP ||
434+
strcmp(option.comment, UNUSED_HELP) == 0)
435+
my_error(ER_VARIABLE_IGNORED, MYF(ME_WARNING), buf1);
435436
else
436437
{
437438
char buf2[NAME_CHAR_LEN + 3];

sql/share/errmsg-utf8.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12278,5 +12278,5 @@ ER_SEQUENCE_TABLE_CANNOT_HAVE_ANY_CONSTRAINTS
1227812278
eng "Sequence tables cannot have any constraints"
1227912279
ER_SEQUENCE_TABLE_ORDER_BY
1228012280
eng "ORDER BY"
12281-
ER_VARIABLE_DELETED
12282-
eng "The variable '%s' is deleted and ignored. It it only exists for compatiblity with old installations"
12281+
ER_VARIABLE_IGNORED
12282+
eng "The variable '%s' is ignored. It only exists for compatibility with old installations and will be removed in a future release"

0 commit comments

Comments
 (0)