merge
This commit is contained in:
commit
7a6ab645ab
@ -1,4 +1,10 @@
|
|||||||
drop table if exists t1, t2;
|
drop table if exists t1, t2;
|
||||||
|
CREATE TABLE t1 (a INT, b INT)
|
||||||
|
PARTITION BY LIST (a)
|
||||||
|
SUBPARTITION BY HASH (b)
|
||||||
|
(PARTITION p1 VALUES IN (1));
|
||||||
|
ALTER TABLE t1 ADD COLUMN c INT;
|
||||||
|
DROP TABLE t1;
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
a int NOT NULL,
|
a int NOT NULL,
|
||||||
b int NOT NULL);
|
b int NOT NULL);
|
||||||
|
@ -14,6 +14,15 @@
|
|||||||
drop table if exists t1, t2;
|
drop table if exists t1, t2;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#48276: can't add column if subpartition exists
|
||||||
|
CREATE TABLE t1 (a INT, b INT)
|
||||||
|
PARTITION BY LIST (a)
|
||||||
|
SUBPARTITION BY HASH (b)
|
||||||
|
(PARTITION p1 VALUES IN (1));
|
||||||
|
ALTER TABLE t1 ADD COLUMN c INT;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug#46639: 1030 (HY000): Got error 124 from storage engine on
|
# Bug#46639: 1030 (HY000): Got error 124 from storage engine on
|
||||||
# INSERT ... SELECT ...
|
# INSERT ... SELECT ...
|
||||||
|
@ -196,10 +196,11 @@ bool partition_default_handling(TABLE *table, partition_info *part_info,
|
|||||||
{
|
{
|
||||||
DBUG_ENTER("partition_default_handling");
|
DBUG_ENTER("partition_default_handling");
|
||||||
|
|
||||||
|
if (!is_create_table_ind)
|
||||||
|
{
|
||||||
if (part_info->use_default_no_partitions)
|
if (part_info->use_default_no_partitions)
|
||||||
{
|
{
|
||||||
if (!is_create_table_ind &&
|
if (table->file->get_no_parts(normalized_path, &part_info->no_parts))
|
||||||
table->file->get_no_parts(normalized_path, &part_info->no_parts))
|
|
||||||
{
|
{
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
@ -208,14 +209,14 @@ bool partition_default_handling(TABLE *table, partition_info *part_info,
|
|||||||
part_info->use_default_no_subpartitions)
|
part_info->use_default_no_subpartitions)
|
||||||
{
|
{
|
||||||
uint no_parts;
|
uint no_parts;
|
||||||
if (!is_create_table_ind &&
|
if (table->file->get_no_parts(normalized_path, &no_parts))
|
||||||
(table->file->get_no_parts(normalized_path, &no_parts)))
|
|
||||||
{
|
{
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
DBUG_ASSERT(part_info->no_parts > 0);
|
DBUG_ASSERT(part_info->no_parts > 0);
|
||||||
part_info->no_subparts= no_parts / part_info->no_parts;
|
|
||||||
DBUG_ASSERT((no_parts % part_info->no_parts) == 0);
|
DBUG_ASSERT((no_parts % part_info->no_parts) == 0);
|
||||||
|
part_info->no_subparts= no_parts / part_info->no_parts;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
part_info->set_up_defaults_for_partitioning(table->file,
|
part_info->set_up_defaults_for_partitioning(table->file,
|
||||||
(ulonglong)0, (uint)0);
|
(ulonglong)0, (uint)0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user