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()
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)
......
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