summaryrefslogtreecommitdiff
path: root/sql/sql_handler.cc
diff options
context:
space:
mode:
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 a7fe5a03f10..1966c7d8b39 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -321,6 +321,7 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, bool reopen)
can close a single table only.
*/
close_thread_tables(thd);
+ thd->mdl_context.release_all_locks();
my_error(ER_ILLEGAL_HA, MYF(0), hash_tables->alias);
error= TRUE;
}