From f3f4e41c3704b6a82942de5fd6c918319e0e4bb2 Mon Sep 17 00:00:00 2001 From: Mikael Ronstrom Date: Wed, 21 Oct 2009 20:53:44 +0200 Subject: Added checks for no NULL values in VALUES LESS THAN, added tests for no MAXVALUE in VALUES IN --- mysql-test/r/partition_column.result | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'mysql-test/r/partition_column.result') diff --git a/mysql-test/r/partition_column.result b/mysql-test/r/partition_column.result index 8bc48553d95..f1bb0a3488a 100644 --- a/mysql-test/r/partition_column.result +++ b/mysql-test/r/partition_column.result @@ -1,5 +1,13 @@ drop table if exists t1; create table t1 (a int, b int) +partition by range column_list (a,b) +(partition p0 values less than (NULL, maxvalue)); +ERROR HY000: Not allowed to use NULL value in VALUES LESS THAN +create table t1 (a int, b int) +partition by list column_list(a,b) +( partition p0 values in ((maxvalue, 0))); +Got one of the listed errors +create table t1 (a int, b int) partition by key (a,a); ERROR HY000: Duplicate partition field name a create table t1 (a int, b int) @@ -144,17 +152,17 @@ create table t1 (a int, b char(10), c varchar(25), d datetime) partition by range column_list(a,b,c,d) subpartition by hash (to_seconds(d)) subpartitions 4 -( partition p0 values less than (1, NULL, MAXVALUE, NULL), +( partition p0 values less than (1, 0, MAXVALUE, 0), partition p1 values less than (1, 'a', MAXVALUE, TO_DAYS('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 -RANGE COLUMN_LIST a,b,c,d 1,NULL,MAXVALUE,NULL -RANGE COLUMN_LIST a,b,c,d 1,NULL,MAXVALUE,NULL -RANGE COLUMN_LIST a,b,c,d 1,NULL,MAXVALUE,NULL -RANGE COLUMN_LIST a,b,c,d 1,NULL,MAXVALUE,NULL +RANGE COLUMN_LIST a,b,c,d 1,0,MAXVALUE,0 +RANGE COLUMN_LIST a,b,c,d 1,0,MAXVALUE,0 +RANGE COLUMN_LIST a,b,c,d 1,0,MAXVALUE,0 +RANGE COLUMN_LIST a,b,c,d 1,0,MAXVALUE,0 RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,730120 RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,730120 RANGE COLUMN_LIST a,b,c,d 1,'a',MAXVALUE,730120 @@ -233,7 +241,7 @@ partition p1 values less than ('2040-01-01')); ERROR HY000: Partition column values of incorrect type create table t1 (a int, b int) partition by range column_list(a,b) -(partition p0 values less than (null, 10)); +(partition p0 values less than (maxvalue, 10)); drop table t1; create table t1 (d date) partition by range column_list(d) @@ -268,7 +276,7 @@ drop table t1; create table t1 (a int, b int) partition by list column_list(a,b) (partition p0 values in ((maxvalue,maxvalue))); -ERROR 42000: Cannot use MAXVALUE as value in List partitioning near 'maxvalue,maxvalue)))' at line 3 +ERROR 42000: Cannot use MAXVALUE as value in VALUES IN near 'maxvalue,maxvalue)))' at line 3 create table t1 (a int, b int) partition by range column_list(a,b) (partition p0 values less than (maxvalue,maxvalue)); @@ -309,11 +317,11 @@ partition by range column_list(a,b) ERROR HY000: Inconsistency in usage of column lists for partitioning create table t1 (a int, b int) partition by range column_list(a,b) -(partition p0 values less than (1, NULL), +(partition p0 values less than (1, 0), partition p1 values less than (2, maxvalue), partition p2 values less than (3, 3), -partition p3 values less than (10, NULL)); -insert into t1 values (10,0); +partition p3 values less than (10, maxvalue)); +insert into t1 values (11,0); ERROR HY000: Table has no partition for value from column_list insert into t1 values (0,1),(1,1),(2,1),(3,1),(3,4),(4,9),(9,1); select * from t1; -- cgit v1.2.1