summaryrefslogtreecommitdiff
path: root/sql/ha_innodb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r--sql/ha_innodb.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index cbbb0d96d22..6bf746c73e6 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -987,10 +987,19 @@ innobase_commit_low(
trx->mysql_master_log_file_name
= active_mi->rli.group_master_log_name;
+ /*
+ Guilhem to Heikki: in 5.0 we don't need to do a computation
+ (old_pos+len) to get the end_pos, because we already have the
+ end_pos under hand in the replication code
+ (Query_log_event::exec_event()).
+ I tested the code change below (simulated a crash with kill
+ -9) and got the good (binlog, position) displayed by InnoDB at
+ crash recovery, so this code change is ok.
+ */
trx->mysql_master_log_pos = ((ib_longlong)
- (active_mi->rli.group_master_log_pos +
- active_mi->rli.event_len
- ));
+ (active_mi->rli.future_group_master_log_pos
+ ));
+
}
#endif /* HAVE_REPLICATION */