mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
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.
This commit is contained in:
parent
c9d6c5acec
commit
567abed2ca
2 changed files with 14 additions and 4 deletions
|
@ -955,8 +955,8 @@ UNIV_INTERN
|
||||||
void
|
void
|
||||||
ibuf_update_free_bits_zip(
|
ibuf_update_free_bits_zip(
|
||||||
/*======================*/
|
/*======================*/
|
||||||
const buf_block_t* block, /* in: index page */
|
buf_block_t* block, /* in/out: index page */
|
||||||
mtr_t* mtr) /* in/out: mtr */
|
mtr_t* mtr) /* in/out: mtr */
|
||||||
{
|
{
|
||||||
page_t* bitmap_page;
|
page_t* bitmap_page;
|
||||||
ulint space;
|
ulint space;
|
||||||
|
@ -974,6 +974,16 @@ ibuf_update_free_bits_zip(
|
||||||
bitmap_page = ibuf_bitmap_get_map_page(space, page_no, zip_size, mtr);
|
bitmap_page = ibuf_bitmap_get_map_page(space, page_no, zip_size, mtr);
|
||||||
|
|
||||||
after = ibuf_index_page_calc_free_zip(zip_size, block);
|
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_page_set_bits(bitmap_page, page_no, zip_size,
|
||||||
IBUF_BITMAP_FREE, after, mtr);
|
IBUF_BITMAP_FREE, after, mtr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,8 +110,8 @@ UNIV_INTERN
|
||||||
void
|
void
|
||||||
ibuf_update_free_bits_zip(
|
ibuf_update_free_bits_zip(
|
||||||
/*======================*/
|
/*======================*/
|
||||||
const buf_block_t* block, /* in: index page */
|
buf_block_t* block, /* in/out: index page */
|
||||||
mtr_t* mtr); /* in/out: mtr */
|
mtr_t* mtr); /* in/out: mtr */
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
Updates the free bits for the two pages to reflect the present state. Does
|
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
|
this in the mtr given, which means that the latching order rules virtually
|
||||||
|
|
Loading…
Add table
Reference in a new issue