• Marko Mäkelä's avatar
    Bug#14636528 INNODB CHANGE BUFFERING IS NOT ENTIRELY CRASH-SAFE · 6bbe24e9
    Marko Mäkelä authored
    Delete-mark change buffer records when resorting to a pessimistic
    delete from the change buffer B-tree. Skip delete-marked records in
    the change buffer merge and when estimating whether an operation can
    be buffered. Without this fix, we could try to apply the same buffered
    changes multiple times if the server was killed at the right moment.
    
    In MySQL 5.5 and later: ibuf_get_volume_buffered_count_func(): Ignore
    delete-marked (already processed) records.
    
    ibuf_delete_rec(): Add a crash point before optimistic delete. If the
    optimistic delete fails, flag the record processed before
    mtr_commit().
    
    ibuf_merge_or_delete_for_page(): Ignore delete-marked (already
    processed) records.
    
    Backport to 5.1: Rename btr_cur_del_unmark_for_ibuf() to
    btr_cur_set_deleted_flag_for_ibuf() and add a parameter.
    
    rb:1307 approved by Jimmy Yang
    6bbe24e9
ha_innodb.cc 269 KB