• svoj@april.(none)'s avatar
    BUG#17917 - SELECT from compressed MyISAM table crashes MySQL server · 7412db5e
    svoj@april.(none) authored
    Retrieving data from compressed MyISAM table which is bigger than 4G on 32-bit box
    with mmap() support results in server crash.
    
    mmap() accepts length of bytes to be mapped in second param, which is 32-bit
    size_t. But we pass data_file_length, which is 64-bit my_off_t. As a result only
    first data_file_length % 4G were mapped.
    
    This fix adds additional condition for mmap() usage, that is use mmap() for
    compressed table which size is no more than 4G on 32-bit platform.
    7412db5e
mi_packrec.c 36.3 KB