summaryrefslogtreecommitdiff
path: root/sql/rpl_rli.cc
diff options
context:
space:
mode:
authorJoerg Bruehe <joerg.bruehe@oracle.com>2012-05-07 22:20:42 +0200
committerJoerg Bruehe <joerg.bruehe@oracle.com>2012-05-07 22:20:42 +0200
commitad1e123f478e170cdbed5fd0e6a58277e61326ad (patch)
treefd4bc4e87a0385cd676cd34fe9ba93dd57358f2e /sql/rpl_rli.cc
parent066dc9a281ee8932827f7e6180dd0fa1bfe5d922 (diff)
parent582b7283472a43af5d7fb51386df055ea9d44a96 (diff)
downloadmariadb-git-ad1e123f478e170cdbed5fd0e6a58277e61326ad.tar.gz
Merge 5.5.24 back into main 5.5.
This is a weave merge, but without any conflicts. In 14 source files, the copyright year needed to be updated to 2012.
Diffstat (limited to 'sql/rpl_rli.cc')
-rw-r--r--sql/rpl_rli.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc
index 607bd092b73..2d302011b44 100644
--- a/sql/rpl_rli.cc
+++ b/sql/rpl_rli.cc
@@ -1264,6 +1264,23 @@ void Relay_log_info::cleanup_context(THD *thd, bool error)
void Relay_log_info::clear_tables_to_lock()
{
+ DBUG_ENTER("Relay_log_info::clear_tables_to_lock()");
+#ifndef DBUG_OFF
+ /**
+ When replicating in RBR and MyISAM Merge tables are involved
+ open_and_lock_tables (called in do_apply_event) appends the
+ base tables to the list of tables_to_lock. Then these are
+ removed from the list in close_thread_tables (which is called
+ before we reach this point).
+
+ This assertion just confirms that we get no surprises at this
+ point.
+ */
+ uint i=0;
+ for (TABLE_LIST *ptr= tables_to_lock ; ptr ; ptr= ptr->next_global, i++) ;
+ DBUG_ASSERT(i == tables_to_lock_count);
+#endif
+
while (tables_to_lock)
{
uchar* to_free= reinterpret_cast<uchar*>(tables_to_lock);
@@ -1288,10 +1305,12 @@ void Relay_log_info::clear_tables_to_lock()
my_free(to_free);
}
DBUG_ASSERT(tables_to_lock == NULL && tables_to_lock_count == 0);
+ DBUG_VOID_RETURN;
}
void Relay_log_info::slave_close_thread_tables(THD *thd)
{
+ DBUG_ENTER("Relay_log_info::slave_close_thread_tables(THD *thd)");
thd->stmt_da->can_overwrite_status= TRUE;
thd->is_error() ? trans_rollback_stmt(thd) : trans_commit_stmt(thd);
thd->stmt_da->can_overwrite_status= FALSE;
@@ -1313,5 +1332,6 @@ void Relay_log_info::slave_close_thread_tables(THD *thd)
thd->mdl_context.release_statement_locks();
clear_tables_to_lock();
+ DBUG_VOID_RETURN;
}
#endif