Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 43373 invoked from network); 9 Jul 2009 11:19:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Jul 2009 11:19:29 -0000 Received: (qmail 5323 invoked by uid 500); 9 Jul 2009 11:19:39 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 5286 invoked by uid 500); 9 Jul 2009 11:19:39 -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 5278 invoked by uid 99); 9 Jul 2009 11:19:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jul 2009 11:19:39 +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, 09 Jul 2009 11:19:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E84B2234C1EE for ; Thu, 9 Jul 2009 04:19:14 -0700 (PDT) Message-ID: <46767009.1247138354950.JavaMail.jira@brutus> Date: Thu, 9 Jul 2009 04:19:14 -0700 (PDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-1528) Preparing "INSERT INTO table SELECT FROM (...)" may cause NullPointerException and subsequent internal errors reported by RawStore module In-Reply-To: <32463540.1153219693825.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-1528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-1528: -------------------------------------- Issue & fix info: [High Value Fix, Repro attached] (was: [High Value Fix]) Urgency: Normal Triaged for 10.5.2. > Preparing "INSERT INTO table SELECT FROM (...)" may cause NullPointerException and subsequent internal errors reported by RawStore module > ----------------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-1528 > URL: https://issues.apache.org/jira/browse/DERBY-1528 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.1.3.1 > Reporter: Knut Anders Hatlen > Attachments: repro1528_assert.java, repro1528_npe.java > > > When preparing a "INSERT INTO table SELECT FROM (...)" statement, > Derby in some cases throw a NullPointerException or an > AssertFailure. This happens when a '?' occurs in a VALUES statement in > the from list. If one tries to access the table after the > NullPointerException, this exception is thrown: > ERROR 40XT0: An internal error was identified by RawStore module. > Example: > ij> create table t (text varchar(20), len int); > 0 rows inserted/updated/deleted > ij> prepare p as 'insert into t select x, length(x) from (values(?)) as v(x)'; > ERROR XJ001: Java exception: ': java.lang.NullPointerException'. > ij> select * from t; > ERROR 40XT0: An internal error was identified by RawStore module. > Replacing '?' with 'CAST (? AS VARCHAR(20))' fixes the problem, but > there is enough information in the query to determine the type of the > parameter even without the cast. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.