From e3541b8a97f74f4dbdbe8a34b445106e3cefdcc4 Mon Sep 17 00:00:00 2001
From: unknown <dlenev@mysql.com>
Date: Wed, 20 Aug 2003 03:38:31 +0400
Subject: Fix for BUG#1086. Now we don't preserve event's log_pos through
 log-slave-updates since this causes unexpected values in Exec_master_log_pos
 in A->B->C replication setup, synchronization  problems in
 master_pos_wait()... Still this brokes some functionality in
 sql/repl_failsafe.cc (but this file is not used now)

mysql-test/r/rpl_log.result:
  SHOW BINLOG EVENTS for binlog on slave should give the same
  Orig_log_pos and Pos values
sql/log_event.cc:
  Do not propagate our master's log pos to our bin log
sql/repl_failsafe.cc:
  Added comment about broken SHOW NEW MASTER
sql/slave.cc:
  Do not propagate our master's log pos to our bin log
sql/sql_class.cc:
  THD::log_pos is no longer needed
sql/sql_class.h:
  THD::log_pos is no longer needed
sql/sql_parse.cc:
  Added comment about broken SHOW NEW MASTER
---
 sql/repl_failsafe.cc | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

(limited to 'sql/repl_failsafe.cc')

diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc
index 0a5f90617d1..dc3f3c87dde 100644
--- a/sql/repl_failsafe.cc
+++ b/sql/repl_failsafe.cc
@@ -249,6 +249,18 @@ static int find_target_pos(LEX_MASTER_INFO *mi, IO_CACHE *log, char *errmsg)
   /* Impossible */
 }
 
+/* 
+  Before 4.0.15 we had a member of THD called log_pos, it was meant for
+  failsafe replication code in repl_failsafe.cc which is disabled until
+  it is reworked. Event's log_pos used to be preserved through 
+  log-slave-updates to make code in repl_failsafe.cc work (this 
+  function, SHOW NEW MASTER); but on the other side it caused unexpected
+  values in Exec_master_log_pos in A->B->C replication setup, 
+  synchronization problems in master_pos_wait(), ... So we 
+  (Dmitri & Guilhem) removed it.
+  
+  So for now this function is broken. 
+*/
 
 int translate_master(THD* thd, LEX_MASTER_INFO* mi, char* errmsg)
 {
@@ -414,6 +426,9 @@ static Slave_log_event* find_slave_event(IO_CACHE* log,
   return (Slave_log_event*)ev;
 }
 
+/*
+   This function is broken now. See comment for translate_master().
+ */
 
 int show_new_master(THD* thd)
 {
-- 
cgit v1.2.1