• Marko Mäkelä's avatar
    MDEV-31441 BLOB corruption on UPDATE of PRIMARY KEY with FOREIGN KEY · cd79f102
    Marko Mäkelä authored
    row_upd_clust_rec_by_insert(): If we are resuming from a lock wait,
    reset the 'disowned' flag of the BLOB pointers in 'entry' that we
    copied from 'rec' on which we had invoked btr_cur_disown_inherited_fields()
    before the lock wait started. In this way, the inserted record with
    the updated PRIMARY KEY value will have the BLOB ownership associated
    with itself, like it is supposed to be.
    
    Note: If the lock wait had been aborted, then rollback would have
    invoked btr_cur_unmark_extern_fields() and no corruption would be possible.
    
    Reviewed by: Vladislav Lesin
    Tested by: Matthias Leich
    cd79f102
row0upd.cc 96.9 KB