summaryrefslogtreecommitdiff
path: root/sql/wsrep_trans_observer.h
diff options
context:
space:
mode:
authorTeemu Ollakka <teemu.ollakka@galeracluster.com>2019-04-06 12:33:51 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2019-04-06 12:33:51 +0300
commiteb872ceb2710034eb507bfb7f5133022d814c59f (patch)
tree26af870c685195ed480498bebccf2603272c9fc0 /sql/wsrep_trans_observer.h
parentfe62ff6e1c8d6931935a0f9a10613abf93e3668f (diff)
downloadmariadb-git-eb872ceb2710034eb507bfb7f5133022d814c59f.tar.gz
Fixed wsrep replaying for stored procedures (#1256)mariadb-10.4.4
- 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.
Diffstat (limited to 'sql/wsrep_trans_observer.h')
-rw-r--r--sql/wsrep_trans_observer.h7
1 files changed, 7 insertions, 0 deletions
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
@@ -56,6 +56,13 @@ static inline bool wsrep_must_abort(THD* thd)
}
/*
+ 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.
Note that we don't require thd->LOCK_thd_data here. Calling this method