diff options
39 files changed, 88 insertions, 58 deletions
diff --git a/include/my_getopt.h b/include/my_getopt.h index 18b4bf10698..499cefd93d6 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -102,6 +102,7 @@ typedef void *(*my_getopt_value)(const char *, uint, const struct my_option *, extern char *disabled_my_option; extern my_bool my_getopt_print_errors; extern my_bool my_getopt_skip_unknown; +extern my_bool my_getopt_prefix_matching; extern my_error_reporter my_getopt_error_reporter; extern int handle_options (int *argc, char ***argv, diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf index 33881666b57..1ab9cd9b1e7 100644 --- a/mysql-test/include/default_mysqld.cnf +++ b/mysql-test/include/default_mysqld.cnf @@ -16,6 +16,8 @@ # Default values that applies to all MySQL Servers [mysqld] +disable-getopt-prefix-matching + open-files-limit= 1024 local-infile character-set-server= latin1 diff --git a/mysql-test/include/have_innodb.combinations b/mysql-test/include/have_innodb.combinations index 5b8d376d1b9..49ae741b269 100644 --- a/mysql-test/include/have_innodb.combinations +++ b/mysql-test/include/have_innodb.combinations @@ -3,12 +3,14 @@ ignore-builtin-innodb plugin-load-add=$HA_INNODB_SO innodb innodb-cmpmem +innodb-cmp-per-index innodb-trx +innodb-locks innodb-buffer-pool-stats innodb-buffer-page innodb-buffer-page-lru innodb-sys-foreign -innodb-sys-foreign-col +innodb-sys-foreign-cols innodb-sys-tables innodb-metrics @@ -17,24 +19,27 @@ ignore-builtin-innodb plugin-load-add=$HA_XTRADB_SO innodb innodb-cmpmem +innodb-cmp-per-index innodb-trx +innodb-locks innodb-buffer-pool-stats innodb-buffer-page innodb-buffer-page-lru innodb-sys-foreign -innodb-sys-foreign-col +innodb-sys-foreign-cols innodb-sys-tables innodb-metrics [xtradb] innodb innodb-cmpmem +innodb-cmp-per-index innodb-trx +innodb-locks innodb-metrics innodb-buffer-pool-stats innodb-buffer-page innodb-buffer-page-lru innodb-sys-foreign -innodb-sys-foreign-col +innodb-sys-foreign-cols innodb-sys-tables -innodb-metrics diff --git a/mysql-test/include/have_xtradb.combinations b/mysql-test/include/have_xtradb.combinations index 20e07c62635..0419dc91171 100644 --- a/mysql-test/include/have_xtradb.combinations +++ b/mysql-test/include/have_xtradb.combinations @@ -4,10 +4,10 @@ plugin-load-add=$HA_XTRADB_SO innodb innodb-cmpmem innodb-trx -innodb-sys-index +innodb-sys-indexes [xtradb] innodb innodb-cmpmem innodb-trx -innodb-sys-index +innodb-sys-indexes diff --git a/mysql-test/r/information_schema_all_engines.result b/mysql-test/r/information_schema_all_engines.result index a1036663ed2..2abecfa346f 100644 --- a/mysql-test/r/information_schema_all_engines.result +++ b/mysql-test/r/information_schema_all_engines.result @@ -23,7 +23,6 @@ INNODB_CMPMEM INNODB_CMPMEM_RESET INNODB_CMP_PER_INDEX INNODB_CMP_RESET -INNODB_LOCKS INNODB_LOCK_WAITS INNODB_SYS_COLUMNS INNODB_SYS_FIELDS @@ -95,7 +94,6 @@ INNODB_CMPMEM page_size INNODB_CMPMEM_RESET page_size INNODB_CMP_PER_INDEX database_name INNODB_CMP_RESET page_size -INNODB_LOCKS lock_id INNODB_LOCK_WAITS requesting_trx_id INNODB_SYS_COLUMNS TABLE_ID INNODB_SYS_FIELDS INDEX_ID @@ -167,7 +165,6 @@ INNODB_CMPMEM page_size INNODB_CMPMEM_RESET page_size INNODB_CMP_PER_INDEX database_name INNODB_CMP_RESET page_size -INNODB_LOCKS lock_id INNODB_LOCK_WAITS requesting_trx_id INNODB_SYS_COLUMNS TABLE_ID INNODB_SYS_FIELDS INDEX_ID @@ -244,7 +241,6 @@ INNODB_CMPMEM information_schema.INNODB_CMPMEM 1 INNODB_CMPMEM_RESET information_schema.INNODB_CMPMEM_RESET 1 INNODB_CMP_PER_INDEX information_schema.INNODB_CMP_PER_INDEX 1 INNODB_CMP_RESET information_schema.INNODB_CMP_RESET 1 -INNODB_LOCKS information_schema.INNODB_LOCKS 1 INNODB_LOCK_WAITS information_schema.INNODB_LOCK_WAITS 1 INNODB_SYS_COLUMNS information_schema.INNODB_SYS_COLUMNS 1 INNODB_SYS_FIELDS information_schema.INNODB_SYS_FIELDS 1 @@ -306,7 +302,6 @@ Database: information_schema | INNODB_CMPMEM_RESET | | INNODB_CMP_PER_INDEX | | INNODB_CMP_RESET | -| INNODB_LOCKS | | INNODB_LOCK_WAITS | | INNODB_SYS_COLUMNS | | INNODB_SYS_FIELDS | @@ -368,7 +363,6 @@ Database: INFORMATION_SCHEMA | INNODB_CMPMEM_RESET | | INNODB_CMP_PER_INDEX | | INNODB_CMP_RESET | -| INNODB_LOCKS | | INNODB_LOCK_WAITS | | INNODB_SYS_COLUMNS | | INNODB_SYS_FIELDS | @@ -411,5 +405,5 @@ Wildcard: inf_rmation_schema | information_schema | SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') GROUP BY TABLE_SCHEMA; table_schema count(*) -information_schema 57 +information_schema 56 mysql 30 diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result index dc2f2b3d270..ce1198a994a 100644 --- a/mysql-test/r/mysqld--help.result +++ b/mysql-test/r/mysqld--help.result @@ -205,6 +205,10 @@ The following options may be given as the first argument: mysql.general_logif --log-output=TABLE is used --general-log-file=name Log connections and queries to given file + --getopt-prefix-matching + Recognize command-line options by their unambiguos + prefixes. + (Defaults to on; use --skip-getopt-prefix-matching to disable.) --group-concat-max-len=# The maximum length of the result of function GROUP_CONCAT() @@ -1152,6 +1156,7 @@ ft-query-expansion-limit 20 ft-stopword-file (No default value) gdb FALSE general-log FALSE +getopt-prefix-matching TRUE group-concat-max-len 1024 gtid-domain-id 0 gtid-ignore-duplicates FALSE diff --git a/mysql-test/suite/engines/funcs/t/rpl_skip_error-slave.opt b/mysql-test/suite/engines/funcs/t/rpl_skip_error-slave.opt index dafe3e46cca..4145dc4b219 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_skip_error-slave.opt +++ b/mysql-test/suite/engines/funcs/t/rpl_skip_error-slave.opt @@ -1 +1 @@ ---slave-skip-error=1053,1062,1582 +--slave-skip-errors=1053,1062,1582 diff --git a/mysql-test/suite/maria/maria-recovery2-master.opt b/mysql-test/suite/maria/maria-recovery2-master.opt index 9b232472a24..ca9560676a5 100644 --- a/mysql-test/suite/maria/maria-recovery2-master.opt +++ b/mysql-test/suite/maria/maria-recovery2-master.opt @@ -1 +1 @@ ---skip-stack-trace --skip-core-file --loose-aria-log-dir-path=$MYSQLTEST_VARDIR/tmp --myisam-recover= +--skip-stack-trace --skip-core-file --loose-aria-log-dir-path=$MYSQLTEST_VARDIR/tmp --myisam-recover-options= diff --git a/mysql-test/suite/parts/t/partition_debug_myisam-master.opt b/mysql-test/suite/parts/t/partition_debug_myisam-master.opt index 24264558cf0..eadc9396657 100644 --- a/mysql-test/suite/parts/t/partition_debug_myisam-master.opt +++ b/mysql-test/suite/parts/t/partition_debug_myisam-master.opt @@ -1 +1 @@ ---skip-stack-trace --skip-core-file --myisam-recover-option=off +--skip-stack-trace --skip-core-file --myisam-recover-options=off diff --git a/mysql-test/suite/parts/t/partition_recover_myisam-master.opt b/mysql-test/suite/parts/t/partition_recover_myisam-master.opt index 787371a854a..ddbd7a0a8c5 100644 --- a/mysql-test/suite/parts/t/partition_recover_myisam-master.opt +++ b/mysql-test/suite/parts/t/partition_recover_myisam-master.opt @@ -1 +1 @@ ---myisam-recover +--myisam-recover-options diff --git a/mysql-test/suite/parts/t/partition_repair_myisam-master.opt b/mysql-test/suite/parts/t/partition_repair_myisam-master.opt index 44fc50f599c..c5f16ccfd5b 100644 --- a/mysql-test/suite/parts/t/partition_repair_myisam-master.opt +++ b/mysql-test/suite/parts/t/partition_repair_myisam-master.opt @@ -1 +1 @@ ---myisam-recover=off +--myisam-recover-options=off diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow-master.opt index a0a6079ec16..c2bb4d156af 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow-master.opt +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow-master.opt @@ -1 +1 @@ ---bind-addr=:: +--bind-address=:: diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny-master.opt index a0a6079ec16..c2bb4d156af 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny-master.opt +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny-master.opt @@ -1 +1 @@ ---bind-addr=:: +--bind-address=:: diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow-master.opt index a0a6079ec16..c2bb4d156af 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow-master.opt +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow-master.opt @@ -1 +1 @@ ---bind-addr=:: +--bind-address=:: diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny-master.opt index a0a6079ec16..c2bb4d156af 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny-master.opt +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny-master.opt @@ -1 +1 @@ ---bind-addr=:: +--bind-address=:: diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow-master.opt index a0a6079ec16..c2bb4d156af 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow-master.opt +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow-master.opt @@ -1 +1 @@ ---bind-addr=:: +--bind-address=:: diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny-master.opt index a0a6079ec16..c2bb4d156af 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny-master.opt +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny-master.opt @@ -1 +1 @@ ---bind-addr=:: +--bind-address=:: diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow-master.opt index a0a6079ec16..c2bb4d156af 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow-master.opt +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow-master.opt @@ -1 +1 @@ ---bind-addr=:: +--bind-address=:: diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny-master.opt index a0a6079ec16..c2bb4d156af 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny-master.opt +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny-master.opt @@ -1 +1 @@ ---bind-addr=:: +--bind-address=:: diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin-master.opt index a0a6079ec16..c2bb4d156af 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin-master.opt +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin-master.opt @@ -1 +1 @@ ---bind-addr=:: +--bind-address=:: diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked-master.opt index a0a6079ec16..c2bb4d156af 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked-master.opt +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked-master.opt @@ -1 +1 @@ ---bind-addr=:: +--bind-address=:: diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con-master.opt index 143ad44c2f2..4b2088ce37f 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con-master.opt +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con-master.opt @@ -1,2 +1,2 @@ ---bind-addr=:: +--bind-address=:: --max-user-connections=1024 diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow-master.opt index a0a6079ec16..c2bb4d156af 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow-master.opt +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow-master.opt @@ -1 +1 @@ ---bind-addr=:: +--bind-address=:: diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny-master.opt index a0a6079ec16..c2bb4d156af 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny-master.opt +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny-master.opt @@ -1 +1 @@ ---bind-addr=:: +--bind-address=:: diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow-master.opt index a0a6079ec16..c2bb4d156af 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow-master.opt +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow-master.opt @@ -1 +1 @@ ---bind-addr=:: +--bind-address=:: diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny-master.opt index a0a6079ec16..c2bb4d156af 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny-master.opt +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny-master.opt @@ -1 +1 @@ ---bind-addr=:: +--bind-address=:: diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd-master.opt index a0a6079ec16..c2bb4d156af 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd-master.opt +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd-master.opt @@ -1 +1 @@ ---bind-addr=:: +--bind-address=:: diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl-master.opt b/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl-master.opt index a0a6079ec16..c2bb4d156af 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl-master.opt +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl-master.opt @@ -1 +1 @@ ---bind-addr=:: +--bind-address=:: diff --git a/mysql-test/suite/perfschema/t/short_option_1-master.opt b/mysql-test/suite/perfschema/t/short_option_1-master.opt index 03c480fe90d..d3ad08d3d54 100644 --- a/mysql-test/suite/perfschema/t/short_option_1-master.opt +++ b/mysql-test/suite/perfschema/t/short_option_1-master.opt @@ -1 +1 @@ --a -Cutf8 --collation=utf8_bin -T12 -W3 +-a -Cutf8 --collation-server=utf8_bin -T12 -W3 diff --git a/mysql-test/suite/perfschema/t/start_server_nothing-master.opt b/mysql-test/suite/perfschema/t/start_server_nothing-master.opt index d0cd757cac1..afd804c1bd0 100644 --- a/mysql-test/suite/perfschema/t/start_server_nothing-master.opt +++ b/mysql-test/suite/perfschema/t/start_server_nothing-master.opt @@ -35,5 +35,5 @@ --loose-performance_schema_events_statements_history_long_size=0 --loose-performance_schema_events_statements_history_size=0 ---loose-performance_schema_session_connect_attrs=0 +--loose-performance_schema_session_connect_attrs_size=0 diff --git a/mysql-test/suite/rpl/t/rpl_skip_error-slave.opt b/mysql-test/suite/rpl/t/rpl_skip_error-slave.opt index a8f5deaa30b..208da1fa722 100644 --- a/mysql-test/suite/rpl/t/rpl_skip_error-slave.opt +++ b/mysql-test/suite/rpl/t/rpl_skip_error-slave.opt @@ -1 +1 @@ ---slave-skip-error=1062 +--slave-skip-errors=1062 diff --git a/mysql-test/suite/rpl/t/rpl_skip_incident-slave.opt b/mysql-test/suite/rpl/t/rpl_skip_incident-slave.opt index bc90d5ea6c1..a223f2e04a4 100644 --- a/mysql-test/suite/rpl/t/rpl_skip_incident-slave.opt +++ b/mysql-test/suite/rpl/t/rpl_skip_incident-slave.opt @@ -1 +1 @@ ---slave-skip-error=1590 +--slave-skip-errors=1590 diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result index a0885a61805..3ee4a09b954 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result @@ -386,7 +386,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME INNODB_CMP_PER_INDEX_ENABLED SESSION_VALUE NULL GLOBAL_VALUE OFF -GLOBAL_VALUE_ORIGIN CONFIG +GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE OFF VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BOOLEAN @@ -1114,7 +1114,7 @@ COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME INNODB_LOCKS_UNSAFE_FOR_BINLOG SESSION_VALUE NULL GLOBAL_VALUE OFF -GLOBAL_VALUE_ORIGIN CONFIG +GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE OFF VARIABLE_SCOPE GLOBAL VARIABLE_TYPE BOOLEAN diff --git a/mysql-test/suite/sys_vars/t/delay_key_write_func-master.opt b/mysql-test/suite/sys_vars/t/delay_key_write_func-master.opt index a449c0fb964..06d4d5aa154 100644 --- a/mysql-test/suite/sys_vars/t/delay_key_write_func-master.opt +++ b/mysql-test/suite/sys_vars/t/delay_key_write_func-master.opt @@ -1,2 +1,2 @@ ---myisam-recover=BACKUP,FORCE +--myisam-recover-options=BACKUP,FORCE diff --git a/mysql-test/suite/sys_vars/t/ignore_db_dirs_basic-master.opt b/mysql-test/suite/sys_vars/t/ignore_db_dirs_basic-master.opt index 30ee4f67284..03b94823278 100644 --- a/mysql-test/suite/sys_vars/t/ignore_db_dirs_basic-master.opt +++ b/mysql-test/suite/sys_vars/t/ignore_db_dirs_basic-master.opt @@ -1,11 +1,11 @@ ---ignore-db-dir=a ---ignore-db-dir=b ---ignore-db-dir=c ---ignore-db-dir= ---ignore-db-dir=d ---ignore-db-dir x ---ignore-db-dir= ---ignore-db-dir=e ---ignore-db-dir=lost+found ---ignore-db-dir=.mysqlgui ---ignore-db-dir=ignored_db +--ignore-db-dirs=a +--ignore-db-dirs=b +--ignore-db-dirs=c +--ignore-db-dirs= +--ignore-db-dirs=d +--ignore-db-dirs x +--ignore-db-dirs= +--ignore-db-dirs=e +--ignore-db-dirs=lost+found +--ignore-db-dirs=.mysqlgui +--ignore-db-dirs=ignored_db diff --git a/mysql-test/t/merge_recover-master.opt b/mysql-test/t/merge_recover-master.opt index 875a25ad513..fca5ea079e3 100644 --- a/mysql-test/t/merge_recover-master.opt +++ b/mysql-test/t/merge_recover-master.opt @@ -1 +1 @@ ---myisam-recover=force +--myisam-recover-options=force diff --git a/mysql-test/t/show_check-master.opt b/mysql-test/t/show_check-master.opt index a16d72855a2..af474d42e8d 100644 --- a/mysql-test/t/show_check-master.opt +++ b/mysql-test/t/show_check-master.opt @@ -1 +1 @@ ---log-output=table,file --slow-query-log --log-queries-not-using-indexes --myisam-recover="" +--log-output=table,file --slow-query-log --log-queries-not-using-indexes --myisam-recover-options="" diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index 594f519a6a3..88fa3d493fc 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -56,7 +56,7 @@ enum enum_special_opt char *disabled_my_option= (char*) "0"; char *enabled_my_option= (char*) "1"; -/* +/* This is a flag that can be set in client programs. 0 means that my_getopt will not print error messages, but the client should do it by itself @@ -64,13 +64,21 @@ char *enabled_my_option= (char*) "1"; my_bool my_getopt_print_errors= 1; -/* +/* This is a flag that can be set in client programs. 1 means that my_getopt will skip over options it does not know how to handle. */ my_bool my_getopt_skip_unknown= 0; + +/* + This is a flag that can be set in client programs. 1 means that + my_getopt will reconize command line options by their unambiguous + prefixes. 0 means an option must be always specified in full. +*/ +my_bool my_getopt_prefix_matching= 1; + static void default_reporter(enum loglevel level, const char *format, ...) { @@ -851,6 +859,9 @@ static int findopt(char *optpat, uint length, if (!opt->name[length]) /* Exact match */ DBUG_RETURN(1); + if (!my_getopt_prefix_matching) + continue; + if (!count) { /* We only need to know one prev */ @@ -867,6 +878,14 @@ static int findopt(char *optpat, uint length, } } } + + if (count == 1) + my_getopt_error_reporter(INFORMATION_LEVEL, + "Using unique option prefix '%.*s' is error-prone " + "and can break in the future. " + "Please use the full name '%s' instead.", + length, optpat, *ffname); + DBUG_RETURN(count); } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 8113d90a89d..885d37d1cd7 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -839,8 +839,12 @@ static struct my_option pfs_early_options[]= "Default startup value for the statements_digest consumer.", &pfs_param.m_consumer_statement_digest_enabled, &pfs_param.m_consumer_statement_digest_enabled, 0, - GET_BOOL, OPT_ARG, TRUE, 0, 0, 0, 0, 0} + GET_BOOL, OPT_ARG, TRUE, 0, 0, 0, 0, 0}, #endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */ + {"getopt-prefix-matching", 0, + "Recognize command-line options by their unambiguos prefixes.", + &my_getopt_prefix_matching, &my_getopt_prefix_matching, 0, GET_BOOL, + NO_ARG, 1, 0, 1, 0, 0, 0} }; #ifdef HAVE_PSI_INTERFACE |