summaryrefslogtreecommitdiff
path: root/sql/event_data_objects.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-08-05 22:56:11 +0300
committerMichael Widenius <monty@askmonty.org>2010-08-05 22:56:11 +0300
commitd042146e5b41b6222df3e6b4c16a44f3ef2939b7 (patch)
treee40f5b435f7d17ed1c24dfb787ab8cd5f4f7d5d8 /sql/event_data_objects.cc
parent3e610bc58d0ba325fdca3b06dfa976ecc513dc1e (diff)
parentf0f21036951f6fed2fddeb58375425f957751fd5 (diff)
downloadmariadb-git-d042146e5b41b6222df3e6b4c16a44f3ef2939b7.tar.gz
Merge with MariaDB 5.1.49
Removed references to HA_END_SPACE_KEY (which has been 0 for a long time)
Diffstat (limited to 'sql/event_data_objects.cc')
-rw-r--r--sql/event_data_objects.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc
index 9b428ed6ec9..959f6ec06c0 100644
--- a/sql/event_data_objects.cc
+++ b/sql/event_data_objects.cc
@@ -833,8 +833,9 @@ bool get_next_time(const Time_zone *time_zone, my_time_t *next,
}
else
{
- long diff_months= (long) (local_now.year - local_start.year)*12 +
- (local_now.month - local_start.month);
+ long diff_months= ((long) local_now.year - (long) local_start.year)*12 +
+ ((long) local_now.month - (long) local_start.month);
+
/*
Unlike for seconds above, the formula below returns the interval
that, when added to the local_start, will give the time in the
@@ -1432,7 +1433,10 @@ Event_job_data::execute(THD *thd, bool drop)
thd->set_query(sp_sql.c_ptr_safe(), sp_sql.length());
{
- Parser_state parser_state(thd, thd->query(), thd->query_length());
+ Parser_state parser_state;
+ if (parser_state.init(thd, thd->query(), thd->query_length()))
+ goto end;
+
lex_start(thd);
if (parse_sql(thd, & parser_state, creation_ctx))