• Alexey Botchkov's avatar
    Bug #47139 Test "merge" crashes in "embedded" run · 2658504d
    Alexey Botchkov authored
      In fact this crashes in normal (not embedded) run also.
      The problem is in the memory mapping. Handling the ha_myisammrg::extra(MMAP)
      the MERGE engine tries to mmap all the tables it unites.
      Though some can be empty and then in the mi_dynmap_file()
      we call the my_mmap(0). Normally this call returns MAP_FAILED,
      but not on FreeBSD. There it returns like a 'normal' value,
      and after the consequitive munmap systems gets unstable and
      crashes on some system call later.
    
    per-file comments:
      storage/myisam/mi_dynrec.c
    Bug #47139      Test "merge" crashes in "embedded" run
        don't try to mmap zero-length area, just return at once.
    2658504d
mi_dynrec.c 55.4 KB