cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dzmitry Kazimirchyk (JIRA)" <>
Subject [jira] [Updated] (CAY-1210) mysql does not use index for case insensitive searches
Date Fri, 09 Sep 2011 17:25:09 GMT


Dzmitry Kazimirchyk updated CAY-1210:

    Attachment: case-insensitive-search.patch

Improvement of previous patch. It adds BINARY usage for MySQL CS queries Select and EJBQL
when ci is true.
Also I figured out that not only MySQL may have case insensitive databases: SQLServer and
Derby have such dbs too. So, putting UPPER suppression to generic QualifierTranslator level
probably has sense.

> mysql does not use index for case insensitive searches
> ------------------------------------------------------
>                 Key: CAY-1210
>                 URL:
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Database integration
>            Reporter: Ari Maniatis
>            Assignee: Ari Maniatis
>             Fix For: 3.1 (final)
>         Attachments: case-insensitive-search.patch, case-insensitive-search.patch
> 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.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message