• Marko Mäkelä's avatar
    MDEV-26228 ASAN heap-use-after-free with ON UPDATE CASCADE · 173e562d
    Marko Mäkelä authored
    In commit 83d2e084 (MDEV-24041)
    we failed to notice that in addition to the bug with
    DELETE and ON DELETE CASCADE, there is another bug with
    UPDATE and ON UPDATE CASCADE.
    
    row_ins_foreign_fill_virtual(): Use the correct memory heap
    for everything that will be reachable from the cascade->update
    that we return to the caller.
    
    Note: It is correct to use the shorter-lived cascade->heap for
    rec_get_offsets(), because that memory will be abandoned when
    row_ins_foreign_fill_virtual() returns.
    173e562d
innodb_virtual_fk.result 24 KB