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.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index 4a69b46ddb7..3afeb4164bd 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -311,7 +311,11 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, bool reopen)
if (!reopen)
my_hash_delete(&thd->handler_tables_hash, (uchar*) hash_tables);
else
+ {
hash_tables->table= NULL;
+ /* Safety, cleanup the pointer to satisfy MDL assertions. */
+ hash_tables->mdl_request.ticket= NULL;
+ }
DBUG_PRINT("exit",("ERROR"));
DBUG_RETURN(TRUE);
}