From 48fcadf358cad7e12aa540d4187ffb9733cd2100 Mon Sep 17 00:00:00 2001 From: "dlenev@brandersnatch.localdomain" <> Date: Sun, 19 Dec 2004 12:51:40 +0300 Subject: [PATCH] Small cleanup of derived tables handling. We should not call free_tmp_table() for derived table in mysql_derived_filling(), since by this moment this table is already registered in THD::derived_tables list and thus free_tmp_table() will be called for it automatically in close_thread_tables(). --- sql/sql_derived.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 7cea1c6fcee..1d4b911bb65 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -268,13 +268,8 @@ int mysql_derived_filling(THD *thd, LEX *lex, TABLE_LIST *orig_table_list) unit->cleanup(); } else - { - free_tmp_table(thd, table); unit->cleanup(); - } lex->current_select= save_current_select; - if (res) - free_tmp_table(thd, table); } return res; }