--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
--error ER_SAME_NAME_PARTITION
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 CHAR(5)) PARTITION BY RANGE ( c1 ) (
    PARTITION p0 VALUES LESS THAN (10),
    PARTITION p1 VALUES LESS THAN (20),
    PARTITION p1 VALUES LESS THAN (30),
    PARTITION p3 VALUES LESS THAN MAXVALUE
);
--error ER_RANGE_NOT_INCREASING_ERROR
CREATE TABLE t1 (c1 SMALLINT NOT NULL PRIMARY KEY, c2 CHAR(5)) PARTITION BY RANGE ( c1 ) (
    PARTITION p0 VALUES LESS THAN (10),
    PARTITION p1 VALUES LESS THAN (10),
    PARTITION p2 VALUES LESS THAN (30),
    PARTITION p3 VALUES LESS THAN MAXVALUE
);
--error ER_SAME_NAME_PARTITION
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 CHAR(5)) PARTITION BY RANGE ( c1 ) (
    PARTITION p0 VALUES LESS THAN (10),
    PARTITION p1 VALUES LESS THAN (20),
    PARTITION p1 VALUES LESS THAN (30),
    PARTITION p3 VALUES LESS THAN MAXVALUE
);
--error ER_RANGE_NOT_INCREASING_ERROR
CREATE TABLE t1 (c1 MEDIUMINT NOT NULL PRIMARY KEY, c2 CHAR(5)) PARTITION BY RANGE ( c1 ) (
    PARTITION p0 VALUES LESS THAN (10),
    PARTITION p1 VALUES LESS THAN (10),
    PARTITION p2 VALUES LESS THAN (30),
    PARTITION p3 VALUES LESS THAN MAXVALUE
);
--error ER_SAME_NAME_PARTITION
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 CHAR(5)) PARTITION BY RANGE ( c1 ) (
    PARTITION p0 VALUES LESS THAN (10),
    PARTITION p1 VALUES LESS THAN (20),
    PARTITION p1 VALUES LESS THAN (30),
    PARTITION p3 VALUES LESS THAN MAXVALUE
);
--error ER_RANGE_NOT_INCREASING_ERROR
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY, c2 CHAR(5)) PARTITION BY RANGE ( c1 ) (
    PARTITION p0 VALUES LESS THAN (10),
    PARTITION p1 VALUES LESS THAN (10),
    PARTITION p2 VALUES LESS THAN (30),
    PARTITION p3 VALUES LESS THAN MAXVALUE
);
--error ER_SAME_NAME_PARTITION
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 CHAR(5)) PARTITION BY RANGE ( c1 ) (
    PARTITION p0 VALUES LESS THAN (10),
    PARTITION p1 VALUES LESS THAN (20),
    PARTITION p1 VALUES LESS THAN (30),
    PARTITION p3 VALUES LESS THAN MAXVALUE
);
--error ER_RANGE_NOT_INCREASING_ERROR
CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 CHAR(5)) PARTITION BY RANGE ( c1 ) (
    PARTITION p0 VALUES LESS THAN (10),
    PARTITION p1 VALUES LESS THAN (10),
    PARTITION p2 VALUES LESS THAN (30),
    PARTITION p3 VALUES LESS THAN MAXVALUE
);
--error ER_SAME_NAME_PARTITION
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 CHAR(5)) PARTITION BY RANGE ( c1 ) (
    PARTITION p0 VALUES LESS THAN (10),
    PARTITION p1 VALUES LESS THAN (20),
    PARTITION p1 VALUES LESS THAN (30),
    PARTITION p3 VALUES LESS THAN MAXVALUE
);
--error ER_RANGE_NOT_INCREASING_ERROR
CREATE TABLE t1 (c1 BIGINT NOT NULL PRIMARY KEY, c2 CHAR(5)) PARTITION BY RANGE ( c1 ) (
    PARTITION p0 VALUES LESS THAN (10),
    PARTITION p1 VALUES LESS THAN (10),
    PARTITION p2 VALUES LESS THAN (30),
    PARTITION p3 VALUES LESS THAN MAXVALUE
);

