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().
This commit is contained in:
parent
325ec86ea1
commit
48fcadf358
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user