Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 44647 invoked from network); 19 Oct 2009 06:36:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Oct 2009 06:36:54 -0000 Received: (qmail 60991 invoked by uid 500); 19 Oct 2009 06:36:54 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 60940 invoked by uid 500); 19 Oct 2009 06:36:54 -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 60857 invoked by uid 99); 19 Oct 2009 06:36:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Oct 2009 06:36:54 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI 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; Mon, 19 Oct 2009 06:36:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 80F44234C1E9 for ; Sun, 18 Oct 2009 23:36:31 -0700 (PDT) Message-ID: <1017112458.1255934191526.JavaMail.jira@brutus> Date: Sun, 18 Oct 2009 23:36:31 -0700 (PDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-4411) Scalar subquery erroneously rejected for not returning exactly one row In-Reply-To: <113312218.1255639891311.JavaMail.jira@brutus> 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-4411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-4411: -------------------------------------- Issue & fix info: [Patch Available, Repro attached] (was: [Repro attached]) > Scalar subquery erroneously rejected for not returning exactly one row > ---------------------------------------------------------------------- > > Key: DERBY-4411 > URL: https://issues.apache.org/jira/browse/DERBY-4411 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.6.0.0 > Reporter: Knut Anders Hatlen > Assignee: Knut Anders Hatlen > Attachments: constantRestriction.diff, derby-4411-1a.diff > > > This sequence of statements causes an error because the scalar sub-query supposedly doesn't return exactly one row, even though it does return exactly one row: > ij> create table t (x int unique, y int); > 0 rows inserted/updated/deleted > ij> insert into t values (1,2); > 1 row inserted/updated/deleted > ij> select * from t where x > (values 1 union select y from t where 1=0); > ERROR 21000: Scalar subquery is only allowed to return a single row. > ij> values 1 union select y from t where 1=0; > 1 > ----------- > 1 > 1 row selected > Before DERBY-4391, the problematic statement would have caused a NullPointerException. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.