summaryrefslogtreecommitdiff
path: root/sql/log_event_old.cc
diff options
context:
space:
mode:
authorunknown <Dao-Gang.Qu@sun.com>2010-01-25 10:55:05 +0800
committerunknown <Dao-Gang.Qu@sun.com>2010-01-25 10:55:05 +0800
commitdad4291b781495cfdc8abac9dc2902621bfb3b56 (patch)
tree79b80f370265c5019547a5ef30b218665a358d84 /sql/log_event_old.cc
parent3cae7d1187795a8089b6f54ac60cf2a0e579cf89 (diff)
parent2b16517522afad76bc94b07bdaa8af64091e713b (diff)
downloadmariadb-git-dad4291b781495cfdc8abac9dc2902621bfb3b56.tar.gz
Manual merge with Conflicts:
sql_udf.cc
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 357bc78b1cd..313916c9818 100644
--- a/sql/log_event_old.cc
+++ b/sql/log_event_old.cc
@@ -1541,7 +1541,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);
@@ -1831,7 +1839,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
@@ -1842,12 +1850,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