summaryrefslogtreecommitdiff
path: root/include/my_time.h
diff options
context:
space:
mode:
authorunknown <Kristofer.Pettersson@naruto.>2006-10-11 11:05:55 +0200
committerunknown <Kristofer.Pettersson@naruto.>2006-10-11 11:05:55 +0200
commite67e4e4c780b8c8aee87a88ff9061d92b3a5f8b0 (patch)
treec6fdc3c8f0c635d61d68059b960c1a2c6cd47274 /include/my_time.h
parentda0b4e97430fb4c49bf1a934c893e7d3e3351e02 (diff)
parentc247bf9dc3c370c70dc763dcf361c85ee20035fd (diff)
downloadmariadb-git-e67e4e4c780b8c8aee87a88ff9061d92b3a5f8b0.tar.gz
Merge naruto.:C:/cpp/bug21811/my51-bug21811
into naruto.:C:/cpp/mysql-5.1-new-maint include/my_time.h: Auto merged mysql-test/r/func_time.result: Auto merged sql/item_timefunc.cc: Auto merged
Diffstat (limited to 'include/my_time.h')
-rw-r--r--include/my_time.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/include/my_time.h b/include/my_time.h
index d0f2fc323d8..cb8684efdb1 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -97,15 +97,25 @@ 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)
+/*
+ Available interval types used in any statement.
+
+ 'interval_type' must be sorted so that simple intervals comes first,
+ ie year, quarter, month, week, day, hour, etc. The order based on
+ interval size is also important and the intervals should be kept in a
+ large to smaller order. (get_interval_value() depends on this)
+
+ Note: If you change the order of elements in this enum you should fix
+ order of elements in 'interval_type_to_name' and 'interval_names'
+ arrays
+
+ See also interval_type_to_name, get_interval_value, interval_names
*/
enum interval_type
{
- INTERVAL_YEAR, INTERVAL_QUARTER, INTERVAL_MONTH, INTERVAL_DAY, INTERVAL_HOUR,
- INTERVAL_MINUTE, INTERVAL_WEEK, INTERVAL_SECOND, INTERVAL_MICROSECOND ,
+ INTERVAL_YEAR, INTERVAL_QUARTER, INTERVAL_MONTH, INTERVAL_WEEK, INTERVAL_DAY,
+ INTERVAL_HOUR, INTERVAL_MINUTE, 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,