Loading mysql-test/r/partition.result +14 −0 Original line number Diff line number Diff line drop table if exists t1; create table t1 (a int) partition by list (a) (partition p0 values in (1)); create procedure pz() alter table t1 engine = myisam; call pz(); call pz(); drop procedure pz; drop table t1; create table t1 (a int) engine = csv partition by list (a) (partition p0 values in (null)); ERROR HY000: CSV handler cannot be used in partitioned tables create table t1 (a bigint) partition by range (a) (partition p0 values less than (0xFFFFFFFFFFFFFFFF), Loading mysql-test/r/partition_error.result +39 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,9 @@ partitions 3 partition x2 tablespace ts2, partition x3 tablespace ts3); ERROR HY000: Field in list of fields for partition function not found in table select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading Loading @@ -163,6 +166,9 @@ partitions 2 (partition x1 values less than (4), partition x2 values less than (5)); ERROR HY000: Only RANGE PARTITIONING can use VALUES LESS THAN in partition definition select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -173,6 +179,9 @@ partitions 2 (partition x1 values in (4), partition x2 values in (5)); ERROR HY000: Only LIST PARTITIONING can use VALUES IN in partition definition select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -183,6 +192,9 @@ partitions 2 (partition x1 values in (4,6), partition x2 values in (5,7)); ERROR HY000: Only LIST PARTITIONING can use VALUES IN in partition definition select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -191,6 +203,9 @@ primary key (a,b)) partition by key (a) subpartition by key (b); ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -199,6 +214,9 @@ primary key (a,b)) partition by key (a) subpartition by key (a, b); ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -207,6 +225,9 @@ primary key (a,b)) partition by key (a) subpartition by hash (a+b); ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -215,6 +236,9 @@ primary key (a,b)) partition by key (a) subpartition by key (b); ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -223,6 +247,9 @@ primary key (a,b)) partition by key (a) subpartition by key (a, b); ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -231,6 +258,9 @@ primary key (a,b)) partition by key (a) subpartition by hash (a+b); ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -249,6 +279,9 @@ subpartition by hash (sin(a+b)) (partition x1 (subpartition x11, subpartition x12), partition x2 (subpartition x21, subpartition x22)); ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -271,6 +304,9 @@ subpartition by key (a,d) (partition x1 values less than (1) (subpartition x11, subpartition x12), partition x2 values less than (2) (subpartition x21, subpartition x22)); ERROR HY000: Field in list of fields for partition function not found in table select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -296,6 +332,9 @@ c int not null, primary key(a,b)) partition by range (a); ERROR HY000: For RANGE partitions each partition must be defined select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading mysql-test/r/partition_list.result +10 −0 Original line number Diff line number Diff line Loading @@ -191,3 +191,13 @@ SELECT COUNT(*) FROM t1 WHERE s1 < 3; COUNT(*) 2 DROP TABLE t1; create table t1 (a int auto_increment primary key) auto_increment=100 partition by list (a) (partition p0 values in (1, 100)); create index inx on t1 (a); insert into t1 values (null); select * from t1; a 100 drop table t1; mysql-test/r/partition_mgm.result +10 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,12 @@ t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 2 */ hello/master-data/test/t1#P#p0.MYD hello/master-data/test/t1#P#p0.MYI hello/master-data/test/t1#P#p1.MYD hello/master-data/test/t1#P#p1.MYI hello/master-data/test/t1.frm hello/master-data/test/t1.par ALTER TABLE t1 COALESCE PARTITION 1; SHOW CREATE TABLE t1; Table Create Table Loading @@ -14,3 +20,7 @@ t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 1 */ hello/master-data/test/t1#P#p0.MYD hello/master-data/test/t1#P#p0.MYI hello/master-data/test/t1.frm hello/master-data/test/t1.par mysql-test/t/partition.test +24 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,30 @@ drop table if exists t1; --enable_warnings # # Bug 19309 Partitions: Crash if double procedural alter # create table t1 (a int) partition by list (a) (partition p0 values in (1)); create procedure pz() alter table t1 engine = myisam; call pz(); call pz(); drop procedure pz; drop table t1; # # Bug 19307: CSV engine crashes # --error ER_PARTITION_MERGE_ERROR create table t1 (a int) engine = csv partition by list (a) (partition p0 values in (null)); # # BUG 16002: Handle unsigned integer functions properly # Loading Loading
mysql-test/r/partition.result +14 −0 Original line number Diff line number Diff line drop table if exists t1; create table t1 (a int) partition by list (a) (partition p0 values in (1)); create procedure pz() alter table t1 engine = myisam; call pz(); call pz(); drop procedure pz; drop table t1; create table t1 (a int) engine = csv partition by list (a) (partition p0 values in (null)); ERROR HY000: CSV handler cannot be used in partitioned tables create table t1 (a bigint) partition by range (a) (partition p0 values less than (0xFFFFFFFFFFFFFFFF), Loading
mysql-test/r/partition_error.result +39 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,9 @@ partitions 3 partition x2 tablespace ts2, partition x3 tablespace ts3); ERROR HY000: Field in list of fields for partition function not found in table select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading Loading @@ -163,6 +166,9 @@ partitions 2 (partition x1 values less than (4), partition x2 values less than (5)); ERROR HY000: Only RANGE PARTITIONING can use VALUES LESS THAN in partition definition select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -173,6 +179,9 @@ partitions 2 (partition x1 values in (4), partition x2 values in (5)); ERROR HY000: Only LIST PARTITIONING can use VALUES IN in partition definition select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -183,6 +192,9 @@ partitions 2 (partition x1 values in (4,6), partition x2 values in (5,7)); ERROR HY000: Only LIST PARTITIONING can use VALUES IN in partition definition select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -191,6 +203,9 @@ primary key (a,b)) partition by key (a) subpartition by key (b); ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -199,6 +214,9 @@ primary key (a,b)) partition by key (a) subpartition by key (a, b); ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -207,6 +225,9 @@ primary key (a,b)) partition by key (a) subpartition by hash (a+b); ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -215,6 +236,9 @@ primary key (a,b)) partition by key (a) subpartition by key (b); ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -223,6 +247,9 @@ primary key (a,b)) partition by key (a) subpartition by key (a, b); ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -231,6 +258,9 @@ primary key (a,b)) partition by key (a) subpartition by hash (a+b); ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -249,6 +279,9 @@ subpartition by hash (sin(a+b)) (partition x1 (subpartition x11, subpartition x12), partition x2 (subpartition x21, subpartition x22)); ERROR HY000: It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -271,6 +304,9 @@ subpartition by key (a,d) (partition x1 values less than (1) (subpartition x11, subpartition x12), partition x2 values less than (2) (subpartition x21, subpartition x22)); ERROR HY000: Field in list of fields for partition function not found in table select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading @@ -296,6 +332,9 @@ c int not null, primary key(a,b)) partition by range (a); ERROR HY000: For RANGE partitions each partition must be defined select load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par'); load_file('$MYSQLTEST_VARDIR/master-data/test/t1.par') NULL CREATE TABLE t1 ( a int not null, b int not null, Loading
mysql-test/r/partition_list.result +10 −0 Original line number Diff line number Diff line Loading @@ -191,3 +191,13 @@ SELECT COUNT(*) FROM t1 WHERE s1 < 3; COUNT(*) 2 DROP TABLE t1; create table t1 (a int auto_increment primary key) auto_increment=100 partition by list (a) (partition p0 values in (1, 100)); create index inx on t1 (a); insert into t1 values (null); select * from t1; a 100 drop table t1;
mysql-test/r/partition_mgm.result +10 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,12 @@ t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 2 */ hello/master-data/test/t1#P#p0.MYD hello/master-data/test/t1#P#p0.MYI hello/master-data/test/t1#P#p1.MYD hello/master-data/test/t1#P#p1.MYI hello/master-data/test/t1.frm hello/master-data/test/t1.par ALTER TABLE t1 COALESCE PARTITION 1; SHOW CREATE TABLE t1; Table Create Table Loading @@ -14,3 +20,7 @@ t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) PARTITIONS 1 */ hello/master-data/test/t1#P#p0.MYD hello/master-data/test/t1#P#p0.MYI hello/master-data/test/t1.frm hello/master-data/test/t1.par
mysql-test/t/partition.test +24 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,30 @@ drop table if exists t1; --enable_warnings # # Bug 19309 Partitions: Crash if double procedural alter # create table t1 (a int) partition by list (a) (partition p0 values in (1)); create procedure pz() alter table t1 engine = myisam; call pz(); call pz(); drop procedure pz; drop table t1; # # Bug 19307: CSV engine crashes # --error ER_PARTITION_MERGE_ERROR create table t1 (a int) engine = csv partition by list (a) (partition p0 values in (null)); # # BUG 16002: Handle unsigned integer functions properly # Loading