Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 95426 invoked from network); 18 Mar 2008 22:24:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Mar 2008 22:24:16 -0000 Received: (qmail 48645 invoked by uid 500); 18 Mar 2008 22:24:12 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 48568 invoked by uid 500); 18 Mar 2008 22:24:12 -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 48545 invoked by uid 99); 18 Mar 2008 22:24:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2008 15:24:12 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2008 22:23:31 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 53E0A234C0AE for ; Tue, 18 Mar 2008 15:22:24 -0700 (PDT) Message-ID: <736433333.1205878944341.JavaMail.jira@brutus> Date: Tue, 18 Mar 2008 15:22:24 -0700 (PDT) From: "Dyre Tjeldvoll (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Closed: (DERBY-2370) EXISTS may return the wrong value for sub-queries involving set operations In-Reply-To: <2046178.1172222105493.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dyre Tjeldvoll closed DERBY-2370. --------------------------------- > 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 > Assignee: A B > Fix For: 10.3.1.4 > > Attachments: d2370_engine_v1.patch, d2370_tests_v1.patch, d2370_v1.stat, d2370_writeup_v1.html, releaseNote.html, releaseNote.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.