Commit 5bc79c0c authored by unknown's avatar unknown

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:
  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().
parent e517bb0d
...@@ -268,13 +268,8 @@ int mysql_derived_filling(THD *thd, LEX *lex, TABLE_LIST *orig_table_list) ...@@ -268,13 +268,8 @@ int mysql_derived_filling(THD *thd, LEX *lex, TABLE_LIST *orig_table_list)
unit->cleanup(); unit->cleanup();
} }
else else
{
free_tmp_table(thd, table);
unit->cleanup(); unit->cleanup();
}
lex->current_select= save_current_select; lex->current_select= save_current_select;
if (res)
free_tmp_table(thd, table);
} }
return res; return res;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment