diff options
author | unknown <kaa@polly.local> | 2006-10-12 12:36:13 +0400 |
---|---|---|
committer | unknown <kaa@polly.local> | 2006-10-12 12:36:13 +0400 |
commit | 131d8b8645f0f5628cd62f5c0b1a3457f9f63307 (patch) | |
tree | 4763f87f5b35217d4afe850ab88ba2dfc0974778 /include/my_time.h | |
parent | 1f816053d2f531062c5449fc4cea71c2c41792d6 (diff) | |
parent | 45af97ad1d06f1ef66d9f4dad53b6cc255e781a2 (diff) | |
download | mariadb-git-131d8b8645f0f5628cd62f5c0b1a3457f9f63307.tar.gz |
Merge polly.local:/tmp/maint/bug11655/my51-bug11655
into polly.local:/home/kaa/src/maint/m51-new-maint--07OGx
include/my_time.h:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/field.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/time.cc:
Auto merged
mysql-test/r/func_time.result:
Manually merged
Diffstat (limited to 'include/my_time.h')
-rw-r--r-- | include/my_time.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/my_time.h b/include/my_time.h index cb8684efdb1..069cecc7b14 100644 --- a/include/my_time.h +++ b/include/my_time.h @@ -57,6 +57,16 @@ typedef long my_time_t; #define TIME_NO_ZERO_DATE (TIME_NO_ZERO_IN_DATE*2) #define TIME_INVALID_DATES (TIME_NO_ZERO_DATE*2) +#define MYSQL_TIME_WARN_TRUNCATED 1 +#define MYSQL_TIME_WARN_OUT_OF_RANGE 2 + +/* Limits for the TIME data type */ +#define TIME_MAX_HOUR 838 +#define TIME_MAX_MINUTE 59 +#define TIME_MAX_SECOND 59 +#define TIME_MAX_VALUE (TIME_MAX_HOUR*10000 + TIME_MAX_MINUTE*100 + \ + TIME_MAX_SECOND) + enum enum_mysql_timestamp_type str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time, uint flags, int *was_cut); @@ -69,7 +79,9 @@ ulonglong TIME_to_ulonglong(const MYSQL_TIME *time); my_bool str_to_time(const char *str,uint length, MYSQL_TIME *l_time, - int *was_cut); + int *warning); + +int check_time_range(struct st_mysql_time *time, int *warning); long calc_daynr(uint year,uint month,uint day); uint calc_days_in_year(uint year); |