db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Matrigali (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (DERBY-2670) %a% and %aa% match too many rows in database with collation=TERRITORY_BASED and territory=no_NO
Date Fri, 25 May 2007 23:50:16 GMT

     [ https://issues.apache.org/jira/browse/DERBY-2670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mike Matrigali resolved DERBY-2670.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 10.3.0.0

This issue is fixed by the following checkin.  This was only a problem in new code introduced
in the trunk and
never affected any Derby release.

Changed WorkHorseForCollatorDatatypes to not cache info about the collation
elements across calls to like on the object.  This info needed to get
invalidated when object for a column was reused to process the next row.
Added a test to CollationTest2 based on bug report.

m2_ibm15:123>svn commit

Sending        java\engine\org\apache\derby\iapi\types\WorkHorseForCollatorDatatypes.java
Sending        java\testing\org\apache\derbyTesting\functionTests\tests\lang\CollationTest2.java
Transmitting file data ..
Committed revision 541822.

> %a% and %aa% match too many rows in database with collation=TERRITORY_BASED and territory=no_NO
> -----------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2670
>                 URL: https://issues.apache.org/jira/browse/DERBY-2670
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Mike Matrigali
>             Fix For: 10.3.0.0
>
>         Attachments: coll.java, collrepro.sql
>
>
> On a database with territory=no_NO and collation=TERRITORY_BASED, I get these results
from a query which uses the LIKE predicate:
> ij> select * from t where x like '%a%';
> X                   
> --------------------
> Waagan              
> Wåhan               
> Wanvik              
> Wågan               
> ekstrabetaling      
> ekstra­arbeid       
> ­a                  
> a                   
> -a                  
>  a                  
> B                   
> C                   
> 12 rows selected
> The last two rows ('B' and 'C') should not have been included in the result, since they
do not match the pattern '%a%'.
> Similar wrong results are seen with '%aa%':
> ij> select * from t where x like '%aa%';
> X                   
> --------------------
> Waagan              
> ekstraarbeid        
> B                   
> 3 rows selected

-- 
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