From 4b2d94d0f84343f4d3bbf372d8612b413ecd0300 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Tue, 28 Mar 2017 16:15:46 +0300 Subject: [PATCH] When a transaction has been started, no other checks are needed If we do check then we will end up turning off the read only flag that just was set on. --- server/modules/filter/cache/cachefiltersession.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/modules/filter/cache/cachefiltersession.cc b/server/modules/filter/cache/cachefiltersession.cc index d2dc9e3da..279ace633 100644 --- a/server/modules/filter/cache/cachefiltersession.cc +++ b/server/modules/filter/cache/cachefiltersession.cc @@ -818,11 +818,15 @@ bool CacheFilterSession::should_consult_cache(GWBUF* pPacket) if (qc_query_is_type(type_mask, QUERY_TYPE_BEGIN_TRX)) { + if (log_decisions()) + { + zReason = "transaction start"; + } + // When a transaction is started, we initially assume it is read-only. m_is_read_only = true; } - - if (!session_trx_is_active(m_pSession)) + else if (!session_trx_is_active(m_pSession)) { if (log_decisions()) {