db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r536007 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute: DeleteCascadeResultSet.java DeleteResultSet.java
Date Mon, 07 May 2007 22:19:16 GMT
Author: kahatlen
Date: Mon May  7 15:19:12 2007
New Revision: 536007

URL: http://svn.apache.org/viewvc?view=rev&rev=536007
Log:
DERBY-827 (partial) Performance can be improved by re-using language ResultSets across Activation
executions

The patch makes two changes:

1) Adds a call to RowChanger.close() in
   DeleteResultSet.cleanUp()

2) In DeleteCascadeResultSet.open() it moves the call to
   cleanUp() (which in turn calls DeleteResultSet.cleanUp()) into
   the finally block so that it gets called even when an
   exception is thrown.

Contributed by Dyre Tjeldvoll.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteCascadeResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteResultSet.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteCascadeResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteCascadeResultSet.java?view=diff&rev=536007&r1=536006&r2=536007
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteCascadeResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteCascadeResultSet.java
Mon May  7 15:19:12 2007
@@ -142,9 +142,10 @@
 			runFkChecker(false); //check for all constraint violations
 			rowChangerFinish();
 			fireAfterTriggers();
-			cleanUp();
 		}finally
 		{
+			cleanUp();
+
 			//clear the parent result sets hash table
 			activation.clearParentResultSets();
 		}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteResultSet.java?view=diff&rev=536007&r1=536006&r2=536007
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DeleteResultSet.java
Mon May  7 15:19:12 2007
@@ -641,6 +641,9 @@
 			deferredBaseCC.close();
 		deferredBaseCC = null;
 
+		if (rc != null) {
+			rc.close();
+		}
 		super.close();
 	}
 



Mime
View raw message