Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 76295 invoked from network); 7 Nov 2007 05:42:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Nov 2007 05:42:12 -0000 Received: (qmail 79952 invoked by uid 500); 7 Nov 2007 05:42:00 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 79729 invoked by uid 500); 7 Nov 2007 05:41:59 -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 79720 invoked by uid 99); 7 Nov 2007 05:41:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2007 21:41:59 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED 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; Wed, 07 Nov 2007 05:42:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0EDA571422E for ; Tue, 6 Nov 2007 21:41:51 -0800 (PST) Message-ID: <16810749.1194414111058.JavaMail.jira@brutus> Date: Tue, 6 Nov 2007 21:41:51 -0800 (PST) From: "Bryan Pendleton (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-3175) NullPointerException on INSERT after ALTER TABLE ... DROP COLUMN In-Reply-To: <31539674.1194340070719.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-3175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bryan Pendleton updated DERBY-3175: ----------------------------------- Attachment: d3175_codeChangeOnly.diff Attached is d3175_codeChangeOnly.diff, which is not for commit. This change appears to fix the bug. I intend to work up a more complete patch proposal, incorporating Knut's test case as a regression test. I also intend to see whether this code change affects the repro script given in DERBY-3177 and if so I'll link the two issues and include that reproduction script in the regression test as well. In the meantime, feedback and suggestions about the analysis or the code change are most welcome. > NullPointerException on INSERT after ALTER TABLE ... DROP COLUMN > ---------------------------------------------------------------- > > Key: DERBY-3175 > URL: https://issues.apache.org/jira/browse/DERBY-3175 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.3.1.4, 10.4.0.0 > Reporter: Knut Anders Hatlen > Assignee: Bryan Pendleton > Attachments: bug.sql, d3175_codeChangeOnly.diff > > > ij version 10.3 > ij> connect 'jdbc:derby:bugdb;create=true'; > ij> create table t ( > x varchar(12), > y varchar(12), > id int primary key generated by default as identity > ); > 0 rows inserted/updated/deleted > ij> alter table t drop column y; > 0 rows inserted/updated/deleted > ij> insert into t(x) values 'a'; > ERROR XJ001: Java exception: ': java.lang.NullPointerException'. > java.sql.SQLException: Java exception: ': java.lang.NullPointerException'. > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) > at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) > at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source) > at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source) > at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) > at org.apache.derby.impl.jdbc.ConnectionChild.handleException(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.runScriptGuts(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) > at org.apache.derby.iapi.tools.run.main(Unknown Source) > Caused by: java.sql.SQLException: Java exception: ': java.lang.NullPointerException'. > at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) > at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) > ... 18 more > Caused by: java.lang.NullPointerException > at org.apache.derby.impl.sql.compile.ResultColumn.columnTypeAndLengthMatch(Unknown Source) > at org.apache.derby.impl.sql.compile.ResultColumnList.columnTypesAndLengthsMatch(Unknown Source) > at org.apache.derby.impl.sql.compile.InsertNode.bindStatement(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) > ... 11 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.