From 854231942a378cd8e7146e58ddf75a59cdba9024 Mon Sep 17 00:00:00 2001 From: hvlad Date: Sat, 12 May 2012 09:30:15 +0000 Subject: [PATCH] Fixed bug CORE-3845 : Interruption of 'heavy query' leads to 0 ms (zero duration) in it`s statistics in trace log --- src/jrd/trace/TraceDSQLHelpers.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/jrd/trace/TraceDSQLHelpers.h b/src/jrd/trace/TraceDSQLHelpers.h index e4e7d82579..6523d3d338 100644 --- a/src/jrd/trace/TraceDSQLHelpers.h +++ b/src/jrd/trace/TraceDSQLHelpers.h @@ -177,7 +177,9 @@ public: m_attachment(attachment), m_request(request) { - m_need_trace = m_request->req_traced && TraceManager::need_dsql_execute(m_attachment); + m_need_trace = m_request->req_traced && TraceManager::need_dsql_execute(m_attachment) && + m_request->req_request && (m_request->req_request->req_flags & req_active); + if (!m_need_trace) { m_request->req_fetch_baseline = NULL; @@ -189,12 +191,6 @@ public: ~TraceDSQLFetch() { - // don't trace fetch after EOS - if (m_request && m_request->req_request && - !(m_request->req_request->req_flags & req_active)) - { - return; - } fetch(true, res_failed); }