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.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index 72df8367dc7..08114b99757 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -1196,10 +1196,10 @@ void mysql_ha_flush(THD *thd)
@note Broadcasts refresh if it closed a table with old version.
*/
-void mysql_ha_cleanup(THD *thd)
+void mysql_ha_cleanup_no_free(THD *thd)
{
SQL_HANDLER *hash_tables;
- DBUG_ENTER("mysql_ha_cleanup");
+ DBUG_ENTER("mysql_ha_cleanup_no_free");
for (uint i= 0; i < thd->handler_tables_hash.records; i++)
{
@@ -1207,9 +1207,15 @@ void mysql_ha_cleanup(THD *thd)
if (hash_tables->table)
mysql_ha_close_table(hash_tables);
}
+ DBUG_VOID_RETURN;
+}
- my_hash_free(&thd->handler_tables_hash);
+void mysql_ha_cleanup(THD *thd)
+{
+ DBUG_ENTER("mysql_ha_cleanup");
+ mysql_ha_cleanup_no_free(thd);
+ my_hash_free(&thd->handler_tables_hash);
DBUG_VOID_RETURN;
}