diff options
Diffstat (limited to 'sql/event_queue.cc')
-rw-r--r-- | sql/event_queue.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sql/event_queue.cc b/sql/event_queue.cc index 2a354fe6cfd..c551cf74095 100644 --- a/sql/event_queue.cc +++ b/sql/event_queue.cc @@ -748,12 +748,14 @@ Event_queue::cond_wait(THD *thd, struct timespec *abstime, const char* msg, thd->enter_cond(&COND_queue_state, &LOCK_event_queue, msg); - DBUG_PRINT("info", ("pthread_cond_%swait", abstime? "timed":"")); - if (!abstime) - pthread_cond_wait(&COND_queue_state, &LOCK_event_queue); - else - pthread_cond_timedwait(&COND_queue_state, &LOCK_event_queue, abstime); - + if (!thd->killed) + { + DBUG_PRINT("info", ("pthread_cond_%swait", abstime ? "timed" : "")); + if (!abstime) + pthread_cond_wait(&COND_queue_state, &LOCK_event_queue); + else + pthread_cond_timedwait(&COND_queue_state, &LOCK_event_queue, abstime); + } mutex_last_locked_in_func= func; mutex_last_locked_at_line= line; mutex_queue_data_locked= TRUE; |