Commit 08a549c3 authored by Marko Mäkelä's avatar Marko Mäkelä

Clean up buf_LRU_remove_hashed()

buf_LRU_block_remove_hashed(): Test for "not ROW_FORMAT=COMPRESSED" first,
because in that case we can assume that an uncompressed page exists.
This removes a condition from the likely code branch.
parent f7780a8e
...@@ -1092,12 +1092,14 @@ static bool buf_LRU_block_remove_hashed(buf_page_t *bpage, const page_id_t id, ...@@ -1092,12 +1092,14 @@ static bool buf_LRU_block_remove_hashed(buf_page_t *bpage, const page_id_t id,
buf_pool.freed_page_clock += 1; buf_pool.freed_page_clock += 1;
if (UNIV_LIKELY(bpage->frame != nullptr)) { if (UNIV_LIKELY(!bpage->zip.data)) {
MEM_CHECK_ADDRESSABLE(bpage, sizeof(buf_block_t));
MEM_CHECK_ADDRESSABLE(bpage->frame, srv_page_size);
buf_block_modify_clock_inc((buf_block_t*) bpage);
} else if (const page_t *page = bpage->frame) {
MEM_CHECK_ADDRESSABLE(bpage, sizeof(buf_block_t)); MEM_CHECK_ADDRESSABLE(bpage, sizeof(buf_block_t));
MEM_CHECK_ADDRESSABLE(bpage->frame, srv_page_size); MEM_CHECK_ADDRESSABLE(bpage->frame, srv_page_size);
buf_block_modify_clock_inc((buf_block_t*) bpage); buf_block_modify_clock_inc((buf_block_t*) bpage);
if (UNIV_LIKELY_NULL(bpage->zip.data)) {
const page_t* page = bpage->frame;
ut_a(!zip || !bpage->oldest_modification()); ut_a(!zip || !bpage->oldest_modification());
ut_ad(bpage->zip_size()); ut_ad(bpage->zip_size());
...@@ -1141,10 +1143,6 @@ static bool buf_LRU_block_remove_hashed(buf_page_t *bpage, const page_id_t id, ...@@ -1141,10 +1143,6 @@ static bool buf_LRU_block_remove_hashed(buf_page_t *bpage, const page_id_t id,
ut_error; ut_error;
} }
} else { } else {
goto evict_zip;
}
} else {
evict_zip:
ut_a(!bpage->oldest_modification()); ut_a(!bpage->oldest_modification());
MEM_CHECK_ADDRESSABLE(bpage->zip.data, bpage->zip_size()); MEM_CHECK_ADDRESSABLE(bpage->zip.data, bpage->zip_size());
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment