1
/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
16
#ifndef _EVENT_PARSE_DATA_H_
17
#define _EVENT_PARSE_DATA_H_
19
#define EVEX_GET_FIELD_FAILED -2
20
#define EVEX_BAD_PARAMS -5
21
#define EVEX_MICROSECOND_UNSUP -6
22
#define EVEX_MAX_INTERVAL_VALUE 1000000000L
24
class Event_parse_data : public Sql_alloc
28
ENABLED = feature can function normally (is turned on)
29
SLAVESIDE_DISABLED = feature is turned off on slave
30
DISABLED = feature is turned off
39
enum enum_on_completion
42
On CREATE EVENT, DROP is the DEFAULT as per the docs.
43
On ALTER EVENT, "no change" is the DEFAULT.
45
ON_COMPLETION_DEFAULT = 0,
47
ON_COMPLETION_PRESERVE
54
do_not_create will be set if STARTS time is in the past and
55
on_completion == ON_COMPLETION_DROP.
63
LEX_STRING definer;// combination of user and host
68
Item* item_execute_at;
75
my_bool execute_at_null;
78
Item* item_expression;
80
interval_type interval;
82
static Event_parse_data *
83
new_instance(THD *thd);
86
check_parse_data(THD *thd);
89
check_dates(THD *thd, int previous_on_completion);
94
init_definer(THD *thd);
97
init_name(THD *thd, sp_name *spn);
100
init_execute_at(THD *thd);
103
init_interval(THD *thd);
106
init_starts(THD *thd);
115
report_bad_value(const char *item_name, Item *bad_item);
118
check_if_in_the_past(THD *thd, my_time_t ltime_utc);
120
Event_parse_data(const Event_parse_data &); /* Prevent use of these */
121
void check_originator_id(THD *thd);
122
void operator=(Event_parse_data &);