summaryrefslogtreecommitdiff
path: root/sql/sql_handler.cc
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2009-12-01 01:13:06 +0300
committerKonstantin Osipov <kostja@sun.com>2009-12-01 01:13:06 +0300
commitf56cc2a3351eff1c7c01706ad8b93dad5770ed93 (patch)
treedfab0cc24f138936eeae5dd70d68cbd515324a87 /sql/sql_handler.cc
parent3d19fdad34c5fa23ac800a0b4819325ee66d8bd4 (diff)
downloadmariadb-git-f56cc2a3351eff1c7c01706ad8b93dad5770ed93.tar.gz
Backport of:
------------------------------------------------------------ revno: 2630.4.16 committer: Dmitry Lenev <dlenev@mysql.com> 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.
Diffstat (limited to 'sql/sql_handler.cc')
-rw-r--r--sql/sql_handler.cc1
1 files changed, 1 insertions, 0 deletions
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) ||