• unknown's avatar
    Added maria_commit() and maria_begin() to be used with external tests · f7b766c0
    unknown authored
    Now ma_test1 -M -T and ma_test2 -M -T produces readable, applyable logs
    
    Note: The .MAD file is not binary identical after applying redo compare to a an original file.
    (This is becasue we don't have full information which function called PURGE_REDO_BLOCKS).
    To verify if a file was correctly applied, we now instead compare row checksums
    
    
    BitKeeper/etc/ignore:
      added storage/maria/tmp/*
    include/maria.h:
      Added maria_commit() and maria_begin() to be used with external tests
    storage/maria/ha_maria.cc:
      Ensure maria_def. is read in C mode
    storage/maria/ma_blockrec.c:
      Fixed redo handling.
      _ma_apply_redo_purge_blocks() updated to handle any number of purged blocks
      Removed code to make data file idenitcal after redo (can't easily be done). See changeset comments
      
      Now ma_test1 -M -T and ma_test2 -M -T produces readable, applyable logs
    storage/maria/ma_commit.c:
      More DBUG statements
      Moved variable declaration to start of function (portability fix)
      Added helper functions 'maria_commit()' and 'maria_begin()'
    storage/maria/ma_loghandler.c:
      Fixed wrong REDO_PURGE_BLOCKS initialization
    storage/maria/ma_recovery.c:
      Added UNDO_ROW_UPDATE
      Removed wrong setting of lsn (there was no lsn at the used position)
      Fixed REDO_PURGE_BLOCKS to handle any number of blocks
    storage/maria/ma_test1.c:
      Added transaction support (via maria_begin() & maria_commit()) to get a log that can be applied with maria_read_log
    storage/maria/ma_test2.c:
      Added transaction support (via maria_begin() & maria_commit()) to get a log that can be applied with maria_read_log
    storage/maria/ma_test_recovery:
      Create temporary files in maria/tmp
      Verify files with checksums instead of byte comparisons
    storage/maria/maria_chk.c:
      When using with -dss we only get  filename, records and checksum.
      This is useful to do a quick comparision if a files is identical to another one.
    storage/maria/maria_def.h:
      Added ma_commit()
    storage/maria/maria_read_log.c:
      Added --help
    f7b766c0
ma_test1.c 21.8 KB