diff options
author | Michael Widenius <monty@askmonty.org> | 2010-11-02 11:03:33 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-11-02 11:03:33 +0200 |
commit | c4a5cf111bb1a2ecc2de14478a679283b081e3b2 (patch) | |
tree | 06fc72775ec3407f9d9a31187c41e879255ec813 /mysys/thr_alarm.c | |
parent | d48a8b60345c5b5f95c2ce590f7032a7c9f87c4b (diff) | |
download | mariadb-git-c4a5cf111bb1a2ecc2de14478a679283b081e3b2.tar.gz |
Fixed wrong queue_replace(), which caused timeout failure in pbxt.flush_read_lock_kill
Fixed compiler warnings.
include/queues.h:
Added prototype for queue_replace()
mysys/queues.c:
Fixed wrong queue_replace()
mysys/thr_alarm.c:
Added DBUG_PRINT
sql/item_subselect.cc:
Check return value of ha_rnd_init().
(Fixes compiler warnings)
sql/sql_class.cc:
Fixed wrong test
sql/sql_show.cc:
Removed not used variable.
Diffstat (limited to 'mysys/thr_alarm.c')
-rw-r--r-- | mysys/thr_alarm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c index f7ff20c9b23..15c24facac0 100644 --- a/mysys/thr_alarm.c +++ b/mysys/thr_alarm.c @@ -465,6 +465,8 @@ void end_thr_alarm(my_bool free_structures) void thr_alarm_kill(my_thread_id thread_id) { uint i; + DBUG_ENTER("thr_alarm_kill"); + if (alarm_aborted) return; pthread_mutex_lock(&LOCK_alarm); @@ -475,6 +477,7 @@ void thr_alarm_kill(my_thread_id thread_id) ALARM *element= (ALARM*) queue_element(&alarm_queue,i); if (element->thread_id == thread_id) { + DBUG_PRINT("info", ("found thread; Killing it")); element->expire_time= 0; queue_replace(&alarm_queue, i); reschedule_alarms(); @@ -482,6 +485,7 @@ void thr_alarm_kill(my_thread_id thread_id) } } pthread_mutex_unlock(&LOCK_alarm); + DBUG_VOID_RETURN; } |