From 82dfff9d08790d1948f03a1ea06681c3ebe3ea04 Mon Sep 17 00:00:00 2001 From: "mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se" <> Date: Fri, 21 Apr 2006 08:43:07 -0400 Subject: BUG#19067: Crash when ALTER TABLE for default subpartitioned table --- sql/partition_info.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sql/partition_info.cc') diff --git a/sql/partition_info.cc b/sql/partition_info.cc index 3194aef8574..01fe5aaf500 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -265,7 +265,7 @@ bool partition_info::set_up_default_subpartitions(handler *file, j= 0; do { - partition_element *subpart_elem= new partition_element(); + partition_element *subpart_elem= new partition_element(part_elem); if (likely(subpart_elem != 0 && (!part_elem->subpartitions.push_back(subpart_elem)))) { @@ -718,6 +718,8 @@ bool partition_info::check_partition_info(handlerton **eng_type, do { partition_element *part_elem= part_it++; + if (part_elem->engine_type == NULL) + part_elem->engine_type= default_engine_type; if (!is_sub_partitioned()) { if (check_table_name(part_elem->partition_name, @@ -726,8 +728,6 @@ bool partition_info::check_partition_info(handlerton **eng_type, my_error(ER_WRONG_PARTITION_NAME, MYF(0)); goto end; } - if (part_elem->engine_type == NULL) - part_elem->engine_type= default_engine_type; DBUG_PRINT("info", ("engine = %d", ha_legacy_type(part_elem->engine_type))); engine_array[part_count++]= part_elem->engine_type; -- cgit v1.2.1