diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index 9a1c5edd43f47..7a3df5cf12549 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -618,14 +618,14 @@ struct trx_t : ilist_node<> { ut_ad(!mutex_is_owner()); mutex.wr_lock(); - assert(!mutex_owner.exchange(pthread_self(), - std::memory_order_relaxed)); + ut_d(assert(!mutex_owner.exchange(pthread_self(), + std::memory_order_relaxed))); } /** Release the mutex */ void mutex_unlock() { - assert(mutex_owner.exchange(0, std::memory_order_relaxed) == - pthread_self()); + ut_d(assert(mutex_owner.exchange(0, std::memory_order_relaxed) == + pthread_self())); mutex.wr_unlock(); } #ifndef SUX_LOCK_GENERIC