summaryrefslogtreecommitdiff
path: root/storage/innobase/trx/trx0i_s.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/trx/trx0i_s.cc')
-rw-r--r--storage/innobase/trx/trx0i_s.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/innobase/trx/trx0i_s.cc b/storage/innobase/trx/trx0i_s.cc
index 1232ccc5ad9..2dc39118d3d 100644
--- a/storage/innobase/trx/trx0i_s.cc
+++ b/storage/innobase/trx/trx0i_s.cc
@@ -1213,7 +1213,7 @@ static void fetch_data_into_cache(trx_i_s_cache_t *cache)
/* Capture the state of transactions */
trx_sys.trx_list.for_each([cache](trx_t &trx) {
if (!cache->is_truncated && trx.state != TRX_STATE_NOT_STARTED &&
- &trx != purge_sys.query->trx)
+ &trx != (purge_sys.query ? purge_sys.query->trx : nullptr))
{
trx.mutex_lock();
if (trx.state != TRX_STATE_NOT_STARTED)