diff options
author | Guilhem Bichot <guilhem.bichot@oracle.com> | 2011-05-21 10:59:32 +0200 |
---|---|---|
committer | Guilhem Bichot <guilhem.bichot@oracle.com> | 2011-05-21 10:59:32 +0200 |
commit | 56eec10f1f52cb6dc1cb517a5f0bd2f0dfec4efe (patch) | |
tree | 5ec3599cb2beed91477c85d0593eda12939c1c6e /sql/item_func.cc | |
parent | 3ceec2f19cff22d7b6078b6a8d5788fa19264b8a (diff) | |
parent | fac0e0e05b143b06feb46cc5a8b653e26d8a1e9c (diff) | |
download | mariadb-git-56eec10f1f52cb6dc1cb517a5f0bd2f0dfec4efe.tar.gz |
merge from latest 5.5
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index def0590bef4..d0def6abccb 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -51,6 +51,8 @@ #include "sp.h" #include "set_var.h" #include "debug_sync.h" +#include <mysql/plugin.h> +#include <mysql/service_thd_wait.h> #ifdef NO_EMBEDDED_ACCESS_CHECKS #define sp_restore_security_context(A,B) while (0) {} @@ -3889,6 +3891,7 @@ longlong Item_func_get_lock::val_int() timed_cond.set_timeout(timeout * ULL(1000000000)); error= 0; + thd_wait_begin(thd, THD_WAIT_USER_LOCK); while (ull->locked && !thd->killed) { DBUG_PRINT("info", ("waiting on lock")); @@ -3900,6 +3903,7 @@ longlong Item_func_get_lock::val_int() } error= 0; } + thd_wait_end(thd); if (ull->locked) { @@ -4117,6 +4121,7 @@ longlong Item_func_sleep::val_int() thd->mysys_var->current_cond= &cond; error= 0; + thd_wait_begin(thd, THD_WAIT_SLEEP); while (!thd->killed) { error= timed_cond.wait(&cond, &LOCK_user_locks); @@ -4124,6 +4129,7 @@ longlong Item_func_sleep::val_int() break; error= 0; } + thd_wait_end(thd); thd_proc_info(thd, 0); mysql_mutex_unlock(&LOCK_user_locks); mysql_mutex_lock(&thd->mysys_var->mutex); |