db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r421015 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
Date Tue, 11 Jul 2006 22:30:39 GMT
Author: djd
Date: Tue Jul 11 15:30:38 2006
New Revision: 421015

URL: http://svn.apache.org/viewvc?rev=421015&view=rev
Log:
DERBY-1142 Stop memory leak for embedded metadata queries. Mark the embedded ResultSet as
having a single use
activation so that upon a close its activation.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java?rev=421015&r1=421014&r2=421015&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java Tue Jul
11 15:30:38 2006
@@ -218,7 +218,12 @@
 		if (SanityManager.DEBUG)
 		SanityManager.ASSERT(resultsToWrap!=null);
 		theResults = resultsToWrap;
-		this.forMetaData = forMetaData;
+		
+		// ResultSet's for metadata are single use, they are created
+		// with a PreparedStatement internally, but that statement is
+		// never returned to the application.
+		if (this.forMetaData = forMetaData)
+			singleUseActivation = resultsToWrap.getActivation();
         this.applicationStmt = this.stmt = owningStmt = stmt;
 
         this.timeoutMillis = stmt == null



Mime
View raw message