diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-03-21 11:37:10 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-03-21 11:37:10 +0200 |
commit | 5203bc10f1f545131d01c253163ba06b6218be2c (patch) | |
tree | bb28122ee8a279bd9ad9b0358ac131356a80a7e8 /sql/wsrep_trans_observer.h | |
parent | 76cdc1d73ec0215c91725a8507da7bda416c52ec (diff) | |
parent | 9394cc89143e4fce3126a96ac1c8a91a66d71dea (diff) | |
download | mariadb-git-5203bc10f1f545131d01c253163ba06b6218be2c.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'sql/wsrep_trans_observer.h')
-rw-r--r-- | sql/wsrep_trans_observer.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/sql/wsrep_trans_observer.h b/sql/wsrep_trans_observer.h index 5f68da684e5..cb58026207b 100644 --- a/sql/wsrep_trans_observer.h +++ b/sql/wsrep_trans_observer.h @@ -361,15 +361,22 @@ static inline int wsrep_before_rollback(THD* thd, bool all) int ret= 0; if (wsrep_is_active(thd)) { - if (!all && thd->in_active_multi_stmt_transaction() && - thd->wsrep_trx().is_streaming() && - !wsrep_stmt_rollback_is_safe(thd)) + if (!all && thd->in_active_multi_stmt_transaction()) { - /* Non-safe statement rollback during SR multi statement - transasction. Self abort the transaction, the actual rollback - and error handling will be done in after statement phase. */ - wsrep_thd_self_abort(thd); - ret= 0; + if (wsrep_emulate_bin_log) + { + wsrep_thd_binlog_stmt_rollback(thd); + } + + if (thd->wsrep_trx().is_streaming() && + !wsrep_stmt_rollback_is_safe(thd)) + { + /* Non-safe statement rollback during SR multi statement + transasction. Self abort the transaction, the actual rollback + and error handling will be done in after statement phase. */ + wsrep_thd_self_abort(thd); + ret= 0; + } } else if (wsrep_is_real(thd, all) && thd->wsrep_trx().state() != wsrep::transaction::s_aborted) |