Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7DADFC2C0 for ; Fri, 28 Jun 2013 06:11:33 +0000 (UTC) Received: (qmail 90870 invoked by uid 500); 28 Jun 2013 06:11:33 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 90664 invoked by uid 500); 28 Jun 2013 06:11:32 -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 89930 invoked by uid 99); 28 Jun 2013 06:11:24 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jun 2013 06:11:24 +0000 Date: Fri, 28 Jun 2013 06:11:24 +0000 (UTC) From: "Raghavendra Neelekani (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (DERBY-4993) Nested connection not marked as closed after session level error 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-4993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13695280#comment-13695280 ] Raghavendra Neelekani edited comment on DERBY-4993 at 6/28/13 6:11 AM: ----------------------------------------------------------------------- Hi Dag what does the above comment mean ? Has this issue been triaged ? was (Author: raagu): Hi Dag what is the above comment means ? Has this issue been triaged ? > Nested connection not marked as closed after session level error > ---------------------------------------------------------------- > > Key: DERBY-4993 > URL: https://issues.apache.org/jira/browse/DERBY-4993 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.7.1.1 > Reporter: Dag H. Wanvik > Priority: Minor > Labels: derby_triage10_8 > > Inside a stored procedure, with a nested connection: > Connection c = DriverManager.getConnection("jdbc:default:connection"); > I see a session level error: > } catch (SQLException e) { > assertSQLState("expected CONN_INTERRUPT", "08000", e); > assertTrue(c.isClosed()); > However, the second assert above fails. Granted, we are still executing > inside the stored routine, but the statement is now "dead"; the calling > statment will see exception 40XC0 (dead statement) and the parent > connection will then be marked as closed (as expected). > But shouldn't the nested connection also be marked closed at this time? > If I try to do something with the connection at this point, e.g. trying > to prepare a new statement I see a NPE because the lcc is already gone: > Caused by: java.lang.NullPointerException > at org.apache.derby.impl.sql.compile.CompilerContextImpl.initRequiredPriv(CompilerContextImpl.java:717) > at org.apache.derby.impl.sql.compile.CompilerContextImpl.(CompilerContextImpl.java:702) > at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.pushCompilerContext(GenericLanguageConnectionContext.java:2355) > at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:236) > at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:91) > at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:1101) > at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:610) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira