• Daniele Sciascia's avatar
    MDEV-21675: Data inconsistency after multirow insert rollback (#1474) · 9394cc89
    Daniele Sciascia authored
    * Remove dead code
    
    * MDEV-21675 Data inconsistency after multirow insert rollback
    
    This patch fixes data inconsistencies that happen after rollback of
    multirow inserts, with binlog disabled.
    For example, statements such as `INSERT INTO t1 VALUES (1,'a'),(1,'b')`
    that fail with duplicate key error. In such cases the whole statement
    is rolled back. However, with wsrep_emulate_binlog in effect, the
    IO_CACHE would not be truncated, and the pending rows events would be
    replicated to the rest of the cluster. In the above example, it would
    result in row (1,'a') being replicated, whereas locally the statement
    is rolled back entirely. Making the cluster inconsistent.
    The patch changes the code so that prior to statement rollback,
    pending rows event are removed and the stmt cache reset.
    That patch also introduces MTR tests that excercise multirow insert
    statements for regular, and streaming replication.
    9394cc89
galera_multirow_rollback.test 1.67 KB