1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

manual merge

mysql-test/r/events.result:
  Auto merged
mysql-test/t/events.test:
  Auto merged
sql/event.cc:
  Auto merged
sql/event.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
This commit is contained in:
unknown
2006-02-28 12:08:13 +01:00
8 changed files with 213 additions and 85 deletions

View File

@ -523,8 +523,7 @@ restart_ticking:
et= evex_queue_first_element(&EVEX_EQ_NAME, event_timed*);
DBUG_PRINT("evex main thread",("got event from the queue"));
if (et->execute_at.year > 1969 &&
my_time_compare(&time_now, &et->execute_at) == -1)
if (!et->execute_at_null && my_time_compare(&time_now,&et->execute_at) == -1)
{
DBUG_PRINT("evex main thread",("still not the time for execution"));
VOID(pthread_mutex_unlock(&LOCK_event_arrays));
@ -571,8 +570,11 @@ restart_ticking:
#else
event_executor_worker((void *) et);
#endif
if ((et->execute_at.year && !et->expression) ||
TIME_to_ulonglong_datetime(&et->execute_at) == 0)
/*
1. For one-time event : year is > 0 and expression is 0
2. For recurring, expression is != -=> check execute_at_null in this case
*/
if ((et->execute_at.year && !et->expression) || et->execute_at_null)
et->flags |= EVENT_EXEC_NO_MORE;
if ((et->flags & EVENT_EXEC_NO_MORE) || et->status == MYSQL_EVENT_DISABLED)