summaryrefslogtreecommitdiff
path: root/include/my_time.h
diff options
context:
space:
mode:
authorandrey@lmy004. <>2006-01-18 20:41:22 +0100
committerandrey@lmy004. <>2006-01-18 20:41:22 +0100
commit0322cb1df817e4a1bdc490746d351a533442eba4 (patch)
tree364b1773d1b0b50d5005939089eefee7bc15af75 /include/my_time.h
parent3eba9695d0340a9b8a618faf77b50c8f3bd92eb9 (diff)
downloadmariadb-git-0322cb1df817e4a1bdc490746d351a533442eba4.tar.gz
- fix bug #16435 (Weekly events execute every second) (WL#1034 Internal CRON)
Before the interval expression was considered to be in seconds, now it is just a number and the type of interval is considered. - this changeset introduces also fix for bug#16432 (Events: error re interval misrepresents the facts) the code of event_timed::set_interval() was refactored anyway so it is meaningful to fix the bug in the same changeset.
Diffstat (limited to 'include/my_time.h')
-rw-r--r--include/my_time.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/my_time.h b/include/my_time.h
index e52ef69475d..2b0dc4ac6ff 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -89,6 +89,21 @@ int my_date_to_str(const MYSQL_TIME *l_time, char *to);
int my_datetime_to_str(const MYSQL_TIME *l_time, char *to);
int my_TIME_to_str(const MYSQL_TIME *l_time, char *to);
+/*
+ The following must be sorted so that simple intervals comes first.
+ (get_interval_value() depends on this)
+*/
+
+enum interval_type
+{
+ INTERVAL_YEAR, INTERVAL_QUARTER, INTERVAL_MONTH, INTERVAL_DAY, INTERVAL_HOUR,
+ INTERVAL_MINUTE, INTERVAL_WEEK, INTERVAL_SECOND, INTERVAL_MICROSECOND ,
+ INTERVAL_YEAR_MONTH, INTERVAL_DAY_HOUR, INTERVAL_DAY_MINUTE,
+ INTERVAL_DAY_SECOND, INTERVAL_HOUR_MINUTE, INTERVAL_HOUR_SECOND,
+ INTERVAL_MINUTE_SECOND, INTERVAL_DAY_MICROSECOND, INTERVAL_HOUR_MICROSECOND,
+ INTERVAL_MINUTE_MICROSECOND, INTERVAL_SECOND_MICROSECOND
+};
+
C_MODE_END
#endif /* _my_time_h_ */