mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
5.5 merge
This commit is contained in:
12
sql/mdl.cc
12
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>
|
||||
@@ -1185,7 +1185,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,
|
||||
@@ -1207,7 +1207,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;
|
||||
@@ -2078,7 +2078,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);
|
||||
|
Reference in New Issue
Block a user