1
#ifndef _EVENT_DATA_OBJECTS_H_
2
#define _EVENT_DATA_OBJECTS_H_
3
/* Copyright (c) 2004, 2010, 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 St, Fifth Floor, Boston, MA 02110-1301 USA */
19
@addtogroup Event_Scheduler
22
@file event_data_objects.h
25
#include "event_parse_data.h"
26
#include "thr_lock.h" /* thr_lock_type */
33
class Event_queue_element_for_exec
36
Event_queue_element_for_exec(){};
37
~Event_queue_element_for_exec();
40
init(LEX_STRING dbname, LEX_STRING name);
48
/* Prevent use of these */
49
Event_queue_element_for_exec(const Event_queue_element_for_exec &);
50
void operator=(Event_queue_element_for_exec &);
63
LEX_STRING definer;// combination of user and host
68
virtual ~Event_basic();
71
load_from_row(THD *thd, TABLE *table) = 0;
75
load_string_fields(Field **fields, ...);
78
load_time_zone(THD *thd, const LEX_STRING tz_name);
83
class Event_queue_element : public Event_basic
90
my_time_t last_executed;
96
my_bool execute_at_null;
99
interval_type interval;
103
uint execution_count;
105
Event_queue_element();
106
virtual ~Event_queue_element();
109
load_from_row(THD *thd, TABLE *table);
112
compute_next_execution_time();
115
mark_last_executed(THD *thd);
119
class Event_timed : public Event_queue_element
121
Event_timed(const Event_timed &); /* Prevent use of these */
122
void operator=(Event_timed &);
127
LEX_STRING definer_user;
128
LEX_STRING definer_host;
137
class Stored_program_creation_ctx *creation_ctx;
138
LEX_STRING body_utf8;
141
virtual ~Event_timed();
147
load_from_row(THD *thd, TABLE *table);
150
get_create_event(THD *thd, String *buf);
154
class Event_job_data : public Event_basic
158
LEX_STRING definer_user;
159
LEX_STRING definer_host;
163
class Stored_program_creation_ctx *creation_ctx;
168
load_from_row(THD *thd, TABLE *table);
171
execute(THD *thd, bool drop);
174
construct_sp_sql(THD *thd, String *sp_sql);
176
construct_drop_event_sql(THD *thd, String *sp_sql);
178
Event_job_data(const Event_job_data &); /* Prevent use of these */
179
void operator=(Event_job_data &);
183
/* Compares only the schema part of the identifier */
185
event_basic_db_equal(LEX_STRING db, Event_basic *et);
187
/* Compares the whole identifier*/
189
event_basic_identifier_equal(LEX_STRING db, LEX_STRING name, Event_basic *b);
192
@} (End of group Event_Scheduler)
195
#endif /* _EVENT_DATA_OBJECTS_H_ */