1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Fix for bug #5134: WHERE x = 'bar' AND x LIKE BINARY 'bar' returns wrong results(for 4.1 tree)

This commit is contained in:
gluh@gluh.mysql.r18.ru
2004-08-23 20:17:14 +04:00
parent 0983295859
commit 7b17daf21e
3 changed files with 39 additions and 2 deletions

View File

@ -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;