diff options
author | Mikael Ronstrom <mikael@dator8> | 2010-10-27 20:29:09 +0200 |
---|---|---|
committer | Mikael Ronstrom <mikael@dator8> | 2010-10-27 20:29:09 +0200 |
commit | 4dff0296f402ff4fa6ee69e0411b8136eb5cd816 (patch) | |
tree | 79fcab86e0204b4ed92224d181605277ed44c6e9 /sql/mdl.cc | |
parent | 4cce72a9292c98fab5628adc24c1635e315444e7 (diff) | |
download | mariadb-git-4dff0296f402ff4fa6ee69e0411b8136eb5cd816.tar.gz |
Added more wait states for THD wait service
Diffstat (limited to 'sql/mdl.cc')
-rw-r--r-- | sql/mdl.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/mdl.cc b/sql/mdl.cc index aa7c2a4b7f2..924a005eec7 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -18,6 +18,8 @@ #include "debug_sync.h" #include <hash.h> #include <mysqld_error.h> +#include <mysql/plugin.h> +#include <mysql/service_thd_wait.h> #ifdef HAVE_PSI_INTERFACE static PSI_mutex_key key_MDL_map_mutex; @@ -991,8 +993,12 @@ MDL_wait::timed_wait(THD *thd, struct timespec *abs_timeout, while (!m_wait_status && !thd_killed(thd) && wait_result != ETIMEDOUT && wait_result != ETIME) + { + thd_wait_begin(thd, THD_WAIT_META_DATA_LOCK); wait_result= mysql_cond_timedwait(&m_COND_wait_status, &m_LOCK_wait_status, abs_timeout); + thd_wait_end(thd); + } if (m_wait_status == EMPTY) { |