• Jan Lindström's avatar
    MDEV-31285 : Assertion `state() == s_executing || state() == s_preparing || · 3c65434b
    Jan Lindström authored
    state() == s_prepared || state() == s_must_abort || state() == s_aborting ||
    state() == s_cert_failed || state() == s_must_replay' failed
    
    When applier tries to execute write rows event it find out
    in table_def::compatible_with that value is not compatible
    and sets error and thd->is_slave_error but thd->is_error()
    is false. Later in rpl_group_info::slave_close_thread_tables
    we commit stmt. This is bad for Galera because later in
    apply_write_set we notice that event apply was not successful
    and try to rollback transaction, but wsrep transaction
    is already in s_committed state.
    
    This is fixed on rpl_group_info::slave_close_thread_tables
    so that in Galera case we rollback stmt if thd->is_slave_error
    or thd->is_error() is set. Then later we can rollback wsrep
    transaction.
    Signed-off-by: default avatarJulius Goryavsky <julius.goryavsky@mariadb.com>
    3c65434b
mdev-31285.result 641 Bytes