summaryrefslogtreecommitdiff
path: root/sql/wsrep_mysqld.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-01-25 17:04:09 +0100
committerSergei Golubchik <serg@mariadb.org>2016-01-25 17:04:09 +0100
commita2330c820af56d69e19f07f9cc9deb655fc67174 (patch)
treea946ecf6015f0e9736343d0fa55f82da99d2c8e2 /sql/wsrep_mysqld.cc
parent744e605de05354bdb18f9241daa8331687492f6b (diff)
downloadmariadb-git-a2330c820af56d69e19f07f9cc9deb655fc67174.tar.gz
MDEV-8208 Sporadic SEGFAULT on startup
different fix. remove old ones, wait for THD to be fully initialized before continuing with the server startup process. This reverts commits db2e21b, 13615c5, 3f515a0, 70113ee.
Diffstat (limited to 'sql/wsrep_mysqld.cc')
-rw-r--r--sql/wsrep_mysqld.cc21
1 files changed, 2 insertions, 19 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index b922d2b2857..03524c8ad5c 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -91,12 +91,6 @@ my_bool wsrep_slave_UK_checks = 0; // slave thread does UK checks
my_bool wsrep_slave_FK_checks = 0; // slave thread does FK checks
bool wsrep_new_cluster = false; // Bootstrap the cluster ?
-/*
- Set during the creation of first wsrep applier and rollback threads.
- Since these threads are critical, abort if the thread creation fails.
-*/
-my_bool wsrep_creating_startup_threads = 0;
-
// Use wsrep_gtid_domain_id for galera transactions?
bool wsrep_gtid_mode = 0;
// gtid_domain_id for galera transactions.
@@ -798,7 +792,6 @@ void wsrep_init_startup (bool first)
if (!wsrep_start_replication()) unireg_abort(1);
- wsrep_creating_startup_threads= 1;
wsrep_create_rollbacker();
wsrep_create_appliers(1);
@@ -1820,21 +1813,11 @@ pthread_handler_t start_wsrep_THD(void *arg)
//thd->version= refresh_version;
thd->proc_info= 0;
thd->set_command(COM_SLEEP);
-
- if (wsrep_creating_startup_threads == 0)
- {
- thd->init_for_queries();
- }
+ thd->init_for_queries();
mysql_mutex_lock(&LOCK_thread_count);
wsrep_running_threads++;
mysql_cond_broadcast(&COND_thread_count);
-
- if (wsrep_running_threads > 2)
- {
- wsrep_creating_startup_threads= 0;
- }
-
mysql_mutex_unlock(&LOCK_thread_count);
processor(thd);
@@ -1877,7 +1860,7 @@ error:
WSREP_ERROR("Failed to create/initialize system thread");
/* Abort if its the first applier/rollbacker thread. */
- if (wsrep_creating_startup_threads == 1)
+ if (!mysqld_server_initialized)
unireg_abort(1);
else
return NULL;