diff --git a/storage/innobase/include/mtr0mtr.h b/storage/innobase/include/mtr0mtr.h index 2f71155187c..2664054f5c6 100644 --- a/storage/innobase/include/mtr0mtr.h +++ b/storage/innobase/include/mtr0mtr.h @@ -614,7 +614,8 @@ private: #ifdef UNIV_DEBUG public: /** @return whether the mini-transaction is active */ - bool is_active() const { ut_ad(!m_commit || m_start); return m_start; } + bool is_active() const + { ut_ad(!m_commit || m_start); return m_start && !m_commit; } /** @return whether the mini-transaction has been committed */ bool has_committed() const { ut_ad(!m_commit || m_start); return m_commit; } private: diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc index e4943195fb1..93d86a96067 100644 --- a/storage/innobase/row/row0merge.cc +++ b/storage/innobase/row/row0merge.cc @@ -1984,7 +1984,7 @@ row_merge_read_clustered_index( os_thread_yield(); scan_next: ut_ad(!mtr_started); - ut_ad(mtr.is_active()); + ut_ad(!mtr.is_active()); mtr.start(); mtr_started = true; /* Restore position on the record, or its