db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r602198 - in /db/derby/code/branches/10.3/java/engine/org/apache/derby/impl: jdbc/EmbedResultSet.java sql/execute/BasicNoPutResultSetImpl.java sql/execute/NoPutResultSetImpl.java
Date Fri, 07 Dec 2007 19:48:44 GMT
Author: mamta
Date: Fri Dec  7 11:48:44 2007
New Revision: 602198

URL: http://svn.apache.org/viewvc?rev=602198&view=rev
Log:
Migrating change(601830) from trunk into 10.3 codeline for DERBY-3037. The commit comments
for trunk were as follows

DERBY-3037

This commit makes sure that EmbeddedResultSet.close() calls Language Resultset.close rather
than Language
Resultset.finish. This change caused few tests to fail. The tests had runtime statistics on
but the code to dump
the runtime statistics was in Language Resutlset.finish and not in Language Resultset.close.
To fix this, I have
moved the code to dump runtime statistics from Language Resutlset.finish into Lanugage ResultSet.close
This has
fixed the test failures.

As for the 2nd part of this jira entry which is to have activation.close() call Language Resultset.finish().
This
already happens in impl.sql.execute.BaseActivation.close() and hence no work was needed for
the 2nd part.


Modified:
    db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
    db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java
    db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/execute/NoPutResultSetImpl.java

Modified: db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java?rev=602198&r1=602197&r2=602198&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
(original)
+++ db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
Fri Dec  7 11:48:44 2007
@@ -592,7 +592,7 @@
 
 			try	{
 				try	{
-					theResults.finish(); // release the result set, don't just close it
+					theResults.close(); 
 				    
 				    if (this.singleUseActivation != null)
 				    {

Modified: db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java?rev=602198&r1=602197&r2=602198&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java
(original)
+++ db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java
Fri Dec  7 11:48:44 2007
@@ -22,9 +22,7 @@
 package org.apache.derby.impl.sql.execute;
 
 import org.apache.derby.iapi.services.context.ContextService;
-import org.apache.derby.iapi.services.monitor.Monitor;
 import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.services.stream.HeaderPrintWriter;
 import org.apache.derby.iapi.services.stream.InfoStreams;
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.services.i18n.MessageService;
@@ -40,8 +38,6 @@
 import org.apache.derby.iapi.sql.execute.NoPutResultSet;
 import org.apache.derby.iapi.sql.execute.ExecutionFactory;
 import org.apache.derby.iapi.sql.Activation;
-
-
 import org.apache.derby.iapi.sql.ResultDescription;
 import org.apache.derby.iapi.sql.ResultSet;
 import org.apache.derby.iapi.sql.Row;
@@ -614,36 +610,6 @@
 	{
 
 		if (!finished) {
-			/*
-			** If run time statistics tracing is turned on, then now is the
-			** time to dump out the information.
-			*/
-			if (isTopResultSet) {
-
-				LanguageConnectionContext lcc = getLanguageConnectionContext();
-				if (lcc.getRunTimeStatisticsMode())
-				{
-					endExecutionTime = getCurrentTimeMillis();
-
-					lcc.setRunTimeStatisticsObject(
-						lcc.getExecutionContext().getResultSetStatisticsFactory().getRunTimeStatistics(activation,
this, subqueryTrackingArray));
-
-					HeaderPrintWriter istream = lcc.getLogQueryPlan() ? Monitor.getStream() : null;
-					if (istream != null)
-					{
-						istream.printlnWithHeader(LanguageConnectionContext.xidStr + 
-												  lcc.getTransactionExecute().getTransactionIdString() +
-												  "), " +
-												  LanguageConnectionContext.lccStr +
-												  lcc.getInstanceNumber() +
-												  "), " +
-												  lcc.getRunTimeStatisticsObject().getStatementText() + " ******* " +
-												  lcc.getRunTimeStatisticsObject().getStatementExecutionPlanText());
-					}
-				}
-
-			}
-
 			if (!isClosed())
 				close();
 

Modified: db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/execute/NoPutResultSetImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/execute/NoPutResultSetImpl.java?rev=602198&r1=602197&r2=602198&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/execute/NoPutResultSetImpl.java
(original)
+++ db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/execute/NoPutResultSetImpl.java
Fri Dec  7 11:48:44 2007
@@ -26,9 +26,12 @@
 import org.apache.derby.iapi.services.i18n.MessageService;
 import org.apache.derby.iapi.services.io.FormatableBitSet;
 import org.apache.derby.iapi.services.loader.GeneratedMethod;
+import org.apache.derby.iapi.services.monitor.Monitor;
 import org.apache.derby.iapi.services.sanity.SanityManager;
+import org.apache.derby.iapi.services.stream.HeaderPrintWriter;
 import org.apache.derby.iapi.sql.Activation;
 import org.apache.derby.iapi.sql.ResultDescription;
+import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
 import org.apache.derby.iapi.sql.execute.ExecIndexRow;
 import org.apache.derby.iapi.sql.execute.ExecRow;
 import org.apache.derby.iapi.sql.execute.NoPutResultSet;
@@ -151,6 +154,32 @@
 		 */
 		if (isTopResultSet)
 		{
+			/*
+			** If run time statistics tracing is turned on, then now is the
+			** time to dump out the information.
+			*/
+			LanguageConnectionContext lcc = getLanguageConnectionContext();
+			if (lcc.getRunTimeStatisticsMode())
+			{
+				endExecutionTime = getCurrentTimeMillis();
+
+				lcc.setRunTimeStatisticsObject(
+					lcc.getExecutionContext().getResultSetStatisticsFactory().getRunTimeStatistics(activation,
this, subqueryTrackingArray));
+
+				HeaderPrintWriter istream = lcc.getLogQueryPlan() ? Monitor.getStream() : null;
+				if (istream != null)
+				{
+					istream.printlnWithHeader(LanguageConnectionContext.xidStr + 
+											  lcc.getTransactionExecute().getTransactionIdString() +
+											  "), " +
+											  LanguageConnectionContext.lccStr +
+											  lcc.getInstanceNumber() +
+											  "), " +
+											  lcc.getRunTimeStatisticsObject().getStatementText() + " ******* " +
+											  lcc.getRunTimeStatisticsObject().getStatementExecutionPlanText());
+				}
+			}
+
 			int staLength = (subqueryTrackingArray == null) ? 0 :
 								subqueryTrackingArray.length;
 



Mime
View raw message