db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A B (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-466) Distinct in subselect can return wrong results
Date Sat, 19 Nov 2005 21:09:26 GMT
     [ http://issues.apache.org/jira/browse/DERBY-466?page=all ]

A B updated DERBY-466:
----------------------

    Attachment: d466-10_1.patch

Since the old patch was applied against the "incubator" URL, a direct merge command to 10.1
was not possible.  So I've recreated the patch against the 10.1 branch (d466-10_1.patch) and
am attaching it here.  I ran derbyall with Sun 1.4.2 and had no failures.

> 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: d466-10_1.patch, 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


Mime
View raw message