summaryrefslogtreecommitdiff
path: root/sql/event_scheduler.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/event_scheduler.h')
-rw-r--r--sql/event_scheduler.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/sql/event_scheduler.h b/sql/event_scheduler.h
index cc6d0f7a20a..18a805eb6f6 100644
--- a/sql/event_scheduler.h
+++ b/sql/event_scheduler.h
@@ -31,12 +31,13 @@ deinit_event_thread(THD *thd);
class Event_scheduler
{
public:
- Event_scheduler(){}
+ Event_scheduler():state(UNINITIALIZED){}
~Event_scheduler(){}
enum enum_state
{
- INITIALIZED = 0,
+ UNINITIALIZED = 0,
+ INITIALIZED,
RUNNING,
STOPPING
};
@@ -50,12 +51,12 @@ public:
stop();
/*
- Need to be public because has to be called from the function
+ Need to be public because has to be called from the function
passed to pthread_create.
*/
bool
run(THD *thd);
-
+
void
init_scheduler(Event_queue *queue);
@@ -64,7 +65,7 @@ public:
void
init_mutexes();
-
+
void
deinit_mutexes();
@@ -112,7 +113,7 @@ private:
ulong thread_id;
pthread_cond_t COND_state;
-
+
Event_queue *queue;
uint mutex_last_locked_at_line;
@@ -121,7 +122,7 @@ private:
const char* mutex_last_unlocked_in_func;
bool mutex_scheduler_data_locked;
bool waiting_on_cond;
-
+
ulonglong started_events;
private: