summaryrefslogtreecommitdiff
path: root/sql/slave.h
diff options
context:
space:
mode:
authorAndrei Elkin <aelkin@mysql.com>2009-04-28 14:46:07 +0300
committerAndrei Elkin <aelkin@mysql.com>2009-04-28 14:46:07 +0300
commite02d162f792c1df93c19b584bfc5f098fbbbfb5e (patch)
treedcc3146dc8720890df186a84a5ded7bf8945cfe2 /sql/slave.h
parent904498295fc10d213e75f0b59ababcc938ee580d (diff)
downloadmariadb-git-e02d162f792c1df93c19b584bfc5f098fbbbfb5e.tar.gz
Bug #38694 Race condition in replication thread shutdown
The issue of the current bug is unguarded access to mi->slave_running by the shutdown thread calling end_slave() that is bug#29968 (alas happened not to be cross-linked with the current bug) Fixed: with removing the unguarded read of the running status and perform reading it in terminate_slave_thread() at time run_lock is taken (mostly bug#29968 backporting, still with some improvements over that patch - see the error reporting from terminate_slave_thread()). Issue of bug#38716 is fixed here for 5.0 branch as well. Note: There has been a separate artifact identified - a race condition between init_slave() and end_slave() - reported as Bug#44467.
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 da548e145d3..5ae596f1eb5 100644
--- a/sql/slave.h
+++ b/sql/slave.h
@@ -504,10 +504,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);