diff options
author | kostja@vajra.(none) <> | 2007-04-05 15:24:34 +0400 |
---|---|---|
committer | kostja@vajra.(none) <> | 2007-04-05 15:24:34 +0400 |
commit | 98db2300865004a4bb573caebc82b25fb5b08911 (patch) | |
tree | 0b971c23e8972589634666ba0253a19e298ee0bf /sql/event_queue.h | |
parent | c392623bf9fd24193673737902c9751a0bea3e3b (diff) | |
download | mariadb-git-98db2300865004a4bb573caebc82b25fb5b08911.tar.gz |
A set of changes aiming to make the Event Scheduler more user-friendly
when there are no up-to-date system tables to support it:
- initialize the scheduler before reporting "Ready for connections".
This ensures that warnings, if any, are printed before "Ready for
connections", and this message is not mangled.
- do not abort the scheduler if there are no system tables
- check the tables once at start up, remember the status and disable
the scheduler if the tables are not up to date.
If one attempts to use the scheduler with bad tables,
issue an error message.
- clean up the behaviour of the module under LOCK TABLES and pre-locking
mode
- make sure implicit commit of Events DDL works as expected.
- add more tests
Collateral clean ups in the events code.
This patch fixes Bug#23631 Events: SHOW VARIABLES doesn't work
when mysql.event is damaged
Diffstat (limited to 'sql/event_queue.h')
-rw-r--r-- | sql/event_queue.h | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/sql/event_queue.h b/sql/event_queue.h index 95f52b7b588..04bb8b93b06 100644 --- a/sql/event_queue.h +++ b/sql/event_queue.h @@ -25,23 +25,16 @@ class Event_queue { public: Event_queue(); - - void - init_mutexes(); - - void - deinit_mutexes(); + ~Event_queue(); bool init_queue(THD *thd); - void - deinit_queue(); - /* Methods for queue management follow */ - void - create_event(THD *thd, Event_queue_element *new_element); + bool + create_event(THD *thd, Event_queue_element *new_element, + bool *created); void update_event(THD *thd, LEX_STRING dbname, LEX_STRING name, @@ -64,9 +57,23 @@ public: void dump_internal_status(); +private: void empty_queue(); -protected: + + void + deinit_queue(); + /* helper functions for working with mutexes & conditionals */ + void + lock_data(const char *func, uint line); + + void + unlock_data(const char *func, uint line); + + void + cond_wait(THD *thd, struct timespec *abstime, const char* msg, + const char *func, uint line); + void find_n_remove_event(LEX_STRING db, LEX_STRING name); @@ -98,16 +105,6 @@ protected: bool mutex_queue_data_attempting_lock; bool waiting_on_cond; - /* helper functions for working with mutexes & conditionals */ - void - lock_data(const char *func, uint line); - - void - unlock_data(const char *func, uint line); - - void - cond_wait(THD *thd, struct timespec *abstime, const char* msg, - const char *func, uint line); }; #endif /* _EVENT_QUEUE_H_ */ |