1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00
Calling List<Cached_item>::delete_elements for the same list twice
caused a crash of the server in the function JOIN::cleaunup.
Ensured that delete_elements() in JOIN::cleanup would be called only once.
This commit is contained in:
Igor Babaev
2008-07-26 13:44:07 -07:00
parent 25dd8b33d7
commit da156dde08
3 changed files with 29 additions and 0 deletions

View File

@ -6469,6 +6469,12 @@ void JOIN::cleanup(bool full)
if (tmp_join)
tmp_table_param.copy_field= 0;
group_fields.delete_elements();
/*
Ensure that the above delete_elements() would not be called
twice for the same list.
*/
if (tmp_join && tmp_join != this)
tmp_join->group_fields= group_fields;
/*
We can't call delete_elements() on copy_funcs as this will cause
problems in free_elements() as some of the elements are then deleted.