summaryrefslogtreecommitdiff
path: root/sql/slave.h
diff options
context:
space:
mode:
authorunknown <mats@kindahl-laptop.dnsalias.net>2007-08-29 16:06:59 +0200
committerunknown <mats@kindahl-laptop.dnsalias.net>2007-08-29 16:06:59 +0200
commite5c8240a7a99cd721625b041017942b9b88e8d5a (patch)
treeb0accb100412a8a519337160ad3a84ff1df10842 /sql/slave.h
parentcd7d837be6685f8afc362ba5e90d9e724745370e (diff)
downloadmariadb-git-e5c8240a7a99cd721625b041017942b9b88e8d5a.tar.gz
BUG#29968 (rpl_ndb_circular.test and rpl_ndb_log.test fail):
Removing unguarded read of slave_running field from inside terminate_slave_threads(). This could cause premature exit in the event that the slave thread already were shutting down, but isn't finished yet. The fields slave_running, io_thd, and sql_thread are guarded by an associated run_lock. A read of these fields were not guarded inside terminate_slave_threads(), which caused an assertion to fire. The assertion was removed, and the code reorganized slightly. sql/slave.cc: Changing signature of terminate_slave_thread() to accept a skip_lock parameter instead of two mutexes. This mimics the signature of the terminate_slave_threads() function. Code is also changed as a result of this. Removing unguarded check of slave_running field in the master info and relay log info structure since that could cause premature exit of terminate_slave_threads(). The thread variable for each of the slave threads can change before acquiring the run_lock mutex inside terminate_slave_thread(). Hence an assertion was removed that read the variable without guarding it with run_lock. Code that checked *slave_running status inside terminate_slave_thread() was reorganized slightly. sql/slave.h: Moving terminate_slave_thread() to use internal linkage.
Diffstat (limited to 'sql/slave.h')
-rw-r--r--sql/slave.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/sql/slave.h b/sql/slave.h
index 731728bde4f..c7385934460 100644
--- a/sql/slave.h
+++ b/sql/slave.h
@@ -133,10 +133,6 @@ bool flush_relay_log_info(RELAY_LOG_INFO* rli);
int register_slave_on_master(MYSQL* mysql);
int terminate_slave_threads(MASTER_INFO* mi, int thread_mask,
bool skip_lock = 0);
-int terminate_slave_thread(THD* thd, pthread_mutex_t* term_mutex,
- pthread_mutex_t* cond_lock,
- pthread_cond_t* term_cond,
- volatile uint* slave_running);
int start_slave_threads(bool need_slave_mutex, bool wait_for_start,
MASTER_INFO* mi, const char* master_info_fname,
const char* slave_info_fname, int thread_mask);