• unknown's avatar
    Bug#25460 - High concurrency MyISAM access causes severe mysqld crash. · 17c3b838
    unknown authored
    Under high load it was possible that memory mapping was started on a table
    while other threads were working with the table.
    
    I fixed the start of memory mapping so that it is done at the first table
    open or when the requesting thread is using the table exclusively only.
    
    
    include/my_base.h:
      Bug#25460 - High concurrency MyISAM access causes severe mysqld crash.
      Added a new MyISAM open_flag HA_OPEN_MMAP.
    storage/myisam/ha_myisam.cc:
      Bug#25460 - High concurrency MyISAM access causes severe mysqld crash.
      Replaced the call to mi_extra(... HA_EXTRA_MMAP ...) by the new open_flag
      HA_OPEN_MMAP. This effects that the mapping will no longer be done on
      every open of the table but just on the initial open, when the MyISAM
      share is created.
    storage/myisam/mi_dynrec.c:
      Bug#25460 - High concurrency MyISAM access causes severe mysqld crash.
      Added a comment with a concern regarding the mmap flag MAP_NORESERVE.
    storage/myisam/mi_extra.c:
      Bug#25460 - High concurrency MyISAM access causes severe mysqld crash.
      Limited the start of memory mapping to situations where the requesting
      thread has the table exclusively opened.
    storage/myisam/mi_open.c:
      Bug#25460 - High concurrency MyISAM access causes severe mysqld crash.
      Added memory mapping code. Used if the new open_flag HA_OPEN_MMAP is set.
    17c3b838
ha_myisam.cc 59.3 KB