diff options
author | Julius Goryavsky <julius.goryavsky@mariadb.com> | 2021-10-27 11:17:08 +0200 |
---|---|---|
committer | Julius Goryavsky <julius.goryavsky@mariadb.com> | 2021-10-28 03:17:12 +0200 |
commit | 7948a1dc53eccc23095a83daa5fd6b3bfaedf7f2 (patch) | |
tree | 087b8a6e71ef72ea7ddb2c67adfd2c1956f713da | |
parent | 772d6d347dd096c5959cb2b68a4e95ca62cf6cc0 (diff) | |
download | mariadb-git-7948a1dc53eccc23095a83daa5fd6b3bfaedf7f2.tar.gz |
MDEV-26914: Unreleased mutex in the exec_relay_log_event() functionbb-10.4-MDEV-26914-galera
In the replication-related code, in the exec_relay_log_event() (slave.cc)
function, where the "data_lock" mutex is captured, this mutex is then not
released on one of the early return branches within a specific insert for
WSREP, namely under the branch: "if (wsrep_before_statement(thd))". As a
result, the mutex remains captured, resulting in errors or hangs.
This commit fixes this issue, which is now showing up as intermittent
failures in mtr tests for galera and galera_sr suites.
-rw-r--r-- | sql/slave.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index 31bd9372a14..68ddc611c03 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -4124,6 +4124,8 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli, #ifdef WITH_WSREP if (wsrep_before_statement(thd)) { + mysql_mutex_unlock(&rli->data_lock); + delete ev; WSREP_INFO("Wsrep before statement error"); DBUG_RETURN(1); } |