Commit 58fd174a authored by marko's avatar marko

branches/zip: ibuf_update_free_bits_zip(): When after==0, call

buf_page_make_young(), like ibuf_update_free_bits_if_full() does.
This difference was pointed out by Sunny.
parent 4c7f244c
......@@ -955,8 +955,8 @@ UNIV_INTERN
void
ibuf_update_free_bits_zip(
/*======================*/
const buf_block_t* block, /* in: index page */
mtr_t* mtr) /* in/out: mtr */
buf_block_t* block, /* in/out: index page */
mtr_t* mtr) /* in/out: mtr */
{
page_t* bitmap_page;
ulint space;
......@@ -974,6 +974,16 @@ ibuf_update_free_bits_zip(
bitmap_page = ibuf_bitmap_get_map_page(space, page_no, zip_size, mtr);
after = ibuf_index_page_calc_free_zip(zip_size, block);
if (after == 0) {
/* We move the page to the front of the buffer pool LRU list:
the purpose of this is to prevent those pages to which we
cannot make inserts using the insert buffer from slipping
out of the buffer pool */
buf_page_make_young(&block->page);
}
ibuf_bitmap_page_set_bits(bitmap_page, page_no, zip_size,
IBUF_BITMAP_FREE, after, mtr);
}
......
......@@ -110,8 +110,8 @@ UNIV_INTERN
void
ibuf_update_free_bits_zip(
/*======================*/
const buf_block_t* block, /* in: index page */
mtr_t* mtr); /* in/out: mtr */
buf_block_t* block, /* in/out: index page */
mtr_t* mtr); /* in/out: mtr */
/**************************************************************************
Updates the free bits for the two pages to reflect the present state. Does
this in the mtr given, which means that the latching order rules virtually
......
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