summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@oracle.com>2010-12-01 12:20:46 +0100
committerMattias Jonsson <mattias.jonsson@oracle.com>2010-12-01 12:20:46 +0100
commitdb830d26b346fd98bc595e747ea33159a0f5994b (patch)
treee9caf5abb221ba055097d2ddf53b2846bede5991 /sql/table.cc
parent2d81ad5be51cb2ec6921e681a6f1020e1cfa8d60 (diff)
downloadmariadb-git-db830d26b346fd98bc595e747ea33159a0f5994b.tar.gz
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.
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 18523f08551..b43d29294a8 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -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)
{