summaryrefslogtreecommitdiff
path: root/sql/partition_info.cc
diff options
context:
space:
mode:
authormikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se <>2006-04-21 08:43:07 -0400
committermikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se <>2006-04-21 08:43:07 -0400
commit82dfff9d08790d1948f03a1ea06681c3ebe3ea04 (patch)
tree3134b1337835cddc30818d013c39e701baabfbfa /sql/partition_info.cc
parent006176ba1f762d5cadbcc5d50790030dbe7d3fa6 (diff)
downloadmariadb-git-82dfff9d08790d1948f03a1ea06681c3ebe3ea04.tar.gz
BUG#19067: Crash when ALTER TABLE for default subpartitioned table
Diffstat (limited to 'sql/partition_info.cc')
-rw-r--r--sql/partition_info.cc6
1 files changed, 3 insertions, 3 deletions
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;