diff options
author | unknown <anozdrin/alik@alik.> | 2006-11-07 13:45:56 +0300 |
---|---|---|
committer | unknown <anozdrin/alik@alik.> | 2006-11-07 13:45:56 +0300 |
commit | b4093b65bea0c57f0ecdbd14c86bcdfce35936a4 (patch) | |
tree | 42fb1db881900588ca6d4b0cce2a7d825736863a /include/my_time.h | |
parent | e5bd94b2d4fd6937a0f5ff53a295fe14a83ccaef (diff) | |
parent | 024a1781a6310383c1e352d483e7a701d564d051 (diff) | |
download | mariadb-git-b4093b65bea0c57f0ecdbd14c86bcdfce35936a4.tar.gz |
Merge alik.:/mnt/raid/alik/MySQL/devel/5.0-rt
into alik.:/mnt/raid/alik/MySQL/devel/5.0-merged-5.0-rt
configure.in:
Auto merged
include/my_time.h:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/rename.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
Auto merged
mysql-test/t/rename.test:
Auto merged
sql-common/my_time.c:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/time.cc:
Auto 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 3f6d033d689..574f1a49c5a 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); |