#At file:///Users/mattiasj/mysql-bzr/b56380-51-bt/ based on revid:nirbhay.choubey@stripped
3533 Mattias Jonsson 2010-12-01
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.
modified:
sql/table.cc
=== modified file 'sql/table.cc'
--- a/sql/table.cc 2010-10-01 11:39:04 +0000
+++ b/sql/table.cc 2010-12-01 11:20:46 +0000
@@ -1867,8 +1867,8 @@ int open_table_from_share(THD *thd, TABL
{
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)
{
Attachment: [text/bzr-bundle] bzr/mattias.jonsson@oracle.com-20101201112046-2ugtweya0dltcrys.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-bugteam branch (mattias.jonsson:3533) Bug#56380 | Mattias Jonsson | 1 Dec |