diff options
author | Michael Widenius <monty@askmonty.org> | 2011-05-10 18:17:43 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-05-10 18:17:43 +0300 |
commit | f34be1893892745b5b1a7a099eab4ad8e9ac8641 (patch) | |
tree | d7eed818fd8b648e5eabe0dbad53e61665d8dc37 /sql/event_scheduler.cc | |
parent | e843297d128b165125d17aab8958f7ca91808923 (diff) | |
parent | 8882d71f3f1dd03ef98d072def39b29e6a03f5b8 (diff) | |
download | mariadb-git-f34be1893892745b5b1a7a099eab4ad8e9ac8641.tar.gz |
Merge with MariaDB 5.2
Diffstat (limited to 'sql/event_scheduler.cc')
-rw-r--r-- | sql/event_scheduler.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/event_scheduler.cc b/sql/event_scheduler.cc index 4d6636eedb2..ecddcb7ca46 100644 --- a/sql/event_scheduler.cc +++ b/sql/event_scheduler.cc @@ -648,7 +648,14 @@ Event_scheduler::stop() /* thd could be 0x0, when shutting down */ sql_print_information("Event Scheduler: " "Waiting for the scheduler thread to reply"); - COND_STATE_WAIT(thd, NULL, "Waiting scheduler to stop"); + + /* + Wait only 2 seconds, as there is a small chance the thread missed the + above awake() call and we may have to do it again + */ + struct timespec top_time; + set_timespec(top_time, 2); + COND_STATE_WAIT(thd, &top_time, "Waiting scheduler to stop"); } while (state == STOPPING); DBUG_PRINT("info", ("Scheduler thread has cleaned up. Set state to INIT")); sql_print_information("Event Scheduler: Stopped"); |