diff options
author | monty@mysql.com <> | 2005-10-12 00:58:22 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2005-10-12 00:58:22 +0300 |
commit | f5fdf3e87a5f60fdb6442912ae5741a24b2461c8 (patch) | |
tree | ce0e98ba05247bbe755ac299d0ceaa8c42d63b7a /mysys/thr_lock.c | |
parent | 17d7ba931d2293f1db89cbd1107a4bc71bc4fcdf (diff) | |
download | mariadb-git-f5fdf3e87a5f60fdb6442912ae5741a24b2461c8.tar.gz |
Reviewing new pushed code
- CHAR() now returns binary string as default
- CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
- Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
(Some old systems returns ETIME and it's safer to test for both values
than to try to write a wrapper for each old system)
- Fixed new introduced bug in NOT BETWEEN X and X
- Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
- Use octet2hex() for all conversion of string to hex
- Simplify and optimize code
Diffstat (limited to 'mysys/thr_lock.c')
-rw-r--r-- | mysys/thr_lock.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c index 41266d61b0a..f5a8b618949 100644 --- a/mysys/thr_lock.c +++ b/mysys/thr_lock.c @@ -408,9 +408,10 @@ wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data, set_timespec(wait_timeout, table_lock_wait_timeout); while (!thread_var->abort || in_wait_list) { - int rc= can_deadlock ? pthread_cond_timedwait(cond, &data->lock->mutex, - &wait_timeout) : - pthread_cond_wait(cond, &data->lock->mutex); + int rc= (can_deadlock ? + pthread_cond_timedwait(cond, &data->lock->mutex, + &wait_timeout) : + pthread_cond_wait(cond, &data->lock->mutex)); /* We must break the wait if one of the following occurs: - the connection has been aborted (!thread_var->abort), but @@ -426,7 +427,7 @@ wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data, */ if (data->cond == 0) break; - if (rc == ETIMEDOUT) + if (rc == ETIMEDOUT || rc == ETIME) { result= THR_LOCK_WAIT_TIMEOUT; break; |