diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h index 0dc5063831583..eed4111365920 100644 --- a/storage/innobase/include/buf0buf.h +++ b/storage/innobase/include/buf0buf.h @@ -799,7 +799,7 @@ class buf_page_t /** Prepare to release a file page to buf_pool.free. */ void free_file_page() noexcept { - ut_ad((zip.fix.fetch_sub(REMOVE_HASH - MEMORY)) == REMOVE_HASH); + assert((zip.fix.fetch_sub(REMOVE_HASH - MEMORY)) == REMOVE_HASH); /* buf_LRU_block_free_non_file_page() asserts !oldest_modification() */ ut_d(oldest_modification_= 0;) id_= page_id_t(~0ULL); diff --git a/storage/innobase/include/sux_lock.h b/storage/innobase/include/sux_lock.h index ea9487b943c7e..83fa552aafc9c 100644 --- a/storage/innobase/include/sux_lock.h +++ b/storage/innobase/include/sux_lock.h @@ -121,15 +121,13 @@ class sux_lock final @param id the new owner of the U or X lock */ void set_new_owner(pthread_t id) { - IF_DBUG(DBUG_ASSERT(writer.exchange(id, std::memory_order_relaxed)), - writer.store(id, std::memory_order_relaxed)); + writer.store(id, std::memory_order_relaxed); } /** Assign the ownership of a write lock to a thread @param id the owner of the U or X lock */ void set_first_owner(pthread_t id) { - IF_DBUG(DBUG_ASSERT(!writer.exchange(id, std::memory_order_relaxed)), - writer.store(id, std::memory_order_relaxed)); + writer.store(id, std::memory_order_relaxed); } #ifdef UNIV_DEBUG /** Register the current thread as a holder of a shared lock */ diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index beb5a28487682..9a1c5edd43f47 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(); - ut_ad(!mutex_owner.exchange(pthread_self(), - std::memory_order_relaxed)); + assert(!mutex_owner.exchange(pthread_self(), + std::memory_order_relaxed)); } /** Release the mutex */ void mutex_unlock() { - ut_ad(mutex_owner.exchange(0, std::memory_order_relaxed) - == pthread_self()); + assert(mutex_owner.exchange(0, std::memory_order_relaxed) == + pthread_self()); mutex.wr_unlock(); } #ifndef SUX_LOCK_GENERIC