• Marko Mäkelä's avatar
    MDEV-13103 Deal with page_compressed page corruption · f5eb3712
    Marko Mäkelä authored
    fil_page_decompress(): Replaces fil_decompress_page().
    Allow the caller detect errors. Remove
    duplicated code. Use the "safe" instead of "fast" variants of
    decompression routines.
    
    fil_page_compress(): Replaces fil_compress_page().
    The length of the input buffer always was srv_page_size (innodb_page_size).
    Remove printouts, and remove the fil_space_t* parameter.
    
    buf_tmp_buffer_t::reserved: Make private; the accessors acquire()
    and release() will use atomic memory access.
    
    buf_pool_reserve_tmp_slot(): Make static. Remove the second parameter.
    Do not acquire any mutex. Remove the allocation of the buffers.
    
    buf_tmp_reserve_crypt_buf(), buf_tmp_reserve_compression_buf():
    Refactored away from buf_pool_reserve_tmp_slot().
    
    buf_page_decrypt_after_read(): Make static, and simplify the logic.
    Use the encryption buffer also for decompressing.
    
    buf_page_io_complete(), buf_dblwr_process(): Check more failures.
    
    fil_space_encrypt(): Simplify the debug checks.
    
    fil_space_t::printed_compression_failure: Remove.
    
    fil_get_compression_alg_name(): Remove.
    
    fil_iterate(): Allocate a buffer for compression and decompression
    only once, instead of allocating and freeing it for every page
    that uses compression, during IMPORT TABLESPACE.
    
    fil_node_get_space_id(), fil_page_is_index_page(),
    fil_page_is_lzo_compressed(): Remove (unused code).
    f5eb3712
fil0fil.cc 174 KB