db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r604976 - in /db/derby/code/trunk/java/engine/org/apache/derby/impl: jdbc/EmbedStatement.java sql/execute/NoRowsResultSetImpl.java
Date Mon, 17 Dec 2007 19:40:13 GMT
Author: mamta
Date: Mon Dec 17 11:40:13 2007
New Revision: 604976

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

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/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NoRowsResultSetImpl.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java?rev=604976&r1=604975&r2=604976&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java Mon Dec
17 11:40:13 2007
@@ -1281,7 +1281,7 @@
                                                   a.getMaxDynamicResults());
 					}
                     
-                    resultsToWrap.finish(); // Don't need the result set any more
+                    resultsToWrap.close(); // Don't need the result set any more
 
                     // executeQuery() is not allowed if the statement
                     // doesn't return exactly one ResultSet.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NoRowsResultSetImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NoRowsResultSetImpl.java?rev=604976&r1=604975&r2=604976&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NoRowsResultSetImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/NoRowsResultSetImpl.java
Mon Dec 17 11:40:13 2007
@@ -324,32 +324,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)
 		{
 			/*
@@ -406,6 +386,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