Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 35597 invoked from network); 7 Dec 2007 19:49:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Dec 2007 19:49:06 -0000 Received: (qmail 36789 invoked by uid 500); 7 Dec 2007 19:48:55 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 36764 invoked by uid 500); 7 Dec 2007 19:48:55 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 36753 invoked by uid 99); 7 Dec 2007 19:48:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Dec 2007 11:48:54 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Dec 2007 19:48:42 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7DC331A9832; Fri, 7 Dec 2007 11:48:45 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: derby-commits@db.apache.org From: mamta@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071207194845.7DC331A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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;