diff options
-rw-r--r-- | sql/sql_handler.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index 19f54669c2f..ed7e30c1fef 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; } |