From eb872ceb2710034eb507bfb7f5133022d814c59f Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Sat, 6 Apr 2019 12:33:51 +0300 Subject: Fixed wsrep replaying for stored procedures (#1256) - Changed replaying to always allocate a separate THD object for applying log events. This is to avoid tampering original THD state during replay process. - Return success from sp_instr_stmt::exec_core() if replaying succeeds. - Do not push warnings/errors into diagnostics area if the transaction must be replayed. This is to avoid reporting transient errors to the client. Added two tests galera_sp_bf_abort, galera_sp_insert_parallel. Wsrep-lib position updated. --- sql/wsrep_trans_observer.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sql/wsrep_trans_observer.h') diff --git a/sql/wsrep_trans_observer.h b/sql/wsrep_trans_observer.h index 467b33ea206..e6901f15ca7 100644 --- a/sql/wsrep_trans_observer.h +++ b/sql/wsrep_trans_observer.h @@ -55,6 +55,13 @@ static inline bool wsrep_must_abort(THD* thd) return (thd->wsrep_trx().state() == wsrep::transaction::s_must_abort); } +/* + Return true if the transaction must be replayed. + */ +static inline bool wsrep_must_replay(THD* thd) +{ + return (thd->wsrep_trx().state() == wsrep::transaction::s_must_replay); +} /* Return true if transaction has not been committed. -- cgit v1.2.1