• Brandon Nesterenko's avatar
    MDEV-25607: Auto-generated DELETE from HEAP table can break replication · cbc1898e
    Brandon Nesterenko authored
    The special logic used by the memory storage engine
    to keep slaves in sync with the master on a restart can
    break replication. In particular, after a restart, the
    master writes DELETE statements in the binlog for
    each MEMORY-based table so the slave can empty its
    data. If the DELETE is not executable, e.g. due to
    invalid triggers, the slave will error and fail, whereas
    the master will never see the problem.
    
    Instead of DELETE statements, use TRUNCATE to
    keep slaves in-sync with the master, thereby bypassing
    triggers.
    
    Reviewed By:
    ===========
    Kristian Nielsen <knielsen@knielsen-hq.org>
    Andrei Elkin <andrei.elkin@mariadb.com>
    cbc1898e
rpl_mdev382.result 20.9 KB