Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 10538 invoked from network); 29 Oct 2009 15:24:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Oct 2009 15:24:23 -0000 Received: (qmail 25532 invoked by uid 500); 29 Oct 2009 15:24:23 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 25471 invoked by uid 500); 29 Oct 2009 15:24:22 -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 25463 invoked by uid 99); 29 Oct 2009 15:24:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Oct 2009 15:24:22 +0000 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; Thu, 29 Oct 2009 15:24:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 635F2234C045 for ; Thu, 29 Oct 2009 08:23:59 -0700 (PDT) Message-ID: <1144815081.1256829839391.JavaMail.jira@brutus> Date: Thu, 29 Oct 2009 15:23:59 +0000 (UTC) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-4420) NullPointerException with INSERT INTO ... from EXCEPT/INTERSECT In-Reply-To: <1869592045.1256281079377.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-4420: -------------------------------------- Attachment: d4420-1a.stat d4420-1a.diff The attached patch copies ResultSetNode.setTableConstructorTypes() to RowResultSetNode and makes the method in RSN a no-op. According to the comments in RSN, the code is only supposed to be executed if the node is a RowResultSetNode, so it sounds like a better place for the code. A test case is also added in InsertTest. Now the insert statements that take all the column values from the select statement work as expected. The ones that only insert into a subset of the columns and take the rest of the values from the column defaults, fail with the "column position out of range" message mentioned in the previous comment. I'm assuming this is a different bug, and I intend to file a separate issue if the proposed fix is committed. All the regression tests ran cleanly. > NullPointerException with INSERT INTO ... from EXCEPT/INTERSECT > --------------------------------------------------------------- > > Key: DERBY-4420 > URL: https://issues.apache.org/jira/browse/DERBY-4420 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.1.1.0, 10.2.1.6, 10.3.1.4, 10.4.1.3, 10.5.1.1, 10.5.3.0, 10.6.0.0 > Reporter: Knut Anders Hatlen > Assignee: Knut Anders Hatlen > Attachments: d4420-1a.diff, d4420-1a.stat, npe.sql > > > The sequence of statements below give a NullPointerException. The statements are very similar to the ones in DERBY-4419, but this is a separate bug since the stack traces are different, and this bug can be seen all the way back to 10.1.1.0, whereas DERBY-4419 was a regression in 10.3. (On 10.0.2.1, a syntax error is raised instead of the NPE.) > ij> create table t1(x int); > 0 rows inserted/updated/deleted > ij> insert into t1 values 1,2; > 2 rows inserted/updated/deleted > ij> create table t2(x int); > 0 rows inserted/updated/deleted > ij> insert into t2 values 2,3; > 2 rows inserted/updated/deleted > ij> create table t3(x int, y int generated always as identity); > 0 rows inserted/updated/deleted > ij> insert into t3(x) select * from t1 except select * from t2; > ERROR XJ001: Java exception: ': java.lang.NullPointerException'. > Same error if INTERSECT is used instead of EXCEPT. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.