From 4186fa72fbb8725f971da193f9f265d10464caa2 Mon Sep 17 00:00:00 2001 From: Christian Gonzalez Date: Wed, 17 May 2023 19:21:29 +0000 Subject: [PATCH] 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. --- client/mysql.cc | 2 +- client/mysqldump.cc | 7 ++-- include/my_getopt.h | 31 +++++++++++++-- mysql-test/main/ctype_binary.result | 4 +- mysql-test/main/ctype_cp1251.result | 4 +- mysql-test/main/ctype_latin1.result | 4 +- mysql-test/main/ctype_ucs.result | 4 +- mysql-test/main/ctype_utf8.result | 4 +- mysql-test/main/func_group.result | 2 +- mysql-test/main/mysqld--help.result | 29 ++++++++------ mysql-test/main/null.result | 2 +- mysql-test/main/type_blob.result | 8 ++-- mysql-test/main/type_year.result | 32 ++++++++-------- .../suite/engines/iuds/r/delete_year.result | 8 ++-- .../suite/engines/iuds/r/insert_year.result | 16 ++++---- .../suite/engines/iuds/r/update_year.result | 8 ++-- .../suite/funcs_1/r/innodb_views.result | 4 +- .../suite/funcs_1/r/is_columns_innodb.result | 6 +-- .../suite/funcs_1/r/is_columns_memory.result | 6 +-- .../suite/funcs_1/r/is_columns_myisam.result | 6 +-- .../r/is_columns_myisam_embedded.result | 6 +-- .../suite/funcs_1/r/memory_views.result | 4 +- .../suite/funcs_1/r/myisam_views-big.result | 4 +- mysql-test/suite/funcs_1/r/storedproc.result | 4 +- mysql-test/suite/innodb/r/data_types.result | 2 +- mysys/my_getopt.c | 20 ++++++++++ sql/mysqld.cc | 38 +++++++++++++++++++ sql/set_var.cc | 15 +++++--- sql/set_var.h | 1 - sql/share/errmsg-utf8.txt | 2 +- sql/sql_plugin.cc | 19 ++-------- sql/sys_vars.cc | 18 ++++----- sql/sys_vars.inl | 1 + storage/maria/aria_chk.c | 9 ++--- storage/maria/aria_read_log.c | 4 +- storage/maria/aria_s3_copy.cc | 2 +- storage/myisam/myisamchk.c | 10 ++--- .../rocksdb/r/col_opt_not_null.result | 6 +-- .../mysql-test/rocksdb/r/col_opt_null.result | 8 ++-- .../rocksdb/r/type_date_time.result | 2 +- storage/spider/spd_param.cc | 4 +- 41 files changed, 223 insertions(+), 143 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index 70fed689ebb..e6666671f8d 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1766,7 +1766,7 @@ static struct my_option my_long_options[] = {"net-buffer-length", 0, "The buffer size for TCP/IP and socket communication.", &opt_net_buffer_length, &opt_net_buffer_length, 0, GET_ULONG, - REQUIRED_ARG, 16384, 1024, 512*1024ULL*1024ULL, MALLOC_OVERHEAD, 1024, 0}, + REQUIRED_ARG, 16384, 1024, 512*1024ULL*1024ULL, 0, 1024, 0}, {"no-beep", 'b', "Turn off beep on error.", &opt_nobeep, &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"one-database", 'o', diff --git a/client/mysqldump.cc b/client/mysqldump.cc index b6a9809eda2..eddde3f3aad 100644 --- a/client/mysqldump.cc +++ b/client/mysqldump.cc @@ -486,16 +486,15 @@ static struct my_option my_long_options[] = "The maximum packet length to send to or receive from server.", &opt_max_allowed_packet, &opt_max_allowed_packet, 0, GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096, - (longlong) 2L*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0}, + (longlong) 2L*1024L*1024L*1024L, 0, 1024, 0}, {"max-statement-time", 0, "Max statement execution time. If unset, overrides server default with 0.", &opt_max_statement_time, &opt_max_statement_time, 0, GET_DOUBLE, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"net_buffer_length", 0, "The buffer size for TCP/IP and socket communication.", - &opt_net_buffer_length, &opt_net_buffer_length, 0, - GET_ULONG, REQUIRED_ARG, 1024*1024L-1025, 4096, 16*1024L*1024L, - MALLOC_OVERHEAD-1024, 1024, 0}, + &opt_net_buffer_length, &opt_net_buffer_length, 0, GET_ULONG, REQUIRED_ARG, + 1024*1024L-1025, 4096, 16*1024L*1024L, 0, 1024, 0}, {"no-autocommit", 0, "Wrap tables with autocommit/commit statements.", &opt_autocommit, &opt_autocommit, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, diff --git a/include/my_getopt.h b/include/my_getopt.h index 26f21bd632e..92cb8da90cd 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -21,6 +21,8 @@ /* my_getopt and my_default are almost always used together */ #include +#include + C_MODE_START #define GET_NO_ARG 1 @@ -44,6 +46,8 @@ C_MODE_START #define GET_AUTO 64 #define GET_TYPE_MASK 63 +#define IS_DEPRECATED_NO_REPLACEMENT(X) (*(X) == 0) + /** Enumeration of the my_option::arg_type attributes. It should be noted that for historical reasons variables with the combination @@ -72,7 +76,7 @@ struct my_option nor one-letter short equivalent use id=0 */ - const char *comment; /**< option comment, for autom. --help. + const char *comment; /**< Option comment, for automated --help. if it's NULL the option is not visible in --help. */ @@ -84,7 +88,11 @@ struct my_option longlong def_value; /**< Default value */ longlong min_value; /**< Min allowed value (for numbers) */ ulonglong max_value; /**< Max allowed value (for numbers) */ - longlong sub_size; /**< Unused */ + const char *deprecation_substitute; /**< Name of the substitute variable which deprecates + this one. Use DEPRECATED_NO_REPLACEMENT when + no replacement exists for the given variable. NULL + value means the variable is not deprecated. + */ long block_size; /**< Value should be a mult. of this (for numbers) */ void *app_type; /**< To be used by an application */ }; @@ -126,7 +134,24 @@ double getopt_double_limit_value(double num, const struct my_option *optp, ulonglong getopt_double2ulonglong(double); double getopt_ulonglong2double(ulonglong); +static inline void convert_dash_to_underscore(char *str, size_t len) +{ + for (char *p= str; p <= str+len; p++) + if (*p == '-') + *p= '_'; + else if (*p != '_' && isalnum(*p) == 0) + break; +} + +static inline void convert_underscore_to_dash(char *str, size_t len) +{ + for (char *p= str; p <= str+len; p++) + if (*p == '_') + *p= '-'; + else if (*p != '-' && isalnum(*p) == 0) + break; +} + C_MODE_END #endif /* _my_getopt_h */ - diff --git a/mysql-test/main/ctype_binary.result b/mysql-test/main/ctype_binary.result index 8dd7b176727..18fd5d4d738 100644 --- a/mysql-test/main/ctype_binary.result +++ b/mysql-test/main/ctype_binary.result @@ -2040,7 +2040,7 @@ hex(concat(a)) a drop table t1; create table t1 (a year(2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead insert into t1 values (1); select hex(concat(a)) from t1; hex(concat(a)) @@ -2355,7 +2355,7 @@ drop table t1; drop view v1; create table t1 (a year(2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead insert into t1 values (1); create view v1(a) as select concat(a) from t1; show columns from v1; diff --git a/mysql-test/main/ctype_cp1251.result b/mysql-test/main/ctype_cp1251.result index fa98a14cff6..c29837da0cd 100644 --- a/mysql-test/main/ctype_cp1251.result +++ b/mysql-test/main/ctype_cp1251.result @@ -2452,7 +2452,7 @@ hex(concat(a)) a drop table t1; create table t1 (a year(2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead insert into t1 values (1); select hex(concat(a)) from t1; hex(concat(a)) @@ -2767,7 +2767,7 @@ drop table t1; drop view v1; create table t1 (a year(2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead insert into t1 values (1); create view v1(a) as select concat(a) from t1; show columns from v1; diff --git a/mysql-test/main/ctype_latin1.result b/mysql-test/main/ctype_latin1.result index e8840b2f440..4ba393f3918 100644 --- a/mysql-test/main/ctype_latin1.result +++ b/mysql-test/main/ctype_latin1.result @@ -2761,7 +2761,7 @@ hex(concat(a)) a drop table t1; create table t1 (a year(2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead insert into t1 values (1); select hex(concat(a)) from t1; hex(concat(a)) @@ -3076,7 +3076,7 @@ drop table t1; drop view v1; create table t1 (a year(2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead insert into t1 values (1); create view v1(a) as select concat(a) from t1; show columns from v1; diff --git a/mysql-test/main/ctype_ucs.result b/mysql-test/main/ctype_ucs.result index 9645d352e24..cde787cbccf 100644 --- a/mysql-test/main/ctype_ucs.result +++ b/mysql-test/main/ctype_ucs.result @@ -3644,7 +3644,7 @@ hex(concat(a)) a drop table t1; create table t1 (a year(2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead insert into t1 values (1); select hex(concat(a)) from t1; hex(concat(a)) @@ -3959,7 +3959,7 @@ drop table t1; drop view v1; create table t1 (a year(2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead insert into t1 values (1); create view v1(a) as select concat(a) from t1; show columns from v1; diff --git a/mysql-test/main/ctype_utf8.result b/mysql-test/main/ctype_utf8.result index 93e5889e505..7d6ecce639b 100644 --- a/mysql-test/main/ctype_utf8.result +++ b/mysql-test/main/ctype_utf8.result @@ -4389,7 +4389,7 @@ hex(concat(a)) a drop table t1; create table t1 (a year(2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead insert into t1 values (1); select hex(concat(a)) from t1; hex(concat(a)) @@ -4704,7 +4704,7 @@ drop table t1; drop view v1; create table t1 (a year(2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead insert into t1 values (1); create view v1(a) as select concat(a) from t1; show columns from v1; diff --git a/mysql-test/main/func_group.result b/mysql-test/main/func_group.result index 6e58b4fc2c6..c567a767ef1 100644 --- a/mysql-test/main/func_group.result +++ b/mysql-test/main/func_group.result @@ -1532,7 +1532,7 @@ DROP TABLE t1; # create table t1 (f1 year(2), f2 year(4), f3 date, f4 datetime); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead insert into t1 values (98,1998,19980101,"1998-01-01 00:00:00"), (00,2000,20000101,"2000-01-01 00:00:01"), diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result index d84f23d9335..3d60ace66e9 100644 --- a/mysql-test/main/mysqld--help.result +++ b/mysql-test/main/mysqld--help.result @@ -38,7 +38,8 @@ The following specify which files/extra groups are read (specified before remain (Automatically configured unless set explicitly) -b, --basedir=name Path to installation directory. All paths are usually resolved relative to this - --big-tables Old variable, which if set to 1, allows large result sets + --big-tables (it's deprecated and will be removed in a future release) + Old variable, which if set to 1, allows large result sets by saving all temporary sets to disk, avoiding 'table full' errors. No longer needed, as the server now handles this automatically. @@ -445,7 +446,8 @@ The following specify which files/extra groups are read (specified before remain Controls what join operations can be executed with join buffers. Odd numbers are used for plain join buffers while even numbers are used for linked buffers - --keep-files-on-create + --keep-files-on-create (it's deprecated and will be removed in a future + release) Don't overwrite stale .MYD and .MYI even if no directory is specified --key-buffer-size=# The size of the buffer used for index blocks for MyISAM @@ -534,16 +536,17 @@ The following specify which files/extra groups are read (specified before remain --log-slave-updates Tells the slave to log the updates from the slave thread to the binary log. You will need to turn it on if you plan to daisy-chain the slaves. - --log-slow-admin-statements + --log-slow-disabled-statements=name + Don't log certain types of statements to slow log. Any + combination of: admin, call, slave, sp + Use 'ALL' to set all combinations. + --log-slow-admin-statements (it's deprecated and will be removed in a future + release. Please use '--log-slow-filter' instead) Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements to the slow log if it is open. Resets or sets the option 'admin' in log_slow_filter. Deprecated, use log_slow_filter without 'admin'. (Defaults to on; use --skip-log-slow-admin-statements to disable.) - --log-slow-disabled-statements=name - Don't log certain types of statements to slow log. Any - combination of: admin, call, slave, sp - Use 'ALL' to set all combinations. --log-slow-filter=name Log only certain types of queries to the slow log. If variable empty all kind of queries are logged. All types @@ -740,7 +743,9 @@ The following specify which files/extra groups are read (specified before remain also @@sql_notes.. Any combination of: basic, unusable_keys, explain Use 'ALL' to set all combinations. - --old Use compatible behavior from previous MariaDB version. + --old (it's deprecated and will be removed in a future release. + Please use '--old-mode' instead) + Use compatible behavior from previous MariaDB version. See also --old-mode --old-mode=name Used to emulate old behavior from earlier MariaDB or MySQL versions. Any combination of: @@ -762,7 +767,8 @@ The following specify which files/extra groups are read (specified before remain max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors (Automatically configured unless set explicitly) - --optimizer-adjust-secondary-key-costs=# + --optimizer-adjust-secondary-key-costs=# (it's deprecated and will be removed + in a future release) Unused, will be removed. --optimizer-disk-read-cost=# Cost of reading a block of IO_SIZE (4096) from a disk (in @@ -1257,7 +1263,8 @@ The following specify which files/extra groups are read (specified before remain --safe-mode Skip some optimize stages (for testing). Deprecated. --safe-user-create Don't allow new user creation by the user who has no write privileges to the mysql.user table. - --secure-auth Disallow authentication for accounts that have old + --secure-auth (it's deprecated and will be removed in a future release) + Disallow authentication for accounts that have old (pre-4.1) passwords (Defaults to on; use --skip-secure-auth to disable.) --secure-file-priv=name @@ -1736,8 +1743,8 @@ log-output FILE log-queries-not-using-indexes FALSE log-short-format FALSE log-slave-updates FALSE -log-slow-admin-statements TRUE log-slow-disabled-statements sp +log-slow-admin-statements TRUE log-slow-filter admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk log-slow-max-warnings 10 log-slow-min-examined-row-limit 0 diff --git a/mysql-test/main/null.result b/mysql-test/main/null.result index 858d24f29b1..f0cb8826773 100644 --- a/mysql-test/main/null.result +++ b/mysql-test/main/null.result @@ -442,7 +442,7 @@ NOT NOT NULLIF(2,3) # CREATE TABLE t1 (a YEAR(2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead INSERT INTO t1 VALUES (0); SELECT a,NULLIF(a,2000),NULLIF(2000,a) FROM t1; a NULLIF(a,2000) NULLIF(2000,a) diff --git a/mysql-test/main/type_blob.result b/mysql-test/main/type_blob.result index b5b2d54c74a..1beb4179339 100644 --- a/mysql-test/main/type_blob.result +++ b/mysql-test/main/type_blob.result @@ -901,7 +901,7 @@ CREATE TABLE b15776 (a char(4294967296)); ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead CREATE TABLE b15776 (a year(?)); Warnings: -Warning 1287 'YEAR(?)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(?)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead INSERT INTO b15776 VALUES (42); SELECT * FROM b15776; a @@ -909,7 +909,7 @@ a DROP TABLE b15776; CREATE TABLE b15776 (a year(4294967296)); Warnings: -Warning 1287 'YEAR(4294967295)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(4294967295)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead SHOW CREATE TABLE b15776; Table Create Table b15776 CREATE TABLE `b15776` ( @@ -918,7 +918,7 @@ b15776 CREATE TABLE `b15776` ( DROP TABLE b15776; CREATE TABLE b15776 (a year(0)); Warnings: -Warning 1287 'YEAR(0)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(0)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead DROP TABLE b15776; CREATE TABLE b15776 (a year(-2)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-2))' at line 1 @@ -938,7 +938,7 @@ CREATE TABLE b15776 (a char(9999999999999999999999999999999999999999999999999999 ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead CREATE TABLE b15776 (a year(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999)); Warnings: -Warning 1287 'YEAR(4294967295)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(4294967295)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead SHOW CREATE TABLE b15776; Table Create Table b15776 CREATE TABLE `b15776` ( diff --git a/mysql-test/main/type_year.result b/mysql-test/main/type_year.result index ce602c1482b..42850c8148b 100644 --- a/mysql-test/main/type_year.result +++ b/mysql-test/main/type_year.result @@ -1,6 +1,6 @@ create table t1 (y year,y2 year(2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead insert into t1 values (0,0),(1999,1999),(2000,2000),(2001,2001),(70,70),(69,69); select * from t1; y y2 @@ -60,7 +60,7 @@ drop table t1; # CREATE TABLE t2(yy YEAR(2), c2 CHAR(4)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead CREATE TABLE t4(yyyy YEAR(4), c4 CHAR(4)); INSERT INTO t2 (c2) VALUES (NULL),(1970),(1999),(2000),(2001),(2069); INSERT INTO t4 (c4) SELECT c2 FROM t2; @@ -373,11 +373,11 @@ DROP TABLE t1; # CREATE TABLE t1 (c1 YEAR(2), c2 YEAR(4)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead ALTER TABLE t1 MODIFY COLUMN c2 YEAR(2); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead DROP TABLE t1; # # End of 5.1 tests @@ -385,7 +385,7 @@ DROP TABLE t1; create function y2k() returns int deterministic return 2000; create table t1 (a year(2), b int); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead insert t1 values (0,2000); select a from t1 where a=2000; a @@ -509,7 +509,7 @@ DROP TABLE t1; # create or replace table t1 (a YEAR(0)); Warnings: -Warning 1287 'YEAR(0)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(0)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -517,7 +517,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci create or replace table t1 (a YEAR(1)); Warnings: -Warning 1287 'YEAR(1)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(1)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -525,7 +525,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci create or replace table t1 (a YEAR(2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -533,7 +533,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci create or replace table t1 (a YEAR(3)); 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 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -547,7 +547,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci create or replace table t1 (a YEAR(5)); Warnings: -Warning 1287 'YEAR(5)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(5)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -555,7 +555,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci create or replace table t1 (a YEAR(100)); Warnings: -Warning 1287 'YEAR(100)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(100)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -588,7 +588,7 @@ Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = DROP TABLE t1; CREATE TABLE t1 (a YEAR(2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead INSERT INTO t1 VALUES (93),(94); SELECT * FROM t1; a @@ -620,7 +620,7 @@ MIN(a) MAX(a) DROP TABLE t1; CREATE OR REPLACE TABLE t1 (a YEAR(2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead INSERT INTO t1 VALUES (1970),(1978),(2000),(2069); SELECT a, CAST(a AS DATE), CAST(COALESCE(a) AS DATE) FROM t1; a CAST(a AS DATE) CAST(COALESCE(a) AS DATE) @@ -652,10 +652,10 @@ DROP TABLE t1; # CREATE TABLE t1 (a YEAR(2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead CREATE TABLE t2 AS SELECT a, ROUND(a), TRUNCATE(a,0), FLOOR(a), CEILING(a) FROM t1; Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead DESC t2; Field Type Null Key Default Extra a year(2) YES NULL diff --git a/mysql-test/suite/engines/iuds/r/delete_year.result b/mysql-test/suite/engines/iuds/r/delete_year.result index 9a2cf7504f4..8e6fbee352c 100644 --- a/mysql-test/suite/engines/iuds/r/delete_year.result +++ b/mysql-test/suite/engines/iuds/r/delete_year.result @@ -3,12 +3,12 @@ CREATE TABLE t1(c1 YEAR NOT NULL,c2 YEAR, PRIMARY KEY(c1)); CREATE TABLE t2(c1 YEAR NOT NULL, c2 YEAR, UNIQUE INDEX idx(c1,c2)); CREATE TABLE t3(c1 YEAR(2) NOT NULL,c2 YEAR(2), PRIMARY KEY(c1)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead CREATE TABLE t4(c1 YEAR(2), c2 YEAR(2), UNIQUE INDEX idx(c1,c2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead INSERT INTO t1 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155); INSERT INTO t2 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155); INSERT INTO t3 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155); diff --git a/mysql-test/suite/engines/iuds/r/insert_year.result b/mysql-test/suite/engines/iuds/r/insert_year.result index 4bd5e618924..2c85badbda0 100644 --- a/mysql-test/suite/engines/iuds/r/insert_year.result +++ b/mysql-test/suite/engines/iuds/r/insert_year.result @@ -3250,20 +3250,20 @@ c1 c2 c3 c4 DROP TABLE t1,t2,t3,t4; CREATE TABLE t1(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead CREATE TABLE t2(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1,c2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead CREATE TABLE t3(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME, UNIQUE INDEX idx(c1,c2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead CREATE TABLE t4(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead INSERT INTO t1 VALUES('1901','1901','98-12-31','98.12.31 11:30:45'),('1999','1999','98-12-30','98.12.30 11:30:45'),('2000','2000','98-12-29','98.12.29 11:30:45'),('2001','2001','98-12-28','98.12.28 11:30:45'),('2099','2099','98-12-27','98.12.27 11:30:45'),('2100','2100','98-12-26','98.12.26 11:30:45'),('2155','2155','98-12-26','98.12.26 11:30:45'); INSERT INTO t2 VALUES('1901','1901','98-12-31','98.12.31 11:30:45'),('1999','1999','98-12-30','98.12.30 11:30:45'),('2000','2000','98-12-29','98.12.29 11:30:45'),('2001','2001','98-12-28','98.12.28 11:30:45'),('2099','2099','98-12-27','98.12.27 11:30:45'),('2100','2100','98-12-26','98.12.26 11:30:45'),('2155','2155','98-12-26','98.12.26 11:30:45'); INSERT INTO t3 VALUES('1901','1901','98-12-31','98.12.31 11:30:45'),('1999','1999','98-12-30','98.12.30 11:30:45'),('2000','2000','98-12-29','98.12.29 11:30:45'),('2001','2001','98-12-28','98.12.28 11:30:45'),('2099','2099','98-12-27','98.12.27 11:30:45'),('2100','2100','98-12-26','98.12.26 11:30:45'),('2155','2155','98-12-26','98.12.26 11:30:45'); diff --git a/mysql-test/suite/engines/iuds/r/update_year.result b/mysql-test/suite/engines/iuds/r/update_year.result index f465e22e117..3abb7835c93 100644 --- a/mysql-test/suite/engines/iuds/r/update_year.result +++ b/mysql-test/suite/engines/iuds/r/update_year.result @@ -3,12 +3,12 @@ CREATE TABLE t1(c1 YEAR NOT NULL,c2 YEAR, PRIMARY KEY(c1)); CREATE TABLE t2(c1 YEAR NOT NULL, c2 YEAR, UNIQUE INDEX idx(c1,c2)); CREATE TABLE t3(c1 YEAR(2) NOT NULL,c2 YEAR(2), PRIMARY KEY(c1)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead CREATE TABLE t4(c1 YEAR(2), c2 YEAR(2), UNIQUE INDEX idx(c1,c2)); Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead INSERT INTO t1 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155); INSERT INTO t2 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155); INSERT INTO t3 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155); diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result index 1c3e5648ba6..48b607fc8d1 100644 --- a/mysql-test/suite/funcs_1/r/innodb_views.result +++ b/mysql-test/suite/funcs_1/r/innodb_views.result @@ -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 '/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 '/std_data/funcs_1/innodb_tb2.txt' into table tb2; USE test; diff --git a/mysql-test/suite/funcs_1/r/is_columns_innodb.result b/mysql-test/suite/funcs_1/r/is_columns_innodb.result index 4f82a877efd..5f98ecc8e03 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_innodb.result +++ b/mysql-test/suite/funcs_1/r/is_columns_innodb.result @@ -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 '/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 '/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 '/std_data/funcs_1/innodb_tb2.txt' into table tb2; USE test; diff --git a/mysql-test/suite/funcs_1/r/is_columns_memory.result b/mysql-test/suite/funcs_1/r/is_columns_memory.result index 7f2d1788068..dd64f194f83 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_memory.result +++ b/mysql-test/suite/funcs_1/r/is_columns_memory.result @@ -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 '/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 '/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 '/std_data/funcs_1/memory_tb2.txt' into table tb2 ; USE test; diff --git a/mysql-test/suite/funcs_1/r/is_columns_myisam.result b/mysql-test/suite/funcs_1/r/is_columns_myisam.result index f1d61611907..148b1365bcc 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_myisam.result +++ b/mysql-test/suite/funcs_1/r/is_columns_myisam.result @@ -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 '/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 '/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 '/std_data/funcs_1/myisam_tb2.txt' into table tb2; USE test; diff --git a/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result index 413f7ed563a..907031e81a6 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_columns_myisam_embedded.result @@ -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 '/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 '/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 '/std_data/funcs_1/myisam_tb2.txt' into table tb2; USE test; diff --git a/mysql-test/suite/funcs_1/r/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result index 800c51e6a2a..225410c13ae 100644 --- a/mysql-test/suite/funcs_1/r/memory_views.result +++ b/mysql-test/suite/funcs_1/r/memory_views.result @@ -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 '/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 '/std_data/funcs_1/memory_tb2.txt' into table tb2 ; USE test; diff --git a/mysql-test/suite/funcs_1/r/myisam_views-big.result b/mysql-test/suite/funcs_1/r/myisam_views-big.result index e80fa2c755d..9de115326d1 100644 --- a/mysql-test/suite/funcs_1/r/myisam_views-big.result +++ b/mysql-test/suite/funcs_1/r/myisam_views-big.result @@ -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 '/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 '/std_data/funcs_1/myisam_tb2.txt' into table tb2; USE test; diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result index c043ea3f9e7..1446bc2435e 100644 --- a/mysql-test/suite/funcs_1/r/storedproc.result +++ b/mysql-test/suite/funcs_1/r/storedproc.result @@ -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 diff --git a/mysql-test/suite/innodb/r/data_types.result b/mysql-test/suite/innodb/r/data_types.result index 695059bf288..5a894e4d8eb 100644 --- a/mysql-test/suite/innodb/r/data_types.result +++ b/mysql-test/suite/innodb/r/data_types.result @@ -82,7 +82,7 @@ t1_VARCHAR_0 VARCHAR(0), t1_VARMYSQL_0 VARCHAR(0) CHARACTER SET utf8 ) ENGINE=InnoDB; Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead INSERT INTO t1 () VALUES (); SELECT name, diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index cc6c5a4315d..a60f7c9f9d8 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -1615,6 +1615,26 @@ void my_print_help(const struct my_option *options) col+= (optp->arg_type == OPT_ARG) ? 5 : 3; } } + if (optp->deprecation_substitute != NULL) + { + if (IS_DEPRECATED_NO_REPLACEMENT(optp->deprecation_substitute)) + col= print_comment("(it's deprecated and will be removed in a future release)", + col, name_space, comment_space); + else + { + char buf1[NAME_CHAR_LEN + 3]; + + strxmov(buf1, "--", optp->deprecation_substitute, NullS); + convert_underscore_to_dash(buf1, strlen(optp->deprecation_substitute) + 2); + + col= print_comment("(it's deprecated and will be removed in a future release. Please use '", + col, name_space, comment_space); + col= print_comment(buf1, + col, name_space, comment_space); + col= print_comment("' instead)", + col, name_space, comment_space); + } + } if (optp->comment && *optp->comment) { uint count; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 24c8bf44645..9bca304fdae 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -7686,8 +7686,24 @@ static void print_version(void) /** Compares two options' names, treats - and _ the same */ static int option_cmp(my_option *a, my_option *b) { + bool deprecated_a= false, deprecated_b= false; + const char *sa= a->name; + if (a->deprecation_substitute != NULL && + !IS_DEPRECATED_NO_REPLACEMENT(a->deprecation_substitute)) + { + sa= a->deprecation_substitute; + deprecated_a= true; + } + const char *sb= b->name; + if (b->deprecation_substitute != NULL && + !IS_DEPRECATED_NO_REPLACEMENT(b->deprecation_substitute)) + { + sb= b->deprecation_substitute; + deprecated_b= true; + } + for (; *sa || *sb; sa++, sb++) { if (*sa < *sb) @@ -7705,6 +7721,13 @@ static int option_cmp(my_option *a, my_option *b) return 1; } } + + if (deprecated_a) + return -1; + + if (deprecated_b) + return 1; + return 0; } @@ -8430,6 +8453,21 @@ mysqld_get_one_option(const struct my_option *opt, const char *argument, break; } } + + if (opt->deprecation_substitute != NULL) { + if (IS_DEPRECATED_NO_REPLACEMENT(opt->deprecation_substitute)) + sql_print_warning("\'%s\' is deprecated and will be removed in a future release", opt->name); + else + { + char buf1[NAME_CHAR_LEN + 3]; + + strxmov(buf1, "--", opt->deprecation_substitute, NullS); + convert_underscore_to_dash(buf1, strlen(opt->deprecation_substitute) + 2); + + sql_print_warning("\'%s\' is deprecated and will be removed in a future release. Please use %s instead", opt->name, buf1); + } + } + return 0; } diff --git a/sql/set_var.cc b/sql/set_var.cc index d833efb0097..7e2fac577d1 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -154,8 +154,7 @@ sys_var::sys_var(sys_var_chain *chain, const char *name_arg, const char *substitute) : next(0), binlog_status(binlog_status_arg), value_origin(COMPILE_TIME), flags(flags_arg), show_val_type(show_val_type_arg), - guard(lock), offset(off), on_check(on_check_func), on_update(on_update_func), - deprecation_substitute(substitute) + guard(lock), offset(off), on_check(on_check_func), on_update(on_update_func) { /* There is a limitation in handle_options() related to short options: @@ -181,6 +180,7 @@ sys_var::sys_var(sys_var_chain *chain, const char *name_arg, option.def_value= def_val; option.app_type= this; option.var_type= flags & AUTO_SET ? GET_AUTO : 0; + option.deprecation_substitute= substitute; if (chain->last) chain->last->next= this; @@ -421,11 +421,16 @@ double sys_var::val_real(bool *is_null, void sys_var::do_deprecated_warning(THD *thd) { - if (deprecation_substitute != NULL) + if (option.deprecation_substitute != NULL) { char buf1[NAME_CHAR_LEN + 3]; + char buf2[NAME_CHAR_LEN + 3]; strxnmov(buf1, sizeof(buf1)-1, "@@", name.str, 0); - warn_deprecated<999999>(thd, buf1, deprecation_substitute); + if (!IS_DEPRECATED_NO_REPLACEMENT(option.deprecation_substitute)) + strxnmov(buf2, sizeof(buf2)-1, "@@", option.deprecation_substitute, 0); + else + buf2[0]= 0; + warn_deprecated<999999>(thd, buf1, buf2); } } @@ -1174,7 +1179,7 @@ int fill_sysvars(THD *thd, TABLE_LIST *tables, COND *cond) // VARIABLE_COMMENT fields[7]->store(var->option.comment, strlen(var->option.comment), - scs); + scs); // NUMERIC_MIN_VALUE // NUMERIC_MAX_VALUE diff --git a/sql/set_var.h b/sql/set_var.h index 8f7e3609f5f..562ee295be3 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -89,7 +89,6 @@ protected: ptrdiff_t offset; ///< offset to the value from global_system_variables on_check_function on_check; on_update_function on_update; - const char *const deprecation_substitute; public: sys_var(sys_var_chain *chain, const char *name_arg, const char *comment, diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index 22d0f4d3392..797d0ec49b9 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -5977,7 +5977,7 @@ ER_UNKNOWN_STORAGE_ENGINE 42000 sw "Injini ya uhifadhi isiyojulikana '%s'" ER_WARN_DEPRECATED_SYNTAX chi "弃用'%s',将在将来的版本中删除。请使用%s" - eng "'%s' is deprecated and will be removed in a future release. Please use %s instead" + eng "'%s' is deprecated and will be removed in a future release. Please use '%s' instead" ger "'%s' ist veraltet. Bitte benutzen Sie '%s'" geo "'%s' მოძველებულია და მომავალში ამოღებული იქნება. გამოიყენეთ %s" jpn "'%s' は将来のリリースで廃止予定です。代わりに %s を使用してください。" diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index ee49e7460f4..0f82341bb07 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1535,20 +1535,6 @@ uchar *get_bookmark_hash_key(const uchar *buff, size_t *length, return (uchar*) var->key; } -static inline void convert_dash_to_underscore(char *str, size_t len) -{ - for (char *p= str; p <= str+len; p++) - if (*p == '-') - *p= '_'; -} - -static inline void convert_underscore_to_dash(char *str, size_t len) -{ - for (char *p= str; p <= str+len; p++) - if (*p == '_') - *p= '-'; -} - #ifdef HAVE_PSI_INTERFACE static PSI_mutex_key key_LOCK_plugin; @@ -3718,8 +3704,6 @@ bool sys_var_pluginvar::global_update(THD *thd, set_var *var) void plugin_opt_set_limits(struct my_option *options, const struct st_mysql_sys_var *opt) { - options->sub_size= 0; - switch (opt->flags & (PLUGIN_VAR_TYPEMASK | PLUGIN_VAR_UNSIGNED | PLUGIN_VAR_THDLOCAL)) { /* global system variables */ @@ -4078,6 +4062,9 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, else options->value= options->u_max_value= *(uchar***) (opt + 1); + if (opt->flags & PLUGIN_VAR_DEPRECATED) + options->deprecation_substitute= ""; + char *option_name_ptr; options[1]= options[0]; options[1].name= option_name_ptr= (char*) alloc_root(mem_root, diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 57dd29104e8..60c236b4a23 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -1518,7 +1518,7 @@ static Sys_var_uint Sys_large_page_size( READ_ONLY GLOBAL_VAR(opt_large_page_size), NO_CMD_LINE, VALID_RANGE(0, UINT_MAX), DEFAULT(0), BLOCK_SIZE(1), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0), - DEPRECATED(1005, "")); + DEPRECATED_NO_REPLACEMENT(1005)); static Sys_var_mybool Sys_large_pages( "large_pages", "Enable support for large pages", @@ -1607,7 +1607,7 @@ static Sys_var_bit Sys_log_slow_admin_statements( SESSION_VAR(log_slow_disabled_statements), CMD_LINE(OPT_ARG), REVERSE(LOG_SLOW_DISABLE_ADMIN), DEFAULT(TRUE), 0, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0), - DEPRECATED(1100, "'@@log_slow_filter'")); + DEPRECATED(1100, "log_slow_filter")); static Sys_var_bit Sys_log_slow_slave_statements( "log_slow_slave_statements", @@ -2814,7 +2814,7 @@ static bool set_old_mode (sys_var *self, THD *thd, enum_var_type type) static Sys_var_mybool Sys_old_mode( "old", "Use compatible behavior from previous MariaDB version. See also --old-mode", SESSION_VAR(old_mode), CMD_LINE(OPT_ARG), DEFAULT(FALSE), 0, NOT_IN_BINLOG, ON_CHECK(0), - ON_UPDATE(set_old_mode), DEPRECATED(1009, "'@@old_mode'")); + ON_UPDATE(set_old_mode), DEPRECATED(1009, "old_mode")); static Sys_var_mybool Sys_opt_allow_suspicious_udfs( "allow_suspicious_udfs", @@ -4297,7 +4297,7 @@ static Sys_var_tx_isolation Sys_tx_isolation( SESSION_VAR(tx_isolation), NO_CMD_LINE, tx_isolation_names, DEFAULT(ISO_REPEATABLE_READ), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_tx_isolation), - ON_UPDATE(0), DEPRECATED(1101, "'@@transaction_isolation'")); + ON_UPDATE(0), DEPRECATED(1101, "transaction_isolation")); static Sys_var_tx_isolation Sys_transaction_isolation( "transaction_isolation", "Default transaction isolation level", @@ -4356,7 +4356,7 @@ static Sys_var_tx_read_only Sys_tx_read_only( "This variable is deprecated and will be removed in a future release.", SESSION_VAR(tx_read_only), NO_CMD_LINE, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_tx_read_only), - ON_UPDATE(0), DEPRECATED(1101, "'@@transaction_read_only'")); + ON_UPDATE(0), DEPRECATED(1101, "transaction_read_only")); static Sys_var_tx_read_only Sys_transaction_read_only( "transaction_read_only", "Default transaction access mode. If set to OFF, " @@ -4485,7 +4485,7 @@ static Sys_var_plugin Sys_storage_engine( SESSION_VAR(table_plugin), NO_CMD_LINE, MYSQL_STORAGE_ENGINE_PLUGIN, DEFAULT(&default_storage_engine), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_not_null), ON_UPDATE(0), - DEPRECATED(1005, "'@@default_storage_engine'")); + DEPRECATED(1005, "default_storage_engine")); static Sys_var_plugin Sys_default_tmp_storage_engine( "default_tmp_storage_engine", "The default storage engine for user-created temporary tables", @@ -4632,7 +4632,7 @@ static Sys_var_mybool Sys_big_tables( "longer needed, as the server now handles this automatically.", SESSION_VAR(big_tables), CMD_LINE(OPT_ARG), DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0), - DEPRECATED(1005, "")); + DEPRECATED_NO_REPLACEMENT(1005)); static Sys_var_bit Sys_big_selects( "sql_big_selects", "If set to 0, MariaDB will not perform large SELECTs." @@ -4734,7 +4734,7 @@ static Sys_var_bit Sys_sql_notes( SESSION_VAR(option_bits), NO_CMD_LINE, OPTION_SQL_NOTES, DEFAULT(TRUE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0), - DEPRECATED(1103, "'@@note_verbosity'")); + DEPRECATED(1103, "note_verbosity")); static Sys_var_bit Sys_auto_is_null( "sql_auto_is_null", "If set to 1, the query SELECT * FROM table_name WHERE " @@ -5107,7 +5107,7 @@ static Sys_var_mybool Sys_keep_files_on_create( SESSION_VAR(keep_files_on_create), CMD_LINE(OPT_ARG), DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0), - DEPRECATED(1008, "")); + DEPRECATED_NO_REPLACEMENT(1008)); static char *license; static Sys_var_charptr Sys_license( diff --git a/sql/sys_vars.inl b/sql/sys_vars.inl index 1d0722c7ae9..95f124bba77 100644 --- a/sql/sys_vars.inl +++ b/sql/sys_vars.inl @@ -70,6 +70,7 @@ */ #define REVERSE(X) ~(X) #define DEPRECATED(V, REPL) (check_deprecated_version(), REPL) +#define DEPRECATED_NO_REPLACEMENT(V) DEPRECATED(V, "") #define session_var(THD, TYPE) (*(TYPE*)session_var_ptr(THD)) #define global_var(TYPE) (*(TYPE*)global_var_ptr()) diff --git a/storage/maria/aria_chk.c b/storage/maria/aria_chk.c index b7ce90bb40a..ef8e27ee704 100644 --- a/storage/maria/aria_chk.c +++ b/storage/maria/aria_chk.c @@ -421,25 +421,24 @@ static struct my_option my_long_options[] = "Size of page buffer. Used by --safe-repair", &check_param.use_buffers, &check_param.use_buffers, 0, GET_ULONG, REQUIRED_ARG, PAGE_BUFFER_INIT, 1024L*1024L, - SIZE_T_MAX, (long) MALLOC_OVERHEAD, (long) IO_SIZE, 0}, + SIZE_T_MAX, 0, (long) IO_SIZE, 0}, { "read_buffer_size", OPT_READ_BUFFER_SIZE, "Read buffer size for sequential reads during scanning", &check_param.read_buffer_length, &check_param.read_buffer_length, 0, GET_ULONG, REQUIRED_ARG, (long) READ_BUFFER_INIT, (long) MALLOC_OVERHEAD, - ~0ULL, (long) MALLOC_OVERHEAD, (long) 1L, 0}, + ~0ULL, 0, (long) 1L, 0}, { "write_buffer_size", OPT_WRITE_BUFFER_SIZE, "Write buffer size for sequential writes during repair of fixed size or dynamic size rows", &check_param.write_buffer_length, &check_param.write_buffer_length, 0, GET_ULONG, REQUIRED_ARG, (long) READ_BUFFER_INIT, (long) MALLOC_OVERHEAD, - ~0UL, (long) MALLOC_OVERHEAD, (long) 1L, 0}, + ~0UL, 0, (long) 1L, 0}, { "sort_buffer_size", OPT_SORT_BUFFER_SIZE, "Size of sort buffer. Used by --recover", &check_param.orig_sort_buffer_length, &check_param.orig_sort_buffer_length, 0, GET_ULL, REQUIRED_ARG, - SORT_BUFFER_INIT, MARIA_MIN_SORT_MEMORY, SIZE_T_MAX/10, MALLOC_OVERHEAD, - 1L, 0}, + SORT_BUFFER_INIT, MARIA_MIN_SORT_MEMORY, SIZE_T_MAX/10, 0, 1L, 0}, { "sort_key_blocks", OPT_SORT_KEY_BLOCKS, "Internal buffer for sorting keys; Don't touch :)", &check_param.sort_key_blocks, diff --git a/storage/maria/aria_read_log.c b/storage/maria/aria_read_log.c index cde28e91c0a..e531be5bbc9 100644 --- a/storage/maria/aria_read_log.c +++ b/storage/maria/aria_read_log.c @@ -261,7 +261,7 @@ static struct my_option my_long_options[] = "The size of the buffer used for index blocks for Aria tables", &opt_page_buffer_size, &opt_page_buffer_size, 0, GET_ULL, REQUIRED_ARG, PAGE_BUFFER_INIT, - PAGE_BUFFER_INIT, SIZE_T_MAX, MALLOC_OVERHEAD, (long) IO_SIZE, 0}, + PAGE_BUFFER_INIT, SIZE_T_MAX, 0, (long) IO_SIZE, 0}, { "print-log-control-file", 'l', "Print the content of the aria_log_control_file", &opt_print_aria_log_control, &opt_print_aria_log_control, 0, @@ -290,7 +290,7 @@ static struct my_option my_long_options[] = "The size of the buffer used for transaction log for Aria tables", &opt_translog_buffer_size, &opt_translog_buffer_size, 0, GET_ULONG, REQUIRED_ARG, (long) TRANSLOG_PAGECACHE_SIZE, - 1024L*1024L, (long) ~(ulong) 0, (long) MALLOC_OVERHEAD, + 1024L*1024L, (long) ~(ulong) 0, 0, (long) IO_SIZE, 0}, {"undo", 'u', "Apply UNDO records to tables. (disable with --disable-undo). " diff --git a/storage/maria/aria_s3_copy.cc b/storage/maria/aria_s3_copy.cc index 6dfe7572a3f..79338ddc661 100644 --- a/storage/maria/aria_s3_copy.cc +++ b/storage/maria/aria_s3_copy.cc @@ -87,7 +87,7 @@ static struct my_option my_long_options[] = &opt_database, &opt_database, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"s3_block_size", 'B', "Block size for data/index blocks in s3", &opt_block_size, &opt_block_size, 0, GET_ULONG, REQUIRED_ARG, - 4*1024*1024, 64*1024, 16*1024*1024, MALLOC_OVERHEAD, 1024, 0 }, + 4*1024*1024, 64*1024, 16*1024*1024, 0, 1024, 0 }, {"s3_protocol_version", 'L', "Protocol used to communication with S3. One of \"Auto\", \"Legacy\", " "\"Original\", \"Amazon\", \"Path\" or \"Domain\". " diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c index 17d2eef898a..98a2ca9d83a 100644 --- a/storage/myisam/myisamchk.c +++ b/storage/myisam/myisamchk.c @@ -274,7 +274,7 @@ static struct my_option my_long_options[] = { "key_buffer_size", OPT_KEY_BUFFER_SIZE, "", &check_param.use_buffers, &check_param.use_buffers, 0, GET_ULL, REQUIRED_ARG, KEY_BUFFER_INIT, MALLOC_OVERHEAD, - SIZE_T_MAX, MALLOC_OVERHEAD, IO_SIZE, 0}, + SIZE_T_MAX, 0, IO_SIZE, 0}, { "key_cache_block_size", OPT_KEY_CACHE_BLOCK_SIZE, "", &opt_key_cache_block_size, &opt_key_cache_block_size, 0, @@ -288,24 +288,24 @@ static struct my_option my_long_options[] = &check_param.read_buffer_length, &check_param.read_buffer_length, 0, GET_ULONG, REQUIRED_ARG, READ_BUFFER_INIT, MALLOC_OVERHEAD, - INT_MAX32, MALLOC_OVERHEAD, 1L, 0}, + INT_MAX32, 0, 1L, 0}, { "write_buffer_size", OPT_WRITE_BUFFER_SIZE, "", &check_param.write_buffer_length, &check_param.write_buffer_length, 0, GET_ULONG, REQUIRED_ARG, READ_BUFFER_INIT, MALLOC_OVERHEAD, - INT_MAX32, MALLOC_OVERHEAD, 1L, 0}, + INT_MAX32, 0, 1L, 0}, { "sort_buffer_size", OPT_SORT_BUFFER_SIZE, "Deprecated. myisam_sort_buffer_size alias is being used", &check_param.sort_buffer_length, &check_param.sort_buffer_length, 0, GET_ULL, REQUIRED_ARG, SORT_BUFFER_INIT, MIN_SORT_BUFFER + MALLOC_OVERHEAD, - SIZE_T_MAX, MALLOC_OVERHEAD, 1L, 0}, + SIZE_T_MAX, 0, 1L, 0}, { "myisam_sort_buffer_size", OPT_SORT_BUFFER_SIZE, "Alias of sort_buffer_size parameter", &check_param.sort_buffer_length, &check_param.sort_buffer_length, 0, GET_ULL, REQUIRED_ARG, SORT_BUFFER_INIT, MIN_SORT_BUFFER + MALLOC_OVERHEAD, - SIZE_T_MAX, MALLOC_OVERHEAD, 1L, 0}, + SIZE_T_MAX, 0, 1L, 0}, { "sort_key_blocks", OPT_SORT_KEY_BLOCKS, "", &check_param.sort_key_blocks, &check_param.sort_key_blocks, 0, GET_ULONG, REQUIRED_ARG, diff --git a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result index 3010e220421..e1bf408c2ff 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_not_null.result @@ -928,7 +928,7 @@ y2 YEAR(2) NOT NULL, pk DATETIME PRIMARY KEY ) ENGINE=rocksdb; Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead SHOW COLUMNS IN t1; Field Type Null Key Default Extra d date NO NULL @@ -1170,7 +1170,7 @@ DROP TABLE IF EXISTS t1; #---------------------------------- CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY, c YEAR(2) NOT NULL) ENGINE=rocksdb; Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead SHOW COLUMNS IN t1; Field Type Null Key Default Extra pk int(11) NO PRI NULL auto_increment @@ -1190,7 +1190,7 @@ pk INT AUTO_INCREMENT PRIMARY KEY, c YEAR(2) NOT NULL DEFAULT '12' ) ENGINE=rocksdb; Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead SHOW COLUMNS IN t1; Field Type Null Key Default Extra pk int(11) NO PRI NULL auto_increment diff --git a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result index 14170e2a1b1..40629c24fff 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/col_opt_null.result @@ -818,7 +818,7 @@ y2 YEAR(2) NULL, pk DATETIME PRIMARY KEY ) ENGINE=rocksdb; Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead SHOW COLUMNS IN t1; Field Type Null Key Default Extra d date YES NULL @@ -1003,9 +1003,9 @@ c2 YEAR(2) NULL DEFAULT '12', pk INT AUTO_INCREMENT PRIMARY KEY ) ENGINE=rocksdb; Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead SHOW COLUMNS IN t1; Field Type Null Key Default Extra c year(2) YES NULL diff --git a/storage/rocksdb/mysql-test/rocksdb/r/type_date_time.result b/storage/rocksdb/mysql-test/rocksdb/r/type_date_time.result index 5c00c0412aa..979c9b9377b 100644 --- a/storage/rocksdb/mysql-test/rocksdb/r/type_date_time.result +++ b/storage/rocksdb/mysql-test/rocksdb/r/type_date_time.result @@ -12,7 +12,7 @@ y2 YEAR(2) , pk DATETIME PRIMARY KEY ) ENGINE=rocksdb; Warnings: -Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead SHOW COLUMNS IN t1; Field Type Null Key Default Extra d date YES NULL diff --git a/storage/spider/spd_param.cc b/storage/spider/spd_param.cc index 0c0f4d9b46f..4b84dfede39 100644 --- a/storage/spider/spd_param.cc +++ b/storage/spider/spd_param.cc @@ -661,7 +661,7 @@ static int spider_param_semi_table_lock_check( DBUG_RETURN(ER_SPIDER_ALTER_BEFORE_UNLOCK_NUM); } value->val_int(value, &tmp); - options.sub_size = 0; + options.deprecation_substitute = 0; options.var_type = GET_INT; options.def_value = ((MYSQL_SYSVAR_NAME(thdvar_int_t) *) var)->def_val; options.min_value = ((MYSQL_SYSVAR_NAME(thdvar_int_t) *) var)->min_val; @@ -714,7 +714,7 @@ static int spider_param_semi_table_lock_connection_check( DBUG_RETURN(ER_SPIDER_ALTER_BEFORE_UNLOCK_NUM); } value->val_int(value, &tmp); - options.sub_size = 0; + options.deprecation_substitute = 0; options.var_type = GET_INT; options.def_value = ((MYSQL_SYSVAR_NAME(thdvar_int_t) *) var)->def_val; options.min_value = ((MYSQL_SYSVAR_NAME(thdvar_int_t) *) var)->min_val;