• unknown's avatar
    BUG#17917 - SELECT from compressed MyISAM table crashes MySQL server · a118b6c6
    unknown 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.
    
    
    myisam/mi_packrec.c:
      Use mmap() for compressed table which size is no more than 4G on 32-bit platform.
    a118b6c6
mi_packrec.c 36.3 KB