1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug#56380: valgrind memory leak warning from partition tests

There could be memory leaks if ALTER ... PARTITION command fails.

Problem was that the list of items to free was not set in
the partition info structure when fix_partition_func call failed
during ALTER ... PARTITION.

Solved by always setting the list in the partition info struct.

sql/table.cc:
  item_free_list is not set if (!work_part_info_used) and
  fix_partition_func failed. Which may result in a mem leak.
This commit is contained in:
Mattias Jonsson
2010-12-01 12:20:46 +01:00
parent 2d81ad5be5
commit db830d26b3

View File

@@ -1867,8 +1867,8 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias,
{
if (work_part_info_used)
tmp= fix_partition_func(thd, outparam, is_create_table);
outparam->part_info->item_free_list= part_func_arena.free_list;
}
outparam->part_info->item_free_list= part_func_arena.free_list;
partititon_err:
if (tmp)
{