Bug #5134 | WHERE x = 'bar' AND x LIKE BINARY 'bar' returns wrong results | ||
---|---|---|---|
Submitted: | 21 Aug 2004 0:35 | Modified: | 23 Aug 2004 17:12 |
Reporter: | Timothy Smith | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.0.21 | OS: | Any (any) |
Assigned to: | Sergei Glukhov | CPU Architecture: | Any |
[21 Aug 2004 0:35]
Timothy Smith
[21 Aug 2004 0:49]
Timothy Smith
We noticed that this variant doesn't show the bug: mysql> SELECT * FROM test WHERE firstname='john' AND BINARY firstname LIKE 'john'; +-----------+----------+ | firstname | lastname | +-----------+----------+ | john | doe | +-----------+----------+
[21 Aug 2004 1:54]
Timothy Smith
One more funny result: mysql> select * from test where firstname='John' and firstname like binary 'john'; Empty set (0.00 sec) mysql> select * from test where firstname='john' and firstname like binary 'John'; Empty set (0.01 sec)
[23 Aug 2004 12:03]
Sergei Glukhov
ChangeSet 1.1981 04/08/23 Fix for bug #5134: WHERE x = 'bar' AND x LIKE BINARY 'bar' returns wrong results
[23 Aug 2004 14:15]
Sergei Glukhov
Previous fix was wrong. Here is 2nd version. ChangeSet 1.1981 04/08/23 Fix for bug #5134: WHERE x = 'bar' AND x LIKE BINARY 'bar' returns wrong results(2nd version)
[23 Aug 2004 17:12]
Sergei Glukhov
Fixed in 4.0 and 4.1 source tree