db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r533003 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
Date Fri, 27 Apr 2007 07:54:34 GMT
Author: kahatlen
Date: Fri Apr 27 00:54:33 2007
New Revision: 533003

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

Set members to their initial values in ScrollInsensitiveResultSet's
openCore() method.

Contributed by Dyre Tjeldvoll.

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

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java?view=diff&rev=533003&r1=533002&r2=533003
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
Fri Apr 27 00:54:33 2007
@@ -235,6 +235,17 @@
 									   false,
                                        keepAfterCommit);
 
+		// When re-using language result sets (DERBY-827) we need to
+		// reset some member variables to the value they would have
+		// had in a newly constructed object.
+		lastPosition = 0;
+		needsRepositioning = false;
+		numFromHashTable = 0;
+		numToHashTable = 0;
+		positionInSource = 0;
+		seenFirst = false;
+		seenLast = false;
+
 		openTime += getElapsedMillis(beginTime);
 		setBeforeFirstRow();
 	}



Mime
View raw message