mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
35 lines
1.2 KiB
Text
35 lines
1.2 KiB
Text
#
|
|
# MDEV-13788 Server crash when issuing bad SQL partition syntax
|
|
#
|
|
CREATE TABLE t1 (id int, d date) ENGINE=MyISAM PARTITION BY RANGE COLUMNS(d) (PARTITION p1 VALUES LESS THAN (MAXVALUE));
|
|
SHOW CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`id` int(11) DEFAULT NULL,
|
|
`d` date DEFAULT NULL
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
|
/*!50500 PARTITION BY RANGE COLUMNS(d)
|
|
(PARTITION p1 VALUES LESS THAN (MAXVALUE) ENGINE = MyISAM) */
|
|
ALTER TABLE t1 REORGANIZE PARTITION p1 INTO
|
|
(
|
|
PARTITION p2, /* Notice no values */
|
|
PARTITION p3 VALUES LESS THAN (MAXVALUE)
|
|
);
|
|
ERROR HY000: Syntax error: RANGE PARTITIONING requires definition of VALUES LESS THAN for each partition
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (id int, d date) ENGINE=MyISAM PARTITION BY LIST (id) (PARTITION p1 VALUES IN (1,2,3));
|
|
SHOW CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`id` int(11) DEFAULT NULL,
|
|
`d` date DEFAULT NULL
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
|
/*!50100 PARTITION BY LIST (id)
|
|
(PARTITION p1 VALUES IN (1,2,3) ENGINE = MyISAM) */
|
|
ALTER TABLE t1 REORGANIZE PARTITION p1 INTO
|
|
(
|
|
PARTITION p2, /* Notice no values */
|
|
PARTITION p3 VALUES IN (4,5,6)
|
|
);
|
|
ERROR HY000: Syntax error: LIST PARTITIONING requires definition of VALUES IN for each partition
|
|
DROP TABLE t1;
|