diff options
Diffstat (limited to 'sql/event_scheduler.cc')
-rw-r--r-- | sql/event_scheduler.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/event_scheduler.cc b/sql/event_scheduler.cc index 8c0025f9ed4..06b7bd3fc6a 100644 --- a/sql/event_scheduler.cc +++ b/sql/event_scheduler.cc @@ -338,6 +338,14 @@ Event_scheduler::Event_scheduler(Event_queue *queue_arg) { pthread_mutex_init(&LOCK_scheduler_state, MY_MUTEX_INIT_FAST); pthread_cond_init(&COND_state, NULL); + +#ifdef SAFE_MUTEX + /* Ensure right mutex order */ + pthread_mutex_lock(&LOCK_scheduler_state); + pthread_mutex_lock(&LOCK_global_system_variables); + pthread_mutex_unlock(&LOCK_global_system_variables); + pthread_mutex_unlock(&LOCK_scheduler_state); +#endif } |