Commit d4f8ffee authored by Mattias Jonsson's avatar Mattias Jonsson

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.
parent c8310653
...@@ -1867,8 +1867,8 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias, ...@@ -1867,8 +1867,8 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias,
{ {
if (work_part_info_used) if (work_part_info_used)
tmp= fix_partition_func(thd, outparam, is_create_table); 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: partititon_err:
if (tmp) if (tmp)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment