diff options
Diffstat (limited to 'sql/events.h')
-rw-r--r-- | sql/events.h | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/sql/events.h b/sql/events.h index f14aed0fbd1..4ea91baf64c 100644 --- a/sql/events.h +++ b/sql/events.h @@ -42,59 +42,59 @@ sortcmp_lex_string(LEX_STRING s, LEX_STRING t, CHARSET_INFO *cs); class Events { public: - friend class Event_queue_element; /* 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; static ulong opt_event_scheduler; static TYPELIB opt_typelib; bool init(); - + void deinit(); void init_mutexes(); - + void destroy_mutexes(); bool start_execution_of_events(); - + bool stop_execution_of_events(); - + bool - is_started(); + is_execution_of_events_started(); - static Events* + static Events * get_instance(); - int + bool create_event(THD *thd, Event_parse_data *parse_data, bool if_exists, uint *rows_affected); - int + bool update_event(THD *thd, Event_parse_data *parse_data, sp_name *rename_to, uint *rows_affected); - int + bool drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists, uint *rows_affected, bool only_from_disk); - int + void drop_schema_events(THD *thd, char *db); int open_event_table(THD *thd, enum thr_lock_type lock_type, TABLE **table); - int + bool show_create_event(THD *thd, LEX_STRING dbname, LEX_STRING name); /* Needed for both SHOW CREATE EVENT and INFORMATION_SCHEMA */ @@ -104,23 +104,28 @@ public: static int fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */); - + bool dump_internal_status(THD *thd); private: + bool + check_system_tables(THD *thd); + /* Singleton DP is used */ - Events(){} + Events(); ~Events(){} /* Singleton instance */ static Events singleton; Event_queue *event_queue; - Event_scheduler *scheduler; + Event_scheduler *scheduler; Event_db_repository *db_repository; - pthread_mutex_t LOCK_event_metadata; + pthread_mutex_t LOCK_event_metadata; + + bool check_system_tables_error; /* Prevent use of these */ Events(const Events &); |