diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-08-11 08:46:12 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-08-11 08:46:12 +0300 |
commit | eea9f8052208a126a10b7f6180a7dd83e9d82dc9 (patch) | |
tree | 77e2638d035d082d57534ed99d63d246645e630a | |
parent | 76e94a45bb5678e634e0590e9ed5a989631f641a (diff) | |
download | mariadb-git-bb-10.2-MDEV-22543.tar.gz |
Fix test.bb-10.2-MDEV-22543
-rw-r--r-- | sql/mdl.cc | 25 | ||||
-rw-r--r-- | sql/wsrep_sst.cc | 10 |
2 files changed, 21 insertions, 14 deletions
diff --git a/sql/mdl.cc b/sql/mdl.cc index 85fe6896189..14a1f17fe86 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -2143,20 +2143,21 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout) if (wait_status != MDL_wait::EMPTY) break; /* Check if the client is gone while we were waiting. */ - if (! thd_is_connected(thd) + if (! thd_is_connected(thd)) + { #if defined(WITH_WSREP) && !defined(EMBEDDED_LIBRARY) - // During SST client might not be connected - && WSREP(thd) && !wsrep_is_sst_progress() + // During SST client might not be connected + if (!wsrep_is_sst_progress()) #endif - ) - { - /* - * The client is disconnected. Don't wait forever: - * assume it's the same as a wait timeout, this - * ensures all error handling is correct. - */ - wait_status= MDL_wait::TIMEOUT; - break; + { + /* + * The client is disconnected. Don't wait forever: + * assume it's the same as a wait timeout, this + * ensures all error handling is correct. + */ + wait_status= MDL_wait::TIMEOUT; + break; + } } mysql_prlock_wrlock(&lock->m_rwlock); diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc index c63f357ad30..a6accd52910 100644 --- a/sql/wsrep_sst.cc +++ b/sql/wsrep_sst.cc @@ -192,6 +192,7 @@ bool wsrep_before_SE() static bool sst_complete = false; static bool sst_needed = false; +static bool sst_in_progress = false; #define WSREP_EXTEND_TIMEOUT_INTERVAL 30 #define WSREP_TIMEDWAIT_SECONDS 10 @@ -1542,7 +1543,10 @@ static void* sst_donor_thread (void* a) char out_buf[out_len]; wsrep_uuid_t ret_uuid= WSREP_UUID_UNDEFINED; - wsrep_seqno_t ret_seqno= WSREP_SEQNO_UNDEFINED; // seqno of complete SST + // seqno of complete SST + wsrep_seqno_t ret_seqno= WSREP_SEQNO_UNDEFINED; + // SST is now in progress + sst_in_progress= true; wsp::thd thd(FALSE); // we turn off wsrep_on for this THD so that it can // operate with wsrep_ready == OFF @@ -1644,6 +1648,8 @@ wait_signal: wsrep->sst_sent (wsrep, &state_id, -err); proc.wait(); + sst_in_progress= false; + return NULL; } @@ -1821,5 +1827,5 @@ void wsrep_SE_initialized() bool wsrep_is_sst_progress() { - return (sst_needed && !sst_complete); + return (sst_in_progress); } |