• Michael Widenius's avatar
    Fix for LP#634943 "marked as crashed", "zerofilling" and "wrong data in... · b9890b05
    Michael Widenius authored
    Fix for LP#634943 "marked as crashed", "zerofilling" and "wrong data in bitmap" when recovering Aria tables
    This was an interaction of several bugs:
    - Tables marked as opened was not properly unmarked on recovery if there was not changes since checkpoint
    - zerofill of tables put wrong data in bitmap if directory for page was full
    - Tables was thought as 'moved' during recovery if they had a create_lsn bigger than the lsn in the control file.
    
    
    storage/maria/ha_maria.cc:
      If table is moved and crashed, threat it as crashed.
      (Not a related to this bug, but still good to have fixed)
    storage/maria/ma_blockrec.c:
      Make enough_free_entries_on_page() global
    storage/maria/ma_blockrec.h:
      Make enough_free_entries_on_page() global
    storage/maria/ma_check.c:
      If directory is full, mark page full. Fixes bug in zerofill
    storage/maria/ma_open.c:
      Don't marke files as MOVED during recovery if create_trid > trnman_max_trid, as this fails for tables created after checkpoint.
    storage/maria/ma_recovery.c:
      Reset open_count in file that was open during crash and was part of checkpoint.
      Fixed wrong warning of 'open count' after recovery of files that was not touched since checkpoint.
    storage/maria/maria_chk.c:
      Changed not documented option --log-dir to --logdir
      Document more of the options.
      Clean up output for --help
    storage/maria/trnman.c:
      Added DBUG_PRINT
    b9890b05
ha_maria.cc 111 KB