From 3be9982f6a9f2bcd2e5ad00f403a4598ba5afb99 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Thu, 14 Feb 2019 15:30:54 +0200 Subject: [PATCH] MDEV-18571 Fix wsrep PS protocol crash Calls to wsrep_after_statement() were missing on PS protocol codepath. Added calls after mysqld_stmt_execute() and mysqld_stmt_bulk_execute(). --- sql/sql_parse.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 25dfdbcbc71..57cec6bacff 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1729,11 +1729,23 @@ bool dispatch_command(enum enum_server_command command, THD *thd, case COM_STMT_BULK_EXECUTE: { mysqld_stmt_bulk_execute(thd, packet, packet_length); +#ifdef WITH_WSREP + if (WSREP_ON) + { + (void)wsrep_after_statement(thd); + } +#endif /* WITH_WSREP */ break; } case COM_STMT_EXECUTE: { mysqld_stmt_execute(thd, packet, packet_length); +#ifdef WITH_WSREP + if (WSREP_ON) + { + (void)wsrep_after_statement(thd); + } +#endif /* WITH_WSREP */ break; } case COM_STMT_FETCH: