• Narayanan V's avatar
    Bug#38848 myisam_use_mmap causes widespread myisam corruption on windows · 53f89223
    Narayanan V authored
                
    Currently the memory map is being created
    with a size that is greater than the size 
    of the underlying datafile. This can cause
    varying behaviour,
    
    e.g. 
    
    In windows the size of the datafile
    is increased, while on linux it remains
    the same.
    
    This fix removes the increment margin to
    the size that is used while creating the
    memory map.
    
    storage/myisam/mi_dynrec.c:
      remove MEMMAP_EXTRA_MARGIN that is used as
      the increment margin to the underlying 
      datafile size while creating the mmap.
    storage/myisam/mi_packrec.c:
      The size of the underlying datafile is
      increased by MEMMAP_EXTRA_MARGIN when
      using a packed record format. Hence in 
      this case the size of the memory map should 
      be incremented by the same factor.
    53f89223
mi_packrec.c 48.9 KB