From derby-dev-return-2100-apmail-db-derby-dev-archive=db.apache.org@db.apache.org Tue Feb 08 17:16:12 2005 Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 27995 invoked from network); 8 Feb 2005 17:16:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Feb 2005 17:16:10 -0000 Received: (qmail 94418 invoked by uid 500); 8 Feb 2005 17:16:10 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 94392 invoked by uid 500); 8 Feb 2005 17:16:09 -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: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 94377 invoked by uid 99); 8 Feb 2005 17:16:09 -0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=HTML_10_20,HTML_MESSAGE,HTML_TITLE_EMPTY,MIME_HTML_ONLY X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from e5.ny.us.ibm.com (HELO e5.ny.us.ibm.com) (32.97.182.145) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 08 Feb 2005 09:16:08 -0800 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e5.ny.us.ibm.com (8.12.10/8.12.10) with ESMTP id j18HG4m4008838 for ; Tue, 8 Feb 2005 12:16:04 -0500 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay04.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j18HG45U241700 for ; Tue, 8 Feb 2005 12:16:04 -0500 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j18HG4eR013942 for ; Tue, 8 Feb 2005 12:16:04 -0500 Received: from [9.48.117.146] (sig-9-48-117-146.mts.ibm.com [9.48.117.146]) by d01av03.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j18HG1Kf013736 for ; Tue, 8 Feb 2005 12:16:03 -0500 Message-ID: <4208F3DF.9010009@Sourcery.Org> Date: Tue, 08 Feb 2005 09:16:15 -0800 From: Satheesh Bandaram User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Development Subject: Re: [PATCH] (DERBY-66) Derby does not support open cursor across commits for XA transactions and hence DatabaseMetaData.supportsOpenCursorsAcrossCommit should return false. References: <870660367.1103796969805.JavaMail.apache@nagoya> <41DBE7CD.5060800@Sun.COM> <41DC219F.96CC352A@Remulak.Net> <41E454E2.2FF42FF8@Remulak.Net> <41ED836E.4703D0A8@Remulak.Net> <4207E38E.8D93C835@Remulak.Net> In-Reply-To: <4207E38E.8D93C835@Remulak.Net> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Submitted this patch.

Thanks,
Satheesh

Sending        java\engine\org\apache\derby\impl\jdbc\EmbedDatabaseMetaData.java
Sending        java\testing\org\apache\derbyTesting\functionTests\master\DerbyNet\metadata.out
Sending        java\testing\org\apache\derbyTesting\functionTests\master\metadata.out
Sending        java\testing\org\apache\derbyTesting\functionTests\tests\lang\updatableResultSet.java
Transmitting file data ....
Committed revision 152678.

Mamta Satoor wrote:
Hi,

Can a commiter please commit the attached patch for Derby-66? The patch will have
DatabaseMetaData.supportsOpenCursorsAcrossCommit return false because Derby
does not support open cursors across commit for XA transactions. I have put a
comment in the code so we know why this method should return false.

thanks,
Mamta
  

Index: java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java =================================================================== --- java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java (revision 151760) +++ java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java (working copy) @@ -1045,9 +1045,9 @@ * * @return true if cursors always remain open; false if they might not remain open */ - //returns true because Derby can have cursors that are open across commits. + //returns false because Derby does not support cursors that are open across commits for XA transactions. public boolean supportsOpenCursorsAcrossCommit() { - return true; + return false; } /** Index: java/testing/org/apache/derbyTesting/functionTests/tests/lang/updatableResultSet.java =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/tests/lang/updatableResultSet.java (revision 151760) +++ java/testing/org/apache/derbyTesting/functionTests/tests/lang/updatableResultSet.java (working copy) @@ -451,7 +451,6 @@ System.out.println("got TYPE_FORWARD_ONLY? " + (callStmt.getResultSetType() == ResultSet.TYPE_FORWARD_ONLY)); System.out.println("got CONCUR_UPDATABLE? " + (callStmt.getResultSetConcurrency() == ResultSet.CONCUR_UPDATABLE)); rs.next(); - System.out.println("row not deleted yet. Confirm with rs.rowDeleted()? " + rs.rowDeleted()); System.out.println("column 1 on this row is " + rs.getInt(1)); rs.deleteRow(); System.out.println("Since after deleteRow(), ResultSet is positioned before the next row, getXXX will fail"); Index: java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out (revision 151760) +++ java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out (working copy) @@ -119,7 +119,7 @@ supportsCorrelatedSubqueries(): true supportsUnion(): true supportsUnionAll(): true -supportsOpenCursorsAcrossCommit(): true +supportsOpenCursorsAcrossCommit(): false supportsOpenCursorsAcrossRollback(): false supportsOpenStatementsAcrossCommit(): true supportsOpenStatementsAcrossRollback(): false Index: java/testing/org/apache/derbyTesting/functionTests/master/metadata.out =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/master/metadata.out (revision 151760) +++ java/testing/org/apache/derbyTesting/functionTests/master/metadata.out (working copy) @@ -119,7 +119,7 @@ supportsCorrelatedSubqueries(): true supportsUnion(): true supportsUnionAll(): true -supportsOpenCursorsAcrossCommit(): true +supportsOpenCursorsAcrossCommit(): false supportsOpenCursorsAcrossRollback(): false supportsOpenStatementsAcrossCommit(): true supportsOpenStatementsAcrossRollback(): false