diff options
author | Seppo Jaakola <seppo.jaakola@codership.com> | 2013-02-05 20:19:47 +0200 |
---|---|---|
committer | Seppo Jaakola <seppo.jaakola@codership.com> | 2013-02-05 20:19:47 +0200 |
commit | 18c97eea5cc53962c5148eb9f42d6764c8629949 (patch) | |
tree | e818c786de1f524b33b80b612549a6486901a103 /sql/mdl.cc | |
parent | d5dc568f9be19c5b3f0d003ec6a71a610fd32212 (diff) | |
parent | bfd179e8ed5fcbad67880933d85d8852d05c7f3b (diff) | |
download | mariadb-git-18c97eea5cc53962c5148eb9f42d6764c8629949.tar.gz |
References lp:1115708 - merged with lp:mariadb/5.5 revision 3657
Diffstat (limited to 'sql/mdl.cc')
-rw-r--r-- | sql/mdl.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sql/mdl.cc b/sql/mdl.cc index e2c633b486e..32a4d8cbbf5 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -14,7 +14,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "mdl.h" +#include "sql_class.h" #include "debug_sync.h" #include <hash.h> #include <mysqld_error.h> @@ -1195,7 +1195,7 @@ MDL_wait::timed_wait(THD *thd, struct timespec *abs_timeout, wait_state_name); thd_wait_begin(thd, THD_WAIT_META_DATA_LOCK); - while (!m_wait_status && !thd_killed(thd) && + while (!m_wait_status && !thd->killed && wait_result != ETIMEDOUT && wait_result != ETIME) { wait_result= mysql_cond_timedwait(&m_COND_wait_status, &m_LOCK_wait_status, @@ -1217,7 +1217,7 @@ MDL_wait::timed_wait(THD *thd, struct timespec *abs_timeout, false, which means that the caller intends to restart the wait. */ - if (thd_killed(thd)) + if (thd->killed) m_wait_status= KILLED; else if (set_status_on_timeout) m_wait_status= TIMEOUT; @@ -2180,7 +2180,11 @@ MDL_context::acquire_lock(MDL_request *mdl_request, ulong lock_wait_timeout) */ m_wait.reset_status(); - if (lock->needs_notification(ticket)) + /* + Don't break conflicting locks if timeout is 0 as 0 is used + To check if there is any conflicting locks... + */ + if (lock->needs_notification(ticket) && lock_wait_timeout) lock->notify_conflicting_locks(this); mysql_prlock_unlock(&lock->m_rwlock); |