diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/partition_column.result | 11 | ||||
-rw-r--r-- | mysql-test/t/partition_column.test | 12 |
2 files changed, 21 insertions, 2 deletions
diff --git a/mysql-test/r/partition_column.result b/mysql-test/r/partition_column.result index d76220e35cb..9da880d5cfa 100644 --- a/mysql-test/r/partition_column.result +++ b/mysql-test/r/partition_column.result @@ -39,6 +39,15 @@ subpartitions 4 partition p1 values less than (1, 'a', MAXVALUE, '1999-01-01'), partition p2 values less than (1, 'a', MAXVALUE, MAXVALUE), partition p3 values less than (1, MAXVALUE, MAXVALUE, MAXVALUE)); +ERROR HY000: Partition column values of incorrect type +create table t1 (a int, b char(10), c varchar(25), d datetime) +partition by range columns(a,b,c,d) +subpartition by hash (to_seconds(d)) +subpartitions 4 +( partition p0 values less than (1, '0', MAXVALUE, '1900-01-01'), +partition p1 values less than (1, 'a', MAXVALUE, '1999-01-01'), +partition p2 values less than (1, 'a', MAXVALUE, MAXVALUE), +partition p3 values less than (1, MAXVALUE, MAXVALUE, MAXVALUE)); select partition_method, partition_expression, partition_description from information_schema.partitions where table_name = "t1"; partition_method partition_expression partition_description @@ -421,7 +430,7 @@ create table t1 (a char(6)) partition by range columns(a) (partition p0 values less than (23456), partition p1 values less than (23456)); -ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition +ERROR HY000: Partition column values of incorrect type create table t1 (a int, b int) partition by range columns(a,b) (partition p0 values less than (10)); diff --git a/mysql-test/t/partition_column.test b/mysql-test/t/partition_column.test index 3d18fcdd337..564943543a7 100644 --- a/mysql-test/t/partition_column.test +++ b/mysql-test/t/partition_column.test @@ -51,6 +51,7 @@ insert into t1 values (''); insert into t1 values (_ucs2 0x2020); drop table t1; +--error ER_WRONG_TYPE_COLUMN_VALUE_ERROR create table t1 (a int, b char(10), c varchar(25), d datetime) partition by range columns(a,b,c,d) subpartition by hash (to_seconds(d)) @@ -59,6 +60,15 @@ subpartitions 4 partition p1 values less than (1, 'a', MAXVALUE, '1999-01-01'), partition p2 values less than (1, 'a', MAXVALUE, MAXVALUE), partition p3 values less than (1, MAXVALUE, MAXVALUE, MAXVALUE)); + +create table t1 (a int, b char(10), c varchar(25), d datetime) +partition by range columns(a,b,c,d) +subpartition by hash (to_seconds(d)) +subpartitions 4 +( partition p0 values less than (1, '0', MAXVALUE, '1900-01-01'), + partition p1 values less than (1, 'a', MAXVALUE, '1999-01-01'), + partition p2 values less than (1, 'a', MAXVALUE, MAXVALUE), + partition p3 values less than (1, MAXVALUE, MAXVALUE, MAXVALUE)); select partition_method, partition_expression, partition_description from information_schema.partitions where table_name = "t1"; show create table t1; @@ -310,7 +320,7 @@ partition by range columns(a) (partition p0 values less than (H23456), partition p1 values less than (M23456)); --- error ER_RANGE_NOT_INCREASING_ERROR +-- error ER_WRONG_TYPE_COLUMN_VALUE_ERROR create table t1 (a char(6)) partition by range columns(a) (partition p0 values less than (23456), |