diff options
author | unknown <mskold@mysql.com> | 2004-08-23 20:33:38 +0200 |
---|---|---|
committer | unknown <mskold@mysql.com> | 2004-08-23 20:33:38 +0200 |
commit | 3fc3bb68cc772e5824375785b6b9d5586daa1d9c (patch) | |
tree | 8e9bfd8b4483effb0eb1aa8bf839ef78cb0f424d /mysql-test | |
parent | a3e0b69bfb736367fa840465766dc266bcc361fb (diff) | |
parent | 614414682f4ffd87570f791cc6c3af624f31b041 (diff) | |
download | mariadb-git-3fc3bb68cc772e5824375785b6b9d5586daa1d9c.tar.gz |
Merge mskold@build.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-4.1
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/binary.result | 18 | ||||
-rw-r--r-- | mysql-test/t/binary.test | 13 |
2 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/r/binary.result b/mysql-test/r/binary.result index a4ced14bb12..68b507d1089 100644 --- a/mysql-test/r/binary.result +++ b/mysql-test/r/binary.result @@ -116,3 +116,21 @@ select collation(a), collation(b), collation(binary 'ccc') from t1 limit 1; collation(a) collation(b) collation(binary 'ccc') latin1_bin binary latin1_bin drop table t1; +create table t1( firstname char(20), lastname char(20)); +insert into t1 values ("john","doe"),("John","Doe"); +select * from t1 where firstname='john' and firstname like binary 'john'; +firstname lastname +john doe +select * from t1 where firstname='john' and binary 'john' = firstname; +firstname lastname +john doe +select * from t1 where firstname='john' and firstname = binary 'john'; +firstname lastname +john doe +select * from t1 where firstname='John' and firstname like binary 'john'; +firstname lastname +john doe +select * from t1 where firstname='john' and firstname like binary 'John'; +firstname lastname +John Doe +drop table t1; diff --git a/mysql-test/t/binary.test b/mysql-test/t/binary.test index 9f63c2ed445..3e702fd5257 100644 --- a/mysql-test/t/binary.test +++ b/mysql-test/t/binary.test @@ -67,3 +67,16 @@ select * from t1 where lower(b)='bbb'; select charset(a), charset(b), charset(binary 'ccc') from t1 limit 1; select collation(a), collation(b), collation(binary 'ccc') from t1 limit 1; drop table t1; + +# +# Bug5134: WHERE x = 'bar' AND x LIKE BINARY 'bar' returns wrong results +# + +create table t1( firstname char(20), lastname char(20)); +insert into t1 values ("john","doe"),("John","Doe"); +select * from t1 where firstname='john' and firstname like binary 'john'; +select * from t1 where firstname='john' and binary 'john' = firstname; +select * from t1 where firstname='john' and firstname = binary 'john'; +select * from t1 where firstname='John' and firstname like binary 'john'; +select * from t1 where firstname='john' and firstname like binary 'John'; +drop table t1; |