diff options
author | Alfranio Correia <alfranio.correia@oracle.com> | 2011-01-31 10:11:01 +0000 |
---|---|---|
committer | Alfranio Correia <alfranio.correia@oracle.com> | 2011-01-31 10:11:01 +0000 |
commit | cb52e82ea77ecc2fdb7de79bf9af13857fa9c1c5 (patch) | |
tree | e87cb89ef59d837be1d5682c3a5c67f7f3073c39 | |
parent | 631f5d0ef398839c53194f550bfe419493260436 (diff) | |
parent | 5a0af47919f5381c4a6e9775dc205d1e96ac5b7e (diff) | |
download | mariadb-git-cb52e82ea77ecc2fdb7de79bf9af13857fa9c1c5.tar.gz |
merge mysql-5.1 (local) --> mysql-5.1
-rw-r--r-- | mysql-test/suite/rpl/t/disabled.def | 1 | ||||
-rw-r--r-- | sql/sql_repl.cc | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index 3b3a55fe4cd..33f65ff3ecc 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -11,7 +11,6 @@ ############################################################################## rpl_row_create_table : Bug#51574 Feb 27 2010 andrei failed different way than earlier with bug#45576 -rpl_log_pos : BUG#55675 Sep 10 2010 27 2010 alfranio rpl.rpl_log_pos fails sporadically with error binlog truncated in the middle rpl_get_master_version_and_clock : Bug#59178 Jan 05 2011 joro Valgrind warnings rpl_get_master_version_and_clock rpl_row_until : BUG#59543 Jan 26 2011 alfranio Replication test from eits suite rpl_row_until times out rpl_stm_until : BUG#59543 Jan 26 2011 alfranio Replication test from eits suite rpl_row_until times out diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 8c769ce6acf..2a1efab13a9 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -545,8 +545,10 @@ impossible position"; while (!net->error && net->vio != 0 && !thd->killed) { + 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--) { @@ -613,8 +615,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. |