Bug #8495 | LIKE operator does not handle escape character on indexed field | ||
---|---|---|---|
Submitted: | 14 Feb 2005 12:19 | Modified: | 28 Jun 2005 6:04 |
Reporter: | Alexander Motin | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | 4.1.9 | OS: | FreeBSD (FreeBSD 5.3, FreeBSD 5.2.1) |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[14 Feb 2005 12:19]
Alexander Motin
[2 Mar 2005 21:34]
Nikola Ciprich
i'd like to report same problem with czech characters, using either latin2_bin or cp1250_bin collation
[21 Apr 2005 14:38]
Nick Meanley
As additional information:- We have a DB table with surnames in as an index and some have ' (eg O'Reily). Some of these had become corrupted by a function double escaping them so we had \' (and even \\\\') (eg O\'Reily). We tried to use the query "select * from Members where Surname like '%\\%'" to find those that had become corrupt but it didn't find them. Only when we had the like clause as '%\\\%' did it work. To me that would read as we are searching for something ending in \%. mysql Ver 14.7 Distrib 4.1.10, for pc-linux-gnu (i686) O.S. Red hat Linux unknown version.