Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
database system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Dec 2009 at 13:59 UTC
Updated:
10 Jan 2010 at 14:04 UTC
Using %%%s%% with LIKE in a query allows one to filter for containment - so does views. However I noted troubles searching for something that starts with 'b', 'd', 's', .. (see http://api.drupal.org/api/function/_db_query_callback/6).
So usually %s is replaced with the search string, %% with % so the db server correctly gets %input%. However when %s gets replaced and input is 'boo' there is %%boo%% and then I think %b gets replaced erroneously.
Comments
Comment #1
fagoI filed an issue for views too: #670748: contained text filter breaks.
Comment #2
fagoI was wrong with the assumption the problem is in db_query() - views 5.x-1.6 did the replacements twice. Luckily this means there is no bug in core.