diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-09-11 15:52:22 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-09-17 14:08:34 +0300 |
commit | 852771ba1e41142a84f90e76e4ed228fc7699700 (patch) | |
tree | b21459b8b369b383ba208db599a922a42d169c85 /storage/innobase/lock | |
parent | 2bac9782aa81ad386beaf00eb126ccf2d15031a1 (diff) | |
download | mariadb-git-852771ba1e41142a84f90e76e4ed228fc7699700.tar.gz |
MDEV-23719: Remove buf_block_t::lock_hash_val
The InnoDB buffer block page descriptor is caching a value
buf_block_t::lock_hash_val that should be quick to compute
in the first place, as suggested by
commit 14be81438098923e95bda6d635d638991e60116b.
lock_rec_fold(): Define as page_id_t::fold() instead of
ut_fold_ulint_pair().
Diffstat (limited to 'storage/innobase/lock')
-rw-r--r-- | storage/innobase/lock/lock0lock.cc | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index 2c888f55b69..e5718a9e75c 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -515,18 +515,6 @@ void lock_sys_t::resize(ulint n_cells) HASH_MIGRATE(&old_hash, &prdt_page_hash, lock_t, hash, lock_rec_lock_fold); old_hash.free(); - - /* need to update block->lock_hash_val */ - mutex_enter(&buf_pool.mutex); - for (buf_page_t* bpage = UT_LIST_GET_FIRST(buf_pool.LRU); - bpage; bpage = UT_LIST_GET_NEXT(LRU, bpage)) { - if (bpage->state() == BUF_BLOCK_FILE_PAGE) { - const page_id_t id(bpage->id()); - reinterpret_cast<buf_block_t*>(bpage)->lock_hash_val - = lock_rec_hash(id.space(), id.page_no()); - } - } - mutex_exit(&buf_pool.mutex); mutex_exit(&mutex); } |