diff options
author | Kristian Nielsen <knielsen@knielsen-hq.org> | 2015-02-19 15:43:27 +0100 |
---|---|---|
committer | Kristian Nielsen <knielsen@knielsen-hq.org> | 2015-02-19 15:43:27 +0100 |
commit | 004dd0aaa8cd0fc42780222120d07021b6b7ec8d (patch) | |
tree | 13e1daf10409bb369bdadcc94e7e3920005b08a7 /sql/slave.cc | |
parent | c1ebb4a60f95f739e58b30a4b7a77237a554fe66 (diff) | |
download | mariadb-git-004dd0aaa8cd0fc42780222120d07021b6b7ec8d.tar.gz |
MDEV-7568: STOP SLAVE crashes the server
The order of initialisation during server startup was incorrect. The slave
threads were started before the parallel replication worker thread pool was
initialised, allowing a race where uninitialised data could be accessed.
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index c83f09c7510..ba56ff54d5a 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -371,6 +371,9 @@ int init_slave() if (run_slave_init_thread()) return 1; + if (global_rpl_thread_pool.init(opt_slave_parallel_threads)) + return 1; + /* This is called when mysqld starts. Before client connections are accepted. However bootstrap may conflict with us if it does START SLAVE. @@ -404,9 +407,6 @@ int init_slave() goto err; } - if (global_rpl_thread_pool.init(opt_slave_parallel_threads)) - return 1; - /* If --slave-skip-errors=... was not used, the string value for the system variable has not been set up yet. Do it now. |