summaryrefslogtreecommitdiff
path: root/sql/event_queue.h
diff options
context:
space:
mode:
authorandrey@lmy004. <>2006-07-13 10:59:58 +0200
committerandrey@lmy004. <>2006-07-13 10:59:58 +0200
commitdd31d457898e129a9f22363741101780e028038f (patch)
treefb7407480fd7ae1b764e1bf59ec33047559bf6dd /sql/event_queue.h
parent3f4e1f5c695215cd18222c359fa56eea4ab63664 (diff)
downloadmariadb-git-dd31d457898e129a9f22363741101780e028038f.tar.gz
WL #3337 (Events new architecture)
Final stroke, events should be loaded from disk on server startup. Also check the validity of their bodies if possible during loading.
Diffstat (limited to 'sql/event_queue.h')
-rw-r--r--sql/event_queue.h31
1 files changed, 17 insertions, 14 deletions
diff --git a/sql/event_queue.h b/sql/event_queue.h
index b7962d14a89..3270938e881 100644
--- a/sql/event_queue.h
+++ b/sql/event_queue.h
@@ -68,12 +68,13 @@ public:
bool
dump_internal_status(THD *thd);
+ int
+ load_events_from_db(THD *thd);
+
protected:
Event_queue_element *
find_n_remove_event(LEX_STRING db, LEX_STRING name);
- int
- load_events_from_db(THD *thd);
void
drop_matching_events(THD *thd, LEX_STRING pattern,
@@ -82,11 +83,24 @@ protected:
void
empty_queue();
+ void
+ notify_observers();
+
+ void
+ dbug_dump_queue(time_t now);
+
/* LOCK_event_queue is the mutex which protects the access to the queue. */
pthread_mutex_t LOCK_event_queue;
Event_db_repository *db_repository;
+ Event_scheduler *scheduler;
+
+ /* The sorted queue with the Event_job_data objects */
+ QUEUE queue;
+
+ bool queue_loaded;
+
uint mutex_last_locked_at_line;
uint mutex_last_unlocked_at_line;
uint mutex_last_attempted_lock_at_line;
@@ -95,24 +109,13 @@ protected:
const char* mutex_last_attempted_lock_in_func;
bool mutex_queue_data_locked;
bool mutex_queue_data_attempting_lock;
-
+
/* helper functions for working with mutexes & conditionals */
void
lock_data(const char *func, uint line);
void
unlock_data(const char *func, uint line);
-
- void
- notify_observers();
-
- void
- dbug_dump_queue(time_t now);
-
- Event_scheduler *scheduler;
-
- /* The sorted queue with the Event_job_data objects */
- QUEUE queue;
};
#endif /* _EVENT_QUEUE_H_ */