diff options
author | Nirbhay Choubey <nirbhay@skysql.com> | 2014-03-27 16:26:00 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@skysql.com> | 2014-03-27 16:26:00 -0400 |
commit | 02ba2bfdb444531e6fe61716a4eaeab40e210bbd (patch) | |
tree | 0b67ad5b8f6e8a901ed2b6cac8d4692d8db8f112 /sql/slave.cc | |
parent | 09e3094945694277a550cccc8bd1fd11338474b1 (diff) | |
parent | c5f7486654d7fd4941b202735799f9a7ec3c15eb (diff) | |
download | mariadb-git-02ba2bfdb444531e6fe61716a4eaeab40e210bbd.tar.gz |
Merging revision from codership-mysql/5.5 (r3928..3968) and
codership-mysql/5.6 (r4021..4065).
- Also contains fixes for some build failures.
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index ecfd048fd26..ecdc6c5d32f 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -4651,6 +4651,22 @@ 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 |