db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r640787 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/CallableTest.java
Date Tue, 25 Mar 2008 12:34:33 GMT
Author: dyre
Date: Tue Mar 25 05:34:18 2008
New Revision: 640787

URL: http://svn.apache.org/viewvc?rev=640787&view=rev
Log:
DERBY-3496: CallableStatement with output parameter leaves cursor open after execution
Patch file: derby-3496.diff (fixed the indentation problem)

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/CallableTest.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java?rev=640787&r1=640786&r2=640787&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java
Tue Mar 25 05:34:18 2008
@@ -150,6 +150,7 @@
 					throw EmbedResultSet.noStateChangeException(e);
 				}
 				finally {
+					results.close();
 					results = null;
 				}
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/CallableTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/CallableTest.java?rev=640787&r1=640786&r2=640787&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/CallableTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/CallableTest.java
Tue Mar 25 05:34:18 2008
@@ -292,6 +292,16 @@
 
     }
 
+    public void testIsolationLevelChangeAfterFunctionCall()
+            throws SQLException {
+        CallableStatement cs = prepareCall("? = CALL NO_IN_ONE_OUT_FUNC()");
+        cs.registerOutParameter(1, java.sql.Types.INTEGER);
+        cs.execute();
+        assertEquals(55, cs.getInt(1));
+        getConnection().setTransactionIsolation(
+            Connection.TRANSACTION_SERIALIZABLE);
+    }
+
     /**
      * Calls a SQL procedure that outputs a message with System.out.println.
      * Converted from the original test, but initially disabled because of the



Mime
View raw message