summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index a84b63c270b..2f0d8d3aa0d 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -18,7 +18,6 @@
#ifdef HAVE_REPLICATION
#include "sql_repl.h"
-#include "sql_acl.h"
#include "log_event.h"
#include <my_dir.h>
@@ -683,7 +682,8 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report)
thread_mask&= thd->lex->slave_thd_opt;
if (thread_mask) //some threads are stopped, start them
{
- if (init_master_info(mi,master_info_file,relay_log_info_file, 0))
+ if (init_master_info(mi,master_info_file,relay_log_info_file, 0,
+ thread_mask))
slave_errno=ER_MASTER_INFO;
else if (server_id_supplied && *mi->host)
{
@@ -880,10 +880,10 @@ int reset_slave(THD *thd, MASTER_INFO* mi)
*/
init_master_info_with_options(mi);
/*
- Reset errors, and master timestamp (the idea is that we forget about the
+ Reset errors (the idea is that we forget about the
old master).
*/
- clear_slave_error_timestamp(&mi->rli);
+ clear_slave_error(&mi->rli);
clear_until_condition(&mi->rli);
// close master_info_file, relay_log_info_file, set mi->inited=rli->inited=0
@@ -978,7 +978,8 @@ int change_master(THD* thd, MASTER_INFO* mi)
thd->proc_info = "Changing master";
LEX_MASTER_INFO* lex_mi= &thd->lex->mi;
// TODO: see if needs re-write
- if (init_master_info(mi, master_info_file, relay_log_info_file, 0))
+ if (init_master_info(mi, master_info_file, relay_log_info_file, 0,
+ thread_mask))
{
send_error(thd, ER_MASTER_INFO);
unlock_slave_threads(mi);
@@ -1142,8 +1143,8 @@ int change_master(THD* thd, MASTER_INFO* mi)
pthread_mutex_lock(&mi->rli.data_lock);
mi->rli.abort_pos_wait++; /* for MASTER_POS_WAIT() to abort */
- /* Clear the errors, for a clean start, and master timestamp */
- clear_slave_error_timestamp(&mi->rli);
+ /* Clear the errors, for a clean start */
+ clear_slave_error(&mi->rli);
clear_until_condition(&mi->rli);
/*
If we don't write new coordinates to disk now, then old will remain in