• unknown's avatar
    Fixed repair_by_sort to work with BLOCK_RECORD · 4e0964cb
    unknown authored
    Fixed bugs in undo logging
    Fixed bug where head block was split before min_row_length (caused Maria to believe row was crashed on read)
    Reserved place for reference-transid on key pages (for packing of transids)
    ALTER TABLE and INSERT ... SELECT now uses fast creation of index
        
    Known bugs:
    ma_test_recovery fails because of a bug in redo handling when log is cut directly after a redo (Guilhem knows how to fix)
    ma_test_recovery.excepted is not totally correct, because of the above bug
    mysqld sometimes fails to restart; Fails with error "end_of_redo_phase: Assertion `long_trid != 0' failed"; Guilhem to investigate
    
    
    include/maria.h:
      Prototype changes
      Added current_filepos to st_maria_sort_info
    mysql-test/r/maria.result:
      Updated results that changes as alter table and insert ... select now uses fast creation of index
    mysys/mf_iocache.c:
      Reset variable to gurard against double invocation
    storage/maria/ma_bitmap.c:
      Added _ma_bitmap_reset_cache() (needed for repair)
    storage/maria/ma_blockrec.c:
      Simplify code
      More initial allocations
      Fixed bug where head block was split before min_row_length (caused Maria to believe row was crashed on read)
    storage/maria/ma_blockrec.h:
      Moved TRANSID_SIZE to maria_def.h
      Added prototype for new functions
    storage/maria/ma_check.c:
      Simplicy code
      Fixed repair_by_sort to work with BLOCK_RECORD
      - When using BLOCK_RECORD or UNPACK create new Maria handle
      - Use common initializer function
      - Align code with maria_repair()
      
      Made some changes to maria_repair_parallel() to use common initializer function
      Removed ASK_MONTY section by fixing noted problem
    storage/maria/ma_close.c:
      Moved check for readonly to _ma_state_info_write()
    storage/maria/ma_key_recover.c:
      Use different log entries if key root changes or not.
      This fixed some bugs when tree grows
    storage/maria/ma_key_recover.h:
      Added keynr to st_msg_to_write_hook_for_undo_key
    storage/maria/ma_loghandler.c:
      Added INIT_LOGREC_UNDO_KEY_INSERT_WITH_ROOT
    storage/maria/ma_loghandler.h:
      Added INIT_LOGREC_UNDO_KEY_INSERT_WITH_ROOT
    storage/maria/ma_open.c:
      Added TRANSID to all key pages (for future compressing of trans id's)
      For compressed records, alloc a bit bigger buffer to avoid valgrind warnings
      If table is opened readonly, don't update state
    storage/maria/ma_packrec.c:
      Allocate bigger array for bit unpacking to avoid valgrind errors
    storage/maria/ma_recovery.c:
      Added UNDO_KEY_INSERT_WITH_ROOT & UNDO_KEY_DELETE_WITH_ROOT
    storage/maria/ma_sort.c:
      More logging
    storage/maria/ma_test_all.sh:
      More tests
    storage/maria/ma_test_recovery.expected:
      Update results
      Note that this is not complete becasue of a bug in recovery
    storage/maria/ma_test_recovery:
      Removed recreation of index (not needed when we have redo for index pages)
    storage/maria/maria_chk.c:
      When using flag --read-only, don't update status for files
      When using --unpack, don't use REPAIR_BY_SORT if other repair option is given
      Enable repair_by_sort for BLOCK records
      Removed not needed newline at start of --describe
    storage/maria/maria_def.h:
      Support for TRANSID_SIZE to key pages
    storage/maria/maria_read_log.c:
      renamed --only-display to --display-only
    4e0964cb
ma_test_recovery.expected 30.2 KB