diff options
author | unknown <monty@hundin.mysql.fi> | 2001-09-01 10:43:52 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-09-01 10:43:52 +0300 |
commit | 62c3fe9b4be15d08cd19f569eaaad495fd46a1f7 (patch) | |
tree | ef4b2588641296838a7ece5d67a5d7cdd1b8ee7a /sql/item_func.cc | |
parent | aaedaa0b7f62eaf40452f85fa7ded59c007037e0 (diff) | |
parent | 9591abbd399bb4b85db9da458fba5ed972c97afa (diff) | |
download | mariadb-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.cc | 16 |
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) |