1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Merge mikael@gorf.tangent.org:/home/mikael/bug17127

into  mikael-ronstr-ms-dator.local:/Users/mikron/bug17127
This commit is contained in:
mikron@mikael-ronstr-ms-dator.local
2006-03-10 10:43:39 +01:00
4 changed files with 92 additions and 0 deletions

View File

@@ -4133,6 +4133,34 @@ uint prep_alter_part_table(THD *thd, TABLE *table, ALTER_INFO *alter_info,
((flags & (HA_FAST_CHANGE_PARTITION | HA_PARTITION_ONE_PHASE)) != 0);
DBUG_PRINT("info", ("*fast_alter_partition: %d flags: 0x%x",
*fast_alter_partition, flags));
if (((alter_info->flags & ALTER_ADD_PARTITION) ||
(alter_info->flags & ALTER_REORGANIZE_PARTITION)) &&
(thd->lex->part_info->part_type != tab_part_info->part_type))
{
if (thd->lex->part_info->part_type == RANGE_PARTITION)
{
my_error(ER_PARTITION_WRONG_VALUES_ERROR, MYF(0),
"RANGE", "LESS THAN");
}
else if (thd->lex->part_info->part_type == LIST_PARTITION)
{
DBUG_ASSERT(thd->lex->part_info->part_type == LIST_PARTITION);
my_error(ER_PARTITION_WRONG_VALUES_ERROR, MYF(0),
"LIST", "IN");
}
else if (tab_part_info->part_type == RANGE_PARTITION)
{
my_error(ER_PARTITION_REQUIRES_VALUES_ERROR, MYF(0),
"RANGE", "LESS THAN");
}
else
{
DBUG_ASSERT(tab_part_info->part_type == LIST_PARTITION);
my_error(ER_PARTITION_REQUIRES_VALUES_ERROR, MYF(0),
"LIST", "IN");
}
DBUG_RETURN(TRUE);
}
if (alter_info->flags & ALTER_ADD_PARTITION)
{
/*