summaryrefslogtreecommitdiff
path: root/mysys/thr_alarm.c
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-06-05 12:29:13 +0300
committerunknown <monty@narttu.mysql.fi>2003-06-05 12:29:13 +0300
commitcd7148472a6ed55acb64fd12068729096b29bd26 (patch)
treed938b5da0ff603d0b355b772263eee8066fd8cbe /mysys/thr_alarm.c
parent080f3bd21dcffea0cf386d8e4599afa740628b3b (diff)
downloadmariadb-git-cd7148472a6ed55acb64fd12068729096b29bd26.tar.gz
Print error if we can't delete an alarm
More debugging variables Increment aborted_threads in case of killed or too big packet include/thr_alarm.h: made prototype more portable mysys/thr_alarm.c: Print error if we can't delete an alarm sql/mysqld.cc: Statistics variable (for debugging) sql/net_serv.cc: statistics variable (for debugging) sql/sql_parse.cc: Increment aborted_threads in case of killed or too big packet
Diffstat (limited to 'mysys/thr_alarm.c')
-rw-r--r--mysys/thr_alarm.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c
index a2647ec7399..1f9c4c3b068 100644
--- a/mysys/thr_alarm.c
+++ b/mysys/thr_alarm.c
@@ -127,7 +127,7 @@ void init_thr_alarm(uint max_alarms)
Returns 0 if no more alarms are allowed (aborted by process)
*/
-bool thr_alarm(thr_alarm_t *alrm, uint sec, ALARM *alarm_data)
+my_bool thr_alarm(thr_alarm_t *alrm, uint sec, ALARM *alarm_data)
{
ulong now;
sigset_t old_mask;
@@ -209,7 +209,7 @@ void thr_end_alarm(thr_alarm_t *alarmed)
ALARM *alarm_data;
sigset_t old_mask;
uint i;
- bool found=0;
+ my_bool found=0;
DBUG_ENTER("thr_end_alarm");
pthread_sigmask(SIG_BLOCK,&full_signal_set,&old_mask);
@@ -230,10 +230,9 @@ void thr_end_alarm(thr_alarm_t *alarmed)
DBUG_ASSERT(!*alarmed || found);
if (!found)
{
-#ifdef MAIN
- printf("Warning: Didn't find alarm %lx in queue of %d alarms\n",
- (long) *alarmed, alarm_queue.elements);
-#endif
+ if (*alarmed)
+ fprintf(stderr,"Warning: Didn't find alarm %lx in queue of %d alarms\n",
+ (long) *alarmed, alarm_queue.elements);
DBUG_PRINT("warning",("Didn't find alarm %lx in queue\n",
(long) *alarmed));
}