diff options
author | unknown <cmiller@zippy.cornsilk.net> | 2006-09-05 17:09:52 -0400 |
---|---|---|
committer | unknown <cmiller@zippy.cornsilk.net> | 2006-09-05 17:09:52 -0400 |
commit | 2e3e6ef15c7ea5fc404f5c0721050f9594378497 (patch) | |
tree | d3d23b99fc76264bda80155221db61db0ed36f64 /mysql-test | |
parent | fc70197acb2e580bb34989e1ce428eb1bfa95d34 (diff) | |
parent | c55b9f50696e3e1768f52f78b3d62f48062319f4 (diff) | |
download | mariadb-git-2e3e6ef15c7ea5fc404f5c0721050f9594378497.tar.gz |
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/ctype_utf8.result | 31 | ||||
-rw-r--r-- | mysql-test/t/ctype_utf8.test | 18 |
2 files changed, 49 insertions, 0 deletions
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index c4c322ae2d0..2b9602215fb 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -924,6 +924,37 @@ NULL select ifnull(NULL, _utf8'string'); ifnull(NULL, _utf8'string') string +set names utf8; +create table t1 (s1 char(5) character set utf8 collate utf8_lithuanian_ci); +insert into t1 values ('I'),('K'),('Y'); +select * from t1 where s1 < 'K' and s1 = 'Y'; +s1 +I +Y +select * from t1 where 'K' > s1 and s1 = 'Y'; +s1 +I +Y +drop table t1; +create table t1 (s1 char(5) character set utf8 collate utf8_czech_ci); +insert into t1 values ('c'),('d'),('h'),('ch'),('CH'),('cH'),('Ch'),('i'); +select * from t1 where s1 > 'd' and s1 = 'CH'; +s1 +ch +CH +Ch +select * from t1 where 'd' < s1 and s1 = 'CH'; +s1 +ch +CH +Ch +select * from t1 where s1 = 'cH' and s1 <> 'ch'; +s1 +cH +select * from t1 where 'cH' = s1 and s1 <> 'ch'; +s1 +cH +drop table t1; create table t1 (a varchar(255)) default character set utf8; insert into t1 values (1.0); drop table t1; diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index 6c4bc4fff1a..5e3a3f640b1 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -728,6 +728,24 @@ select repeat(_utf8'+',3) as h union select NULL; select ifnull(NULL, _utf8'string'); # +# Bug#9509 Optimizer: wrong result after AND with comparisons +# +set names utf8; +create table t1 (s1 char(5) character set utf8 collate utf8_lithuanian_ci); +insert into t1 values ('I'),('K'),('Y'); +select * from t1 where s1 < 'K' and s1 = 'Y'; +select * from t1 where 'K' > s1 and s1 = 'Y'; +drop table t1; + +create table t1 (s1 char(5) character set utf8 collate utf8_czech_ci); +insert into t1 values ('c'),('d'),('h'),('ch'),('CH'),('cH'),('Ch'),('i'); +select * from t1 where s1 > 'd' and s1 = 'CH'; +select * from t1 where 'd' < s1 and s1 = 'CH'; +select * from t1 where s1 = 'cH' and s1 <> 'ch'; +select * from t1 where 'cH' = s1 and s1 <> 'ch'; +drop table t1; + +# # Bug#10714: Inserting double value into utf8 column crashes server # create table t1 (a varchar(255)) default character set utf8; |