Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
exposed filters
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2011 at 07:33 UTC
Updated:
22 Mar 2011 at 00:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
fexmusicmutuz commentedHelp me, please!!!
Comment #2
bojanz commentedCase sensitivity has been removed. All filters are assumed to be case insensitive. This is due to Drupal 7 architecture.
Also, please don't bump your issues. It's rude.
Comment #3
bojanz commentedThis needs to be confirmed (it should not happen)
Comment #4
fexmusicmutuz commentedLIKE statements are case sensitive in postgresql
Comment #5
bojanz commentedThe Drupal 7 DB Layer defines LIKE as ILIKE for PostgreSQL. But maybe we are doing our own thing somewhere...
Comment #6
fexmusicmutuz commentedI think the DB Layer will not help here:
Comment #7
bojanz commentedSummary:
MySQL and SQLite specify LIKE as case-insensitive.
However, PostgreSQL specifies LIKE as case-sensitive, and provides ILIKE that works like the MySQL / SQLite variants.
Drupal's DB layer knows how to handle it. Which doesn't matter for us because we aren't using it in this case :P
And there's no reason I can see for us not to use it.
Attaching a patch that uses Drupal's db layer for the LIKE operations. All string filter tests still pass.
I did a checkout of Views from August, and while the code was similar to the proposed patch, it didn't use db_like() and it still used the unneeded UPPER trick. So I think we're good here (going with the proposed approach)
P.S. As a guide for db_like() usage I'm reading http://drupal.org/node/683736. Plus we have instances in our codebase where are using LIKE as the operator, and db_like is there.
Comment #8
dawehnerThis original patch failed for op_equal
The tests showed one failure.
Fixed this small part and the test seems fine again.