Commit 00f202b2 authored by Jan Lindström's avatar Jan Lindström Committed by Sergei Golubchik

MDEV-30133 MariaDB startup does not validate plugin-wsrep-provider when...

MDEV-30133 MariaDB startup does not validate plugin-wsrep-provider when wsrep_mode=off or wsrep_provider is not set

Refuse to start if WSREP_ON=OFF or wsrep_provider is not set or
it is set to 'none' if plugin-wsrep-provider is used.
parent 4849b73c
......@@ -4,7 +4,7 @@ SHOW VARIABLES LIKE 'wsrep_provider_repl_max_ws_size';
Variable_name Value
wsrep_provider_repl_max_ws_size 1
INSERT INTO t1 VALUES (1);
ERROR HY000: Got error 5 "Input/output error" during COMMIT
ERROR HY000: Maximum writeset size exceeded
SET GLOBAL wsrep_provider_repl_max_ws_size=DEFAULT;
SHOW VARIABLES LIKE 'wsrep_provider_repl_max_ws_size';
Variable_name Value
......@@ -18,3 +18,6 @@ ERROR HY000: Variable 'wsrep_provider' is a read only variable
DROP TABLE t1;
CALL mtr.add_suppression("transaction size limit");
CALL mtr.add_suppression("rbr write fail");
SELECT VARIABLE_NAME,READ_ONLY FROM information_schema.system_variables where VARIABLE_NAME like '%wsrep_provider_options%';
VARIABLE_NAME READ_ONLY
WSREP_PROVIDER_OPTIONS YES
......@@ -276,6 +276,15 @@ void wsrep_destroy_sysvar(struct st_mysql_sys_var *var)
static int wsrep_provider_plugin_init(void *p)
{
WSREP_DEBUG("wsrep_provider_plugin_init()");
if (!WSREP_ON_ || !wsrep_provider ||
(wsrep_provider && !strncasecmp(wsrep_provider, WSREP_NONE, FN_REFLEN)))
{
WSREP_ERROR("plugin-wsrep-provider can't be enabled if wsrep_on==OFF or wsrep_provider is unset or set to 'none'");
my_message(ER_WRONG_ARGUMENTS, "plugin-wsrep-provider can't be enabled if wsrep_on==OFF or wsrep_provider is unset or set to 'none'", MYF(0));
return 1;
}
provider_plugin_enabled= true;
// When plugin-wsrep-provider is enabled we set
......
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