mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-6736: Valgrind warnings 'Invalid read' in subselect_engine::calc_const_tables with SQ in WHERE and
HAVING, ORDER BY, materialization+semijoin During cleanup a pointer to the materialised table that was freed was not set to NULL
This commit is contained in:
@@ -11476,13 +11476,15 @@ void JOIN_TAB::cleanup()
|
||||
}
|
||||
else
|
||||
{
|
||||
TABLE_LIST *tmp= table->pos_in_table_list;
|
||||
end_read_record(&read_record);
|
||||
table->pos_in_table_list->jtbm_subselect->cleanup();
|
||||
tmp->jtbm_subselect->cleanup();
|
||||
/*
|
||||
The above call freed the materializedd temptable. Set it to NULL so
|
||||
that we don't attempt to touch it if JOIN_TAB::cleanup() is invoked
|
||||
multiple times (it may be)
|
||||
*/
|
||||
tmp->table= NULL;
|
||||
table=NULL;
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
|
Reference in New Issue
Block a user