diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-03-23 12:58:57 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-03-23 12:58:57 +0200 |
commit | bcedcb132815f67f9921b413c0dddd87393b8b28 (patch) | |
tree | 13db70b80fed0ee2e052ecf09656a230db2d1df1 | |
parent | 02fe99750536aad7c9e75513be47c91c8c568419 (diff) | |
parent | 24d1e07b3e0c45a6bf4c1180466266424c3955a1 (diff) | |
download | mariadb-git-bb-10.5-MDEV-21988.tar.gz |
Merge branch 'codership-10.5-MDEV-21988' into 10.5bb-10.5-MDEV-21988
-rw-r--r-- | sql/wsrep_schema.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sql/wsrep_schema.cc b/sql/wsrep_schema.cc index 95c788ba806..80bc53b1790 100644 --- a/sql/wsrep_schema.cc +++ b/sql/wsrep_schema.cc @@ -139,6 +139,25 @@ private: my_bool m_wsrep_on; }; +class thd_server_status +{ +public: + thd_server_status(THD* thd, uint server_status, bool condition) + : m_thd(thd) + , m_thd_server_status(thd->server_status) + { + if (condition) + thd->server_status= server_status; + } + ~thd_server_status() + { + m_thd->server_status= m_thd_server_status; + } +private: + THD* m_thd; + uint m_thd_server_status; +}; + class thd_context_switch { public: @@ -1094,6 +1113,9 @@ int Wsrep_schema::remove_fragments(THD* thd, } else { + Wsrep_schema_impl::thd_server_status + thd_server_status(thd, thd->server_status | SERVER_STATUS_IN_TRANS, + thd->in_multi_stmt_transaction_mode()); Wsrep_schema_impl::finish_stmt(thd); } |