• Michael Widenius's avatar
    MDEV-19595 fixed · 8acbf9c1
    Michael Widenius authored
    The test cases for the MDEV found several independent bugs
    in MariaDB server and Aria:
    - If a temporary table was marked as crashed, it could never
      be deleted.
    - Opening of a crashed temporary table gave an error message
      but the error was never forwarded to the caller which caused
      an assert() in my_ok()
    - init_read_record() did mmap of all temporary tables, which is
      probably not a good idea as this area can potentially be
      very big. Changed code to only mmap internal temporary tables.
    - mmap-ed tables where not unmapped in case of repair/optimize
      which caused bad data in table and crashes if the original
      table files where replaced with new ones (as the old mmap
      was still in place). Fixed by removing the mmap in case
      of repair.
    - Cleaned up usage of code that disabled mmap in Aria
    8acbf9c1
records.cc 21 KB