diff options
author | Michael Widenius <monty@askmonty.org> | 2010-08-02 12:01:24 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-08-02 12:01:24 +0300 |
commit | e0a6b02c5d0a311e7167295494786077009743d1 (patch) | |
tree | 72c934fe42261ad5de3139961e092f57e9d147df /sql/event_data_objects.cc | |
parent | d2f8b7d04503478ab6b6998194a2070891f0c2bb (diff) | |
parent | 6ad06b15222300e4eed4fe3972d1ad249c4c42a2 (diff) | |
download | mariadb-git-e0a6b02c5d0a311e7167295494786077009743d1.tar.gz |
Merge with MySQL 5.1.49
Fixed Bug#52005 'JOIN_TAB->dependent' may be incorrectly propageted for multilevel outer joins' in a better way (patch from Sergey Petrunya)
Diffstat (limited to 'sql/event_data_objects.cc')
-rw-r--r-- | sql/event_data_objects.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index cdd1d0abff3..62e7c670346 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)) |