Skip to content

Commit

Permalink
Fixed bug CORE-6526 : AV in engine when StatementTimeout is active fo…
Browse files Browse the repository at this point in the history
…r user statement and some internal DSQL statement was executed as part of overall execution process
  • Loading branch information
hvlad committed Mar 28, 2021
1 parent b0e3229 commit 1b9f5d8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/jrd/jrd.h
Expand Up @@ -728,10 +728,9 @@ class thread_db : public Firebird::ThreadData
public:
TimerGuard(thread_db* tdbb, TimeoutTimer* timer, bool autoStop)
: m_tdbb(tdbb),
m_autoStop(autoStop && timer)
m_autoStop(autoStop && timer),
m_saveTimer(tdbb->tdbb_reqTimer)
{
fb_assert(m_tdbb->tdbb_reqTimer == NULL);

m_tdbb->tdbb_reqTimer = timer;
if (timer && timer->expired())
m_tdbb->tdbb_quantum = 0;
Expand All @@ -742,12 +741,13 @@ class thread_db : public Firebird::ThreadData
if (m_autoStop)
m_tdbb->tdbb_reqTimer->stop();

m_tdbb->tdbb_reqTimer = NULL;
m_tdbb->tdbb_reqTimer = m_saveTimer;
}

private:
thread_db* m_tdbb;
bool m_autoStop;
Firebird::RefPtr<TimeoutTimer> m_saveTimer;
};

private:
Expand Down

0 comments on commit 1b9f5d8

Please sign in to comment.