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] Updated: (DERBY-2865) With TERRITORY_BASED collation LENGTH function does not return correct number of characters for Norwegian 'aa'
Date Mon, 25 Jun 2007 21:09:25 GMT

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

Mike Matrigali updated DERBY-2865:
----------------------------------


The intent of the current code was to treat aa as matching a single _ for like processing,
but not to treat it as a single character.  
If this is not the right thing from the SQL standard perspective then it is a bug.  The input
I was seeing from those more familar 
with norway rules was that this was the expected result from an _.   Does anyone have access
to another database, which could
let us know what they do for norway collation and _ in like for aa.   The current tests actually
use this as a test case.

Like processing is currently implemented for territory based collation using "collation elements"
as defined by the JVM's rules in
the RuleBasedCollator.   The initial input we got back was that _ matching aa was the expected
result.  

> With TERRITORY_BASED collation LENGTH function does not return correct number of characters
for Norwegian 'aa'
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2865
>                 URL: https://issues.apache.org/jira/browse/DERBY-2865
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.3.0.0
>            Reporter: Kathey Marsden
>            Priority: Minor
>
> For territory=no_NO and collation=TERRITORY_BASED, 'aa' should be a single character
but the length function reports it as two characters.
> ij> connect 'jdbc:derby:nordb;create=true;territory=no_NO;collation=TERRITORY_BASED';
> ij(CONNECTION1)> create table t (vc varchar(30));
> 0 rows inserted/updated/deleted
> ij(CONNECTION1)> insert into t values('aarg');
> 1 row inserted/updated/deleted
> ij(CONNECTION1)> select vc, length(vc) from t2;
> ERROR 42X05: Table/View 'T2' does not exist.
> ij(CONNECTION1)> select vc, length(vc) from t;
> VC                            |2
> ------------------------------------------
> aarg                          |4
> 1 row selected
> SUBSTR and CHAR functions have the same issue
> ij> values (SUBSTR('aarg',1,3));
> 1
> ----
> aar
> ij> values (CHAR('aarg',3));
> 1
> ----
> aar

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