diff options
author | Nirbhay Choubey <nirbhay@skysql.com> | 2014-03-25 17:01:05 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@skysql.com> | 2014-03-25 17:01:05 -0400 |
commit | 899f9801d4466a6ecccd32a34a38aaf19019e39a (patch) | |
tree | 67d0be09c93257a3eb9f687af2ffeca172a05bec /sql/slave.cc | |
parent | 3088d52c20eca10e5b8689648edef8f7fd49830a (diff) | |
download | mariadb-git-899f9801d4466a6ecccd32a34a38aaf19019e39a.tar.gz |
bzr merge -r3946..3968 codership/5.5
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index e29387a4b7f..0dcaec838da 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -4613,6 +4613,21 @@ err_during_init: DBUG_EXECUTE_IF("simulate_slave_delay_at_terminate_bug38694", sleep(5);); mysql_mutex_unlock(&rli->run_lock); // tell the world we are done +#ifdef WITH_WSREP + /* if slave stopped due to node going non primary, we set global flag to + trigger automatic restart of slave when node joins back to cluster + */ + if (WSREP_ON && !wsrep_ready) + { + WSREP_INFO("Slave thread stopped because node dropped from cluster"); + if (wsrep_restart_slave) + { + WSREP_INFO("wsrep_restart_slave was set and therefore slave will be " + "automatically restarted when node joins back to cluster"); + wsrep_restart_slave_activated= TRUE; + } + } +#endif /* WITH_WSREP */ DBUG_LEAVE; // Must match DBUG_ENTER() my_thread_end(); #ifdef HAVE_OPENSSL |