1
0
mirror of https://github.com/MariaDB/server.git synced 2025-10-12 12:25:37 +03:00

MDEV-5011: ERROR Plugin 'MEMORY' has ref_count=1 after shutdown for SJM queries

- Provide a special execution path for cleanup of degenerate 
  non-merged semi-join children of degenerate selects.
This commit is contained in:
Sergey Petrunya
2013-09-12 13:53:13 +04:00
parent c2b38529a9
commit 7e4845beea
6 changed files with 73 additions and 0 deletions

View File

@@ -10125,6 +10125,11 @@ void JOIN_TAB::cleanup()
{
if (table->pos_in_table_list->jtbm_subselect->is_jtbm_const_tab)
{
/*
Set this to NULL so that cleanup_empty_jtbm_semi_joins() doesn't
attempt to make another free_tmp_table call.
*/
table->pos_in_table_list->table= NULL;
free_tmp_table(join->thd, table);
table= NULL;
}
@@ -10461,6 +10466,7 @@ void JOIN::cleanup(bool full)
}
if (full)
{
cleanup_empty_jtbm_semi_joins(this);
/*
Ensure that the following delete_elements() would not be called
twice for the same list.