mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.3 into 10.4
This commit is contained in:
@ -13831,24 +13831,7 @@ void JOIN::cleanup(bool full)
|
||||
for (tab= first_linear_tab(this, WITH_BUSH_ROOTS, WITH_CONST_TABLES); tab;
|
||||
tab= next_linear_tab(this, tab, WITH_BUSH_ROOTS))
|
||||
{
|
||||
if (!tab->table)
|
||||
continue;
|
||||
DBUG_PRINT("info", ("close index: %s.%s alias: %s",
|
||||
tab->table->s->db.str,
|
||||
tab->table->s->table_name.str,
|
||||
tab->table->alias.c_ptr()));
|
||||
if (tab->table->is_created())
|
||||
{
|
||||
tab->table->file->ha_index_or_rnd_end();
|
||||
if (tab->aggr)
|
||||
{
|
||||
int tmp= 0;
|
||||
if ((tmp= tab->table->file->extra(HA_EXTRA_NO_CACHE)))
|
||||
tab->table->file->print_error(tmp, MYF(0));
|
||||
}
|
||||
}
|
||||
delete tab->filesort_result;
|
||||
tab->filesort_result= NULL;
|
||||
tab->partial_cleanup();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -28848,6 +28831,40 @@ void JOIN::handle_implicit_grouping_with_window_funcs()
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
@brief
|
||||
Perform a partial cleanup for the JOIN_TAB structure
|
||||
|
||||
@note
|
||||
this is used to cleanup resources for the re-execution of correlated
|
||||
subqueries.
|
||||
*/
|
||||
void JOIN_TAB::partial_cleanup()
|
||||
{
|
||||
if (!table)
|
||||
return;
|
||||
|
||||
if (table->is_created())
|
||||
{
|
||||
table->file->ha_index_or_rnd_end();
|
||||
DBUG_PRINT("info", ("close index: %s.%s alias: %s",
|
||||
table->s->db.str,
|
||||
table->s->table_name.str,
|
||||
table->alias.c_ptr()));
|
||||
if (aggr)
|
||||
{
|
||||
int tmp= 0;
|
||||
if ((tmp= table->file->extra(HA_EXTRA_NO_CACHE)))
|
||||
table->file->print_error(tmp, MYF(0));
|
||||
}
|
||||
}
|
||||
delete filesort_result;
|
||||
filesort_result= NULL;
|
||||
free_cache(&read_record);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@brief
|
||||
Look for provision of the select_handler interface by a foreign engine
|
||||
|
Reference in New Issue
Block a user