db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6025) Wrong results with IN lists and indexes in territory based collation
Date Fri, 21 Dec 2012 11:07:12 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13537798#comment-13537798
] 

Knut Anders Hatlen commented on DERBY-6025:
-------------------------------------------

I suspect this is caused by InListOperatorNode.generateStartStopKey(), which does not preserve
information about the collation when the type info is pushed down to BaseExpressionActivation.minValue()
and BaseExpressionActivation.maxValue().
                
> Wrong results with IN lists and indexes in territory based collation
> --------------------------------------------------------------------
>
>                 Key: DERBY-6025
>                 URL: https://issues.apache.org/jira/browse/DERBY-6025
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.9.1.0
>            Reporter: Knut Anders Hatlen
>
> The sequence below shows that a query returns 1 row when there is no index on the table,
and it returns 0 rows when an index is created. It should return 1 row regardless of the index's
presence.
> ij version 10.9
> ij> connect 'jdbc:derby:memory:colldb;create=true;territory=no;collation=TERRITORY_BASED';
> ij> create table t(x varchar(40));
> 0 rows inserted/updated/deleted
> ij> insert into t values 'Stranda Idrottslag', 'Aalesunds Fotballklubb';
> 2 rows inserted/updated/deleted
> ij> select * from t where x in ('Aalesunds Fotballklubb', cast('xyz' as char(3)));
> X                                       
> ----------------------------------------
> Aalesunds Fotballklubb                  
> 1 row selected
> ij> create index i on t(x);
> 0 rows inserted/updated/deleted
> ij> select * from t where x in ('Aalesunds Fotballklubb', cast('xyz' as char(3)));
> X                                       
> ----------------------------------------
> 0 rows selected

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message