Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 50218 invoked from network); 29 Mar 2011 09:13:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Mar 2011 09:13:44 -0000 Received: (qmail 70866 invoked by uid 500); 29 Mar 2011 09:13:44 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 70732 invoked by uid 500); 29 Mar 2011 09:13:44 -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 70725 invoked by uid 99); 29 Mar 2011 09:13:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2011 09:13:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD,WEIRD_QUOTING X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2011 09:13:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 4FDA88560F for ; Tue, 29 Mar 2011 09:13:06 +0000 (UTC) Date: Tue, 29 Mar 2011 09:13:06 +0000 (UTC) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Message-ID: <1826223576.18509.1301389986323.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1467148840.18484.1301388785851.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (DERBY-5161) Cannot rollback after syntax error in internal statement 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-5161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-5161: -------------------------------------- Attachment: finally.diff Attaching a patch that moves popStatementContext() into a finally clause. Now the repro doesn't fail when invoking rollback: ij version 10.8 ij> connect 'jdbc:derby:db;create=true'; ij> autocommit off; ij> create table t(x int); 0 rows inserted/updated/deleted ij> alter table t add column """" int default 42; ERROR 42X01: Syntax error: Encountered "\"" at line 1, column 22. Issue the 'help' command for general information on IJ command syntax. Any unrecognized commands are treated as potential SQL commands and executed directly. Consult your DBMS server reference documentation for details of the SQL syntax supported by your server. ij> rollback; ij> I haven't run any other tests yet. No regression tests have been added since I don't know how to reproduce the problem without backing out DERBY-5157. > Cannot rollback after syntax error in internal statement > -------------------------------------------------------- > > Key: DERBY-5161 > URL: https://issues.apache.org/jira/browse/DERBY-5161 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.7.1.1 > Reporter: Knut Anders Hatlen > Attachments: finally.diff > > > To reproduce, execute the statements below in ij. Can only be reproduced this way before DERBY-5157. I don't know how to reproduce it when that bug is fixed. > ij version 10.7 > ij> connect 'jdbc:derby:db;create=true'; > ij> autocommit off; > ij> create table t(x int); > 0 rows inserted/updated/deleted > ij> alter table t add column """" int default 42; > ERROR 42X01: Syntax error: Encountered "\"" at line 1, column 22. > Issue the 'help' command for general information on IJ command syntax. > Any unrecognized commands are treated as potential SQL commands and executed directly. > Consult your DBMS server reference documentation for details of the SQL syntax supported by your server. > ij> rollback; > ERROR X0Y67: Cannot issue rollback in a nested connection when there is a pending operation in the parent connection. > The error message implies that we've called rollback() on a nested transaction, whereas we're in fact called it on the parent transaction. > Expected result: The rollback statement should abort the transaction without raising any errors. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira