• marko's avatar
    branches/zip: In the rollback of incomplete transactions after crash · ba78ee0d
    marko authored
    recovery, tolerate clustered index records whose externally stored
    columns have not been written.  This should remove the assertion failures
    that were reported as Mantis issue#58, issue#62, issue#64.
    
    trx_is_recv(): New function: TRUE if this transaction is rolling back
    an incomplete transaction in crash recovery.
    
    enum trx_rbmode: Rollback modes: no rollback, normal rollback, crash recovery.
    
    btr_cur_pessimistic_delete(), btr_free_externally_stored_field(),
    btr_rec_free_externally_stored_fields():
    Replace the ibool parameter with enum trx_rbmode.
    
    btr_free_externally_stored_field(): If field_ref is zero, return
    but assert ut_a(rbmode == RB_RECOVERY).  Unless InnoDB has crashed
    while inserting a clustered index record, field_ref should not be zero.
    
    btr_rec_free_updated_extern_fields(): Add the parameter enum trx_rbmode.
    
    btr_cur_pessimistic_update(): Pass the rbmode parameter to
    btr_rec_free_updated_extern_fields().
    
    row_undo_ins(), row_undo_mod_upd_del_sec(): If row_build_index_entry()
    fails, assert trx_is_recv() and skip this secondary index.
    
    row_undo_mod_upd_del_sec(): Empty the heap at the end of each loop
    iteration in order to conserve memory and to reduce the number of
    low-level memory allocations.
    ba78ee0d
ibuf0ibuf.c 95.5 KB