From 958ad5a880b3db4536f7814007714fddd89884e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Wed, 8 Nov 2017 12:25:46 +0200 Subject: [PATCH] MW-388 Fix conflict handling of SPs with DECLARE ... HANDLER Adapt to MariaDB case --- sql/sql_parse.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index f28bf1044e0..b908c4dac7f 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -5621,7 +5621,7 @@ finish: if (thd->is_error() || (thd->variables.option_bits & OPTION_MASTER_SQL_ERROR)) trans_rollback_stmt(thd); #ifdef WITH_WSREP - else if (thd->sp_runtime_ctx && + else if (thd->spcont && !thd->is_error() && !thd->in_multi_stmt_transaction_mode() && (thd->wsrep_conflict_state == MUST_ABORT || @@ -5637,7 +5637,7 @@ finish: */ trans_rollback_stmt(thd); thd->wsrep_conflict_state= NO_CONFLICT; - thd->killed= THD::NOT_KILLED; + thd->killed= NOT_KILLED; } #endif /* WITH_WSREP */ else