• marko's avatar
    branches/zip: buf_LRU_free_block(): When buf_page_is_old(b), we incremented · 7d69d455
    marko authored
    buf_pool->LRU_old_len.  However, we forgot to check if buf_pool->LRU_old
    happens to point to b's successor in the LRU list.  If it does, we must
    assign buf_pool->LRU_old = b.  The following invariants hold:
    
    In the LRU list, the "old" flag should grow monotonically, i.e., it is 0
    for the first few items and 1 from thereafter.
    
    If buf_pool->LRU_old != NULL, it must point to the first item with old=1
    in the LRU list, and there must be buf_pool->LRU_old_len old items in the list.
    
    This should fix Mantis issue#50 and issue#68.
    7d69d455
buf0buf.h 49.9 KB