Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 16105 invoked from network); 16 Feb 2008 16:09:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Feb 2008 16:09:33 -0000 Received: (qmail 81509 invoked by uid 500); 16 Feb 2008 16:09:26 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 81477 invoked by uid 500); 16 Feb 2008 16:09:26 -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 81401 invoked by uid 99); 16 Feb 2008 16:09:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Feb 2008 08:09:25 -0800 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.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Feb 2008 16:08:48 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C4C0871407F for ; Sat, 16 Feb 2008 08:09:08 -0800 (PST) Message-ID: <5348983.1203178148803.JavaMail.jira@brutus> Date: Sat, 16 Feb 2008 08:09:08 -0800 (PST) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-3422) Embedded returns wrong value for DatabaseMetaData.autoCommitFailureClosesAllResultSets() In-Reply-To: <13968004.1203086528143.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-3422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-3422: -------------------------------------- Derby Info: [Patch Available] > Embedded returns wrong value for DatabaseMetaData.autoCommitFailureClosesAllResultSets() > ---------------------------------------------------------------------------------------- > > Key: DERBY-3422 > URL: https://issues.apache.org/jira/browse/DERBY-3422 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.4.0.0 > Reporter: Knut Anders Hatlen > Assignee: Knut Anders Hatlen > Priority: Minor > Attachments: d3422.diff, d3422.stat, test.diff > > > DatabaseMetaData.autoCommitFailureClosesAllResultSets() returns false both on the client and on embedded. However, the embedded driver does in fact close all open result sets when an error occurs in auto-commit mode. There is a test case in jdbc4.TestDbMetaData to test this (testAutoCommitFailure), but it only uses ResultSet.isClosed() to check whether or not the result set is closed after the failure. Because of DERBY-3404, isClosed() returns false for the result sets that have been closed because of the failure, so the test doesn't reveal the bug. If the test is changed to invoke methods on the result set (e.g. next()) instead of calling isClosed(), we'll see that the result set is in fact closed and get an SQLException with SQL state XCL16. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.