If you set up any handlers to create LIKE '%%' queries where the queried text starts with the letters b, f, s, or b (like a query that ends up as LIKE '%b%') the query will fail. It has to do with the fact that those are special characters used in DB_QUERY_REGEXP. They either get thrown out of the query or changed into other values. I got far enough in debugging this to see that the % used as a wildcard in the sql is getting confused with sending something like %b to the REGEXP. The percent sign needs to be escaped or something, but I don't know enough about REGEXP to fix this.

Comments

karens’s picture

To be more specific, in case there is someone out there who knows what the fix is, in line 578 of views_query.inc the sql clause is run through preg_replace_callback(DB_QUERY_REGEXP, '_db_query_callback', $clause); and that's were the sql is picking up the wrong value -- a clause like LIKE '%b%' turns into LIKE '''%'.

karens’s picture

I finally figured out the answer, you need four(4) percent signs where you would normally have a sql wildcard character (LIKE '%%%%b%' will become LIKE '%b%')

karens’s picture

Status: Active » Fixed

Forgot to mark this fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)