diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-08-26 12:02:07 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-08-26 12:02:07 +0300 |
commit | 97a4a3872e5037b8db1e8c27152740190330ab9c (patch) | |
tree | 4ac50bc687f7f1e55f4d4ff25e8a96555501e2bf /sql/mdl.cc | |
parent | 8f8f2aea93835899345454f87768fd649749e29c (diff) | |
parent | 1e08e08ccb8896c1f0d2f673c16f5b92cdf7dc46 (diff) | |
download | mariadb-git-97a4a3872e5037b8db1e8c27152740190330ab9c.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'sql/mdl.cc')
-rw-r--r-- | sql/mdl.cc | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/sql/mdl.cc b/sql/mdl.cc index 240ef97b1c4..4772dc017f9 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -25,9 +25,6 @@ #include <mysql/plugin.h> #include <mysql/service_thd_wait.h> #include <mysql/psi/mysql_stage.h> -#ifdef WITH_WSREP -#include "wsrep_sst.h" -#endif #include <tpool.h> #include <pfs_metadata_provider.h> #include <mysql/psi/mysql_mdl.h> @@ -2335,26 +2332,18 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout) wait_status= m_wait.timed_wait(m_owner, &abs_shortwait, FALSE, mdl_request->key.get_wait_state_name()); - THD* thd= m_owner->get_thd(); - 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(m_owner->get_thd())) { -#if defined(WITH_WSREP) && !defined(EMBEDDED_LIBRARY) - // 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); |