db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r530343 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute: InsertResultSet.java LastIndexKeyResultSet.java ProjectRestrictResultSet.java
Date Thu, 19 Apr 2007 09:09:11 GMT
Author: kahatlen
Date: Thu Apr 19 02:09:08 2007
New Revision: 530343

URL: http://svn.apache.org/viewvc?view=rev&rev=530343
Log:
DERBY-827 (partial) Fix close() methods for some language result sets
to allow re-use.

Contributed by Dyre Tjeldvoll.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ProjectRestrictResultSet.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java?view=diff&rev=530343&r1=530342&r2=530343
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java
Thu Apr 19 02:09:08 2007
@@ -539,6 +539,16 @@
 	}
 
 	/**
+	 * Clean up resources and call close on data members.
+	 */
+	public void close() throws StandardException {
+		super.close();
+		if (autoGeneratedKeysRowsHolder != null) {
+			autoGeneratedKeysRowsHolder.close();
+		}
+	}
+
+	/**
 	 * Verify that the auto-generated columns list (by position) has valid
 	 * column positions for the table.
 	 */

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java?view=diff&rev=530343&r1=530342&r2=530343
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java
Thu Apr 19 02:09:08 2007
@@ -317,6 +317,7 @@
 		if (isOpen)
 	    {
 			isOpen = false;
+			returnedRow = false;
 		    clearCurrentRow();
 
 			super.close();

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ProjectRestrictResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ProjectRestrictResultSet.java?view=diff&rev=530343&r1=530342&r2=530343
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ProjectRestrictResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ProjectRestrictResultSet.java
Thu Apr 19 02:09:08 2007
@@ -62,7 +62,7 @@
 
     // set in constructor and not altered during
     // life of object.
-    public NoPutResultSet source;
+    final NoPutResultSet source;
 	public GeneratedMethod constantRestriction;
     public GeneratedMethod restriction;
 	public boolean doesProjection;
@@ -352,6 +352,7 @@
 		{
 			isOpen = false;
 			shortCircuitOpen = false;
+			source.close();
 			return;
 		}
 



Mime
View raw message