1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Fix for Bug#6148. Only rewind read position in binary log when the

slave SQL thread is started.


sql/slave.cc:
  Adding threads to init as parameter to init_master_info.
  Only rewind read position when starting SQL thread.
sql/slave.h:
  Adding threads to init as parameter to init_master_info.
  Only rewind read position when starting SQL thread.
sql/sql_repl.cc:
  Adding threads to init as parameter to init_master_info.
  Only rewind read position when starting SQL thread.
sql/repl_failsafe.cc:
  Adding threads to init as parameter to init_master_info.
  Only rewind read position when starting SQL thread.
This commit is contained in:
unknown
2004-11-25 09:26:45 +01:00
parent 442b2d89b1
commit 6f2cf12aa6
6 changed files with 65 additions and 7 deletions

View File

@@ -662,7 +662,8 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report)
thread_mask &= thd->lex.slave_thd_opt;
if (thread_mask)
{
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)
slave_errno = start_slave_threads(0 /*no mutex */,
@@ -867,7 +868,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->net, ER_MASTER_INFO);
unlock_slave_threads(mi);