mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-11162 Assertion `num_records == m_idx_array.size()' failed in Filesort_buffer::alloc_sort_buffer(uint, uint)
When JOIN::destroy() is called for a JOIN object that has - join->tmp_join != NULL - also has join->table[0]->sort then the latter was not cleaned up. This could cause a memory leak and/or asserts in the subsequent queries. Fixed by adding a cleanup call.
This commit is contained in:
@ -3144,6 +3144,7 @@ JOIN::destroy()
|
||||
*/
|
||||
tmp_table_param.cleanup();
|
||||
tmp_join->tmp_table_param.copy_field= 0;
|
||||
cleanup(1);
|
||||
DBUG_RETURN(tmp_join->destroy());
|
||||
}
|
||||
cond_equal= 0;
|
||||
|
Reference in New Issue
Block a user