1 #ifndef _EVENT_DB_REPOSITORY_H_
2 #define _EVENT_DB_REPOSITORY_H_
3 /* Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; version 2 of the License.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
19 @addtogroup Event_Scheduler
22 @file event_db_repository.h
24 Data Dictionary related operations of Event Scheduler.
26 This is a private header file of Events module. Please do not include it
27 directly. All public declarations of Events module should be stored in
28 events.h and event_data_objects.h.
31 enum enum_events_table_field
38 ET_FIELD_INTERVAL_EXPR
,
39 ET_FIELD_TRANSIENT_INTERVAL
,
42 ET_FIELD_LAST_EXECUTED
,
46 ET_FIELD_ON_COMPLETION
,
51 ET_FIELD_CHARACTER_SET_CLIENT
,
52 ET_FIELD_COLLATION_CONNECTION
,
53 ET_FIELD_DB_COLLATION
,
55 ET_FIELD_COUNT
/* a cool trick to count the number of fields :) */
60 events_table_index_read_for_db(THD
*thd
, TABLE
*schema_table
,
64 events_table_scan_all(THD
*thd
, TABLE
*schema_table
, TABLE
*event_table
);
68 class Event_parse_data
;
70 class Event_db_repository
73 Event_db_repository(){}
76 create_event(THD
*thd
, Event_parse_data
*parse_data
, bool create_if_not
,
77 bool *event_already_exists
);
80 update_event(THD
*thd
, Event_parse_data
*parse_data
, LEX_STRING
*new_dbname
,
81 LEX_STRING
*new_name
);
84 drop_event(THD
*thd
, LEX_STRING db
, LEX_STRING name
, bool drop_if_exists
);
87 drop_schema_events(THD
*thd
, LEX_STRING schema
);
90 find_named_event(LEX_STRING db
, LEX_STRING name
, TABLE
*table
);
93 load_named_event(THD
*thd
, LEX_STRING dbname
, LEX_STRING name
, Event_basic
*et
);
96 open_event_table(THD
*thd
, enum thr_lock_type lock_type
, TABLE
**table
);
99 fill_schema_events(THD
*thd
, TABLE_LIST
*tables
, const char *db
);
102 update_timing_fields_for_event(THD
*thd
,
103 LEX_STRING event_db_name
,
104 LEX_STRING event_name
,
105 bool update_last_executed
,
106 my_time_t last_executed
,
111 check_system_tables(THD
*thd
);
114 drop_events_by_field(THD
*thd
, enum enum_events_table_field field
,
115 LEX_STRING field_value
);
117 index_read_for_db_for_i_s(THD
*thd
, TABLE
*schema_table
, TABLE
*event_table
,
121 table_scan_all_for_i_s(THD
*thd
, TABLE
*schema_table
, TABLE
*event_table
);
124 /* Prevent use of these */
125 Event_db_repository(const Event_db_repository
&);
126 void operator=(Event_db_repository
&);
130 @} (End of group Event_Scheduler)
132 #endif /* _EVENT_DB_REPOSITORY_H_ */