From f56cc2a3351eff1c7c01706ad8b93dad5770ed93 Mon Sep 17 00:00:00 2001 From: Konstantin Osipov Date: Tue, 1 Dec 2009 01:13:06 +0300 Subject: Backport of: ------------------------------------------------------------ revno: 2630.4.16 committer: Dmitry Lenev branch nick: mysql-6.0-3726-w timestamp: Thu 2008-05-29 09:45:02 +0400 message: WL#3726 "DDL locking for all metadata objects". After review changes in progress. Tweaked some comments and did some renames to avoid ambiguites. --- sql/sql_handler.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/sql_handler.cc') diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index 6087b0b7700..87e9538b48f 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -798,6 +798,7 @@ void mysql_ha_flush(THD *thd) for (uint i= 0; i < thd->handler_tables_hash.records; i++) { hash_tables= (TABLE_LIST*) my_hash_element(&thd->handler_tables_hash, i); + /* TABLE::mdl_lock is 0 for temporary tables so we need extra check. */ if (hash_tables->table && (hash_tables->table->mdl_lock && mdl_has_pending_conflicting_lock(hash_tables->table->mdl_lock) || -- cgit v1.2.1