diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2019-05-07 09:10:56 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2019-05-07 09:10:56 +0300 |
commit | f182c13357af6df5fb4dfe90665481f39ccdca1a (patch) | |
tree | f0678759c01299e4d70ad4d0aa685eccb878d4b9 | |
parent | e8dd18a474ee6b48eb7f92e3831f9e359b0bdc6e (diff) | |
download | mariadb-git-bb-10.1-MDEV-19404.tar.gz |
MDEV-19404: Assertion failure on !is_thread_specific || (mysqld_server_initialized && thd)bb-10.1-MDEV-19404
In wsrep_plugins_post_init we iterate all theads and if they are
galera appliers (wsrep_applier) we init session variables. However,
current_thd was not set and recent changes on session variables
require holding LOCK_gloal_system_variables mutex.
-rw-r--r-- | sql/sql_plugin.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index b8aff064aca..255f24388e2 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -4349,7 +4349,10 @@ void wsrep_plugins_post_init() // Save options_bits as it will get overwritten in plugin_thdvar_init() ulonglong option_bits_saved= thd->variables.option_bits; + set_current_thd(thd); + mysql_mutex_lock(&LOCK_global_system_variables); plugin_thdvar_init(thd); + mysql_mutex_unlock(&LOCK_global_system_variables); // Restore option_bits thd->variables.option_bits= option_bits_saved; |