Commit 20f6c403 authored by Jan Lindström's avatar Jan Lindström

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.
parent dd0b844a
...@@ -5417,6 +5417,10 @@ static int init_server_components() ...@@ -5417,6 +5417,10 @@ static int init_server_components()
that there are unprocessed options. that there are unprocessed options.
*/ */
my_getopt_skip_unknown= 0; 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, if ((ho_error= handle_options(&remaining_argc, &remaining_argv, no_opts,
mysqld_get_one_option))) mysqld_get_one_option)))
...@@ -5426,12 +5430,19 @@ static int init_server_components() ...@@ -5426,12 +5430,19 @@ static int init_server_components()
remaining_argv--; remaining_argv--;
my_getopt_skip_unknown= TRUE; my_getopt_skip_unknown= TRUE;
#ifdef WITH_WSREP
if (!wsrep_recovery)
{
#endif
if (remaining_argc > 1) if (remaining_argc > 1)
{ {
fprintf(stderr, "%s: Too many arguments (first extra is '%s').\n", fprintf(stderr, "%s: Too many arguments (first extra is '%s').\n",
my_progname, remaining_argv[1]); my_progname, remaining_argv[1]);
unireg_abort(1); unireg_abort(1);
} }
#ifdef WITH_WSREP
}
#endif
} }
if (opt_abort) if (opt_abort)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment