From 7c525ce36babf8cbceb05595a551dd140188e1ba Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Wed, 28 Sep 2016 13:26:13 -0400 Subject: MDEV-9312: storage engine not enforced during galera cluster replication Perform a post initialization of plugin-related variables of wsrep threads after their global counterparts have been initialized. --- sql/wsrep_mysqld.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sql/wsrep_mysqld.cc') diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 776bf4a3ab2..5f25ea1ef38 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -36,6 +36,7 @@ #include #include "log_event.h" #include +#include "sql_plugin.h" /* wsrep_plugins_pre_init() */ wsrep_t *wsrep = NULL; /* @@ -771,7 +772,6 @@ void wsrep_thr_init() mysql_mutex_init(key_LOCK_wsrep_config_state, &LOCK_wsrep_config_state, MY_MUTEX_INIT_FAST); } - void wsrep_init_startup (bool first) { if (wsrep_init()) unireg_abort(1); @@ -782,6 +782,13 @@ void wsrep_init_startup (bool first) wsrep_debug, wsrep_convert_LOCK_to_trx, (wsrep_on_fun)wsrep_on); + /* + Pre-initialize global_system_variables.table_plugin with a dummy engine + (placeholder) required during the initialization of wsrep threads (THDs). + (see: plugin_thdvar_init()) + */ + wsrep_plugins_pre_init(); + /* Skip replication start if dummy wsrep provider is loaded */ if (!strcmp(wsrep_provider, WSREP_NONE)) return; -- cgit v1.2.1