I found that bug in views 5.x, but from looking at the code I assume it's in 6.x too.
The text filter with the operation 'contains' uses the following string in db_query: %%%s%%
So %s is replaced with the search string, %% with % so the db server correctly gets %input%. However the problem I noted was that the query breaks once you search for something starting with 'b' (also 's', 'd', ..) - as then when %s gets replaced and input is 'boo' there is %%boo%% and then I think %b gets replaced erroneously.
Well if so, it's probably a bug of db_query(). A filed a bug for core #670746: queries might break when filtering for containment too but wanted to let you know. Perhaps there is a possible workaround views can use.
Comments
Comment #1
merlinofchaos commentedThis bug was fixed in the -dev version of Views for D5, and it was because Views was running sets of replacements twice. I've never seen or heard of this happening in D6. Are you sure this is actually happening somewhere?
Comment #2
fagoAh, thanks. Your mentioned bug-fix is #165611: 'b...' breaks filters - avoid double query argument replacement. I only ran over the bug with views 5.x-1.6 and was obviously too quick with blaming db_query and assuming it's the same in d6. :)