• Marko Mäkelä's avatar
    MDEV-18981 Possible corruption when using FOREIGN KEY with virtual columns · 630199e7
    Marko Mäkelä authored
    row_ins_foreign_fill_virtual(): Construct update->old_vrow
    with ROW_COPY_DATA instead of ROW_COPY_POINTERS. With the latter,
    the object would be pointing to a buffer pool page frame. That page
    frame can become stale and invalid as soon as
    row_ins_foreign_check_on_constraint() invokes mtr_t::commit().
    
    Most of the time, the pointer target is not going to be overwritten
    by anything, and everything appears to work correctly.
    Buffer pool page replacement is highly unlikely, and any pessimistic
    operation that would overwrite the old location of the record is only
    slightly more likely. It is not known whether there is an actual bug.
    This came up while diagnosing MDEV-18879 in MariaDB 10.3.
    630199e7
row0ins.cc 103 KB