diff options
author | kroki/tomash@moonlight.home <> | 2007-01-29 20:46:29 +0300 |
---|---|---|
committer | kroki/tomash@moonlight.home <> | 2007-01-29 20:46:29 +0300 |
commit | c06c7356e396f4e8a98ad8418efa20b790bac08e (patch) | |
tree | 566186260c06200f3bb46b87d5efcc4abf285756 /sql/events.h | |
parent | db5c164688d4fa6a23496fa9f0003fb8e0c47a8f (diff) | |
download | mariadb-git-c06c7356e396f4e8a98ad8418efa20b790bac08e.tar.gz |
Fix for bug#22740 Events: Decouple Event_queue from Event_db_repository
This patch implements the idea of the bug report by making Event_queue
unaware of Event_db_repository by making a higher level class - Events,
which is aware of most of all classes, responsible for passing all data
needed for adding/updating/deleting an event to/from the queue.
Introduces few new classes :
- Event_worker_thread
- Event_queue_element_for_exec
Diffstat (limited to 'sql/events.h')
-rw-r--r-- | sql/events.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/sql/events.h b/sql/events.h index 621ab0ffca5..35ee3c569d0 100644 --- a/sql/events.h +++ b/sql/events.h @@ -42,13 +42,6 @@ sortcmp_lex_string(LEX_STRING s, LEX_STRING t, CHARSET_INFO *cs); class Events { public: - /* - Quite NOT the best practice and will be removed once - Event_timed::drop() and Event_timed is fixed not do drop directly - or other scheme will be found. - */ - friend class Event_queue_element; - /* The order should match the order in opt_typelib */ enum enum_opt_event_scheduler { @@ -92,15 +85,11 @@ public: update_event(THD *thd, Event_parse_data *parse_data, sp_name *rename_to); bool - drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists, - bool only_from_disk); + drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists); void drop_schema_events(THD *thd, char *db); - int - open_event_table(THD *thd, enum thr_lock_type lock_type, TABLE **table); - bool show_create_event(THD *thd, LEX_STRING dbname, LEX_STRING name); @@ -119,6 +108,9 @@ private: bool check_system_tables(THD *thd); + int + load_events_from_db(THD *thd); + /* Singleton DP is used */ Events(); ~Events(){} |