1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

MDEV-6833: SIGSEGV on shutdown with non-default wsrep_slave_threads

thd->variables' table_plugin & tmp_table_plugin should be set to
NULL for wsrep system threads.
Also made a minor change to skip checking of wsrep options if
wsrep_on is not set.
This commit is contained in:
Nirbhay Choubey
2014-10-04 13:59:07 -04:00
parent c768af75b7
commit 61d8b4a29b
2 changed files with 9 additions and 4 deletions

View File

@@ -3074,12 +3074,12 @@ void plugin_thdvar_init(THD *thd)
plugin_ref old_table_plugin= thd->variables.table_plugin;
plugin_ref old_tmp_table_plugin= thd->variables.tmp_table_plugin;
DBUG_ENTER("plugin_thdvar_init");
// This function may be called many times per THD (e.g. on COM_CHANGE_USER)
thd->variables.table_plugin= NULL;
thd->variables.tmp_table_plugin= NULL;
cleanup_variables(thd, &thd->variables);
thd->variables= global_system_variables;
/* we are going to allocate these lazily */
@@ -3098,6 +3098,9 @@ void plugin_thdvar_init(THD *thd)
intern_plugin_unlock(NULL, old_table_plugin);
intern_plugin_unlock(NULL, old_tmp_table_plugin);
mysql_mutex_unlock(&LOCK_plugin);
} else {
thd->variables.table_plugin= NULL;
thd->variables.tmp_table_plugin= NULL;
}
DBUG_VOID_RETURN;