diff options
author | svoj@mysql.com/june.mysql.com <> | 2008-02-22 19:07:07 +0400 |
---|---|---|
committer | svoj@mysql.com/june.mysql.com <> | 2008-02-22 19:07:07 +0400 |
commit | fe3b1c8e25669f250159142a507841f6402a38d9 (patch) | |
tree | 52b69b48dfb11664d7cf89f4ac7eb75e996479c3 /sql/slave.h | |
parent | b620694ba360a6a2f051adafaf6f25e45bf2fa1b (diff) | |
download | mariadb-git-fe3b1c8e25669f250159142a507841f6402a38d9.tar.gz |
BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if
log-slave-updates and circul repl
Slave SQL thread may execute one extra event when there are events
skipped by slave I/O thread (e.g. originated by the same server).
Whereas it was requested not to do so by the UNTIL condition.
This happens because we compare with the end position of previously
executed event. This is fine when there are no skipped by slave I/O
thread events, as end position of previous event equals to start
position of to be executed event. Otherwise this position equals to
start position of skipped event.
This is fixed by:
- reading the event to be executed before checking if the until condition
is satisfied.
- comparing the start position of the event to be executed. Since we do
not have the start position available, we compute it by subtracting
event length from end position (which is available).
- if there are no events on the event queue at the slave sql starting
time, that meet until condition, we stop immediately, as in this
case we do not want to wait for next event.
Diffstat (limited to 'sql/slave.h')
-rw-r--r-- | sql/slave.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/slave.h b/sql/slave.h index c61787cdf3b..da548e145d3 100644 --- a/sql/slave.h +++ b/sql/slave.h @@ -348,7 +348,7 @@ typedef struct st_relay_log_info void close_temporary_tables(); /* Check if UNTIL condition is satisfied. See slave.cc for more. */ - bool is_until_satisfied(); + bool is_until_satisfied(my_off_t master_beg_pos); inline ulonglong until_pos() { return ((until_condition == UNTIL_MASTER_POS) ? group_master_log_pos : |