diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2021-01-28 10:31:57 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2021-01-28 12:48:19 +0200 |
commit | 20f6c403eb976a6dd25cb58d0ce17f6da2566253 (patch) | |
tree | bb23b411d128b06cd22d6813cdbb0283eae49027 /sql | |
parent | dd0b844a9cb30cc5adc1cfb57e75755d339323bf (diff) | |
download | mariadb-git-20f6c403eb976a6dd25cb58d0ce17f6da2566253.tar.gz |
MDEV-20717 : Plugin system variables and activation options can break "mysqld --wsrep_recover"
Problem is that not all plugins are loaded when wsrep_recover is executed.
Thus, we allow unknown system variables and extra system variables during
wsrep_recover. Any unknown system variables would still be caught when
the server starts up normally after the SST.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysqld.cc | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 55ed5a6a680..4bfac5c20d1 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -5417,6 +5417,10 @@ static int init_server_components() that there are unprocessed options. */ my_getopt_skip_unknown= 0; +#ifdef WITH_WSREP + if (wsrep_recovery) + my_getopt_skip_unknown= TRUE; +#endif if ((ho_error= handle_options(&remaining_argc, &remaining_argv, no_opts, mysqld_get_one_option))) @@ -5426,12 +5430,19 @@ static int init_server_components() remaining_argv--; my_getopt_skip_unknown= TRUE; - if (remaining_argc > 1) +#ifdef WITH_WSREP + if (!wsrep_recovery) { - fprintf(stderr, "%s: Too many arguments (first extra is '%s').\n", - my_progname, remaining_argv[1]); - unireg_abort(1); +#endif + if (remaining_argc > 1) + { + fprintf(stderr, "%s: Too many arguments (first extra is '%s').\n", + my_progname, remaining_argv[1]); + unireg_abort(1); + } +#ifdef WITH_WSREP } +#endif } if (opt_abort) |