diff options
Diffstat (limited to 'storage/innobase/include')
-rw-r--r-- | storage/innobase/include/buf0buf.h | 17 | ||||
-rw-r--r-- | storage/innobase/include/dict0types.h | 2 | ||||
-rw-r--r-- | storage/innobase/include/mtr0mtr.h | 16 | ||||
-rw-r--r-- | storage/innobase/include/mtr0types.h | 4 | ||||
-rw-r--r-- | storage/innobase/include/rem0rec.h | 2 | ||||
-rw-r--r-- | storage/innobase/include/row0mysql.h | 2 | ||||
-rw-r--r-- | storage/innobase/include/trx0purge.h | 2 | ||||
-rw-r--r-- | storage/innobase/include/ut0new.h | 2 | ||||
-rw-r--r-- | storage/innobase/include/ut0ut.h | 2 |
9 files changed, 17 insertions, 32 deletions
diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h index 846cf5e5f3a..59aa1ac08ad 100644 --- a/storage/innobase/include/buf0buf.h +++ b/storage/innobase/include/buf0buf.h @@ -740,7 +740,8 @@ public: @param node data file @return whether the operation succeeded @retval DB_PAGE_CORRUPTED if the checksum fails - @retval DB_DECRYPTION_FAILED if the page cannot be decrypted */ + @retval DB_DECRYPTION_FAILED if the page cannot be decrypted + @retval DB_FAIL if the page contains the wrong ID */ dberr_t read_complete(const fil_node_t &node); /** Note that a block is no longer dirty, while not removing @@ -1002,7 +1003,7 @@ even after we release the buffer pool mutex. */ class HazardPointer { public: - virtual ~HazardPointer() {} + virtual ~HazardPointer() = default; /** @return current value */ buf_page_t *get() const { mysql_mutex_assert_owner(m_mutex); return m_hp; } @@ -1041,16 +1042,15 @@ protected: class FlushHp : public HazardPointer { public: - ~FlushHp() override {} + ~FlushHp() override = default; /** Adjust the value of hp. This happens when some other thread working on the same list attempts to remove the hp from the list. @param bpage buffer block to be compared */ + MY_ATTRIBUTE((nonnull)) void adjust(const buf_page_t *bpage) override { - ut_ad(bpage != NULL); - /* We only support reverse traversal for now. */ if (is_hp(bpage)) m_hp= UT_LIST_GET_PREV(list, m_hp); @@ -1062,15 +1062,15 @@ public: /** Class implementing buf_pool.LRU hazard pointer */ class LRUHp : public HazardPointer { public: - ~LRUHp() override {} + ~LRUHp() override = default; /** Adjust the value of hp. This happens when some other thread working on the same list attempts to remove the hp from the list. @param bpage buffer block to be compared */ + MY_ATTRIBUTE((nonnull)) void adjust(const buf_page_t *bpage) override { - ut_ad(bpage); /** We only support reverse traversal for now. */ if (is_hp(bpage)) m_hp= UT_LIST_GET_PREV(LRU, m_hp); @@ -1085,8 +1085,7 @@ itr in that position and the other thread can start scan from there */ class LRUItr : public LRUHp { public: - LRUItr() : LRUHp() {} - ~LRUItr() override {} + ~LRUItr() override = default; /** Select from where to start a scan. If we have scanned too deep into the LRU list it resets the value to the tail diff --git a/storage/innobase/include/dict0types.h b/storage/innobase/include/dict0types.h index 82a0f780723..f6169227433 100644 --- a/storage/innobase/include/dict0types.h +++ b/storage/innobase/include/dict0types.h @@ -101,7 +101,7 @@ struct table_name_t char* m_name; /** Default constructor */ - table_name_t() {} + table_name_t() = default; /** Constructor */ table_name_t(char* name) : m_name(name) {} diff --git a/storage/innobase/include/mtr0mtr.h b/storage/innobase/include/mtr0mtr.h index 6a2148d487c..cdb159a5b26 100644 --- a/storage/innobase/include/mtr0mtr.h +++ b/storage/innobase/include/mtr0mtr.h @@ -283,17 +283,6 @@ struct mtr_t { memo_push(lock, MTR_MEMO_SX_LOCK); } - /** Acquire a tablespace S-latch. - @param space tablespace */ - void s_lock_space(fil_space_t *space) - { - ut_ad(space->purpose == FIL_TYPE_TEMPORARY || - space->purpose == FIL_TYPE_IMPORT || - space->purpose == FIL_TYPE_TABLESPACE); - memo_push(space, MTR_MEMO_SPACE_S_LOCK); - space->s_lock(); - } - /** Acquire an exclusive tablespace latch. @param space tablespace */ void x_lock_space(fil_space_t *space); @@ -346,9 +335,8 @@ public: /** Check if we are holding tablespace latch @param space tablespace to search for - @param shared whether to look for shared latch, instead of exclusive @return whether space.latch is being held */ - bool memo_contains(const fil_space_t& space, bool shared= false) const + bool memo_contains(const fil_space_t& space) const MY_ATTRIBUTE((warn_unused_result)); #ifdef UNIV_DEBUG /** Check if we are holding an rw-latch in this mini-transaction @@ -401,7 +389,7 @@ public: break; case MTR_MEMO_MODIFY: case MTR_MEMO_S_LOCK: case MTR_MEMO_X_LOCK: case MTR_MEMO_SX_LOCK: - case MTR_MEMO_SPACE_X_LOCK: case MTR_MEMO_SPACE_S_LOCK: + case MTR_MEMO_SPACE_X_LOCK: ut_ad("invalid type" == 0); } #endif diff --git a/storage/innobase/include/mtr0types.h b/storage/innobase/include/mtr0types.h index 1de31126a88..19db13a12b6 100644 --- a/storage/innobase/include/mtr0types.h +++ b/storage/innobase/include/mtr0types.h @@ -342,8 +342,6 @@ enum mtr_memo_type_t { MTR_MEMO_SX_LOCK = RW_SX_LATCH << 5, /** wr_lock() on fil_space_t::latch */ - MTR_MEMO_SPACE_X_LOCK = MTR_MEMO_SX_LOCK << 1, - /** rd_lock() on fil_space_t::latch */ - MTR_MEMO_SPACE_S_LOCK = MTR_MEMO_SX_LOCK << 2 + MTR_MEMO_SPACE_X_LOCK = MTR_MEMO_SX_LOCK << 1 }; #endif /* !UNIV_INNOCHECKSUM */ diff --git a/storage/innobase/include/rem0rec.h b/storage/innobase/include/rem0rec.h index dcf26e57e7e..2f038ab349f 100644 --- a/storage/innobase/include/rem0rec.h +++ b/storage/innobase/include/rem0rec.h @@ -1223,7 +1223,7 @@ public: } /** Destructor */ - ~rec_printer() override {} + ~rec_printer() override = default; private: /** Copy constructor */ diff --git a/storage/innobase/include/row0mysql.h b/storage/innobase/include/row0mysql.h index a49e2c3f441..a9f1c87d600 100644 --- a/storage/innobase/include/row0mysql.h +++ b/storage/innobase/include/row0mysql.h @@ -702,7 +702,7 @@ struct row_prebuilt_t { /** Callback for row_mysql_sys_index_iterate() */ struct SysIndexCallback { - virtual ~SysIndexCallback() { } + virtual ~SysIndexCallback() = default; /** Callback method @param mtr current mini transaction diff --git a/storage/innobase/include/trx0purge.h b/storage/innobase/include/trx0purge.h index 3711599bd8c..ac39d3ec45b 100644 --- a/storage/innobase/include/trx0purge.h +++ b/storage/innobase/include/trx0purge.h @@ -56,7 +56,7 @@ public: typedef trx_rsegs_t::iterator iterator; typedef trx_rsegs_t::const_iterator const_iterator; - TrxUndoRsegs() {} + TrxUndoRsegs() = default; /** Constructor */ TrxUndoRsegs(trx_rseg_t& rseg) diff --git a/storage/innobase/include/ut0new.h b/storage/innobase/include/ut0new.h index cd116cc3a20..f4183e4c61a 100644 --- a/storage/innobase/include/ut0new.h +++ b/storage/innobase/include/ut0new.h @@ -283,7 +283,7 @@ public: { } #else - ut_allocator() {} + ut_allocator() = default; ut_allocator(PSI_memory_key) {} #endif /* UNIV_PFS_MEMORY */ diff --git a/storage/innobase/include/ut0ut.h b/storage/innobase/include/ut0ut.h index 95541ea574e..fe16ce149da 100644 --- a/storage/innobase/include/ut0ut.h +++ b/storage/innobase/include/ut0ut.h @@ -323,7 +323,7 @@ class logger { protected: /* This class must not be used directly */ - ATTRIBUTE_COLD ATTRIBUTE_NOINLINE logger() {} + ATTRIBUTE_COLD ATTRIBUTE_NOINLINE logger() = default; public: template<typename T> ATTRIBUTE_COLD ATTRIBUTE_NOINLINE logger& operator<<(const T& rhs) |