diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2019-12-09 08:09:56 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2019-12-09 08:14:39 +0200 |
commit | 59e14b96847e458909ca7fcf95b144fd6ccdb708 (patch) | |
tree | 628e51778090c87021cb3cfba7d6724695133d79 /sql/wsrep_mysqld.cc | |
parent | fd1979bc9a535735ed3f3a7dbb67d09568dd8417 (diff) | |
download | mariadb-git-59e14b96847e458909ca7fcf95b144fd6ccdb708.tar.gz |
MDEV-21189: Dropping partition with 'wsrep_OSU_method=RSU' and 'SESSION sql_log_bin = 0' cases the galera node to hang
Found two bugs
(1) have_committing_connections was missing mutex unlock on one
exit case. As this function is called on a loop it caused mutex
lock when we already owned the mutex. This could cause hang.
(2) wsrep_RSU_begin did set up error code when partition to
be dropped could not be MDL-locked because of concurrent
operations but wrong error code was propagated to upper layer
causing error to be ignored. This could have also caused
the hang.
Diffstat (limited to 'sql/wsrep_mysqld.cc')
-rw-r--r-- | sql/wsrep_mysqld.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 062c9dcd74c..cfcc04bff2c 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -1784,7 +1784,7 @@ static int wsrep_RSU_begin(THD *thd, char *db_, char *table_) } my_error(ER_LOCK_DEADLOCK, MYF(0)); - return(1); + return(-1); } wsrep_seqno_t seqno = wsrep->pause(wsrep); @@ -2311,6 +2311,7 @@ static my_bool have_committing_connections() if (is_committing_connection(tmp)) { + mysql_mutex_unlock(&LOCK_thread_count); return TRUE; } } |