Merge 10.4 into 10.5

The functional changes of commit 5836191c8f
(MDEV-21168) are omitted due to MDEV-742 having addressed the issue.
This commit is contained in:
Marko Mäkelä 2020-04-25 21:57:52 +03:00
commit fbe2712705
202 changed files with 2952 additions and 1710 deletions

View file

@ -91,6 +91,12 @@ static bool refresh_provider_options()
}
}
static void wsrep_set_wsrep_on()
{
WSREP_ON_= global_system_variables.wsrep_on && wsrep_provider &&
strcmp(wsrep_provider, WSREP_NONE);
}
/* This is intentionally declared as a weak global symbol, so that
linking will succeed even if the server is built with a dynamically
linked InnoDB. */
@ -125,6 +131,8 @@ bool wsrep_on_update (sys_var *self, THD* thd, enum_var_type var_type)
thd->variables.wsrep_on= global_system_variables.wsrep_on= saved_wsrep_on;
}
wsrep_set_wsrep_on();
return false;
}
@ -418,6 +426,7 @@ bool wsrep_provider_update (sys_var *self, THD* thd, enum_var_type type)
if (!rcode)
refresh_provider_options();
wsrep_set_wsrep_on();
mysql_mutex_lock(&LOCK_global_system_variables);
return rcode;
@ -437,6 +446,7 @@ void wsrep_provider_init (const char* value)
if (wsrep_provider) my_free((void *)wsrep_provider);
wsrep_provider= my_strdup(PSI_INSTRUMENT_MEM, value, MYF(0));
wsrep_set_wsrep_on();
}
bool wsrep_provider_options_check(sys_var *self, THD* thd, set_var* var)
@ -924,6 +934,8 @@ static void export_wsrep_status_to_mysql(THD* thd)
int wsrep_show_status (THD *thd, SHOW_VAR *var, char *buff)
{
/* Note that we should allow show status like 'wsrep%' even
when WSREP(thd) is false. */
if (WSREP_ON)
{
export_wsrep_status_to_mysql(thd);