Commit b7578df0 authored by andrey@lmy004's avatar andrey@lmy004

WL #1034 updates after review

parent bee85987
This diff is collapsed.
This diff is collapsed.
...@@ -18,6 +18,9 @@ ...@@ -18,6 +18,9 @@
#define _EVENT_PRIV_H_ #define _EVENT_PRIV_H_
#define UNLOCK_MUTEX_AND_BAIL_OUT(__mutex, __label) \
{ VOID(pthread_mutex_unlock(&__mutex)); goto __label; }
enum enum
{ {
EVEX_FIELD_DB = 0, EVEX_FIELD_DB = 0,
......
...@@ -290,7 +290,7 @@ event_timed::init_ends(THD *thd, Item *ends) ...@@ -290,7 +290,7 @@ event_timed::init_ends(THD *thd, Item *ends)
if (ends->fix_fields(thd, &ends)) if (ends->fix_fields(thd, &ends))
DBUG_RETURN(EVEX_PARSE_ERROR); DBUG_RETURN(EVEX_PARSE_ERROR);
// the field was already fixed in init_ends // the field was already fixed in init_ends
if ((not_used= ends->get_date(&ltime, TIME_NO_ZERO_DATE))) if ((not_used= ends->get_date(&ltime, TIME_NO_ZERO_DATE)))
DBUG_RETURN(EVEX_BAD_PARAMS); DBUG_RETURN(EVEX_BAD_PARAMS);
...@@ -537,10 +537,19 @@ event_timed::compute_next_execution_time() ...@@ -537,10 +537,19 @@ event_timed::compute_next_execution_time()
my_tz_UTC->gmt_sec_to_TIME(&time_now, now); my_tz_UTC->gmt_sec_to_TIME(&time_now, now);
/* /*
sql_print_information("[%s.%s]", m_db.str, m_name.str); sql_print_information("[%s.%s]", m_db.str, m_name.str);
sql_print_information("time_now : [%d-%d-%d %d:%d:%d ]", time_now.year, time_now.month, time_now.day, time_now.hour, time_now.minute, time_now.second); sql_print_information("time_now : [%d-%d-%d %d:%d:%d ]",
sql_print_information("m_starts : [%d-%d-%d %d:%d:%d ]", m_starts.year, m_starts.month, m_starts.day, m_starts.hour, m_starts.minute, m_starts.second); time_now.year, time_now.month, time_now.day,
sql_print_information("m_ends : [%d-%d-%d %d:%d:%d ]", m_ends.year, m_ends.month, m_ends.day, m_ends.hour, m_ends.minute, m_ends.second); time_now.hour, time_now.minute, time_now.second);
sql_print_information("m_last_ex: [%d-%d-%d %d:%d:%d ]", m_last_executed.year, m_last_executed.month, m_last_executed.day, m_last_executed.hour, m_last_executed.minute, m_last_executed.second); sql_print_information("m_starts : [%d-%d-%d %d:%d:%d ]", m_starts.year,
m_starts.month, m_starts.day, m_starts.hour,
m_starts.minute, m_starts.second);
sql_print_information("m_ends : [%d-%d-%d %d:%d:%d ]", m_ends.year,
m_ends.month, m_ends.day, m_ends.hour,
m_ends.minute, m_ends.second);
sql_print_information("m_last_ex: [%d-%d-%d %d:%d:%d ]", m_last_executed.year,
m_last_executed.month, m_last_executed.day,
m_last_executed.hour, m_last_executed.minute,
m_last_executed.second);
*/ */
//if time_now is after m_ends don't execute anymore //if time_now is after m_ends don't execute anymore
if (m_ends.year && (tmp= my_time_compare(&m_ends, &time_now)) == -1) if (m_ends.year && (tmp= my_time_compare(&m_ends, &time_now)) == -1)
...@@ -702,7 +711,6 @@ event_timed::mark_last_executed() ...@@ -702,7 +711,6 @@ event_timed::mark_last_executed()
bool bool
event_timed::drop(THD *thd) event_timed::drop(THD *thd)
{ {
return (bool) evex_drop_event(thd, this, false); return (bool) evex_drop_event(thd, this, false);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment