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