• unknown's avatar
    Added undo of deleted row · 044c4103
    unknown authored
    Added part of undo of update row
    Extended ma_test1 for recovery testing
    Some bug fixes
    
    
    storage/maria/ha_maria.cc:
      Ignore 'state.split' in case of block records
    storage/maria/ma_bitmap.c:
      Added return value for _ma_bitmap_find_place() for how much data we should put on head page
    storage/maria/ma_blockrec.c:
      Added undo of deleted row.
      - Added logging of CLR_END records in write_block_record()
      - Split ma_write_init_block_record() to two functions to get better code reuse
      - Added _ma_apply_undo_row_delete()
      - Added ma_get_length()
      
      Added 'empty' prototype for undo_row_update()
      
      Fixed bug when moving data withing a head/tail page.
      Fixed bug when reading a page with bigger LSN but of different type than was expected.
      Store undo_lsn first in CLR_END record
      
      Simplified some code by adding local variables.
      Changed log format for UNDO_ROW_DELETE to store total length of used blobs
    storage/maria/ma_blockrec.h:
      Added prototypes for undo code.
    storage/maria/ma_pagecache.c:
      Allow plain page to change to LSN page (needed in recovery to apply UNDO)
    storage/maria/ma_recovery.c:
      Added undo handling of UNDO_ROW_DELETE and UNDO_ROW_UPDATE
    storage/maria/ma_test1.c:
      Extended --test-undo option to allow us to die after insert or after delete.
      Fixed bug in printing key values when using -v
    storage/maria/maria_def.h:
      Moved some variables around to be getter alignment
      Added length_buff buffer to be used during undo handling
    044c4103
ha_maria.cc 74.4 KB