mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
moved all partition create table error tests to one test for easier maintenance
This commit is contained in:
@ -108,124 +108,6 @@ CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
c int not null,
|
||||
primary key(a,b))
|
||||
partition by range (a);
|
||||
ERROR HY000: For RANGE partitions each partition must be defined
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
c int not null,
|
||||
primary key(a,b))
|
||||
partition by range (a+d)
|
||||
partitions 2
|
||||
(partition x1 values less than (4) tablespace ts1,
|
||||
partition x2 values less than (8) tablespace ts2);
|
||||
ERROR 42S22: Unknown column 'd' in 'partition function'
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
c int not null,
|
||||
primary key(a,b))
|
||||
partition by range (a)
|
||||
partitions 2
|
||||
(partition x1 values less than (4.0) tablespace ts1,
|
||||
partition x2 values less than (8) tablespace ts2);
|
||||
ERROR HY000: VALUES LESS THAN value must be of same type as partition function
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
c int not null,
|
||||
primary key(a,b))
|
||||
partition by range (3+4)
|
||||
partitions 2
|
||||
(partition x1 values less than (4) tablespace ts1,
|
||||
partition x2 values less than (8) tablespace ts2);
|
||||
ERROR HY000: Constant/Random expression in (sub)partitioning function is not allowed
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
c int not null,
|
||||
primary key(a,b))
|
||||
partition by range (a)
|
||||
partitions 2
|
||||
(partition x1 values less than (4),
|
||||
partition x2);
|
||||
ERROR HY000: RANGE PARTITIONING requires definition of VALUES LESS THAN for each partition
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
c int not null,
|
||||
primary key(a,b))
|
||||
partition by range (a)
|
||||
partitions 2
|
||||
(partition x1 values in (4),
|
||||
partition x2);
|
||||
ERROR HY000: Only LIST PARTITIONING can use VALUES IN in partition definition
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
c int not null,
|
||||
primary key(a,b))
|
||||
partition by range (a)
|
||||
partitions 2
|
||||
(partition x1 values in (4),
|
||||
partition x2 values less than (5));
|
||||
ERROR HY000: Only LIST PARTITIONING can use VALUES IN in partition definition
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
c int not null,
|
||||
primary key(a,b))
|
||||
partition by list (a)
|
||||
partitions 2
|
||||
(partition x1 values less than 4,
|
||||
partition x2 values less than (5));
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '4,
|
||||
partition x2 values less than (5))' at line 8
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
c int not null,
|
||||
primary key(a,b))
|
||||
partition by range (a)
|
||||
partitions 2
|
||||
(partition x1 values less than maxvalue,
|
||||
partition x2 values less than (5));
|
||||
ERROR 42000: MAXVALUE can only be used in last partition definition near '))' at line 9
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
c int not null,
|
||||
primary key(a,b))
|
||||
partition by range (a)
|
||||
partitions 2
|
||||
(partition x1 values less than maxvalue,
|
||||
partition x2 values less than maxvalue);
|
||||
ERROR 42000: MAXVALUE can only be used in last partition definition near 'maxvalue)' at line 9
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
c int not null,
|
||||
primary key(a,b))
|
||||
partition by range (a)
|
||||
partitions 2
|
||||
(partition x1 values less than (4),
|
||||
partition x2 values less than (3));
|
||||
ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
c int not null,
|
||||
primary key(a,b))
|
||||
partition by range (sin(a))
|
||||
partitions 2
|
||||
(partition x1 values less than (4),
|
||||
partition x2 values less than (5));
|
||||
ERROR HY000: The PARTITION function returns the wrong type
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
c int not null,
|
||||
primary key (a,b))
|
||||
partition by range (a)
|
||||
subpartition by hash (a+b)
|
||||
@ -421,35 +303,3 @@ a b c
|
||||
1 1 1
|
||||
4 1 1
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
c int not null,
|
||||
primary key (a,b))
|
||||
partition by range (a+b)
|
||||
subpartition by key (a)
|
||||
( partition x1
|
||||
( subpartition x11 engine myisam,
|
||||
subpartition x12 engine myisam),
|
||||
partition x2
|
||||
( subpartition x21 engine myisam,
|
||||
subpartition x22 engine myisam)
|
||||
);
|
||||
ERROR HY000: RANGE PARTITIONING requires definition of VALUES LESS THAN for each partition
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
c int not null,
|
||||
primary key (a,b))
|
||||
partition by key (a)
|
||||
subpartition by range (a+b)
|
||||
( partition x1
|
||||
( subpartition x11 engine myisam values less than (0),
|
||||
subpartition x12 engine myisam values less than (1)),
|
||||
partition x2
|
||||
( subpartition x21 engine myisam values less than (0),
|
||||
subpartition x22 engine myisam values less than (1))
|
||||
);
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'range (a+b)
|
||||
( partition x1
|
||||
( subpartition x11 engine myisam values less than (0)' at line 7
|
||||
|
Reference in New Issue
Block a user