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_scheduler.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_scheduler.h')
-rw-r--r-- | sql/event_scheduler.h | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/sql/event_scheduler.h b/sql/event_scheduler.h index 74d53c4f63d..70635196745 100644 --- a/sql/event_scheduler.h +++ b/sql/event_scheduler.h @@ -15,7 +15,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* +/** + @file This file is internal to Events module. Please do not include it directly. All public declarations of Events module are in events.h and event_data_objects.h. @@ -41,10 +42,9 @@ class Event_worker_thread { public: static void - init(Events *events, Event_db_repository *db_repo) + init(Event_db_repository *db_repository_arg) { - db_repository= db_repo; - events_facade= events; + db_repository= db_repository_arg; } void @@ -55,15 +55,15 @@ private: print_warnings(THD *thd, Event_job_data *et); static Event_db_repository *db_repository; - static Events *events_facade; }; class Event_scheduler { public: - Event_scheduler():state(UNINITIALIZED){} - ~Event_scheduler(){} + Event_scheduler(Event_queue *event_queue_arg); + ~Event_scheduler(); + /* State changing methods follow */ @@ -80,17 +80,6 @@ public: bool run(THD *thd); - void - init_scheduler(Event_queue *queue); - - void - deinit_scheduler(); - - void - init_mutexes(); - - void - deinit_mutexes(); /* Information retrieving methods follow */ bool |