From 21fa12734fa53d5cfea11cc9d5d306274790b7e8 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 23 Aug 2004 20:17:14 +0400 Subject: Fix for bug #5134: WHERE x = 'bar' AND x LIKE BINARY 'bar' returns wrong results(for 4.1 tree) mysql-test/r/binary.result: Fix for bug #5134: WHERE x = 'bar' AND x LIKE BINARY 'bar' returns wrong results mysql-test/t/binary.test: Fix for bug #5134: WHERE x = 'bar' AND x LIKE BINARY 'bar' returns wrong results sql/sql_select.cc: Fix for bug #5134: WHERE x = 'bar' AND x LIKE BINARY 'bar' returns wrong results --- mysql-test/t/binary.test | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mysql-test/t/binary.test') 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; -- cgit v1.2.1