Commit 0482b6eb authored by Magne Mahre's avatar Magne Mahre

WL#5154 Remove deprecated 4.1 features

Several items said to be deprecated in the 4.1 manual
have never been removed.  This worklog adds deprecation
warnings when these items are used, and warns the user 
that the items will be removed in MySQL 5.6.

A couple of previously deprecation decision have been
reversed (see single file comments)
parent cdcf2ae9
...@@ -31,6 +31,15 @@ ...@@ -31,6 +31,15 @@
# endif # endif
#endif #endif
/* Version numbers for deprecation messages */
#define VER_CELOSIA "5.6"
#define WARN_DEPRECATED(Ver,Old,New) \
do { \
printf("Warning: The option '%s' is deprecated and will be removed " \
"in MySQL %s. Please use %s instead.\n", (Old), (Ver), (New)); \
} while(0);
enum options_client enum options_client
{ {
OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET,
...@@ -49,7 +58,7 @@ enum options_client ...@@ -49,7 +58,7 @@ enum options_client
OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM, OPT_SKIP_OPTIMIZATION, OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM, OPT_SKIP_OPTIMIZATION,
OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH, OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH,
OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_CREATE_OPTIONS, OPT_SERVER_ARG, OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_CREATE_OPTIONS, OPT_SERVER_ARG,
OPT_START_POSITION, OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME, OPT_POSITION, OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME,
OPT_SIGINT_IGNORE, OPT_HEXBLOB, OPT_ORDER_BY_PRIMARY, OPT_COUNT, OPT_SIGINT_IGNORE, OPT_HEXBLOB, OPT_ORDER_BY_PRIMARY, OPT_COUNT,
#ifdef HAVE_NDBCLUSTER_DB #ifdef HAVE_NDBCLUSTER_DB
OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING, OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING,
...@@ -80,5 +89,6 @@ enum options_client ...@@ -80,5 +89,6 @@ enum options_client
OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT, OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT,
OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE, OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE,
OPT_WRITE_BINLOG, OPT_DUMP_DATE, OPT_WRITE_BINLOG, OPT_DUMP_DATE,
OPT_FIRST_SLAVE,
OPT_MAX_CLIENT_OPTION OPT_MAX_CLIENT_OPTION
}; };
...@@ -54,6 +54,9 @@ static char *server_version= NULL; ...@@ -54,6 +54,9 @@ static char *server_version= NULL;
/* Array of options to pass to libemysqld */ /* Array of options to pass to libemysqld */
#define MAX_SERVER_ARGS 64 #define MAX_SERVER_ARGS 64
/* Version numbers for deprecation messages */
#define VER_CELOSIA "5.6"
void* sql_alloc(unsigned size); // Don't use mysqld alloc for these void* sql_alloc(unsigned size); // Don't use mysqld alloc for these
void sql_element_free(void *ptr); void sql_element_free(void *ptr);
#include "sql_string.h" #include "sql_string.h"
...@@ -1343,7 +1346,7 @@ static struct my_option my_long_options[] = ...@@ -1343,7 +1346,7 @@ static struct my_option my_long_options[] =
(uchar**) &opt_rehash, (uchar**) &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, (uchar**) &opt_rehash, (uchar**) &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
0, 0}, 0, 0},
{"no-auto-rehash", 'A', {"no-auto-rehash", 'A',
"No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect. WARNING: options deprecated; use --disable-auto-rehash instead.", "No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"batch", 'B', {"batch", 'B',
"Don't use history file. Disable interactive behavior. (Enables --silent)", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, "Don't use history file. Disable interactive behavior. (Enables --silent)", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
...@@ -1412,7 +1415,7 @@ static struct my_option my_long_options[] = ...@@ -1412,7 +1415,7 @@ static struct my_option my_long_options[] =
{"line-numbers", OPT_LINE_NUMBERS, "Write line numbers for errors.", {"line-numbers", OPT_LINE_NUMBERS, "Write line numbers for errors.",
(uchar**) &line_numbers, (uchar**) &line_numbers, 0, GET_BOOL, (uchar**) &line_numbers, (uchar**) &line_numbers, 0, GET_BOOL,
NO_ARG, 1, 0, 0, 0, 0, 0}, NO_ARG, 1, 0, 0, 0, 0, 0},
{"skip-line-numbers", 'L', "Don't write line number for errors. WARNING: -L is deprecated, use long version of this option instead.", 0, 0, 0, GET_NO_ARG, {"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"unbuffered", 'n', "Flush buffer after each query.", (uchar**) &unbuffered, {"unbuffered", 'n', "Flush buffer after each query.", (uchar**) &unbuffered,
(uchar**) &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
...@@ -1420,7 +1423,7 @@ static struct my_option my_long_options[] = ...@@ -1420,7 +1423,7 @@ static struct my_option my_long_options[] =
(uchar**) &column_names, (uchar**) &column_names, 0, GET_BOOL, (uchar**) &column_names, (uchar**) &column_names, 0, GET_BOOL,
NO_ARG, 1, 0, 0, 0, 0, 0}, NO_ARG, 1, 0, 0, 0, 0, 0},
{"skip-column-names", 'N', {"skip-column-names", 'N',
"Don't write column names in results. WARNING: -N is deprecated, use long version of this options instead.", "Don't write column names in results.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"set-variable", 'O', {"set-variable", 'O',
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.", "Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
...@@ -1650,7 +1653,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -1650,7 +1653,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
} }
break; break;
case OPT_NOPAGER: case OPT_NOPAGER:
printf("WARNING: option deprecated; use --disable-pager instead.\n"); WARN_DEPRECATED(VER_CELOSIA, "--no-pager", "--disable-pager");
opt_nopager= 1; opt_nopager= 1;
break; break;
case OPT_MYSQL_PROTOCOL: case OPT_MYSQL_PROTOCOL:
...@@ -1696,12 +1699,18 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -1696,12 +1699,18 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
if (!(status.line_buff= batch_readline_command(status.line_buff, argument))) if (!(status.line_buff= batch_readline_command(status.line_buff, argument)))
return 1; return 1;
break; break;
case 'g':
WARN_DEPRECATED(VER_CELOSIA, "-g, --no-named-commands", "--skip-named-commands");
break;
case 'o': case 'o':
if (argument == disabled_my_option) if (argument == disabled_my_option)
one_database= 0; one_database= 0;
else else
one_database= skip_updates= 1; one_database= skip_updates= 1;
break; break;
case 'O':
WARN_DEPRECATED(VER_CELOSIA, "-O, --set-variable", "--variable-name=value");
break;
case 'p': case 'p':
if (argument == disabled_my_option) if (argument == disabled_my_option)
argument= (char*) ""; // Don't require password argument= (char*) ""; // Don't require password
......
...@@ -282,6 +282,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -282,6 +282,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
charsets_dir = argument; charsets_dir = argument;
#endif #endif
break; break;
case 'O':
WARN_DEPRECATED(VER_CELOSIA, "--set-variable", "--variable-name=value");
break;
case OPT_MYSQL_PROTOCOL: case OPT_MYSQL_PROTOCOL:
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib, opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
opt->name); opt->name);
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_LOCAL_FILES) #define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_LOCAL_FILES)
char server_version[SERVER_VERSION_LENGTH]; char server_version[SERVER_VERSION_LENGTH];
ulong server_id = 0; ulong server_id = 0;
...@@ -1060,7 +1061,7 @@ static struct my_option my_long_options[] = ...@@ -1060,7 +1061,7 @@ static struct my_option my_long_options[] =
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").", "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
(uchar**) &port, (uchar**) &port, 0, GET_INT, REQUIRED_ARG, (uchar**) &port, (uchar**) &port, 0, GET_INT, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"position", 'j', "Deprecated. Use --start-position instead.", {"position", OPT_POSITION, "Deprecated. Use --start-position instead.",
(uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL, (uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL,
REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE, REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE,
/* COM_BINLOG_DUMP accepts only 4 bytes for the position */ /* COM_BINLOG_DUMP accepts only 4 bytes for the position */
...@@ -1103,7 +1104,7 @@ static struct my_option my_long_options[] = ...@@ -1103,7 +1104,7 @@ static struct my_option my_long_options[] =
"(you should probably use quotes for your shell to set it properly).", "(you should probably use quotes for your shell to set it properly).",
(uchar**) &start_datetime_str, (uchar**) &start_datetime_str, (uchar**) &start_datetime_str, (uchar**) &start_datetime_str,
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"start-position", OPT_START_POSITION, {"start-position", 'j',
"Start reading the binlog at position N. Applies to the first binlog " "Start reading the binlog at position N. Applies to the first binlog "
"passed on the command line.", "passed on the command line.",
(uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL, (uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL,
...@@ -1314,6 +1315,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -1314,6 +1315,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case 'R': case 'R':
remote_opt= 1; remote_opt= 1;
break; break;
case OPT_POSITION:
WARN_DEPRECATED(VER_CELOSIA, "--position", "--start-position");
break;
case OPT_MYSQL_PROTOCOL: case OPT_MYSQL_PROTOCOL:
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib, opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
opt->name); opt->name);
......
...@@ -282,7 +282,7 @@ static struct my_option my_long_options[] = ...@@ -282,7 +282,7 @@ static struct my_option my_long_options[] =
(uchar**) &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0}, (uchar**) &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
{"fields-escaped-by", OPT_ESC, "Fields in the i.file are escaped by ...", {"fields-escaped-by", OPT_ESC, "Fields in the i.file are escaped by ...",
(uchar**) &escaped, (uchar**) &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &escaped, (uchar**) &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"first-slave", 'x', "Deprecated, renamed to --lock-all-tables.", {"first-slave", OPT_FIRST_SLAVE, "Deprecated, renamed to --lock-all-tables.",
(uchar**) &opt_lock_all_tables, (uchar**) &opt_lock_all_tables, 0, GET_BOOL, NO_ARG, (uchar**) &opt_lock_all_tables, (uchar**) &opt_lock_all_tables, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"flush-logs", 'F', "Flush logs file in server before starting dump. " {"flush-logs", 'F', "Flush logs file in server before starting dump. "
...@@ -366,8 +366,7 @@ static struct my_option my_long_options[] = ...@@ -366,8 +366,7 @@ static struct my_option my_long_options[] =
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"no-data", 'd', "No row information.", (uchar**) &opt_no_data, {"no-data", 'd', "No row information.", (uchar**) &opt_no_data,
(uchar**) &opt_no_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &opt_no_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"no-set-names", 'N', {"no-set-names", 'N',"Suppress the SET NAMES statement",
"Deprecated. Use --skip-set-charset instead.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"opt", OPT_OPTIMIZE, {"opt", OPT_OPTIMIZE,
"Same as --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys. Enabled by default, disable with --skip-opt.", "Same as --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys. Enabled by default, disable with --skip-opt.",
...@@ -760,6 +759,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -760,6 +759,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case '?': case '?':
usage(); usage();
exit(0); exit(0);
case 'O':
WARN_DEPRECATED(VER_CELOSIA, "--set-variable", "--variable-name=value");
break;
case (int) OPT_FIRST_SLAVE:
WARN_DEPRECATED(VER_CELOSIA, "--first-slave", "--lock-all-tables");
break;
case (int) OPT_MASTER_DATA: case (int) OPT_MASTER_DATA:
if (!argument) /* work like in old versions */ if (!argument) /* work like in old versions */
opt_master_data= MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL; opt_master_data= MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL;
......
...@@ -682,7 +682,7 @@ select timestampadd(SQL_TSI_FRAC_SECOND, 1, date) from t1; ...@@ -682,7 +682,7 @@ select timestampadd(SQL_TSI_FRAC_SECOND, 1, date) from t1;
timestampadd(SQL_TSI_FRAC_SECOND, 1, date) timestampadd(SQL_TSI_FRAC_SECOND, 1, date)
2003-01-02 00:00:00.000001 2003-01-02 00:00:00.000001
Warnings: Warnings:
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead
select timestampdiff(MONTH, '2001-02-01', '2001-05-01') as a; select timestampdiff(MONTH, '2001-02-01', '2001-05-01') as a;
a a
3 3
...@@ -717,7 +717,7 @@ select timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05 ...@@ -717,7 +717,7 @@ select timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05
a a
7689538999999 7689538999999
Warnings: Warnings:
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead
select timestampdiff(SQL_TSI_DAY, '1986-02-01', '1986-03-01') as a1, select timestampdiff(SQL_TSI_DAY, '1986-02-01', '1986-03-01') as a1,
timestampdiff(SQL_TSI_DAY, '1900-02-01', '1900-03-01') as a2, timestampdiff(SQL_TSI_DAY, '1900-02-01', '1900-03-01') as a2,
timestampdiff(SQL_TSI_DAY, '1996-02-01', '1996-03-01') as a3, timestampdiff(SQL_TSI_DAY, '1996-02-01', '1996-03-01') as a3,
...@@ -1088,7 +1088,7 @@ timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12: ...@@ -1088,7 +1088,7 @@ timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:
id select_type table type possible_keys key key_len ref rows filtered Extra id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings: Warnings:
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead
Note 1003 select timestampdiff(WEEK,'2001-02-01','2001-05-01') AS `a1`,timestampdiff(SECOND_FRAC,'2001-02-01 12:59:59.120000','2001-05-01 12:58:58.119999') AS `a2` Note 1003 select timestampdiff(WEEK,'2001-02-01','2001-05-01') AS `a1`,timestampdiff(SECOND_FRAC,'2001-02-01 12:59:59.120000','2001-05-01 12:58:58.119999') AS `a2`
select time_format('100:00:00', '%H %k %h %I %l'); select time_format('100:00:00', '%H %k %h %I %l');
time_format('100:00:00', '%H %k %h %I %l') time_format('100:00:00', '%H %k %h %I %l')
...@@ -1287,12 +1287,12 @@ SELECT TIMESTAMPADD(FRAC_SECOND, 1, '2008-02-18'); ...@@ -1287,12 +1287,12 @@ SELECT TIMESTAMPADD(FRAC_SECOND, 1, '2008-02-18');
TIMESTAMPADD(FRAC_SECOND, 1, '2008-02-18') TIMESTAMPADD(FRAC_SECOND, 1, '2008-02-18')
2008-02-18 00:00:00.000001 2008-02-18 00:00:00.000001
Warnings: Warnings:
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead
SELECT TIMESTAMPDIFF(FRAC_SECOND, '2008-02-17', '2008-02-18'); SELECT TIMESTAMPDIFF(FRAC_SECOND, '2008-02-17', '2008-02-18');
TIMESTAMPDIFF(FRAC_SECOND, '2008-02-17', '2008-02-18') TIMESTAMPDIFF(FRAC_SECOND, '2008-02-17', '2008-02-18')
86400000000 86400000000
Warnings: Warnings:
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead
SELECT DATE_ADD('2008-02-18', INTERVAL 1 FRAC_SECOND); SELECT DATE_ADD('2008-02-18', INTERVAL 1 FRAC_SECOND);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FRAC_SECOND)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FRAC_SECOND)' at line 1
SELECT DATE_SUB('2008-02-18', INTERVAL 1 FRAC_SECOND); SELECT DATE_SUB('2008-02-18', INTERVAL 1 FRAC_SECOND);
......
...@@ -93,6 +93,7 @@ ROLLBACK /* added by mysqlbinlog */; ...@@ -93,6 +93,7 @@ ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
--- --position -- --- --position --
Warning: The option '--position' is deprecated and will be removed in MySQL 5.6. Please use --start-position instead.
/*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/; DELIMITER /*!*/;
...@@ -193,6 +194,7 @@ ROLLBACK /* added by mysqlbinlog */; ...@@ -193,6 +194,7 @@ ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
--- --position -- --- --position --
Warning: The option '--position' is deprecated and will be removed in MySQL 5.6. Please use --start-position instead.
/*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/; DELIMITER /*!*/;
...@@ -233,6 +235,7 @@ DELIMITER ; ...@@ -233,6 +235,7 @@ DELIMITER ;
# End of log file # End of log file
ROLLBACK /* added by mysqlbinlog */; ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
Warning: The option '--position' is deprecated and will be removed in MySQL 5.6. Please use --start-position instead.
/*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/; DELIMITER /*!*/;
......
...@@ -566,7 +566,7 @@ set sql_log_bin=1; ...@@ -566,7 +566,7 @@ set sql_log_bin=1;
set sql_log_off=1; set sql_log_off=1;
set sql_log_update=1; set sql_log_update=1;
Warnings: Warnings:
Note 1315 The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored Note 1315 The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored. This option will be removed in MySQL 5.6.
set sql_low_priority_updates=1; set sql_low_priority_updates=1;
set sql_max_join_size=200; set sql_max_join_size=200;
select @@sql_max_join_size,@@max_join_size; select @@sql_max_join_size,@@max_join_size;
......
...@@ -146,6 +146,10 @@ int handle_options(int *argc, char ***argv, ...@@ -146,6 +146,10 @@ int handle_options(int *argc, char ***argv,
{ /* --set-variable, or -O */ { /* --set-variable, or -O */
if (*cur_arg == 'O') if (*cur_arg == 'O')
{ {
my_getopt_error_reporter(WARNING_LEVEL,
"%s: Option '-O' is deprecated. "
"Use --variable-name=value instead.",
my_progname);
must_be_var= 1; must_be_var= 1;
if (!(*++cur_arg)) /* If not -Ovar=# */ if (!(*++cur_arg)) /* If not -Ovar=# */
...@@ -165,6 +169,11 @@ int handle_options(int *argc, char ***argv, ...@@ -165,6 +169,11 @@ int handle_options(int *argc, char ***argv,
} }
else if (!getopt_compare_strings(cur_arg, "-set-variable", 13)) else if (!getopt_compare_strings(cur_arg, "-set-variable", 13))
{ {
my_getopt_error_reporter(WARNING_LEVEL,
"%s: Option '--set-variable' is deprecated. "
"Use --variable-name=value instead.",
my_progname);
must_be_var= 1; must_be_var= 1;
if (cur_arg[13] == '=') if (cur_arg[13] == '=')
{ {
......
...@@ -68,7 +68,10 @@ sub main ...@@ -68,7 +68,10 @@ sub main
# than a correct --defaults-extra-file option # than a correct --defaults-extra-file option
unshift @defaults_options, "--defaults-extra-file=$1"; unshift @defaults_options, "--defaults-extra-file=$1";
print "WARNING: --config-file is deprecated and will be removed\n";
print "in MySQL 5.6. Please use --defaults-extra-file instead\n";
} }
}
} }
foreach (@defaults_options) foreach (@defaults_options)
......
...@@ -111,6 +111,10 @@ char* query_table_status(THD *thd,const char *db,const char *table_name); ...@@ -111,6 +111,10 @@ char* query_table_status(THD *thd,const char *db,const char *table_name);
#define PREV_BITS(type,A) ((type) (((type) 1 << (A)) -1)) #define PREV_BITS(type,A) ((type) (((type) 1 << (A)) -1))
#define all_bits_set(A,B) ((A) & (B) != (B)) #define all_bits_set(A,B) ((A) & (B) != (B))
/* Version numbers for deprecation messages */
#define VER_BETONY "5.5"
#define VER_CELOSIA "5.6"
#define WARN_DEPRECATED(Thd,Ver,Old,New) \ #define WARN_DEPRECATED(Thd,Ver,Old,New) \
do { \ do { \
DBUG_ASSERT(strncmp(Ver, MYSQL_SERVER_VERSION, sizeof(Ver)-1) > 0); \ DBUG_ASSERT(strncmp(Ver, MYSQL_SERVER_VERSION, sizeof(Ver)-1) > 0); \
......
...@@ -5603,6 +5603,7 @@ enum options_mysqld ...@@ -5603,6 +5603,7 @@ enum options_mysqld
OPT_DISCONNECT_SLAVE_EVENT_COUNT, OPT_TC_HEURISTIC_RECOVER, OPT_DISCONNECT_SLAVE_EVENT_COUNT, OPT_TC_HEURISTIC_RECOVER,
OPT_ABORT_SLAVE_EVENT_COUNT, OPT_ABORT_SLAVE_EVENT_COUNT,
OPT_LOG_BIN_TRUST_FUNCTION_CREATORS, OPT_LOG_BIN_TRUST_FUNCTION_CREATORS,
OPT_LOG_BIN_TRUST_FUNCTION_CREATORS_OLD,
OPT_ENGINE_CONDITION_PUSHDOWN, OPT_NDB_CONNECTSTRING, OPT_ENGINE_CONDITION_PUSHDOWN, OPT_NDB_CONNECTSTRING,
OPT_NDB_USE_EXACT_COUNT, OPT_NDB_USE_TRANSACTIONS, OPT_NDB_USE_EXACT_COUNT, OPT_NDB_USE_TRANSACTIONS,
OPT_NDB_FORCE_SEND, OPT_NDB_AUTOINCREMENT_PREFETCH_SZ, OPT_NDB_FORCE_SEND, OPT_NDB_AUTOINCREMENT_PREFETCH_SZ,
...@@ -5683,6 +5684,7 @@ enum options_mysqld ...@@ -5683,6 +5684,7 @@ enum options_mysqld
OPT_EXPIRE_LOGS_DAYS, OPT_EXPIRE_LOGS_DAYS,
OPT_GROUP_CONCAT_MAX_LEN, OPT_GROUP_CONCAT_MAX_LEN,
OPT_DEFAULT_COLLATION, OPT_DEFAULT_COLLATION,
OPT_DEFAULT_COLLATION_OLD,
OPT_CHARACTER_SET_CLIENT_HANDSHAKE, OPT_CHARACTER_SET_CLIENT_HANDSHAKE,
OPT_CHARACTER_SET_FILESYSTEM, OPT_CHARACTER_SET_FILESYSTEM,
OPT_LC_TIME_NAMES, OPT_LC_TIME_NAMES,
...@@ -5857,7 +5859,7 @@ struct my_option my_long_options[] = ...@@ -5857,7 +5859,7 @@ struct my_option my_long_options[] =
{"default-character-set", 'C', "Set the default character set (deprecated option, use --character-set-server instead).", {"default-character-set", 'C', "Set the default character set (deprecated option, use --character-set-server instead).",
(uchar**) &default_character_set_name, (uchar**) &default_character_set_name, (uchar**) &default_character_set_name, (uchar**) &default_character_set_name,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{"default-collation", OPT_DEFAULT_COLLATION, "Set the default collation (deprecated option, use --collation-server instead).", {"default-collation", OPT_DEFAULT_COLLATION_OLD, "Set the default collation (deprecated option, use --collation-server instead).",
(uchar**) &default_collation_name, (uchar**) &default_collation_name, (uchar**) &default_collation_name, (uchar**) &default_collation_name,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
{"default-storage-engine", OPT_STORAGE_ENGINE, {"default-storage-engine", OPT_STORAGE_ENGINE,
...@@ -5988,7 +5990,7 @@ each time the SQL thread starts.", ...@@ -5988,7 +5990,7 @@ each time the SQL thread starts.",
compatibility; the behaviour was also changed to apply only to functions compatibility; the behaviour was also changed to apply only to functions
(and triggers). In a future release this old name could be removed. (and triggers). In a future release this old name could be removed.
*/ */
{"log-bin-trust-routine-creators", OPT_LOG_BIN_TRUST_FUNCTION_CREATORS, {"log-bin-trust-routine-creators", OPT_LOG_BIN_TRUST_FUNCTION_CREATORS_OLD,
"(deprecated) Use log-bin-trust-function-creators.", "(deprecated) Use log-bin-trust-function-creators.",
(uchar**) &trust_function_creators, (uchar**) &trust_function_creators, 0, (uchar**) &trust_function_creators, (uchar**) &trust_function_creators, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
...@@ -7905,6 +7907,9 @@ mysqld_get_one_option(int optid, ...@@ -7905,6 +7907,9 @@ mysqld_get_one_option(int optid,
#endif #endif
opt_endinfo=1; /* unireg: memory allocation */ opt_endinfo=1; /* unireg: memory allocation */
break; break;
case '0':
WARN_DEPRECATED(NULL, VER_CELOSIA, "--log-long-format", "--log-short-format");
break;
case 'a': case 'a':
global_system_variables.sql_mode= fix_sql_mode(MODE_ANSI); global_system_variables.sql_mode= fix_sql_mode(MODE_ANSI);
global_system_variables.tx_isolation= ISO_SERIALIZABLE; global_system_variables.tx_isolation= ISO_SERIALIZABLE;
...@@ -7913,6 +7918,7 @@ mysqld_get_one_option(int optid, ...@@ -7913,6 +7918,7 @@ mysqld_get_one_option(int optid,
strmake(mysql_home,argument,sizeof(mysql_home)-1); strmake(mysql_home,argument,sizeof(mysql_home)-1);
break; break;
case 'C': case 'C':
WARN_DEPRECATED(NULL, VER_CELOSIA, "--default-character-set", "--character-set-server");
if (default_collation_name == compiled_default_collation_name) if (default_collation_name == compiled_default_collation_name)
default_collation_name= 0; default_collation_name= 0;
break; break;
...@@ -7935,6 +7941,9 @@ mysqld_get_one_option(int optid, ...@@ -7935,6 +7941,9 @@ mysqld_get_one_option(int optid,
case 'L': case 'L':
strmake(language, argument, sizeof(language)-1); strmake(language, argument, sizeof(language)-1);
break; break;
case 'O':
WARN_DEPRECATED(NULL, VER_CELOSIA, "--set-variable", "--variable-name=value");
break;
#ifdef HAVE_REPLICATION #ifdef HAVE_REPLICATION
case OPT_SLAVE_SKIP_ERRORS: case OPT_SLAVE_SKIP_ERRORS:
init_slave_skip_errors(argument); init_slave_skip_errors(argument);
...@@ -7969,6 +7978,15 @@ mysqld_get_one_option(int optid, ...@@ -7969,6 +7978,15 @@ mysqld_get_one_option(int optid,
test_flags= argument ? (uint) atoi(argument) : 0; test_flags= argument ? (uint) atoi(argument) : 0;
opt_endinfo=1; opt_endinfo=1;
break; break;
case (int) OPT_DEFAULT_COLLATION_OLD:
WARN_DEPRECATED(NULL, VER_CELOSIA, "--default-collation", "--collation-server");
break;
case (int) OPT_SAFE_SHOW_DB:
WARN_DEPRECATED(NULL, VER_CELOSIA, "--safe-show-database", "GRANT SHOW DATABASES");
break;
case (int) OPT_LOG_BIN_TRUST_FUNCTION_CREATORS_OLD:
WARN_DEPRECATED(NULL, VER_CELOSIA, "--log-bin-trust-routine-creators", "--log-bin-trust-function-creators");
break;
case (int) OPT_BIG_TABLES: case (int) OPT_BIG_TABLES:
thd_startup_options|=OPTION_BIG_TABLES; thd_startup_options|=OPTION_BIG_TABLES;
break; break;
......
...@@ -4139,7 +4139,7 @@ bool process_key_caches(process_key_cache_t func) ...@@ -4139,7 +4139,7 @@ bool process_key_caches(process_key_cache_t func)
void sys_var_trust_routine_creators::warn_deprecated(THD *thd) void sys_var_trust_routine_creators::warn_deprecated(THD *thd)
{ {
WARN_DEPRECATED(thd, "6.0", "@@log_bin_trust_routine_creators", WARN_DEPRECATED(thd, VER_CELOSIA, "@@log_bin_trust_routine_creators",
"'@@log_bin_trust_function_creators'"); "'@@log_bin_trust_function_creators'");
} }
......
...@@ -5138,11 +5138,11 @@ ER_SP_BADSTATEMENT 0A000 ...@@ -5138,11 +5138,11 @@ ER_SP_BADSTATEMENT 0A000
eng "%s is not allowed in stored procedures" eng "%s is not allowed in stored procedures"
ger "%s ist in gespeicherten Prozeduren nicht erlaubt" ger "%s ist in gespeicherten Prozeduren nicht erlaubt"
ER_UPDATE_LOG_DEPRECATED_IGNORED 42000 ER_UPDATE_LOG_DEPRECATED_IGNORED 42000
eng "The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored" eng "The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored. This option will be removed in MySQL 5.6."
ger "Das Update-Log ist veraltet und wurde durch das Binr-Log ersetzt. SET SQL_LOG_UPDATE wird ignoriert" ger "Das Update-Log ist veraltet und wurde durch das Binr-Log ersetzt. SET SQL_LOG_UPDATE wird ignoriert. Diese Option wird in MySQL 5.6 entfernt."
ER_UPDATE_LOG_DEPRECATED_TRANSLATED 42000 ER_UPDATE_LOG_DEPRECATED_TRANSLATED 42000
eng "The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been translated to SET SQL_LOG_BIN" eng "The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been translated to SET SQL_LOG_BIN. This option will be removed in MySQL 5.6."
ger "Das Update-Log ist veraltet und wurde durch das Binr-Log ersetzt. SET SQL_LOG_UPDATE wurde in SET SQL_LOG_BIN bersetzt" ger "Das Update-Log ist veraltet und wurde durch das Binr-Log ersetzt. SET SQL_LOG_UPDATE wurde in SET SQL_LOG_BIN bersetzt. Diese Option wird in MySQL 5.6 entfernt."
ER_QUERY_INTERRUPTED 70100 ER_QUERY_INTERRUPTED 70100
eng "Query execution was interrupted" eng "Query execution was interrupted"
ger "Ausfhrung der Abfrage wurde unterbrochen" ger "Ausfhrung der Abfrage wurde unterbrochen"
......
...@@ -8932,7 +8932,7 @@ interval_time_stamp: ...@@ -8932,7 +8932,7 @@ interval_time_stamp:
implementation without changing its implementation without changing its
resolution. resolution.
*/ */
WARN_DEPRECATED(yythd, "6.2", "FRAC_SECOND", "MICROSECOND"); WARN_DEPRECATED(yythd, VER_CELOSIA, "FRAC_SECOND", "MICROSECOND");
} }
; ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment