mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-28671 Enable var deprecation for mysqld help output
Currently there are mechanism to mark a system variable as deprecated, but they are only used to print warning messages when a deprecated variable is set. Leverage the existing mechanisms in order to make the deprecation information available at the --help output of mysqld by: * Moving the deprecation information (i.e `deprecation_substitute` attribute) from the `sys_var` class into the `my_option` struct. As every `sys_var` contains its own `my_option` struct, the access to the deprecation information remains available to `sys_var` objects. `my_getotp` functions, which works directly with `my_option` structs, gain access to this information while building the --help output. * For plugin variables, leverages the `PLUGIN_VAR_DEPRECATED` flag and set the `deprecation_substitute` attribute accordingly when building the `my_option` objects. * Change the `option_cmp` function to use the `deprecation_substitute` attribute instead of the name when sorting the options. This way deprecated options and the substitutes will be grouped together. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
This commit is contained in:
committed by
Sergei Golubchik
parent
25094f339b
commit
4186fa72fb
@@ -54,7 +54,7 @@ f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb2.txt'
|
||||
into table tb2;
|
||||
DROP DATABASE IF EXISTS test1;
|
||||
@@ -115,7 +115,7 @@ f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb2.txt'
|
||||
into table tb2;
|
||||
USE test;
|
||||
|
@@ -133,7 +133,7 @@ f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb2.txt'
|
||||
into table tb2;
|
||||
drop table if exists tb3 ;
|
||||
@@ -265,7 +265,7 @@ f240 varchar(2000),
|
||||
f241 char(100)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb4.txt'
|
||||
into table tb4;
|
||||
USE test1;
|
||||
@@ -324,7 +324,7 @@ f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb2.txt'
|
||||
into table tb2;
|
||||
USE test;
|
||||
|
@@ -129,7 +129,7 @@ f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb2.txt'
|
||||
into table tb2 ;
|
||||
drop table if exists tb3;
|
||||
@@ -254,7 +254,7 @@ f239 varbinary(0),
|
||||
f240 varchar(1200)
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb4.txt'
|
||||
into table tb4;
|
||||
USE test1;
|
||||
@@ -313,7 +313,7 @@ f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb2.txt'
|
||||
into table tb2 ;
|
||||
USE test;
|
||||
|
@@ -145,7 +145,7 @@ f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
|
||||
into table tb2;
|
||||
drop table if exists tb3 ;
|
||||
@@ -286,7 +286,7 @@ f241 char(100),
|
||||
f242 bit(30)
|
||||
) engine = myisam;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb4.txt'
|
||||
into table tb4;
|
||||
USE test1;
|
||||
@@ -353,7 +353,7 @@ f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
|
||||
into table tb2;
|
||||
USE test;
|
||||
|
@@ -145,7 +145,7 @@ f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
|
||||
into table tb2;
|
||||
drop table if exists tb3 ;
|
||||
@@ -286,7 +286,7 @@ f241 char(100),
|
||||
f242 bit(30)
|
||||
) engine = myisam;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb4.txt'
|
||||
into table tb4;
|
||||
USE test1;
|
||||
@@ -353,7 +353,7 @@ f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
|
||||
into table tb2;
|
||||
USE test;
|
||||
|
@@ -55,7 +55,7 @@ f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb2.txt'
|
||||
into table tb2 ;
|
||||
DROP DATABASE IF EXISTS test1;
|
||||
@@ -116,7 +116,7 @@ f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb2.txt'
|
||||
into table tb2 ;
|
||||
USE test;
|
||||
|
@@ -63,7 +63,7 @@ f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
|
||||
into table tb2;
|
||||
DROP DATABASE IF EXISTS test1;
|
||||
@@ -132,7 +132,7 @@ f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
|
||||
into table tb2;
|
||||
USE test;
|
||||
|
@@ -7526,12 +7526,12 @@ declare x, y, z year(3) default 2005;
|
||||
SELECT x, y, z;
|
||||
END//
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
CALL sp1();
|
||||
x y z
|
||||
2005 2005 2005
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1( )
|
||||
BEGIN
|
||||
|
Reference in New Issue
Block a user