diff options
author | Alexander Nozdrin <alik@sun.com> | 2009-11-10 11:34:26 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2009-11-10 11:34:26 +0300 |
commit | ecd604717296518d1107362ae870bca226a0a6cc (patch) | |
tree | 2b510f70b2f2fee98a5d730b29194f09f4aab273 /mysql-test | |
parent | b712dce3d57335d3957afe94d1c3200880aebe99 (diff) | |
parent | 6590cb3bd6de1979d6db92d55db740c28cc1a068 (diff) | |
download | mariadb-git-ecd604717296518d1107362ae870bca226a0a6cc.tar.gz |
Auto-merge from mysql-next-mr-alik.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/ctype_collate.result | 30 | ||||
-rw-r--r-- | mysql-test/r/partition_column.result | 50 | ||||
-rw-r--r-- | mysql-test/r/partition_innodb.result | 11 | ||||
-rw-r--r-- | mysql-test/t/ctype_collate.test | 12 | ||||
-rw-r--r-- | mysql-test/t/partition_column.test | 31 | ||||
-rw-r--r-- | mysql-test/t/partition_innodb.test | 15 |
6 files changed, 149 insertions, 0 deletions
diff --git a/mysql-test/r/ctype_collate.result b/mysql-test/r/ctype_collate.result index b42094550bd..67262a4935d 100644 --- a/mysql-test/r/ctype_collate.result +++ b/mysql-test/r/ctype_collate.result @@ -548,6 +548,36 @@ SELECT * FROM t1 WHERE s2 = s3; s1 s2 s3 a A A DROP TABLE t1; +create table t1 (a varchar(1) character set latin1 collate latin1_general_ci); +insert into t1 values ('A'),('a'),('B'),('b'),('C'),('c'); +select * from t1 where a > 'B' collate latin1_bin; +a +a +b +C +c +select * from t1 where a <> 'B' collate latin1_bin; +a +A +a +b +C +c +create index i on t1 (a); +select * from t1 where a > 'B' collate latin1_bin; +a +a +b +C +c +select * from t1 where a <> 'B' collate latin1_bin; +a +A +a +b +C +c +drop table t1; SET NAMES latin1; CREATE TABLE t1 (s1 char(10) COLLATE latin1_german1_ci, diff --git a/mysql-test/r/partition_column.result b/mysql-test/r/partition_column.result index 9d46c6e0805..249de9f3496 100644 --- a/mysql-test/r/partition_column.result +++ b/mysql-test/r/partition_column.result @@ -1,4 +1,54 @@ drop table if exists t1; +create table t1 (a varchar(1) character set latin1 collate latin1_general_ci) +partition by range columns(a) +( partition p0 values less than ('a'), +partition p1 values less than ('b'), +partition p2 values less than ('c'), +partition p3 values less than ('d')); +insert into t1 values ('A'),('a'),('B'),('b'),('C'),('c'); +select * from t1 where a > 'B' collate latin1_bin; +a +a +b +C +c +select * from t1 where a <> 'B' collate latin1_bin; +a +A +a +b +C +c +alter table t1 remove partitioning; +select * from t1 where a > 'B' collate latin1_bin; +a +a +b +C +c +select * from t1 where a <> 'B' collate latin1_bin; +a +A +a +b +C +c +drop table t1; +create table t1 (a varchar(2) character set latin1, +b varchar(2) character set latin1) +partition by list columns(a,b) +(partition p0 values in (('a','a'))); +insert into t1 values ('A','A'); +select * from t1 where b <> 'a' collate latin1_bin AND +a = 'A' collate latin1_bin; +a b +A A +alter table t1 remove partitioning; +select * from t1 where b <> 'a' collate latin1_bin AND +a = 'A' collate latin1_bin; +a b +A A +drop table t1; create table t1 (a varchar(5)) partition by list columns(a) ( partition p0 values in ('\''), diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index 53e0d88f3f8..d95e7dc43fd 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -1,4 +1,15 @@ drop table if exists t1; +create table t1 (a varchar(5), b int signed, c varchar(10), d datetime) +partition by range columns(b,c) +subpartition by hash(to_seconds(d)) +( partition p0 values less than (2, 'b'), +partition p1 values less than (4, 'd'), +partition p2 values less than (10, 'za')); +insert into t1 values ('a', 3, 'w', '2001-10-27 04:34:00'); +insert into t1 values ('r', 7, 'w', '2001-10-27 05:34:00'); +insert into t1 values ('g', 10, 'w', '2001-10-27 06:34:00'); +update t1 set a = 'c' where a > 'f'; +drop table t1; create table t1 (a varchar(5)) engine=memory partition by range columns(a) diff --git a/mysql-test/t/ctype_collate.test b/mysql-test/t/ctype_collate.test index 6b6abbcfbcc..cb2113277b9 100644 --- a/mysql-test/t/ctype_collate.test +++ b/mysql-test/t/ctype_collate.test @@ -172,6 +172,18 @@ DROP TABLE t1; # # Test that optimizer doesn't use indexes with wrong collation # +# +# BUG#48447, Delivering too few records with indexes using collate syntax +# +create table t1 (a varchar(1) character set latin1 collate latin1_general_ci); +insert into t1 values ('A'),('a'),('B'),('b'),('C'),('c'); +select * from t1 where a > 'B' collate latin1_bin; +select * from t1 where a <> 'B' collate latin1_bin; +create index i on t1 (a); +select * from t1 where a > 'B' collate latin1_bin; +select * from t1 where a <> 'B' collate latin1_bin; +drop table t1; + SET NAMES latin1; CREATE TABLE t1 (s1 char(10) COLLATE latin1_german1_ci, diff --git a/mysql-test/t/partition_column.test b/mysql-test/t/partition_column.test index 6b62e3576b4..7577325234f 100644 --- a/mysql-test/t/partition_column.test +++ b/mysql-test/t/partition_column.test @@ -8,6 +8,37 @@ drop table if exists t1; --enable_warnings +# +# BUG#48161, Delivering too few records using collate syntax with partitions +# +# Test case from BUG#48447 with some extension +create table t1 (a varchar(1) character set latin1 collate latin1_general_ci) +partition by range columns(a) +( partition p0 values less than ('a'), + partition p1 values less than ('b'), + partition p2 values less than ('c'), + partition p3 values less than ('d')); +insert into t1 values ('A'),('a'),('B'),('b'),('C'),('c'); +select * from t1 where a > 'B' collate latin1_bin; +select * from t1 where a <> 'B' collate latin1_bin; +alter table t1 remove partitioning; +select * from t1 where a > 'B' collate latin1_bin; +select * from t1 where a <> 'B' collate latin1_bin; +drop table t1; + +# Test case from BUG#48161 +create table t1 (a varchar(2) character set latin1, + b varchar(2) character set latin1) +partition by list columns(a,b) +(partition p0 values in (('a','a'))); +insert into t1 values ('A','A'); +select * from t1 where b <> 'a' collate latin1_bin AND + a = 'A' collate latin1_bin; +alter table t1 remove partitioning; +select * from t1 where b <> 'a' collate latin1_bin AND + a = 'A' collate latin1_bin; +drop table t1; + create table t1 (a varchar(5)) partition by list columns(a) ( partition p0 values in ('\''), diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index 5aef5dcaa18..2e08834cfc7 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -6,6 +6,21 @@ drop table if exists t1; --enable_warnings # +# BUG#47774, Assertion failure in InnoDB using column list partitioning +# +create table t1 (a varchar(5), b int signed, c varchar(10), d datetime) +partition by range columns(b,c) +subpartition by hash(to_seconds(d)) +( partition p0 values less than (2, 'b'), + partition p1 values less than (4, 'd'), + partition p2 values less than (10, 'za')); +insert into t1 values ('a', 3, 'w', '2001-10-27 04:34:00'); +insert into t1 values ('r', 7, 'w', '2001-10-27 05:34:00'); +insert into t1 values ('g', 10, 'w', '2001-10-27 06:34:00'); +update t1 set a = 'c' where a > 'f'; +drop table t1; + +# # BUG#47776, Failed to update for MEMORY engine, crash for InnoDB and success for MyISAM # create table t1 (a varchar(5)) |