Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 44824 invoked from network); 28 Oct 2006 21:39:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Oct 2006 21:39:25 -0000 Received: (qmail 31680 invoked by uid 500); 28 Oct 2006 21:39:36 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 31631 invoked by uid 500); 28 Oct 2006 21:39:36 -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 31621 invoked by uid 99); 28 Oct 2006 21:39:35 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Oct 2006 14:39:35 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Oct 2006 14:39:22 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7C2E17142D1 for ; Sat, 28 Oct 2006 14:38:17 -0700 (PDT) Message-ID: <15549163.1162071497479.JavaMail.root@brutus> Date: Sat, 28 Oct 2006 14:38:17 -0700 (PDT) From: "Christian d'Heureuse (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Created: (DERBY-2015) NullPointerException in INSERT ... SELECT with self-joined table and IDENTITY column MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org NullPointerException in INSERT ... SELECT with self-joined table and IDENTITY column ------------------------------------------------------------------------------------ Key: DERBY-2015 URL: http://issues.apache.org/jira/browse/DERBY-2015 Project: Derby Issue Type: Bug Components: SQL Affects Versions: 10.2.1.6 Environment: Java 1.5.0_06-b05 WinXP Reporter: Christian d'Heureuse The following statements generate a NullPointerException: CREATE TABLE t1 ( f1 INTEGER); CREATE TABLE t2 ( f2 INTEGER GENERATED ALWAYS AS IDENTITY, f3 INTEGER); INSERT INTO t2 (f3) SELECT a.f1 FROM t1 a INNER JOIN t1 b ON a.f1 = b.f1; Stack trace: ---------------------------------------------------------------- 2006-10-28 21:29:17.937 GMT: Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.1.6 - (452058): instance c013800d-010e-90d3-9ea6-00000012fd20 on database directory C:\temp_sys\temp_Derby_TestErr_db Database Class Loader started - derby.database.classpath='' 2006-10-28 21:29:25.437 GMT Thread[main,5,main] (XID = 125), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Cleanup action starting 2006-10-28 21:29:25.437 GMT Thread[main,5,main] (XID = 125), (SESSIONID = 0), (DATABASE = c:\temp_sys\temp_Derby_TestErr_db), (DRDAID = null), Failed Statement is: INSERT INTO t2 (f3) SELECT a.f1 FROM t1 a INNER JOIN t1 b ON a.f1 = b.f1 java.lang.NullPointerException at org.apache.derby.impl.sql.compile.ResultColumnList.remapColumnReferencesToExpressions(Unknown Source) at org.apache.derby.impl.sql.compile.JoinNode.flatten(Unknown Source) at org.apache.derby.impl.sql.compile.FromList.flattenFromTables(Unknown Source) at org.apache.derby.impl.sql.compile.SelectNode.preprocess(Unknown Source) at org.apache.derby.impl.sql.compile.SingleChildResultSetNode.preprocess(Unknown Source) at org.apache.derby.impl.sql.compile.DMLStatementNode.optimize(Unknown Source) at org.apache.derby.impl.sql.compile.DMLModStatementNode.optimize(Unknown Source) at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source) at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source) at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source) at org.apache.derby.impl.tools.ij.ij.executeImmediate(Unknown Source) at org.apache.derby.impl.tools.ij.utilMain.doCatch(Unknown Source) at org.apache.derby.impl.tools.ij.utilMain.go(Unknown Source) at org.apache.derby.impl.tools.ij.Main.go(Unknown Source) at org.apache.derby.impl.tools.ij.Main.mainCore(Unknown Source) at org.apache.derby.impl.tools.ij.Main14.main(Unknown Source) at org.apache.derby.tools.ij.main(Unknown Source) Cleanup action completed ---------------------------------------------------------------- As with DERBY-1574, any subsequent SQL statements produce an internal error in the RawStore module. -- 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