summaryrefslogtreecommitdiff
path: root/sql/log_event_old.cc
diff options
context:
space:
mode:
authorAlfranio Correia <alfranio.correia@sun.com>2009-12-24 11:51:30 +0000
committerAlfranio Correia <alfranio.correia@sun.com>2009-12-24 11:51:30 +0000
commitb79df3bc1998e9c33353a64fb90b8bd6d137642c (patch)
treee696367023a8af343b814b8fd9024f44f8a26f30 /sql/log_event_old.cc
parente8e85ed2a6fc6b1091ac62590f9084b9eae00d50 (diff)
parent0f8ea111b963554b0dcabdf0e99591f100270476 (diff)
downloadmariadb-git-b79df3bc1998e9c33353a64fb90b8bd6d137642c.tar.gz
merge mysql-next-mr --> mysql-5.1-rpl-merge
Diffstat (limited to 'sql/log_event_old.cc')
-rw-r--r--sql/log_event_old.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc
index fbcbb388236..72affd2bee9 100644
--- a/sql/log_event_old.cc
+++ b/sql/log_event_old.cc
@@ -1513,7 +1513,15 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli)
NOTE: For this new scheme there should be no pending event:
need to add code to assert that is the case.
*/
- thd->binlog_flush_pending_rows_event(false);
+ error= thd->binlog_flush_pending_rows_event(false);
+ if (error)
+ {
+ rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR,
+ ER(ER_SLAVE_FATAL_ERROR),
+ "call to binlog_flush_pending_rows_event() failed");
+ thd->is_slave_error= 1;
+ DBUG_RETURN(error);
+ }
TABLE_LIST *tables= rli->tables_to_lock;
close_tables_for_reopen(thd, &tables);
@@ -1803,7 +1811,7 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli)
(assume the last master's transaction is ignored by the slave because of
replicate-ignore rules).
*/
- thd->binlog_flush_pending_rows_event(true);
+ int binlog_error= thd->binlog_flush_pending_rows_event(true);
/*
If this event is not in a transaction, the call below will, if some
@@ -1814,12 +1822,13 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli)
are involved, commit the transaction and flush the pending event to the
binlog.
*/
- if ((error= ha_autocommit_or_rollback(thd, 0)))
+ if ((error= ha_autocommit_or_rollback(thd, binlog_error)))
rli->report(ERROR_LEVEL, error,
"Error in %s event: commit of row events failed, "
"table `%s`.`%s`",
get_type_str(), m_table->s->db.str,
m_table->s->table_name.str);
+ error|= binlog_error;
/*
Now what if this is not a transactional engine? we still need to