Commit 1eb0f45d authored by jimw@mysql.com's avatar jimw@mysql.com

Fix minor typo in handling of error conditions and return of SLEEP().

parent 15f97778
...@@ -3269,7 +3269,7 @@ longlong Item_func_sleep::val_int() ...@@ -3269,7 +3269,7 @@ longlong Item_func_sleep::val_int()
THD *thd= current_thd; THD *thd= current_thd;
struct timespec abstime; struct timespec abstime;
pthread_cond_t cond; pthread_cond_t cond;
int error= 0; int error;
DBUG_ASSERT(fixed == 1); DBUG_ASSERT(fixed == 1);
...@@ -3284,7 +3284,7 @@ longlong Item_func_sleep::val_int() ...@@ -3284,7 +3284,7 @@ longlong Item_func_sleep::val_int()
while (!thd->killed && while (!thd->killed &&
(error= pthread_cond_timedwait(&cond, &LOCK_user_locks, (error= pthread_cond_timedwait(&cond, &LOCK_user_locks,
&abstime) != ETIMEDOUT) && &abstime)) != ETIMEDOUT &&
error != EINVAL) ; error != EINVAL) ;
pthread_mutex_lock(&thd->mysys_var->mutex); pthread_mutex_lock(&thd->mysys_var->mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment