summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-09-01 10:43:52 +0300
committerunknown <monty@hundin.mysql.fi>2001-09-01 10:43:52 +0300
commit62c3fe9b4be15d08cd19f569eaaad495fd46a1f7 (patch)
treeef4b2588641296838a7ece5d67a5d7cdd1b8ee7a /sql/item_func.cc
parentaaedaa0b7f62eaf40452f85fa7ded59c007037e0 (diff)
parent9591abbd399bb4b85db9da458fba5ed972c97afa (diff)
downloadmariadb-git-62c3fe9b4be15d08cd19f569eaaad495fd46a1f7.tar.gz
Merge work:/home/bk/mysql into hundin.mysql.fi:/my/bk/mysql
sql/item_func.cc: Auto merged
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc16
1 files changed, 5 insertions, 11 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 47adb902107..ac12adb50e0 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -1500,11 +1500,9 @@ longlong Item_func_get_lock::val_int()
/* structure is now initialized. Try to get the lock */
/* Set up control struct to allow others to abort locks */
- pthread_mutex_lock(&thd->mysys_var->mutex);
thd->proc_info="User lock";
thd->mysys_var->current_mutex= &LOCK_user_locks;
thd->mysys_var->current_cond= &ull->cond;
- pthread_mutex_unlock(&thd->mysys_var->mutex);
#ifdef HAVE_TIMESPEC_TS_SEC
abstime.ts_sec=time((time_t*) 0)+(time_t) timeout;
@@ -1514,15 +1512,11 @@ longlong Item_func_get_lock::val_int()
abstime.tv_nsec=0;
#endif
- while ((error=pthread_cond_timedwait(&ull->cond,&LOCK_user_locks,&abstime))
- != ETIME && error != ETIMEDOUT && ull->locked)
- {
- if (thd->killed || abort_loop)
- {
- error=EINTR; // Return NULL
- break;
- }
- }
+ while (!thd->killed &&
+ (error=pthread_cond_timedwait(&ull->cond,&LOCK_user_locks,&abstime))
+ != ETIME && error != ETIMEDOUT && ull->locked) ;
+ if (thd->killed)
+ error=EINTR; // Return NULL
if (ull->locked)
{
if (!--ull->count)