• Marko Mäkelä's avatar
    MDEV-31875 ROW_FORMAT=COMPRESSED table: InnoDB: ... Only 0 bytes read · 44df6f35
    Marko Mäkelä authored
    buf_read_ahead_random(), buf_read_ahead_linear(): Avoid read-ahead
    of the last page(s) of ROW_FORMAT=COMPRESSED tablespaces that use
    a page size of 1024 or 2048 bytes. We invoke os_file_set_size() on
    integer multiples of 4096 bytes in order to be compatible with
    the requirements of innodb_flush_method=O_DIRECT regardless of the
    physical block size of the underlying storage.
    
    This change must be null-merged to MariaDB Server 10.5 and later.
    There, out-of-bounds read-ahead should be handled gracefully
    by simply discarding the buffer page that had been allocated.
    
    Tested by: Matthias Leich
    44df6f35
buf0rea.cc 26 KB