diff options
author | Mikael Ronstrom <mikael@mysql.com> | 2009-11-06 11:49:27 +0100 |
---|---|---|
committer | Mikael Ronstrom <mikael@mysql.com> | 2009-11-06 11:49:27 +0100 |
commit | bf7771df3f8b797aa35a98881aa2d6891a4a6cf8 (patch) | |
tree | c09e8e0f366a56f7f2a23b283baa2e5f9f3d7ea3 | |
parent | ca9fe97e9f050111227f3257172670a151431d83 (diff) | |
download | mariadb-git-bf7771df3f8b797aa35a98881aa2d6891a4a6cf8.tar.gz |
Review fixes for BUG#48161 and BUG#48447
-rw-r--r-- | mysql-test/r/ctype_collate.result | 30 | ||||
-rw-r--r-- | mysql-test/r/partition_column.result | 29 | ||||
-rw-r--r-- | mysql-test/t/ctype_collate.test | 12 | ||||
-rw-r--r-- | mysql-test/t/partition_column.test | 16 |
4 files changed, 55 insertions, 32 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 daed67b1cce..76faae968c6 100644 --- a/mysql-test/r/partition_column.result +++ b/mysql-test/r/partition_column.result @@ -1,5 +1,10 @@ drop table if exists t1; -create table t1 (a varchar(1) character set latin1 collate latin1_general_ci); +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 @@ -14,27 +19,7 @@ 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 index i on t1; -alter table t1 -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')); +alter table t1 remove partitioning; select * from t1 where a > 'B' collate latin1_bin; a 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 78828afd484..7577325234f 100644 --- a/mysql-test/t/partition_column.test +++ b/mysql-test/t/partition_column.test @@ -10,26 +10,22 @@ drop table if exists t1; # # BUG#48161, Delivering too few records using collate syntax with partitions -# BUG#48447, Delivering too few records with indexes using collate syntax # # Test case from BUG#48447 with some extension -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 index i on t1; -alter table 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; +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) |