db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r605219 - in /db/derby/code/branches/10.3/java/engine/org/apache/derby/impl: jdbc/EmbedStatement.java sql/execute/NoRowsResultSetImpl.java
Date Tue, 18 Dec 2007 14:56:19 GMT
Author: mamta
Date: Tue Dec 18 06:56:18 2007
New Revision: 605219

URL: http://svn.apache.org/viewvc?rev=605219&view=rev
Log:
DERBY-3037 

Migrating change 604976 from trunk into 10.3.2.2 codeline. The commit comment for trunk were
as follows

EmbedStatement.executeStatement at line 1276 was calling finish rather than close on the Language
Resultset. I fixed that to make a call to close. In addition, I also had to move the code
for collecting the stats from finish to close method in NoRowsResultSetImpl. 


Modified:
    db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
    db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/execute/NoRowsResultSetImpl.java

Modified: db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java?rev=605219&r1=605218&r2=605219&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
(original)
+++ db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
Tue Dec 18 06:56:18 2007
@@ -1242,7 +1242,7 @@
 
 					updateCount = resultsToWrap.modifiedRowCount();
 
-					resultsToWrap.finish();	// Don't need the result set any more
+					resultsToWrap.close();	// Don't need the result set any more
 					results = null; // note that we have none.
 
                     int dynamicResultCount = 0;

Modified: db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/execute/NoRowsResultSetImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/execute/NoRowsResultSetImpl.java?rev=605219&r1=605218&r2=605219&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/execute/NoRowsResultSetImpl.java
(original)
+++ db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/execute/NoRowsResultSetImpl.java
Tue Dec 18 06:56:18 2007
@@ -347,32 +347,12 @@
 	}
 
 	/**
-     * No rows to return, does nothing
+     * Dump the stat if not already done so. Close all of the open subqueries.
 	 *
 	 * @exception StandardException thrown on error
 	 */
 	public void	close() throws StandardException
 	{ 
-		isOpen = false;
-	}
-
-	/**
-	 * Find out if the <code>ResultSet</code> is closed.
-	 *
-	 * @return <code>true</code> if closed, <code>false</code> otherwise
-	 */
-	public boolean isClosed() {
-		return !isOpen;
-	}
-
-	/**
-	 *	doesn't need to do anything, as no calls
-	 *	are made that need to be restricted once
-	 *	the result set is 'finished'.
-	 *
-	 * @exception StandardException on error
-	 */
-	public void finish() throws StandardException {
 		if (! dumpedStats)
 		{
 			/*
@@ -429,6 +409,20 @@
 			}
 			subqueryTrackingArray[index].close();
 		}
+		isOpen = false;
+	}
+
+	/**
+	 * Find out if the <code>ResultSet</code> is closed.
+	 *
+	 * @return <code>true</code> if closed, <code>false</code> otherwise
+	 */
+	public boolean isClosed() {
+		return !isOpen;
+	}
+
+	public void	finish() throws StandardException
+	{
 	}
 
 	/**



Mime
View raw message