diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 73499cdc7d6..08332672715 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -5044,8 +5044,12 @@ static int init_server_components() if (remaining_argc > 1) { int ho_error; - struct my_option no_opts[]= + struct my_option removed_opts[]= { + /* All options in this list are accepted by the server for backwards + compatibility, but do not have any effect otherwise, they behave + as if supplied with --loose. Whenever a deprecated option is removed + it should be appended here. */ {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; /* @@ -5054,7 +5058,7 @@ static int init_server_components() */ my_getopt_skip_unknown= 0; - if ((ho_error= handle_options(&remaining_argc, &remaining_argv, no_opts, + if ((ho_error= handle_options(&remaining_argc, &remaining_argv, removed_opts, mysqld_get_one_option))) unireg_abort(ho_error); /* Add back the program name handle_options removes */ @@ -6387,6 +6391,10 @@ int handle_early_options() { option, OPT_MYSQL_COMPATIBILITY, \ 0, 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0 } +#define MARIADB_REMOVED_OPTION(option) \ + { option, OPT_REMOVED_OPTION, \ + 0, 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0 } + /** System variables are automatically command-line options (few @@ -8009,6 +8017,8 @@ mysqld_get_one_option(const struct my_option *opt, char *argument, "for compatibility with old my.cnf files.", opt->name); break; + case OPT_REMOVED_OPTION: + break; case OPT_MYSQL_COMPATIBILITY: sql_print_warning("'%s' is MySQL 5.6 / 5.7 compatible option. Not used or " "needed in MariaDB.", opt->name); diff --git a/sql/mysqld.h b/sql/mysqld.h index 80e1876a70c..4f4e608e811 100644 --- a/sql/mysqld.h +++ b/sql/mysqld.h @@ -655,6 +655,7 @@ enum options_mysqld OPT_CONSOLE, OPT_DEBUG_SYNC_TIMEOUT, OPT_DEPRECATED_OPTION, + OPT_REMOVED_OPTION, OPT_IGNORE_DB_DIRECTORY, OPT_ISAM_LOG, OPT_KEY_BUFFER_SIZE,