summaryrefslogtreecommitdiff
path: root/sql/rpl_mi.h
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2017-01-29 23:44:24 +0200
committerSergei Golubchik <serg@mariadb.org>2017-02-28 16:10:46 +0100
commitc5e25c8b40e8c75d690dbc0e441abbefdd3cdcf4 (patch)
tree498143cfbf5a6c80bd15a0f39a3d07f62e0aaa43 /sql/rpl_mi.h
parente65f667bb60244610512efd7491fc77eccceb9db (diff)
downloadmariadb-git-c5e25c8b40e8c75d690dbc0e441abbefdd3cdcf4.tar.gz
Added a separate lock for start/stop/reset slave.
This solves some possible dead locks when one calls stop slave while slave is starting.
Diffstat (limited to 'sql/rpl_mi.h')
-rw-r--r--sql/rpl_mi.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/rpl_mi.h b/sql/rpl_mi.h
index 32591c56caa..5c42378ca2c 100644
--- a/sql/rpl_mi.h
+++ b/sql/rpl_mi.h
@@ -81,6 +81,8 @@ class Master_info : public Slave_reporting_capability
}
void release();
void wait_until_free();
+ void lock_slave_threads();
+ void unlock_slave_threads();
/* the variables below are needed because we can change masters on the fly */
char master_log_name[FN_REFLEN+6]; /* Room for multi-*/
@@ -99,7 +101,7 @@ class Master_info : public Slave_reporting_capability
File fd; // we keep the file open, so we need to remember the file pointer
IO_CACHE file;
- mysql_mutex_t data_lock, run_lock, sleep_lock;
+ mysql_mutex_t data_lock, run_lock, sleep_lock, start_stop_lock;
mysql_cond_t data_cond, start_cond, stop_cond, sleep_cond;
THD *io_thd;
MYSQL* mysql;