• Monty's avatar
    Fixed bug in free locks that caused rows in cache to not be properly flushed · 1ff23d0c
    Monty authored
    Fixed by doing adding external_lock(F_UNLCK) in free_locks.
    I also moved unlock of cache_handler to be after changing lock type of
    cached tables to ensure that no one can use cached table while this is
    happening (as cache table is locked with write lock).
    I also fixed a wrong mutex order bug in ha_cache::flush_insert_cache()
    
    Other things:
    - Addded share::cached_rows to track inserted rows. This is only used
      for asserts to check the number of rows in the cache.
    - Fixed wrong mysql_file_chsize() in case of repair
    1ff23d0c
ha_cache.cc 21.7 KB