db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "A B (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (DERBY-2370) EXISTS may return the wrong value for sub-queries involving set operations
Date Wed, 25 Apr 2007 22:32:15 GMT

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

A B resolved DERBY-2370.
------------------------

       Resolution: Fixed
    Fix Version/s: 10.3.0.0
       Derby Info: [Existing Application Impact]  (was: [Existing Application Impact, Patch
Available])

Thank you for the review, Dyre.  I synced with the latest codeline and re-ran derbyall and
suites.All as a sanity check, then committed the patch with svn #532509:

  URL: http://svn.apache.org/viewvc?view=rev&rev=532509

As I haven't heard any comments regarding the new behavior for certain queries (namely, throwing
an error where Derby used to succeed in some cases), I'm working under the assumption that
this is okay and am marking the issue RESOLVED.

Many thanks for your time!

> EXISTS may return the wrong value for sub-queries involving set operations
> --------------------------------------------------------------------------
>
>                 Key: DERBY-2370
>                 URL: https://issues.apache.org/jira/browse/DERBY-2370
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.2.2.0
>            Reporter: Dyre Tjeldvoll
>         Assigned To: A B
>             Fix For: 10.3.0.0
>
>         Attachments: d2370_engine_v1.patch, d2370_tests_v1.patch, d2370_v1.stat, d2370_writeup_v1.html,
repro.sql
>
>
> It seems like EXISTS on a SELECT returning zero rows returns false (as
> expected), but EXISTS on INTERSECT of two disjunct sets returns true,
> e.g EXISTS (values 1 intersect values 2).
> Yip Ng wrote on derby-dev:
> I believe its probably got to do with the EXISTS subquery transforming
> the original RCL to
> a TRUE boolean value for the INTERSECT.  So during row comparison at
> execution time
> for INTERSECT processing since true == true(thus intersects), so it
> will always return 'BAD'.  Likewise,
> select * from ( values 'OK' ) as T where exists (values 1 except values 2);
> This supposedly should return 'OK' but because of the boolean
> transformation mentioned
> above for EXISTS subquery, it will return no rows for EXCEPT
> processing.

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