summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
authorunknown <mats@romeo.(none)>2006-10-10 15:26:02 +0200
committerunknown <mats@romeo.(none)>2006-10-10 15:26:02 +0200
commit3f3ffdccc1200e82b7d788d897afa5086452ee17 (patch)
tree808bc1fbf7672598af1494d4e6f3b64178d7b9a8 /sql/log_event.cc
parent010edb7eecf3fdbdb8645ef3d175d7388f1d08f1 (diff)
parent55ce447188b47d0d8f923c54ba0dcf35a0f38b76 (diff)
downloadmariadb-git-3f3ffdccc1200e82b7d788d897afa5086452ee17.tar.gz
Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into romeo.(none):/home/bk/b21474-mysql-5.1-new-rpl sql/log_event.cc: Auto merged
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r--sql/log_event.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 5eca92fabe4..4a6346bf57c 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -2517,19 +2517,19 @@ int Format_description_log_event::exec_event(struct st_relay_log_info* rli)
if (server_id == (uint32) ::server_id)
{
/*
- Do not modify rli->group_master_log_pos, as this event did not exist on
- the master. That is, just update the *relay log* coordinates; this is
- done by passing log_pos=0 to inc_group_relay_log_pos, like we do in
- Stop_log_event::exec_event().
- If in a transaction, don't touch group_* coordinates.
- */
- if (thd->options & OPTION_BEGIN)
- rli->inc_event_relay_log_pos();
- else
- {
- rli->inc_group_relay_log_pos(0);
- flush_relay_log_info(rli);
- }
+ We only increase the relay log position if we are skipping
+ events and do not touch any group_* variables, nor flush the
+ relay log info. If there is a crash, we will have to re-skip
+ the events again, but that is a minor issue.
+
+ If we do not skip stepping the group log position (and the
+ server id was changed when restarting the server), it might well
+ be that we start executing at a position that is invalid, e.g.,
+ at a Rows_log_event or a Query_log_event preceeded by a
+ Intvar_log_event instead of starting at a Table_map_log_event or
+ the Intvar_log_event respectively.
+ */
+ rli->inc_event_relay_log_pos();
DBUG_RETURN(0);
}