--echo #
--echo # MDEV-13788 Server crash when issuing bad SQL partition syntax
--echo #

--eval CREATE TABLE t1 (id int, d date) ENGINE=$engine PARTITION BY RANGE COLUMNS(d) (PARTITION p1 VALUES LESS THAN (MAXVALUE))
SHOW CREATE TABLE t1;
--error ER_PARTITION_REQUIRES_VALUES_ERROR
ALTER TABLE t1 REORGANIZE PARTITION p1 INTO
(
  PARTITION p2, /* Notice no values */
  PARTITION p3 VALUES LESS THAN (MAXVALUE)
);
DROP TABLE t1;


--eval CREATE TABLE t1 (id int, d date) ENGINE=$engine PARTITION BY LIST (id) (PARTITION p1 VALUES IN (1,2,3))
SHOW CREATE TABLE t1;
--error ER_PARTITION_REQUIRES_VALUES_ERROR
ALTER TABLE t1 REORGANIZE PARTITION p1 INTO
(
  PARTITION p2, /* Notice no values */
  PARTITION p3 VALUES IN (4,5,6)
);
DROP TABLE t1;
