If the attached patch looks good, can one of the commiters commit it?

Mamta Satoor wrote:

>
> Here is a simple patch for the bug. Please review, comment/vote on it.
>
> thanks,
> Mamta
>
> > > Shreyas Kaushik (JIRA) wrote:
> > > >      [ 
> > > > http://nagoya.apache.org/jira/browse/DERBY-66?page=comments#action_57008
> > > >  ]
> > > >
> > > > Shreyas Kaushik commented on DERBY-66:
> > > > --------------------------------------
> > > >
> > > > I think it's the other way around. As the JDBC api says "Retrieves 
> > > > whether this database supports keeping cursors open across commits" it 
> > > > is the property of the database.
> > > >
> > > > Since Derby can have cursors that are open across commits it should 
> > > > return true.
> > > >
> > > > To be even precise, when creating a ResultSet handle that needs to have 
> > > > cursors open across commits, a check on whether the underlying Database 
> > > > supports such a holdability has to be checked.
> > > >
> > > >


Index: java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
===================================================================
--- java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java   
(revision 124908)
+++ java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java   
(working copy)
@@ -1045,8 +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.
        public boolean supportsOpenCursorsAcrossCommit() {
-               return false;
+               return true;
        }
 
     /**
Index: 
java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out
===================================================================
--- 
java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out 
    (revision 124908)
+++ 
java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/metadata.out 
    (working copy)
@@ -119,7 +119,7 @@
 supportsCorrelatedSubqueries(): true
 supportsUnion(): true
 supportsUnionAll(): true
-supportsOpenCursorsAcrossCommit(): false
+supportsOpenCursorsAcrossCommit(): true
 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 124908)
+++ java/testing/org/apache/derbyTesting/functionTests/master/metadata.out      
(working copy)
@@ -119,7 +119,7 @@
 supportsCorrelatedSubqueries(): true
 supportsUnion(): true
 supportsUnionAll(): true
-supportsOpenCursorsAcrossCommit(): false
+supportsOpenCursorsAcrossCommit(): true
 supportsOpenCursorsAcrossRollback(): false
 supportsOpenStatementsAcrossCommit(): true
 supportsOpenStatementsAcrossRollback(): false

Reply via email to