diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result index 13139996e61..421afbbf1ba 100644 --- a/mysql-test/r/mysqld--help.result +++ b/mysql-test/r/mysqld--help.result @@ -949,9 +949,6 @@ The following options may be given as the first argument: The number of cached table definitions --table-open-cache=# The number of cached open tables - --table-open-cache-instances=# - MySQL 5.6 compatible option. Not used or needed in - MariaDB --tc-heuristic-recover=name Decision to use in heuristic recover process. Possible values are COMMIT or ROLLBACK. @@ -1287,7 +1284,6 @@ sysdate-is-now FALSE table-cache 400 table-definition-cache 400 table-open-cache 400 -table-open-cache-instances 1 tc-heuristic-recover COMMIT thread-cache-size 0 thread-pool-idle-timeout 60 diff --git a/mysql-test/suite/multi_source/info_logs-master.opt b/mysql-test/suite/multi_source/info_logs-master.opt index da4e6d3c455..8b83537f7d3 100644 --- a/mysql-test/suite/multi_source/info_logs-master.opt +++ b/mysql-test/suite/multi_source/info_logs-master.opt @@ -1 +1 @@ ---relay-log=relay.bin --relay-log-info=relay.bin.info +--relay-log=relay.bin --relay-log-info-file=relay.bin.info diff --git a/mysql-test/suite/sys_vars/disabled.def b/mysql-test/suite/sys_vars/disabled.def index 596191d09b6..758215208de 100644 --- a/mysql-test/suite/sys_vars/disabled.def +++ b/mysql-test/suite/sys_vars/disabled.def @@ -11,4 +11,4 @@ ############################################################################## innodb_flush_checkpoint_debug_basic: removed from XtraDB-26.0 - +table_open_cache_instances_basic: no such variable in MariaDB diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index 5c7cbe7a75a..2e97417340d 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -1315,6 +1315,8 @@ void my_print_help(const struct my_option *options) for (optp= options; optp->name; optp++) { + if (!optp->comment) + continue; if (optp->id && optp->id < 256) { printf(" -%c%s", optp->id, strlen(optp->name) ? ", " : " "); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index d646bc251f7..cb4fe5f956c 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -6609,6 +6609,19 @@ int handle_early_options() } +#define MYSQL_COMPATIBILITY_OPTION(option) \ + { option, OPT_MYSQL_COMPATIBILITY, \ + 0, 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0 } + +#define MYSQL_TO_BE_IMPLEMENTED_OPTION(option) \ + { option, OPT_MYSQL_TO_BE_IMPLEMENTED, \ + 0, 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0 } + +#define MYSQL_SUGGEST_ANALOG_OPTION(option, str) \ + { option, OPT_MYSQL_COMPATIBILITY, \ + 0, 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0 } + + /** System variables are automatically command-line options (few exceptions are documented in sys_var.h), so don't need @@ -7026,7 +7039,50 @@ struct my_option my_long_options[]= GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"table_cache", 0, "Deprecated; use --table-open-cache instead.", &tc_size, &tc_size, 0, GET_ULONG, - REQUIRED_ARG, TABLE_OPEN_CACHE_DEFAULT, 1, 512*1024L, 0, 1, 0} + REQUIRED_ARG, TABLE_OPEN_CACHE_DEFAULT, 1, 512*1024L, 0, 1, 0}, + + /* The following options exist in 5.6 but not in 10.0 */ + MYSQL_TO_BE_IMPLEMENTED_OPTION("default-tmp-storage-engine"), + MYSQL_COMPATIBILITY_OPTION("log-raw"), + MYSQL_TO_BE_IMPLEMENTED_OPTION("default-authentication-plugin"), + MYSQL_COMPATIBILITY_OPTION("binlog-max-flush-queue-time"), + MYSQL_TO_BE_IMPLEMENTED_OPTION("binlog-row-image"), + MYSQL_TO_BE_IMPLEMENTED_OPTION("explicit-defaults-for-timestamp"), + MYSQL_COMPATIBILITY_OPTION("master-info-repository"), + MYSQL_COMPATIBILITY_OPTION("relay-log-info-repository"), + MYSQL_SUGGEST_ANALOG_OPTION("binlog-rows-query-log-events", "--binlog-annotate-row-events"), + MYSQL_COMPATIBILITY_OPTION("binlog-order-commits"), + MYSQL_TO_BE_IMPLEMENTED_OPTION("log-throttle-queries-not-using-indexes"), + MYSQL_TO_BE_IMPLEMENTED_OPTION("end-markers-in-json"), + MYSQL_TO_BE_IMPLEMENTED_OPTION("optimizer-trace"), // OPTIMIZER_TRACE + MYSQL_TO_BE_IMPLEMENTED_OPTION("optimizer-trace-features"), // OPTIMIZER_TRACE + MYSQL_TO_BE_IMPLEMENTED_OPTION("optimizer-trace-offset"), // OPTIMIZER_TRACE + MYSQL_TO_BE_IMPLEMENTED_OPTION("optimizer-trace-limit"), // OPTIMIZER_TRACE + MYSQL_TO_BE_IMPLEMENTED_OPTION("optimizer-trace-max-mem-size"), // OPTIMIZER_TRACE + MYSQL_TO_BE_IMPLEMENTED_OPTION("eq-range-index-dive-limit"), + MYSQL_COMPATIBILITY_OPTION("server-id-bits"), + MYSQL_TO_BE_IMPLEMENTED_OPTION("slave-rows-search-algorithms"), // HAVE_REPLICATION + MYSQL_COMPATIBILITY_OPTION("table-open-cache-instances"), + MYSQL_TO_BE_IMPLEMENTED_OPTION("slave-allow-batching"), // HAVE_REPLICATION + MYSQL_COMPATIBILITY_OPTION("slave-checkpoint-period"), // HAVE_REPLICATION + MYSQL_COMPATIBILITY_OPTION("slave-checkpoint-group"), // HAVE_REPLICATION + MYSQL_SUGGEST_ANALOG_OPTION("slave-parallel-workers", "--slave-parallel-threads"), // HAVE_REPLICATION + MYSQL_SUGGEST_ANALOG_OPTION("slave-pending-jobs-size-max", "--slave-parallel-max-queued"), // HAVE_REPLICATION + MYSQL_TO_BE_IMPLEMENTED_OPTION("disconnect-on-expired-password"), + MYSQL_TO_BE_IMPLEMENTED_OPTION("sha256-password-private-key-path"), // HAVE_OPENSSL && !HAVE_YASSL + MYSQL_TO_BE_IMPLEMENTED_OPTION("sha256-password-public-key-path"), // HAVE_OPENSSL && !HAVE_YASSL + + /* The following options exist in 5.5 and 5.6 but not in 10.0 */ + MYSQL_SUGGEST_ANALOG_OPTION("abort-slave-event-count", "--debug-abort-slave-event-count"), + MYSQL_SUGGEST_ANALOG_OPTION("disconnect-slave-event-count", "--debug-disconnect-slave-event-count"), + MYSQL_SUGGEST_ANALOG_OPTION("exit-info", "--debug-exit-info"), + MYSQL_SUGGEST_ANALOG_OPTION("max-binlog-dump-events", "--debug-max-binlog-dump-events"), + MYSQL_SUGGEST_ANALOG_OPTION("sporadic-binlog-dump-fail", "--debug-sporadic-binlog-dump-fail"), + MYSQL_COMPATIBILITY_OPTION("new"), + + /* The following options were added after 5.6.10 */ + MYSQL_TO_BE_IMPLEMENTED_OPTION("rpl-stop-slave-timeout"), + MYSQL_TO_BE_IMPLEMENTED_OPTION("validate-user-plugins") // NO_EMBEDDED_ACCESS_CHECKS }; static int show_queries(THD *thd, SHOW_VAR *var, char *buff) @@ -8188,6 +8244,14 @@ mysqld_get_one_option(int optid, "for compatiblity with old my.cnf files.", opt->name); break; + case OPT_MYSQL_COMPATIBILITY: + sql_print_warning("'%s' is MySQL 5.6 compatible option. Not used or needed " + "in MariaDB.", opt->name); + break; + case OPT_MYSQL_TO_BE_IMPLEMENTED: + sql_print_warning("'%s' is MySQL 5.6 compatible option. To be implemented " + "in later versions.", opt->name); + break; case 'a': global_system_variables.sql_mode= MODE_ANSI; global_system_variables.tx_isolation= ISO_SERIALIZABLE; diff --git a/sql/mysqld.h b/sql/mysqld.h index 659cdd210c6..57ecfbb5553 100644 --- a/sql/mysqld.h +++ b/sql/mysqld.h @@ -575,6 +575,8 @@ enum options_mysqld OPT_SSL_KEY, OPT_UPDATE_LOG, OPT_WANT_CORE, + OPT_MYSQL_COMPATIBILITY, + OPT_MYSQL_TO_BE_IMPLEMENTED, OPT_which_is_always_the_last }; #endif diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 688099a9462..803d61e1252 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -2865,15 +2865,6 @@ static Sys_var_ulong Sys_table_cache_size( VALID_RANGE(1, 512*1024), DEFAULT(TABLE_OPEN_CACHE_DEFAULT), BLOCK_SIZE(1)); -static ulong table_cache_instances; -static Sys_var_ulong Sys_table_cache_instances( - "table_open_cache_instances", - "MySQL 5.6 compatible option. Not used or needed in MariaDB", - READ_ONLY GLOBAL_VAR(table_cache_instances), CMD_LINE(REQUIRED_ARG), - VALID_RANGE(1, 64), DEFAULT(1), - BLOCK_SIZE(1), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL), - ON_UPDATE(NULL), NULL); - static Sys_var_ulong Sys_thread_cache_size( "thread_cache_size", "How many threads we should keep in a cache for reuse",