• sjaakola's avatar
    MDEV-21153 Replica nodes crash due to indexed virtual columns and FK cascading delete · 7d04ce6a
    sjaakola authored
    Fix for MDEV-23033 fixes a problem in replication applying of transactions, which contain cascading foreign key delete for a table, which has indexed virtual column.
    This fix adds slave_fk_event_map flag for table, to mark when the prelocking is needed for applying of a transaction.
    See commit 608b0ee5 for more details.
    However, this fix is targeted for async replication only, Rows_log_event::do_apply_event() has condition to rule out galera replication from the fix domain, and use cases suffering from MDEV-23033 and related MDEV-21153 will fail in galera cluster.
    
    The fix in this commit removes the condition to rule out the setting of slave_fk_event_map flag from galera replication, and makes the fix in MDEV-23033 effective for galera replication as well.
    
    Finally, a mtr test for virtual column support has been added. galera.galera_virtual_column.test has as first test a scenario from MDEV-21153
    Reviewed-by: default avatarJan Lindström <jan.lindstrom@mariadb.com>
    7d04ce6a
log_event.cc 473 KB