summaryrefslogtreecommitdiff
path: root/sql/sql_manager.cc
diff options
context:
space:
mode:
authormonty@mysql.com <>2005-10-12 00:58:22 +0300
committermonty@mysql.com <>2005-10-12 00:58:22 +0300
commitf5fdf3e87a5f60fdb6442912ae5741a24b2461c8 (patch)
treece0e98ba05247bbe755ac299d0ceaa8c42d63b7a /sql/sql_manager.cc
parent17d7ba931d2293f1db89cbd1107a4bc71bc4fcdf (diff)
downloadmariadb-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 'sql/sql_manager.cc')
-rw-r--r--sql/sql_manager.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/sql/sql_manager.cc b/sql/sql_manager.cc
index 0af6a80d4c2..54599314293 100644
--- a/sql/sql_manager.cc
+++ b/sql/sql_manager.cc
@@ -58,12 +58,14 @@ extern "C" pthread_handler_decl(handle_manager,arg __attribute__((unused)))
set_timespec(abstime, flush_time);
reset_flush_time = FALSE;
}
- while (!manager_status && !error && !abort_loop)
- error = pthread_cond_timedwait(&COND_manager, &LOCK_manager, &abstime);
+ while (!manager_status && (!error || error == EINTR) && !abort_loop)
+ error= pthread_cond_timedwait(&COND_manager, &LOCK_manager, &abstime);
}
else
- while (!manager_status && !error && !abort_loop)
- error = pthread_cond_wait(&COND_manager, &LOCK_manager);
+ {
+ while (!manager_status && (!error || error == EINTR) && !abort_loop)
+ error= pthread_cond_wait(&COND_manager, &LOCK_manager);
+ }
status = manager_status;
manager_status = 0;
pthread_mutex_unlock(&LOCK_manager);
@@ -71,7 +73,7 @@ extern "C" pthread_handler_decl(handle_manager,arg __attribute__((unused)))
if (abort_loop)
break;
- if (error) /* == ETIMEDOUT */
+ if (error == ETIMEDOUT || error == ETIME)
{
flush_tables();
error = 0;