1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

BUG#21143: mysqld hangs when using wrong number of subpartitions

Rewrote if-statement a bit shorter
Added check for subpartitions in REORGANIZE partitions to be of same number as
in base table.
This commit is contained in:
mikael/pappa@dator5.(none)
2006-08-08 08:52:51 -04:00
parent a4eb61b88c
commit 79ab9cef27
4 changed files with 38 additions and 11 deletions

View File

@ -3471,14 +3471,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;
{
@ -4392,6 +4387,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)