ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
drop table t1;
create table t1 (a int)
partition by list (a)
(partition p0 values in (5));
insert into t1 values (0);
ERROR HY000: Table has no partition for value 0
drop table t1;
create table t1 (a int)
partition by range (a) subpartition by hash (a)
(partition p0 values less than (100));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) (PARTITION p0 VALUES LESS THAN (100) )
alter table t1 add partition (partition p1 values less than (200)
(subpartition subpart21));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) (PARTITION p0 VALUES LESS THAN (100) (SUBPARTITION p0sp0 ENGINE = MyISAM), PARTITION p1 VALUES LESS THAN (200) (SUBPARTITION subpart21 ENGINE = MyISAM))
drop table t1;
create table t1 (a int)
partition by key (a);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY (a)
(partition p0 values less than (0) (subpartition sp0),
partition p1 values less than (1));
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near ')' at line 5
create table t1 (a int, b int)
partition by range (a)
subpartition by hash(a)
(partition p0 values less than (0),
partition p1 values less than (1) (subpartition sp0));
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '))' at line 5
create table t1 (a int)
partition by hash (a)
(partition p0 (subpartition sp0));
ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning
create table t1 (a int)
partition by range (a)
(partition p0 values less than (1));
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
drop table t1;
create table t1 (a int)
partition by list (a)
(partition p0 values in (1));
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
drop table t1;
create table t1 (a int)
partition by hash (a)
(partition p0);
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 values in (2));
ERROR HY000: Only LIST PARTITIONING can use VALUES IN in partition definition
drop table t1;
create table t1 (a int)
partition by list (a)
(partition p0 values in (1));
alter table t1 rebuild partition;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
drop table t1;
create table t1 (a int) engine=innodb partition by hash(a) ;
show table status like 't1';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment