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
commitd4f8ffeeb622b3d2ecfd9f66d96627ff9fde0487 (patch)
treee9caf5abb221ba055097d2ddf53b2846bede5991 /sql/table.cc
parentc8310653b4a9a804576fac3afab75448fca1d1b5 (diff)
downloadmariadb-git-d4f8ffeeb622b3d2ecfd9f66d96627ff9fde0487.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.
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)
{