Commit aebc0edf authored by marko's avatar marko

branches/zip: buf_page_set_old(): Add the assertion ut_ad(bpage->in_LRU_list).

Adjust the callers where necessary:
buf_LRU_add_block_to_end_low() and buf_LRU_add_block_low().
parent 0a078140
......@@ -974,8 +974,6 @@ buf_LRU_add_block_to_end_low(
ut_a(buf_page_in_file(bpage));
buf_page_set_old(bpage, TRUE);
last_bpage = UT_LIST_GET_LAST(buf_pool->LRU);
if (last_bpage) {
......@@ -988,6 +986,8 @@ buf_LRU_add_block_to_end_low(
UT_LIST_ADD_LAST(LRU, buf_pool->LRU, bpage);
ut_d(bpage->in_LRU_list = TRUE);
buf_page_set_old(bpage, TRUE);
if (UT_LIST_GET_LEN(buf_pool->LRU) >= BUF_LRU_OLD_MIN_LEN) {
buf_pool->LRU_old_len++;
......@@ -1035,8 +1035,6 @@ buf_LRU_add_block_low(
ut_a(buf_page_in_file(bpage));
ut_ad(!bpage->in_LRU_list);
buf_page_set_old(bpage, old);
if (!old || (UT_LIST_GET_LEN(buf_pool->LRU) < BUF_LRU_OLD_MIN_LEN)) {
UT_LIST_ADD_FIRST(LRU, buf_pool->LRU, bpage);
......@@ -1056,6 +1054,8 @@ buf_LRU_add_block_low(
ut_d(bpage->in_LRU_list = TRUE);
buf_page_set_old(bpage, old);
if (UT_LIST_GET_LEN(buf_pool->LRU) > BUF_LRU_OLD_MIN_LEN) {
ut_ad(buf_pool->LRU_old);
......
......@@ -444,6 +444,7 @@ buf_page_set_old(
{
ut_a(buf_page_in_file(bpage));
ut_ad(buf_pool_mutex_own());
ut_ad(bpage->in_LRU_list);
bpage->old = old;
}
......
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