Index: java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java
===================================================================
--- java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java	(revision 638926)
+++ java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java	(working copy)
@@ -150,6 +150,7 @@
 					throw EmbedResultSet.noStateChangeException(e);
 				}
 				finally {
+                                        results.close();
 					results = null;
 				}
 
Index: java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/CallableTest.java
===================================================================
--- java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/CallableTest.java	(revision 638926)
+++ java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/CallableTest.java	(working copy)
@@ -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
