From de26416468c3915ec1363d6e95e6a4302846641c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 20 Mar 2006 17:41:45 +0400 Subject: Bug#14367 Partitions: crash if utf8 column use part_info->item_free_list instead of thd->free_list during partition function parsing mysql-test/r/partition.result: Bug#14367 Partitions: crash if utf8 column test case mysql-test/t/partition.test: Bug#14367 Partitions: crash if utf8 column test case sql/item.cc: Bug#14367 Partitions: crash if utf8 column create copy of string in current mem_root to avoid memory leak --- sql/sql_partition.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sql/sql_partition.cc') diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 03fa046094a..bb2db2c5da4 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -1710,6 +1710,7 @@ bool fix_partition_func(THD *thd, const char* name, TABLE *table, char* db_name; partition_info *part_info= table->part_info; ulong save_set_query_id= thd->set_query_id; + Item *thd_free_list= thd->free_list; DBUG_ENTER("fix_partition_func"); if (part_info->fixed) @@ -1744,6 +1745,7 @@ bool fix_partition_func(THD *thd, const char* name, TABLE *table, DBUG_RETURN(TRUE); } } + thd->free_list= part_info->item_free_list; if (part_info->is_sub_partitioned()) { DBUG_ASSERT(part_info->subpart_type == HASH_PARTITION); @@ -1853,6 +1855,7 @@ bool fix_partition_func(THD *thd, const char* name, TABLE *table, set_up_range_analysis_info(part_info); result= FALSE; end: + thd->free_list= thd_free_list; thd->set_query_id= save_set_query_id; DBUG_PRINT("info", ("thd->set_query_id: %d", thd->set_query_id)); DBUG_RETURN(result); -- cgit v1.2.1