summaryrefslogtreecommitdiff
path: root/sql/sql_partition.cc
diff options
context:
space:
mode:
authormikael/pappa@dator5.(none) <>2006-08-16 10:53:20 -0400
committermikael/pappa@dator5.(none) <>2006-08-16 10:53:20 -0400
commita6df8abf2c40715eddc65c8bd764238a17c34316 (patch)
treeb0f44dadd1436db09c817cc93f841986b745dc43 /sql/sql_partition.cc
parent8d8b2b38df7bcf74903b84a9797e0123aa08bd2c (diff)
parent79ab9cef2715d433e905385c8cf20ee9694bf036 (diff)
downloadmariadb-git-a6df8abf2c40715eddc65c8bd764238a17c34316.tar.gz
Merge dator5.(none):/home/pappa/bug21143
into dator5.(none):/home/pappa/bug21388
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r--sql/sql_partition.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index f6e59c244c9..208f9a0837a 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -3474,14 +3474,9 @@ bool mysql_unpack_partition(THD *thd, const uchar *part_buf,
}
table->part_info= part_info;
table->file->set_part_info(part_info);
- if (part_info->default_engine_type == NULL)
- {
+ if (!part_info->default_engine_type)
part_info->default_engine_type= default_db_type;
- }
- else
- {
- DBUG_ASSERT(part_info->default_engine_type == default_db_type);
- }
+ DBUG_ASSERT(part_info->default_engine_type == default_db_type);
part_info->item_free_list= thd->free_list;
{
@@ -4395,6 +4390,13 @@ state of p1.
my_error(ER_REORG_HASH_ONLY_ON_SAME_NO, MYF(0));
DBUG_RETURN(TRUE);
}
+ if (tab_part_info->is_sub_partitioned() &&
+ alt_part_info->no_subparts &&
+ alt_part_info->no_subparts != tab_part_info->no_subparts)
+ {
+ my_error(ER_PARTITION_WRONG_NO_SUBPART_ERROR, MYF(0));
+ DBUG_RETURN(TRUE);
+ }
check_total_partitions= tab_part_info->no_parts + no_parts_new;
check_total_partitions-= no_parts_reorged;
if (check_total_partitions > MAX_PARTITIONS)