1
#ifndef _EVENT_DATA_OBJECTS_H_
2
#define _EVENT_DATA_OBJECTS_H_
3
/* Copyright (C) 2004-2006 MySQL AB
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
19
@addtogroup Event_Scheduler
22
@file event_data_objects.h
25
#include "event_parse_data.h"
27
class Event_queue_element_for_exec
30
Event_queue_element_for_exec(){};
31
~Event_queue_element_for_exec();
34
init(LEX_STRING dbname, LEX_STRING name);
42
/* Prevent use of these */
43
Event_queue_element_for_exec(const Event_queue_element_for_exec &);
44
void operator=(Event_queue_element_for_exec &);
57
LEX_STRING definer;// combination of user and host
62
virtual ~Event_basic();
65
load_from_row(THD *thd, TABLE *table) = 0;
69
load_string_fields(Field **fields, ...);
72
load_time_zone(THD *thd, const LEX_STRING tz_name);
77
class Event_queue_element : public Event_basic
81
bool last_executed_changed;
88
my_time_t last_executed;
94
my_bool execute_at_null;
97
interval_type interval;
101
uint execution_count;
103
Event_queue_element();
104
virtual ~Event_queue_element();
107
load_from_row(THD *thd, TABLE *table);
110
compute_next_execution_time();
113
mark_last_executed(THD *thd);
116
update_timing_fields(THD *thd);
120
class Event_timed : public Event_queue_element
122
Event_timed(const Event_timed &); /* Prevent use of these */
123
void operator=(Event_timed &);
128
LEX_STRING definer_user;
129
LEX_STRING definer_host;
138
class Stored_program_creation_ctx *creation_ctx;
139
LEX_STRING body_utf8;
142
virtual ~Event_timed();
148
load_from_row(THD *thd, TABLE *table);
151
get_create_event(THD *thd, String *buf);
155
class Event_job_data : public Event_basic
159
LEX_STRING definer_user;
160
LEX_STRING definer_host;
164
class Stored_program_creation_ctx *creation_ctx;
169
load_from_row(THD *thd, TABLE *table);
172
execute(THD *thd, bool drop);
175
construct_sp_sql(THD *thd, String *sp_sql);
177
construct_drop_event_sql(THD *thd, String *sp_sql);
179
Event_job_data(const Event_job_data &); /* Prevent use of these */
180
void operator=(Event_job_data &);
184
/* Compares only the schema part of the identifier */
186
event_basic_db_equal(LEX_STRING db, Event_basic *et);
188
/* Compares the whole identifier*/
190
event_basic_identifier_equal(LEX_STRING db, LEX_STRING name, Event_basic *b);
193
@} (End of group Event_Scheduler)
196
#endif /* _EVENT_DATA_OBJECTS_H_ */