summaryrefslogtreecommitdiff
path: root/mysql-test/r/partition.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/partition.result')
-rw-r--r--mysql-test/r/partition.result32
1 files changed, 30 insertions, 2 deletions
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result
index b8ca0a247d9..aa6a64ac76e 100644
--- a/mysql-test/r/partition.result
+++ b/mysql-test/r/partition.result
@@ -1,4 +1,32 @@
drop table if exists t1;
+CREATE TABLE t1 (
+d DATE NOT NULL
+)
+PARTITION BY RANGE( YEAR(d) ) (
+PARTITION p0 VALUES LESS THAN (1960),
+PARTITION p1 VALUES LESS THAN (1970),
+PARTITION p2 VALUES LESS THAN (1980),
+PARTITION p3 VALUES LESS THAN (1990)
+);
+ALTER TABLE t1 ADD PARTITION (
+PARTITION `p5` VALUES LESS THAN (2010)
+COMMENT 'APSTART \' APEND'
+);
+SELECT * FROM t1 LIMIT 1;
+d
+DROP TABLE t1;
+create table t1 (id int auto_increment, s1 int, primary key (id));
+insert into t1 values (null,1);
+insert into t1 values (null,6);
+select * from t1;
+id s1
+1 1
+2 6
+alter table t1 partition by range (id) (
+partition p0 values less than (3),
+partition p1 values less than maxvalue
+);
+drop table t1;
create table t1 (a int)
partition by key(a)
partitions 0.2+e1;
@@ -687,7 +715,7 @@ partition by range (a)
alter table t1 add partition (partition p1 values in (2));
ERROR HY000: Only LIST PARTITIONING can use VALUES IN in partition definition
alter table t1 add partition (partition p1);
-ERROR HY000: RANGE PARTITIONING requires definition of VALUES LESS THAN for each partition
+ERROR HY000: Syntax error: RANGE PARTITIONING requires definition of VALUES LESS THAN for each partition
drop table t1;
create table t1 (a int)
partition by list (a)
@@ -695,7 +723,7 @@ partition by list (a)
alter table t1 add partition (partition p1 values less than (2));
ERROR HY000: Only RANGE PARTITIONING can use VALUES LESS THAN in partition definition
alter table t1 add partition (partition p1);
-ERROR HY000: LIST PARTITIONING requires definition of VALUES IN for each partition
+ERROR HY000: Syntax error: LIST PARTITIONING requires definition of VALUES IN for each partition
drop table t1;
create table t1 (a int)
partition by hash (a)