summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2015-12-19 19:19:32 -0500
committerNirbhay Choubey <nirbhay@mariadb.com>2015-12-19 19:19:32 -0500
commit8dfd157bb2c560f0ee7496216cc3f0895788bdf0 (patch)
tree9412c66e4e7c2776617474ddf323be1620d245cc /sql
parentdad555a09c8d590132c77c192a18d7fc1f8fe91e (diff)
parent3f515a09ff13d5ee242de121b0162dd4b39db219 (diff)
downloadmariadb-git-8dfd157bb2c560f0ee7496216cc3f0895788bdf0.tar.gz
Merge branch '5.5-galera' into 10.0-galera
Diffstat (limited to 'sql')
-rw-r--r--sql/mysqld.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 5b276b57274..7c91b6f815a 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -5140,10 +5140,20 @@ static int init_server_components()
THD *current_thd_saved= current_thd;
set_current_thd(tmp);
+ /*
+ Also save/restore server_status and variables.option_bits and they
+ get altered during init_for_queries().
+ */
+ unsigned int server_status_saved= tmp->server_status;
+ ulonglong option_bits_saved= tmp->variables.option_bits;
+
tmp->init_for_queries();
/* Restore current_thd. */
set_current_thd(current_thd_saved);
+
+ tmp->server_status= server_status_saved;
+ tmp->variables.option_bits= option_bits_saved;
}
}
mysql_mutex_unlock(&LOCK_thread_count);
@@ -5511,7 +5521,7 @@ error:
WSREP_ERROR("Failed to create/initialize system thread");
/* Abort if its the first applier/rollbacker thread. */
- if (wsrep_creating_startup_threads < 2)
+ if (wsrep_creating_startup_threads == 1)
unireg_abort(1);
else
return NULL;