summaryrefslogtreecommitdiff
path: root/sql/event_db_repository.cc
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2010-02-15 14:16:49 +0300
committerAlexander Nozdrin <alik@sun.com>2010-02-15 14:16:49 +0300
commit6c32fa735717e91a1de369bc8fe7d73ef9ff224a (patch)
tree2c79edc43ff38be4c2de71e4fee4285523f5c08c /sql/event_db_repository.cc
parent0ec868ca0e2d3ea60835d7c8fa7b951182b497b1 (diff)
parent2fa7509bf07761e041c5702f3b833b7fefb3ec61 (diff)
downloadmariadb-git-6c32fa735717e91a1de369bc8fe7d73ef9ff224a.tar.gz
Manual merge from mysql-next-mr.
Conflicts: - sql/log_event.cc - sql/sql_class.h
Diffstat (limited to 'sql/event_db_repository.cc')
-rw-r--r--sql/event_db_repository.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/event_db_repository.cc b/sql/event_db_repository.cc
index 53f1025458e..e9bcecc459d 100644
--- a/sql/event_db_repository.cc
+++ b/sql/event_db_repository.cc
@@ -1053,8 +1053,8 @@ update_timing_fields_for_event(THD *thd,
Turn off row binlogging of event timing updates. These are not used
for RBR of events replicated to the slave.
*/
- save_binlog_row_based= thd->is_current_stmt_binlog_format_row();
- thd->clear_current_stmt_binlog_format_row();
+ if ((save_binlog_row_based= thd->is_current_stmt_binlog_format_row()))
+ thd->clear_current_stmt_binlog_format_row();
DBUG_ASSERT(thd->security_ctx->master_access & SUPER_ACL);
@@ -1097,7 +1097,9 @@ end:
if (table)
close_thread_tables(thd);
/* Restore the state of binlog format */
- thd->current_stmt_binlog_row_based= save_binlog_row_based;
+ DBUG_ASSERT(!thd->is_current_stmt_binlog_format_row());
+ if (save_binlog_row_based)
+ thd->set_current_stmt_binlog_format_row();
DBUG_RETURN(test(ret));
}