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 | |
| 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')
| -rw-r--r-- | sql/sql_insert.cc | 2 | ||||
| -rw-r--r-- | sql/sql_repl.cc | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 0b463ff1202..4475e087163 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -979,7 +979,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, if (thd->transaction.stmt.modified_non_trans_table) thd->transaction.all.modified_non_trans_table= TRUE; - if ((changed && error <= 0) || + if (error <= 0 || thd->transaction.stmt.modified_non_trans_table || was_insert_delayed) { 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. |
