diff options
author | Alfranio Correia <alfranio.correia@oracle.com> | 2011-01-31 13:11:05 +0000 |
---|---|---|
committer | Alfranio Correia <alfranio.correia@oracle.com> | 2011-01-31 13:11:05 +0000 |
commit | cd4fd3c7c127fbe84833bb7d6700423c7f4bf0e5 (patch) | |
tree | 2ecb0add210ec3ca1cdf74929ac371e6897dd61c /sql/sql_repl.cc | |
parent | 61163b51e0db9413ba34c4c57f5653bb651c2fc8 (diff) | |
parent | cb52e82ea77ecc2fdb7de79bf9af13857fa9c1c5 (diff) | |
download | mariadb-git-cd4fd3c7c127fbe84833bb7d6700423c7f4bf0e5.tar.gz |
merge mysql-5.1 --> mysql-5.5
Conflicts:
. mysql-test/extra/rpl_tests/rpl_insert_ignore.test
. mysql-test/suite/rpl/t/disabled.def
. mysql-test/suite/rpl/t/rpl_insert_ignore.test
. sql/sql_insert.cc
. sql/sql_repl.cc
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r-- | sql/sql_repl.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 4cc49daf3fe..bc0cca4d887 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -676,8 +676,11 @@ impossible position"; file */ if (reset_transmit_packet(thd, flags, &ev_offset, &errmsg)) goto err; + + my_off_t prev_pos= pos; while (!(error = Log_event::read_log_event(&log, packet, log_lock))) { + prev_pos= my_b_tell(&log); #ifndef DBUG_OFF if (max_binlog_dump_events && !left_events--) { @@ -767,8 +770,13 @@ impossible position"; here we were reading binlog that was not closed properly (as a result of a crash ?). treat any corruption as EOF */ - if (binlog_can_be_corrupted && error != LOG_READ_MEM) + if (binlog_can_be_corrupted && + error != LOG_READ_MEM && error != LOG_READ_EOF) + { + my_b_seek(&log, prev_pos); error=LOG_READ_EOF; + } + /* TODO: now that we are logging the offset, check to make sure the recorded offset and the actual match. |