• Marko Mäkelä's avatar
    Bug #58549 Race condition in buf_LRU_drop_page_hash_for_tablespace() · 0f8ae318
    Marko Mäkelä authored
    and compressed tables
    
    buf_LRU_drop_page_hash_for_tablespace(): after releasing and
    reacquiring the buffer pool mutex, do not dereference any block
    descriptor pointer that is not known to be a pointer to an
    uncompressed page frame (type buf_block_t; state ==
    BUF_BLOCK_FILE_PAGE). Also, defer the acquisition of the block_mutex
    until it is needed.
    
    buf_page_get_gen(): Add mode == BUF_GET_IF_IN_POOL_PEEK for
    buffer-fixing a block without making it young in the LRU list.
    
    buf_page_get_gen(), buf_page_init(), buf_LRU_block_remove_hashed_page():
    Set bpage->state = BUF_BLOCK_ZIP_FREE before buf_buddy_free(bpage),
    so that similar race conditions might be detected a little easier.
    
    btr_search_drop_page_hash_when_freed(): Use BUF_GET_IF_IN_POOL_PEEK
    when dropping the hash indexes.
    
    rb://528 approved by Jimmy Yang
    0f8ae318
buf0buf.h 52.9 KB