summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVlad Lesin <vlad_lesin@mail.ru>2020-06-08 11:45:56 +0300
committerVlad Lesin <vlad_lesin@mail.ru>2020-06-14 13:23:07 +0300
commit9bdf35e90f36d9be8cc7591e2ed5e62feadc5515 (patch)
treea4e2062030c56378d1f1922f13825adfebd8ebd9 /include
parentceaa8b647a1b4464980e66cc3ea766e5b19666ee (diff)
downloadmariadb-git-9bdf35e90f36d9be8cc7591e2ed5e62feadc5515.tar.gz
MDEV-18215: mariabackup does not report unknown command line options
MDEV-21298: mariabackup doesn't read from the [mariadbd] and [mariadbd-X.Y] server option groups from configuration files MDEV-21301: mariabackup doesn't read [mariadb-backup] option group in configuration file All three issues require to change the same code, that is why their fixes are joined in one commit. The fix is in invoking load_defaults_or_exit() and handle_options() for backup-specific groups separately from client-server groups to let the last handle_options() call fail on unknown backup-specific options. The order of options procesing is the following: 1) Load server groups and process server options, ignore unknown options 2) Load client groups and process client options, ignore unknown options 3) Load backup groups and process client-server options, exit on unknown option 4) Process --mysqld-args command line options, ignore unknown options New global flag my_handle_options_init_variables was added to have ability to invoke handle_options() for the same allowed options set several times without re-initialising previously set option values. --password value destroying is moved from option processing callback to mariabackup's handle_options() function to have ability to invoke server's handle_options() several times for the same possible allowed options set. Galera invokes wsrep_sst_mariabackup.sh with mysqld command line options to configure mariabackup as close to the server as possible. It is not known what server options are supported by mariabackup when the script is invoked. That is why new mariabackup option "--mysqld-args" is added, all unknown options that follow this option will be silently ignored. wsrep_sst_mariabackup.sh was also changed to: - use "--mysqld-args" mariabackup option to pass mysqld options, - remove deprecated innobackupex mode, - remove unsupported mariabackup options: --encrypt --encrypt-key --rebuild-indexes --rebuild-threads
Diffstat (limited to 'include')
-rw-r--r--include/my_getopt.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/my_getopt.h b/include/my_getopt.h
index 72ce03d5654..f0cefb35b87 100644
--- a/include/my_getopt.h
+++ b/include/my_getopt.h
@@ -106,6 +106,7 @@ extern char *autoset_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_bool my_handle_options_init_variables;
extern my_error_reporter my_getopt_error_reporter;
extern int handle_options (int *argc, char ***argv,