From derby-dev-return-10782-apmail-db-derby-dev-archive=db.apache.org@db.apache.org Fri Nov 18 18:00:14 2005 Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 43982 invoked from network); 18 Nov 2005 18:00:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Nov 2005 18:00:10 -0000 Received: (qmail 73440 invoked by uid 500); 18 Nov 2005 18:00:04 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 73333 invoked by uid 500); 18 Nov 2005 18:00:03 -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 73275 invoked by uid 99); 18 Nov 2005 18:00:03 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Nov 2005 10:00:03 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 758D2226 for ; Fri, 18 Nov 2005 18:59:42 +0100 (CET) Message-ID: <1919661339.1132336782478.JavaMail.jira@ajax.apache.org> Date: Fri, 18 Nov 2005 18:59:42 +0100 (CET) From: "A B (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Reopened: (DERBY-466) Distinct in subselect can return wrong results In-Reply-To: <568273189.1121819447896.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-466?page=all ] A B reopened DERBY-466: ----------------------- I would like to port this change to 10.1 and am currently working to do the merge and run the nightlies. If the tests pass tonight then I will post the merge command tomorrow. In the meantime, I am reopening the issue... > Distinct in subselect can return wrong results > ---------------------------------------------- > > Key: DERBY-466 > URL: http://issues.apache.org/jira/browse/DERBY-466 > Project: Derby > Type: Bug > Components: SQL > Environment: All Platforms > Reporter: Manish Khettry > Assignee: Manish Khettry > Fix For: 10.2.0.0 > Attachments: distinct.diff.txt > > The second query should return two rows but returns just one. > ij> select * from t1; > I |V > ---------------------- > 1 |row 1 > 2 |row 2 > 2 rows selected > ij> select * from t1, (select distinct 1 from t1) as sub(c); > I |V |C > ---------------------------------- > 1 |row 1 |1 > 1 row selected > More specifically, this bug will show up when the sql layer does duplication elimination for distinct *without* a sorter (i.e. the underlying result set is already sorted). The result set will return correct data the first time, but after it is closed and re-opened it will not return any data rows. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira