diff options
author | unknown <lars@black.(none)> | 2006-10-10 21:59:23 +0200 |
---|---|---|
committer | unknown <lars@black.(none)> | 2006-10-10 21:59:23 +0200 |
commit | c34940a0786f472ab3d1797c6cd97228b1ee49f5 (patch) | |
tree | 8540e483e880421e97e84bf91c84cd2320023353 /sql/slave.cc | |
parent | ef0ee7642ad986551495bd891ad78bcdb11c7fcf (diff) | |
parent | 3f3ffdccc1200e82b7d788d897afa5086452ee17 (diff) | |
download | mariadb-git-c34940a0786f472ab3d1797c6cd97228b1ee49f5.tar.gz |
Merge mysql.com:/home/bkroot/mysql-5.1-new-rpl
into mysql.com:/home/bk/MERGE/mysql-5.1-merge
include/my_sys.h:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
Auto merged
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index 5d871a64347..1852ff68070 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3101,17 +3101,22 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli) type_code != START_EVENT_V3 && type_code!= FORMAT_DESCRIPTION_EVENT)) { DBUG_PRINT("info", ("event skipped")); - if (thd->options & OPTION_BEGIN) - rli->inc_event_relay_log_pos(); - else - { - rli->inc_group_relay_log_pos((type_code == ROTATE_EVENT || - type_code == STOP_EVENT || - type_code == FORMAT_DESCRIPTION_EVENT) ? - LL(0) : ev->log_pos, - 1/* skip lock*/); - flush_relay_log_info(rli); - } + /* + We only skip the event here and do not increase the group log + position. In the event that we have to restart, this means + that we might have to skip the event again, but that is a + minor issue. + + If we were to increase the group log position when skipping an + event, it might be that we are restarting at the wrong + position and have events before that we should have executed, + so not increasing the group log position is a sure bet in this + case. + + In this way, we just step the group log position when we + *know* that we are at the end of a group. + */ + rli->inc_event_relay_log_pos(); /* Protect against common user error of setting the counter to 1 |