From 68b5c12d76ca0d0cdfd86b629dd3e604f377879a Mon Sep 17 00:00:00 2001 From: Magne Mahre Date: Wed, 17 Feb 2010 13:15:07 +0100 Subject: [PATCH] WL#5182 Remove more deprecated 4.1/5.0 features WL#5154 was a task for formally deprecating and removing items that were mentioned in the manual as having been deprecated since MySQL 4.1 or 5.0, but that had never been removed. Since WL#5154 was created, examination of mysqld.cc, mysql.cc, and mysqldump.c reveals additional deprecations not mentioned in the manual. (In some cases, the items are simply not mentioned in the 5.1+ manuals.) This is a follow-on task to deprecate and remove these additional items. The deprecation happened in MySQL 5.1, and the options/variables are now removed from the code. client/mysql.cc: --no-tee is now removed client/mysqldump.c: --all is now removed -a now points to --create-options sql/mysqld.cc: delay-key-write-for-all-tables is removed --enable-locking is removed --log-update is removed --skip-locking is removed --skip-symlink is removed --sql-bin-update-same is removed --warnings is removed --record-buffer is removed --- client/client_priv.h | 4 +- client/mysql.cc | 7 ---- client/mysqldump.c | 5 +-- mysql-test/r/mysqld--help-notwin.result | 21 ---------- mysql-test/r/mysqld--help-win.result | 21 ---------- sql/mysql_priv.h | 4 -- sql/mysqld.cc | 56 +------------------------ 7 files changed, 5 insertions(+), 113 deletions(-) diff --git a/client/client_priv.h b/client/client_priv.h index 3090a50bd43..27ba3c973c5 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -34,7 +34,7 @@ enum options_client { OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, - OPT_PAGER, OPT_TEE, OPT_NOTEE, + OPT_PAGER, OPT_TEE, OPT_LOW_PRIORITY, OPT_AUTO_REPAIR, OPT_COMPRESS, OPT_DROP, OPT_LOCKS, OPT_KEYWORDS, OPT_DELAYED, OPT_OPTIMIZE, OPT_FTB, OPT_LTB, OPT_ENC, OPT_O_ENC, OPT_ESC, OPT_TABLES, @@ -48,7 +48,7 @@ enum options_client OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL, OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM, OPT_SKIP_OPTIMIZATION, 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_SERVER_ARG, OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME, OPT_SIGINT_IGNORE, OPT_HEXBLOB, OPT_ORDER_BY_PRIMARY, OPT_COUNT, #ifdef HAVE_NDBCLUSTER_DB diff --git a/client/mysql.cc b/client/mysql.cc index 4c22cc9ebed..179392d5965 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1511,8 +1511,6 @@ static struct my_option my_long_options[] = {"tee", OPT_TEE, "Append everything into outfile. See interactive help (\\h) also. Does not work in batch mode. Disable with --disable-tee. This option is disabled by default.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"no-tee", OPT_NOTEE, "Disable outfile. See interactive help (\\h) also. WARNING: option deprecated; use --disable-tee instead", 0, 0, 0, GET_NO_ARG, - NO_ARG, 0, 0, 0, 0, 0, 0}, #ifndef DONT_ALLOW_USER_CHANGE {"user", 'u', "User for login if not current user.", (uchar**) ¤t_user, (uchar**) ¤t_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -1651,11 +1649,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), else init_tee(argument); break; - case OPT_NOTEE: - printf("WARNING: option deprecated; use --disable-tee instead.\n"); - if (opt_outfile) - end_tee(); - break; case OPT_PAGER: if (argument == disabled_my_option) opt_nopager= 1; diff --git a/client/mysqldump.c b/client/mysqldump.c index fadb7e6649b..f94309205c6 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -184,9 +184,6 @@ HASH ignore_table; static struct my_option my_long_options[] = { - {"all", 'a', "Deprecated. Use --create-options instead.", - (uchar**) &create_options, (uchar**) &create_options, 0, GET_BOOL, NO_ARG, 1, - 0, 0, 0, 0, 0}, {"all-databases", 'A', "Dump all the databases. This will be same as --databases with all databases selected.", (uchar**) &opt_alldbs, (uchar**) &opt_alldbs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, @@ -239,7 +236,7 @@ static struct my_option my_long_options[] = {"compress", 'C', "Use compression in server/client protocol.", (uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"create-options", OPT_CREATE_OPTIONS, + {"create-options", 'a', "Include all MySQL specific create options.", (uchar**) &create_options, (uchar**) &create_options, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, diff --git a/mysql-test/r/mysqld--help-notwin.result b/mysql-test/r/mysqld--help-notwin.result index f8faeaf76ec..4a6993c54ee 100644 --- a/mysql-test/r/mysqld--help-notwin.result +++ b/mysql-test/r/mysqld--help-notwin.result @@ -109,10 +109,6 @@ The following options may be given as the first argument: The default week format used by WEEK() functions --delay-key-write[=name] Type of DELAY_KEY_WRITE - --delay-key-write-for-all-tables - Don't flush key buffers between writes for any MyISAM - table (Deprecated option, use --delay-key-write=all - instead). --delayed-insert-limit=# After inserting delayed_insert_limit rows, the INSERT DELAYED handler will check if there are any SELECT @@ -132,7 +128,6 @@ The following options may be given as the first argument: --div-precision-increment=# Precision of the result of '/' operator will be increased on that value - --enable-locking Deprecated option, use --external-locking instead. --engine-condition-pushdown Push supported query conditions to the storage engine. Deprecated, use --optimizer-switch instead. @@ -264,9 +259,6 @@ The following options may be given as the first argument: transactions that affect more than one storage engine, when binary log is disabled) --log-tc-size=# Size of transaction coordinator log. - --log-update[=name] The update log is deprecated since version 5.0, is - replaced by the binary log and this option justs turns on - --log-bin instead. -W, --log-warnings[=#] Log some not critical warnings to the log file --long-query-time=# Log all queries that have taken more than long_query_time @@ -497,7 +489,6 @@ The following options may be given as the first argument: When reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeks. If not set, then it's set to the value of record_buffer - --record-buffer=# Deprecated; use --read-buffer-size instead. --relay-log=name The location and name to use for relay logs --relay-log-index=name The location and name to use for the file that keeps a @@ -608,7 +599,6 @@ The following options may be given as the first argument: --skip-grant-tables Start without grant tables. This gives all users FULL ACCESS to all tables! --skip-host-cache Don't cache host names. - --skip-locking Deprecated option, use --skip-external-locking instead. --skip-name-resolve Don't resolve hostnames. All hostnames are IP's or 'localhost'. --skip-networking Don't allow connection with TCP/IP @@ -617,8 +607,6 @@ The following options may be given as the first argument: Don't allow 'SHOW DATABASE' commands --skip-slave-start If set, slave is not autostarted. --skip-stack-trace Don't print a stack trace on failure. - --skip-symlink Don't allow symlinking of tables. Deprecated option. Use - --skip-symbolic-links instead. --skip-thread-priority Don't give threads different priorities. This option is deprecated because it has no effect; the implied behavior @@ -670,10 +658,6 @@ The following options may be given as the first argument: --sporadic-binlog-dump-fail Option used by mysql-test for debugging and testing of replication. - --sql-bin-update-same - The update log is deprecated since version 5.0, is - replaced by the binary log and this option does nothing - anymore. --sql-mode=name Syntax: sql-mode=mode[,mode[,mode...]]. See the manual for the complete list of valid sql modes -s, --symbolic-links @@ -745,7 +729,6 @@ The following options may be given as the first argument: -V, --version Output version information and exit. --wait-timeout=# The number of seconds the server waits for activity on a connection before closing it - -W, --warnings[=#] Deprecated; use --log-warnings instead. Variables (--variable-name=value) and boolean options {FALSE|TRUE} Value (after reading options) @@ -786,7 +769,6 @@ delayed-insert-timeout 300 delayed-queue-size 1000 disconnect-slave-event-count 0 div-precision-increment 4 -enable-locking FALSE engine-condition-pushdown TRUE event-scheduler OFF expire-logs-days 0 @@ -834,7 +816,6 @@ log-slow-admin-statements FALSE log-slow-slave-statements FALSE log-tc tc.log log-tc-size 24576 -log-update (No default value) log-warnings 1 long-query-time 10 low-priority-updates FALSE @@ -918,7 +899,6 @@ range-alloc-block-size 4096 read-buffer-size 131072 read-only FALSE read-rnd-buffer-size 262144 -record-buffer 131072 relay-log (No default value) relay-log-index (No default value) relay-log-info-file relay-log.info @@ -977,7 +957,6 @@ updatable-views-with-limit YES use-symbolic-links FALSE verbose TRUE wait-timeout 28800 -warnings 1 To see what values a running MySQL server is using, type 'mysqladmin variables' instead of 'mysqld --verbose --help'. diff --git a/mysql-test/r/mysqld--help-win.result b/mysql-test/r/mysqld--help-win.result index abc7bdb2655..c9fe5344c42 100644 --- a/mysql-test/r/mysqld--help-win.result +++ b/mysql-test/r/mysqld--help-win.result @@ -109,10 +109,6 @@ The following options may be given as the first argument: The default week format used by WEEK() functions --delay-key-write[=name] Type of DELAY_KEY_WRITE - --delay-key-write-for-all-tables - Don't flush key buffers between writes for any MyISAM - table (Deprecated option, use --delay-key-write=all - instead). --delayed-insert-limit=# After inserting delayed_insert_limit rows, the INSERT DELAYED handler will check if there are any SELECT @@ -132,7 +128,6 @@ The following options may be given as the first argument: --div-precision-increment=# Precision of the result of '/' operator will be increased on that value - --enable-locking Deprecated option, use --external-locking instead. --engine-condition-pushdown Push supported query conditions to the storage engine. Deprecated, use --optimizer-switch instead. @@ -263,9 +258,6 @@ The following options may be given as the first argument: transactions that affect more than one storage engine, when binary log is disabled) --log-tc-size=# Size of transaction coordinator log. - --log-update[=name] The update log is deprecated since version 5.0, is - replaced by the binary log and this option justs turns on - --log-bin instead. -W, --log-warnings[=#] Log some not critical warnings to the log file --long-query-time=# Log all queries that have taken more than long_query_time @@ -497,7 +489,6 @@ The following options may be given as the first argument: When reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeks. If not set, then it's set to the value of record_buffer - --record-buffer=# Deprecated; use --read-buffer-size instead. --relay-log=name The location and name to use for relay logs --relay-log-index=name The location and name to use for the file that keeps a @@ -611,7 +602,6 @@ The following options may be given as the first argument: --skip-grant-tables Start without grant tables. This gives all users FULL ACCESS to all tables! --skip-host-cache Don't cache host names. - --skip-locking Deprecated option, use --skip-external-locking instead. --skip-name-resolve Don't resolve hostnames. All hostnames are IP's or 'localhost'. --skip-networking Don't allow connection with TCP/IP @@ -620,8 +610,6 @@ The following options may be given as the first argument: Don't allow 'SHOW DATABASE' commands --skip-slave-start If set, slave is not autostarted. --skip-stack-trace Don't print a stack trace on failure. - --skip-symlink Don't allow symlinking of tables. Deprecated option. Use - --skip-symbolic-links instead. --skip-thread-priority Don't give threads different priorities. This option is deprecated because it has no effect; the implied behavior @@ -673,10 +661,6 @@ The following options may be given as the first argument: --sporadic-binlog-dump-fail Option used by mysql-test for debugging and testing of replication. - --sql-bin-update-same - The update log is deprecated since version 5.0, is - replaced by the binary log and this option does nothing - anymore. --sql-mode=name Syntax: sql-mode=mode[,mode[,mode...]]. See the manual for the complete list of valid sql modes --standalone Dummy option to start as a standalone program (NT). @@ -749,7 +733,6 @@ The following options may be given as the first argument: -V, --version Output version information and exit. --wait-timeout=# The number of seconds the server waits for activity on a connection before closing it - -W, --warnings[=#] Deprecated; use --log-warnings instead. Variables (--variable-name=value) and boolean options {FALSE|TRUE} Value (after reading options) @@ -790,7 +773,6 @@ delayed-insert-timeout 300 delayed-queue-size 1000 disconnect-slave-event-count 0 div-precision-increment 4 -enable-locking FALSE engine-condition-pushdown TRUE event-scheduler OFF expire-logs-days 0 @@ -837,7 +819,6 @@ log-slow-admin-statements FALSE log-slow-slave-statements FALSE log-tc tc.log log-tc-size 24576 -log-update (No default value) log-warnings 1 long-query-time 10 low-priority-updates FALSE @@ -922,7 +903,6 @@ range-alloc-block-size 4096 read-buffer-size 131072 read-only FALSE read-rnd-buffer-size 262144 -record-buffer 131072 relay-log (No default value) relay-log-index (No default value) relay-log-info-file relay-log.info @@ -983,7 +963,6 @@ updatable-views-with-limit YES use-symbolic-links FALSE verbose TRUE wait-timeout 28800 -warnings 1 To see what values a running MySQL server is using, type 'mysqladmin variables' instead of 'mysqld --verbose --help'. diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 7ef8517ad13..477b443ff88 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -2629,7 +2629,6 @@ enum options_mysqld OPT_BOOTSTRAP, OPT_CONSOLE, OPT_DEBUG_SYNC_TIMEOUT, - OPT_DELAY_KEY_WRITE_ALL, OPT_ISAM_LOG, OPT_KEY_BUFFER_SIZE, OPT_KEY_CACHE_AGE_THRESHOLD, @@ -2648,19 +2647,16 @@ enum options_mysqld OPT_SAFE, OPT_SERVER_ID, OPT_SKIP_HOST_CACHE, - OPT_SKIP_LOCK, OPT_SKIP_NEW, OPT_SKIP_PRIOR, OPT_SKIP_RESOLVE, OPT_SKIP_STACK_TRACE, - OPT_SKIP_SYMLINKS, OPT_SLOW_QUERY_LOG, OPT_SSL_CA, OPT_SSL_CAPATH, OPT_SSL_CERT, OPT_SSL_CIPHER, OPT_SSL_KEY, - OPT_UPDATE_LOG, OPT_WANT_CORE, OPT_ENGINE_CONDITION_PUSHDOWN }; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 7b59a8a61ef..39c94d4f261 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4007,21 +4007,13 @@ static int init_server_components() Implementation of the above : - If mysqld is started with --log-update and --log-bin, ignore --log-update (print a warning), push a warning when SQL_LOG_UPDATE - is used, and turn off --sql-bin-update-same. + is used, This will completely ignore SQL_LOG_UPDATE - If mysqld is started with --log-update only, change it to --log-bin (with the filename passed to log-update, plus '-bin') (print a warning), push a warning when SQL_LOG_UPDATE is - used, and turn on --sql-bin-update-same. + used. This will translate SQL_LOG_UPDATE to SQL_LOG_BIN. - - Note that we tell the user that --sql-bin-update-same is deprecated and - does nothing, and we don't take into account if he used this option or - not; but internally we give this variable a value to have the behaviour - we want (i.e. have SQL_LOG_UPDATE influence SQL_LOG_BIN or not). - As sql-bin-update-same, log-update and log-bin cannot be changed by the - user after starting the server (they are not variables), the user will - not later interfere with the settings we do here. */ if (opt_bin_log) { @@ -6023,9 +6015,6 @@ struct my_option my_long_options[]= {"default-time-zone", 0, "Set the default time zone.", (uchar**) &default_tz_name, (uchar**) &default_tz_name, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, - {"delay-key-write-for-all-tables", OPT_DELAY_KEY_WRITE_ALL, - "Don't flush key buffers between writes for any MyISAM table (Deprecated option, use --delay-key-write=all instead).", - 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, #ifdef HAVE_OPENSSL {"des-key-file", 0, "Load keys for des_encrypt() and des_encrypt from given file.", @@ -6039,10 +6028,6 @@ struct my_option my_long_options[]= (uchar**) &disconnect_slave_event_count, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, #endif /* HAVE_REPLICATION */ - {"enable-locking", 0, - "Deprecated option, use --external-locking instead.", - (uchar**) &opt_external_locking, (uchar**) &opt_external_locking, - 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, #ifdef HAVE_STACK_TRACE_ON_SEGV {"enable-pstack", 0, "Print a symbolic stack trace on failure.", (uchar**) &opt_do_pstack, (uchar**) &opt_do_pstack, 0, GET_BOOL, NO_ARG, 0, 0, @@ -6127,11 +6112,6 @@ struct my_option my_long_options[]= REQUIRED_ARG, TC_LOG_MIN_SIZE, TC_LOG_MIN_SIZE, ULONG_MAX, 0, TC_LOG_PAGE_SIZE, 0}, #endif - {"log-update", OPT_UPDATE_LOG, - "The update log is deprecated since version 5.0, is replaced by the binary \ -log and this option justs turns on --log-bin instead.", - (uchar**) &opt_update_logname, (uchar**) &opt_update_logname, 0, GET_STR, - OPT_ARG, 0, 0, 0, 0, 0, 0}, {"master-info-file", 0, "The location and name of the file that remembers the master and where the I/O replication \ thread is in the master's binlogs.", @@ -6219,9 +6199,6 @@ Can't be set to 1 if --log-slave-updates is used.", #endif {"skip-host-cache", OPT_SKIP_HOST_CACHE, "Don't cache host names.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"skip-locking", OPT_SKIP_LOCK, - "Deprecated option, use --skip-external-locking instead.", - 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"skip-name-resolve", OPT_SKIP_RESOLVE, "Don't resolve hostnames. All hostnames are IP's or 'localhost'.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -6233,8 +6210,6 @@ Can't be set to 1 if --log-slave-updates is used.", {"skip-stack-trace", OPT_SKIP_STACK_TRACE, "Don't print a stack trace on failure.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"skip-symlink", OPT_SKIP_SYMLINKS, "Don't allow symlinking of tables. Deprecated option. Use --skip-symbolic-links instead.", - 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"skip-thread-priority", OPT_SKIP_PRIOR, "Don't give threads different priorities. This option is deprecated " "because it has no effect; the implied behavior is already the default.", @@ -6246,10 +6221,6 @@ Can't be set to 1 if --log-slave-updates is used.", (uchar**) &opt_sporadic_binlog_dump_fail, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, #endif /* HAVE_REPLICATION */ - {"sql-bin-update-same", 0, - "The update log is deprecated since version 5.0, is replaced by the " - "binary log and this option does nothing anymore.", - 0, 0, 0, GET_DISABLED, NO_ARG, 0, 0, 0, 0, 0, 0}, #ifdef HAVE_OPENSSL {"ssl", 0, "Enable SSL for connection (automatically enabled with other flags).", @@ -6308,20 +6279,12 @@ Can't be set to 1 if --log-slave-updates is used.", 0, 0}, {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"warnings", 'W', "Deprecated; use --log-warnings instead.", - (uchar**) &global_system_variables.log_warnings, - (uchar**) &max_system_variables.log_warnings, 0, GET_ULONG, OPT_ARG, - 1, 0, ULONG_MAX, 0, 0, 0}, {"plugin-load", 0, "Optional semicolon-separated list of plugins to load, where each plugin is " "identified as name=library, where name is the plugin name and library " "is the plugin library in plugin_dir.", (uchar**) &opt_plugin_load, (uchar**) &opt_plugin_load, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"record_buffer", 0, "Deprecated; use --read-buffer-size instead.", - (uchar**) &global_system_variables.read_buff_size, - (uchar**) &max_system_variables.read_buff_size,0, GET_ULONG, REQUIRED_ARG, - 128*1024L, IO_SIZE*2, INT_MAX32, 0, IO_SIZE, 0}, {"table_cache", 0, "Deprecated; use --table-open-cache instead.", (uchar**) &table_cache_size, (uchar**) &table_cache_size, 0, GET_ULONG, REQUIRED_ARG, TABLE_OPEN_CACHE_DEFAULT, 1, 512*1024L, 0, 1, 0}, @@ -7235,9 +7198,6 @@ mysqld_get_one_option(int optid, case (int) OPT_ISAM_LOG: opt_myisam_log=1; break; - case (int) OPT_UPDATE_LOG: - opt_update_log=1; - break; case (int) OPT_BIN_LOG: opt_bin_log= test(argument != disabled_my_option); break; @@ -7358,9 +7318,6 @@ mysqld_get_one_option(int optid, "and will be removed in MySQL 7.0. This option has no effect " "as the implied behavior is already the default."); break; - case (int) OPT_SKIP_LOCK: - opt_external_locking=0; - break; case (int) OPT_SKIP_HOST_CACHE: opt_specialflag|= SPECIAL_NO_HOST_CACHE; break; @@ -7373,9 +7330,6 @@ mysqld_get_one_option(int optid, case (int) OPT_SKIP_STACK_TRACE: test_flags|=TEST_NO_STACKTRACE; break; - case (int) OPT_SKIP_SYMLINKS: - my_use_symdir=0; - break; case (int) OPT_BIND_ADDRESS: { struct addrinfo *res_lst, hints; @@ -7408,12 +7362,6 @@ mysqld_get_one_option(int optid, case OPT_SERVER_ID: server_id_supplied = 1; break; - case OPT_DELAY_KEY_WRITE_ALL: - if (argument != disabled_my_option) - delay_key_write_options= DELAY_KEY_WRITE_ALL; - else - delay_key_write_options= DELAY_KEY_WRITE_NONE; - break; case OPT_ONE_THREAD: thread_handling= SCHEDULER_ONE_THREAD_PER_CONNECTION; break;