• marko's avatar
    branches/zip: Minor improvements. · 492cd8ce
    marko authored
    buf_LRU_block_remove_hashed_page(): Return the new state of the block.
    
    Only call buf_LRU_block_free_hashed_page()
    if buf_LRU_block_remove_hashed_page() did not return BUF_BLOCK_ZIP_FREE,
    that is, the control block was not freed.
    
    buf_LRU_insert_zip_clean(): New function, for inserting a compressed-only
    block into buf_pool->zip_clean in the LRU order.
    
    buf_LRU_block_remove_hashed_page(), buf_LRU_free_block():
    Add the flag "zip" for controlling if the compressed page of an uncompressed
    page should be removed.  For now, assume zip==TRUE.
    
    buf_LRU_get_free_block(): Replace the test for UT_LIST_GET_LEN(buf_pool->free)
    with a test for the return value of buf_LRU_get_free_only().  Do not
    free zip.data, as it must already have been freed.
    
    buf_flush_insert_into_flush_list(), buf_flush_insert_sorted_into_flush_list():
    Remove compressed-only blocks from the buf_pool->zip_clean list.
    
    buf_flush_remove(): Restore compressed-only blocks to
    the buf_pool->zip_clean list.
    
    buf_page_init_for_read(): Uncompress compressed-only blocks when possible.
    Currently, there cannot be any compressed-only blocks in the buffer pool;
    they would be inserted by buf_LRU_free_block(bpage, zip=FALSE).
    492cd8ce
buf0flu.c 32.7 KB