1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fixed a problem where the temp table of a materialized subquery

was not cleaned up between PS re-executions. The reason was two-fold:
- a merge with mysql-6.0 missed select_union::cleanup() that should
  have cleaned up the temp table, and
- the subclass of select_union used by materialization didn't call
  the base class cleanup() method.
This commit is contained in:
unknown
2010-07-16 14:02:15 +03:00
parent 75bba30c5a
commit 2d78ffb8d5
5 changed files with 79 additions and 9 deletions

View File

@ -136,6 +136,22 @@ select_union::create_result_table(THD *thd_arg, List<Item> *column_types,
}
/**
Reset and empty the temporary table that stores the materialized query result.
@note The cleanup performed here is exactly the same as for the two temp
tables of JOIN - exec_tmp_table_[1 | 2].
*/
void select_union::cleanup()
{
table->file->extra(HA_EXTRA_RESET_STATE);
table->file->ha_delete_all_rows();
free_io_cache(table);
filesort_free_buffers(table,0);
}
/*
initialization procedures before fake_select_lex preparation()