Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BF41810832 for ; Fri, 28 Feb 2014 06:26:23 +0000 (UTC) Received: (qmail 15319 invoked by uid 500); 28 Feb 2014 06:26:23 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 15130 invoked by uid 500); 28 Feb 2014 06:26:21 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 15122 invoked by uid 99); 28 Feb 2014 06:26:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Feb 2014 06:26:19 +0000 Date: Fri, 28 Feb 2014 06:26:19 +0000 (UTC) From: "Mamta A. Satoor (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DERBY-6025) Wrong results with IN lists and indexes in territory based collation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-6025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13915497#comment-13915497 ] Mamta A. Satoor commented on DERBY-6025: ---------------------------------------- As Knut suspected, when we generate calls to minValue and maxValue, we are not sending the collation information of the left operand of the in list predicate. This causes us to do English language comparison of values rather than territory based comparison. I am working on changing this and will post a patch tomorrow. > 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.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1, 10.7.1.1, 10.8.1.2, 10.8.2.2, 10.8.3.0, 10.9.1.0, 10.10.1.1 > Reporter: Knut Anders Hatlen > Assignee: Mamta A. Satoor > Labels: derby_triage10_11 > > 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 was sent by Atlassian JIRA (v6.1.5#6160)