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().
This commit is contained in:
marko 2008-08-18 18:06:33 +00:00
parent 0a07814087
commit aebc0edf5a
2 changed files with 5 additions and 4 deletions

View file

@ -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);

View file

@ -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;
}