• Alfranio Correia's avatar
    BUG#44581 Slave stops when transaction with non-transactional table gets lock wait · 508fe9dd
    Alfranio Correia authored
    timeout
                
    In STMT and MIXED modes, a statement that changes both non-transactional and
    transactional tables must be written to the binary log whenever there are
    changes to non-transactional tables. This means that the statement gets into the
    binary log even when the changes to the transactional tables fail. In particular
    , in the presence of a failure such statement is annotated with the error number
    and wrapped in a begin/rollback. On the slave, while applying the statement, it
    is expected the same failure and the rollback prevents the transactional changes
    to be persisted.
                
    Unfortunately, statements that fail due to concurrency issues (e.g. deadlocks,
    timeouts) are logged in the same way causing the slave to stop as the statements
    are applied sequentially by the SQL Thread. To fix this bug, we automatically
    ignore concurrency failures on the slave. Specifically, the following failures
    are ignored: ER_LOCK_WAIT_TIMEOUT, ER_LOCK_DEADLOCK and ER_XA_RBDEADLOCK.
    508fe9dd
slave.cc 146 KB