Loading mysql-test/r/partition.result +0 −5 Original line number Diff line number Diff line drop table if exists t1; create table t1 (s1 char(2) character set utf8) partition by list (case when s1 > 'cz' then 1 else 2 end) (partition p1 values in (1), partition p2 values in (2)); drop table t1; create table t1 (a int) partition by key(a) partitions 0.2+e1; Loading mysql-test/r/partition_error.result +17 −0 Original line number Diff line number Diff line drop table if exists t1; create table t1 (a int) partition by range (a) (partition p0 values less than ((select count(*) from t1))); ERROR HY000: This partition function is not allowed create table t1 (a int) partition by range (a) (partition p0 values less than (a); ERROR 42S22: Unknown column 'a' in 'partition function' create table t1 (a int) partition by range (a) (partition p0 values less than (1)); alter table t1 add partition (partition p1 values less than (a)); ERROR 42S22: Unknown column 'a' in 'partition function' alter table t1 add partition (partition p1 values less than ((select count(*) from t1))); ERROR HY000: This partition function is not allowed drop table t1; create table t1 (a int) engine = x partition by key (a); Warnings: Loading mysql-test/r/partition_pruning.result +3 −9 Original line number Diff line number Diff line Loading @@ -284,13 +284,6 @@ explain partitions select * from t9 where a <= '2004-12-19'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t9 p0,p1 ALL NULL NULL NULL NULL 2 Using where drop table t5,t6,t7,t8,t9; create table t1 (a enum('a','b','c','d') default 'a') partition by hash (ascii(a)) partitions 2; insert into t1 values ('a'),('b'),('c'); explain partitions select * from t1 where a='b'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0,p1 ALL NULL NULL NULL NULL 3 Using where drop table t1; create table t1 ( a1 int not null ) Loading Loading @@ -683,8 +676,9 @@ f_int1 f_int2 8 8 9 9 drop table t1; create table t1 (a char(10)) partition by list(length(a)) ( partition p1 values in (1), create table t1 (a char(10) binary) partition by list(length(a)) (partition p1 values in (1), partition p2 values in (2), partition p3 values in (3), partition p4 values in (4), Loading mysql-test/r/partition_range.result +42 −0 Original line number Diff line number Diff line Loading @@ -719,3 +719,45 @@ WHERE (a >= '2004-07-01' AND a <= '2004-09-30') OR id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p407,p408,p409,p507,p508,p509 ALL NULL NULL NULL NULL 18 Using where DROP TABLE t1; create table t1 (a varchar(20)) partition by range (crc32(md5(a))) (partition p0 values less than (100), partition p1 values less than maxvalue); insert into t1 values ("12345678901234567890"); insert into t1 values ("A2345678901234567890"); insert into t1 values ("B2345678901234567890"); insert into t1 values ("1234567890123456789"); insert into t1 values ("1234567890123456"); select * from t1; a 12345678901234567890 A2345678901234567890 B2345678901234567890 1234567890123456789 1234567890123456 explain partitions select * from t1 where a = "12345678901234567890"; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 5 Using where explain partitions select * from t1 where a = "12345678901234567890" OR a = "A2345678901234567890" OR a = "B2345678901234567890" OR a = "C2345678901234567890"; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 5 Using where explain partitions select * from t1 where a = "01234567890123456"; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 5 Using where select * from t1 where a = "01234567890123456"; a select * from t1 where a = "12345678901234567890" OR a = "A2345678901234567890" OR a = "B2345678901234567890" OR a = "C2345678901234567890"; a 12345678901234567890 A2345678901234567890 B2345678901234567890 select * from t1 where a = "12345678901234567890"; a 12345678901234567890 drop table t1; mysql-test/t/partition.test +0 −9 Original line number Diff line number Diff line Loading @@ -13,15 +13,6 @@ drop table if exists t1; --enable_warnings # # Bug#14367: Partitions: crash if utf8 column # create table t1 (s1 char(2) character set utf8) partition by list (case when s1 > 'cz' then 1 else 2 end) (partition p1 values in (1), partition p2 values in (2)); drop table t1; # # Bug 15890: Strange number of partitions accepted # Loading Loading
mysql-test/r/partition.result +0 −5 Original line number Diff line number Diff line drop table if exists t1; create table t1 (s1 char(2) character set utf8) partition by list (case when s1 > 'cz' then 1 else 2 end) (partition p1 values in (1), partition p2 values in (2)); drop table t1; create table t1 (a int) partition by key(a) partitions 0.2+e1; Loading
mysql-test/r/partition_error.result +17 −0 Original line number Diff line number Diff line drop table if exists t1; create table t1 (a int) partition by range (a) (partition p0 values less than ((select count(*) from t1))); ERROR HY000: This partition function is not allowed create table t1 (a int) partition by range (a) (partition p0 values less than (a); ERROR 42S22: Unknown column 'a' in 'partition function' create table t1 (a int) partition by range (a) (partition p0 values less than (1)); alter table t1 add partition (partition p1 values less than (a)); ERROR 42S22: Unknown column 'a' in 'partition function' alter table t1 add partition (partition p1 values less than ((select count(*) from t1))); ERROR HY000: This partition function is not allowed drop table t1; create table t1 (a int) engine = x partition by key (a); Warnings: Loading
mysql-test/r/partition_pruning.result +3 −9 Original line number Diff line number Diff line Loading @@ -284,13 +284,6 @@ explain partitions select * from t9 where a <= '2004-12-19'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t9 p0,p1 ALL NULL NULL NULL NULL 2 Using where drop table t5,t6,t7,t8,t9; create table t1 (a enum('a','b','c','d') default 'a') partition by hash (ascii(a)) partitions 2; insert into t1 values ('a'),('b'),('c'); explain partitions select * from t1 where a='b'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0,p1 ALL NULL NULL NULL NULL 3 Using where drop table t1; create table t1 ( a1 int not null ) Loading Loading @@ -683,8 +676,9 @@ f_int1 f_int2 8 8 9 9 drop table t1; create table t1 (a char(10)) partition by list(length(a)) ( partition p1 values in (1), create table t1 (a char(10) binary) partition by list(length(a)) (partition p1 values in (1), partition p2 values in (2), partition p3 values in (3), partition p4 values in (4), Loading
mysql-test/r/partition_range.result +42 −0 Original line number Diff line number Diff line Loading @@ -719,3 +719,45 @@ WHERE (a >= '2004-07-01' AND a <= '2004-09-30') OR id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p407,p408,p409,p507,p508,p509 ALL NULL NULL NULL NULL 18 Using where DROP TABLE t1; create table t1 (a varchar(20)) partition by range (crc32(md5(a))) (partition p0 values less than (100), partition p1 values less than maxvalue); insert into t1 values ("12345678901234567890"); insert into t1 values ("A2345678901234567890"); insert into t1 values ("B2345678901234567890"); insert into t1 values ("1234567890123456789"); insert into t1 values ("1234567890123456"); select * from t1; a 12345678901234567890 A2345678901234567890 B2345678901234567890 1234567890123456789 1234567890123456 explain partitions select * from t1 where a = "12345678901234567890"; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 5 Using where explain partitions select * from t1 where a = "12345678901234567890" OR a = "A2345678901234567890" OR a = "B2345678901234567890" OR a = "C2345678901234567890"; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 5 Using where explain partitions select * from t1 where a = "01234567890123456"; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 5 Using where select * from t1 where a = "01234567890123456"; a select * from t1 where a = "12345678901234567890" OR a = "A2345678901234567890" OR a = "B2345678901234567890" OR a = "C2345678901234567890"; a 12345678901234567890 A2345678901234567890 B2345678901234567890 select * from t1 where a = "12345678901234567890"; a 12345678901234567890 drop table t1;
mysql-test/t/partition.test +0 −9 Original line number Diff line number Diff line Loading @@ -13,15 +13,6 @@ drop table if exists t1; --enable_warnings # # Bug#14367: Partitions: crash if utf8 column # create table t1 (s1 char(2) character set utf8) partition by list (case when s1 > 'cz' then 1 else 2 end) (partition p1 values in (1), partition p2 values in (2)); drop table t1; # # Bug 15890: Strange number of partitions accepted # Loading