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.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index e87381dd49c..822f2b2c419 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -466,6 +466,12 @@ retry:
{
mysql_ha_close_table(thd, tables);
hash_tables->table= NULL;
+ /*
+ The lock might have been aborted, we need to manually reset
+ thd->some_tables_deleted because handler's tables are closed
+ in a non-standard way. Otherwise we might loop indefinitely.
+ */
+ thd->some_tables_deleted= 0;
goto retry;
}