MySQL 8.3.0
Source Code Documentation
Events Class Reference

A facade to the functionality of the Event Scheduler. More...

#include <events.h>

Public Types

enum  enum_opt_event_scheduler { EVENTS_OFF , EVENTS_ON , EVENTS_DISABLED }
 

Public Member Functions

 Events (const Events &)=delete
 
void operator= (Events &)=delete
 

Static Public Member Functions

static bool start (int *err_no)
 
static bool stop ()
 
static bool init (bool opt_noacl)
 Initializes the scheduler's structures. More...
 
static void deinit ()
 
static void init_mutexes ()
 
static bool create_event (THD *thd, Event_parse_data *parse_data, bool if_exists)
 Create a new event. More...
 
static bool update_event (THD *thd, Event_parse_data *parse_data, const LEX_CSTRING *new_dbname, const LEX_CSTRING *new_name)
 Alter an event. More...
 
static bool drop_event (THD *thd, LEX_CSTRING dbname, LEX_CSTRING name, bool if_exists)
 Drops an event. More...
 
static bool lock_schema_events (THD *thd, const dd::Schema &schema)
 Take exclusive metadata lock on all events in a schema. More...
 
static bool drop_schema_events (THD *thd, const dd::Schema &schema)
 Drops all events from a schema. More...
 
static bool show_create_event (THD *thd, LEX_CSTRING dbname, LEX_CSTRING name)
 Implement SHOW CREATE EVENT statement. More...
 
static int reconstruct_interval_expression (String *buf, interval_type interval, longlong expression)
 
static void dump_internal_status ()
 

Static Public Attributes

static ulong opt_event_scheduler = Events::EVENTS_OFF
 

Static Private Attributes

static Event_queueevent_queue
 
static Event_schedulerscheduler
 

Detailed Description

A facade to the functionality of the Event Scheduler.

Every public operation against the scheduler has to be executed via the interface provided by a static method of this class. No instance of this class is ever created and it has no non-static data members.

The life cycle of the Events module is the following:

At server start up: init_mutexes() -> init() When the server is running: create_event(), drop_event(), start_or_stop_event_scheduler(), etc At shutdown: deinit(), destroy_mutexes().

The peculiar initialization and shutdown cycle is an adaptation to the outside server startup/shutdown framework and mimics the rest of MySQL subsystems (ACL, time zone tables, etc).

Member Enumeration Documentation

◆ enum_opt_event_scheduler

Enumerator
EVENTS_OFF 
EVENTS_ON 
EVENTS_DISABLED 

Constructor & Destructor Documentation

◆ Events()

Events::Events ( const Events )
delete

Member Function Documentation

◆ operator=()

void Events::operator= ( Events )
delete

The documentation for this class was generated from the following files: