1create table t1 ( 2pk bigint not null auto_increment, 3dt datetime default null, 4unique (pk, dt) 5) engine=aria row_format=dynamic 6partition by range columns(dt) ( 7partition `p20171231` values less than ('2017-12-31'), 8partition `p20181231` values less than ('2018-12-31') 9); 10insert into t1 values (1,'2017-09-28 15:12:00'); 11select * from t1; 12pk dt 131 2017-09-28 15:12:00 14alter table t1 drop partition p20181231; 15select * from t1; 16pk dt 171 2017-09-28 15:12:00 18drop table t1; 19create table t1 (a int) engine=Aria transactional=1 partition by hash(a) partitions 2; 20show create table t1; 21Table Create Table 22t1 CREATE TABLE `t1` ( 23 `a` int(11) DEFAULT NULL 24) ENGINE=Aria DEFAULT CHARSET=latin1 TRANSACTIONAL=1 25 PARTITION BY HASH (`a`) 26PARTITIONS 2 27drop table t1; 28# 29# MDEV-14641 Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine 30# 31CREATE TABLE t1 (i INT) ENGINE=Aria PARTITION BY LIST(i) (PARTITION p0 VALUES IN (1), PARTITION p1 VALUES IN (2));; 32ALTER TABLE t1 ROW_FORMAT=COMPRESSED; 33ALTER TABLE t1 DROP PARTITION p1; 34SELECT * FROM t1; 35i 36DROP TABLE t1; 37# 38# MDEV-13788 Server crash when issuing bad SQL partition syntax 39# 40CREATE TABLE t1 (id int, d date) ENGINE=Aria PARTITION BY RANGE COLUMNS(d) (PARTITION p1 VALUES LESS THAN (MAXVALUE)); 41SHOW CREATE TABLE t1; 42Table Create Table 43t1 CREATE TABLE `t1` ( 44 `id` int(11) DEFAULT NULL, 45 `d` date DEFAULT NULL 46) ENGINE=Aria DEFAULT CHARSET=latin1 47 PARTITION BY RANGE COLUMNS(`d`) 48(PARTITION `p1` VALUES LESS THAN (MAXVALUE) ENGINE = Aria) 49ALTER TABLE t1 REORGANIZE PARTITION p1 INTO 50( 51PARTITION p2, /* Notice no values */ 52PARTITION p3 VALUES LESS THAN (MAXVALUE) 53); 54ERROR HY000: Syntax error: RANGE PARTITIONING requires definition of VALUES LESS THAN for each partition 55DROP TABLE t1; 56CREATE TABLE t1 (id int, d date) ENGINE=Aria PARTITION BY LIST (id) (PARTITION p1 VALUES IN (1,2,3)); 57SHOW CREATE TABLE t1; 58Table Create Table 59t1 CREATE TABLE `t1` ( 60 `id` int(11) DEFAULT NULL, 61 `d` date DEFAULT NULL 62) ENGINE=Aria DEFAULT CHARSET=latin1 63 PARTITION BY LIST (`id`) 64(PARTITION `p1` VALUES IN (1,2,3) ENGINE = Aria) 65ALTER TABLE t1 REORGANIZE PARTITION p1 INTO 66( 67PARTITION p2, /* Notice no values */ 68PARTITION p3 VALUES IN (4,5,6) 69); 70ERROR HY000: Syntax error: LIST PARTITIONING requires definition of VALUES IN for each partition 71DROP TABLE t1; 72create table t1 (i int) engine=Aria partition by range(i) (partition p0 values less than (10)); 73lock table t1 write; 74alter table t1 add partition (partition p0 values less than (20)); 75ERROR HY000: Duplicate partition name p0 76alter table t1 add partition (partition p1 values less than (20)) /* comment */; 77drop table t1; 78