cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (CAY-1210) mysql does not use index for case insensitive searches
Date Wed, 12 Jan 2011 13:39:46 GMT

    [ https://issues.apache.org/jira/browse/CAY-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980706#action_12980706
] 

Andrus Adamchik edited comment on CAY-1210 at 1/12/11 8:38 AM:
---------------------------------------------------------------

As recap of this thread on the dev list: http://markmail.org/message/pakh6dyzfsi5d2hr I am
documenting a solution that we'll implement in 3.1:

* A new configuration property will be introduced:  "cayenne.runtime.likeclause.ci" (default
false, can be set to true).  
*  LIKE IGNORE CASE SelectQuery and EJBQL translators should read this property from RuntimeProperties
service (meaning the property can be set  either via DI or from command line with -Dcayenne.runtime.likeclause.ci=true)
and skip conversion to UPPER if it is true.

Since translator will still be defined by DbAdapter, some databases may chose to ignore this
property.

      was (Author: andrus):
    As recap of this thread on the dev list: http://markmail.org/message/pakh6dyzfsi5d2hr
I am documenting a solution that we'll implement in 3.1:

* A new configuration property will be introduced:  "cayenne.runtime.likeclause.ci" (default
false, can be set to true).  
*  LIKE IGNORE CASE SelectQuery and EJBQL translators should read this property from RuntimeProperties
service (meaning the property can be set  either via DI or from command line with -Dcayenne.runtime.likeclause.ci=true)
and skip conversion to UPPER if it is true.


  
> mysql does not use index for case insensitive searches
> ------------------------------------------------------
>
>                 Key: CAY-1210
>                 URL: https://issues.apache.org/jira/browse/CAY-1210
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Database integration
>            Reporter: Ari Maniatis
>            Assignee: Ari Maniatis
>             Fix For: 3.1M1
>
>
> When performing a case insensitive search Cayenne spits out SQL which looks like this
> SELECT .... WHERE upper(name) LIKE upper("fred")
> This prevents any index being used for the search. Since mysql already performed case
insensitive searches on text fields we need to suppress the 'upper' functions being used in
these situations. All searches on these fields are already case insensitive.
> http://dev.mysql.com/doc/refman/5.0/en/case-sensitivity.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message