diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-11-14 16:00:38 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2018-11-14 16:00:38 +0400 |
commit | b9a9055793ab8b9a50200e2f55602463627dedd3 (patch) | |
tree | bb245b2e03aa973439f7c50f69019b8622bf22af /include/my_time.h | |
parent | 62bcd74712680fa07c9ed8c42c384c8825c4f9af (diff) | |
download | mariadb-git-b9a9055793ab8b9a50200e2f55602463627dedd3.tar.gz |
MDEV-17712 Remove C_TIME_FUZZY_DATES, C_TIME_DATETIME_ONLY, C_TIME_TIME_ONLY
Diffstat (limited to 'include/my_time.h')
-rw-r--r-- | include/my_time.h | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/include/my_time.h b/include/my_time.h index babd6101eeb..a7911f0f8da 100644 --- a/include/my_time.h +++ b/include/my_time.h @@ -57,13 +57,6 @@ extern uchar days_in_month[]; /* Flags to str_to_datetime */ -/* - TIME_FUZZY_DATES is used for the result will only be used for comparison - purposes. Conversion is as relaxed as possible. -*/ -#define C_TIME_FUZZY_DATES 1U -#define C_TIME_DATETIME_ONLY 2U -#define C_TIME_TIME_ONLY 4U #define C_TIME_NO_ZERO_IN_DATE (1UL << 23) /* == MODE_NO_ZERO_IN_DATE */ #define C_TIME_NO_ZERO_DATE (1UL << 24) /* == MODE_NO_ZERO_DATE */ #define C_TIME_INVALID_DATES (1UL << 25) /* == MODE_INVALID_DATES */ @@ -117,15 +110,18 @@ my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date, ulonglong flags, int *was_cut); my_bool str_to_DDhhmmssff(const char *str, size_t length, MYSQL_TIME *l_time, ulong max_hour, MYSQL_TIME_STATUS *status); -my_bool str_to_time(const char *str, size_t length, MYSQL_TIME *l_time, - ulonglong flag, MYSQL_TIME_STATUS *status); -my_bool str_to_datetime(const char *str, size_t length, MYSQL_TIME *l_time, - ulonglong flags, MYSQL_TIME_STATUS *status); -longlong number_to_datetime(longlong nr, ulong sec_part, MYSQL_TIME *time_res, - ulonglong flags, int *was_cut); - -int number_to_time(my_bool neg, ulonglong nr, ulong sec_part, - MYSQL_TIME *ltime, int *was_cut); +my_bool str_to_datetime_or_date_or_time(const char *str, size_t length, + MYSQL_TIME *to, ulonglong flag, + MYSQL_TIME_STATUS *status); +my_bool str_to_datetime_or_date(const char *str, size_t length, MYSQL_TIME *to, + ulonglong flags, MYSQL_TIME_STATUS *status); + +longlong number_to_datetime_or_date(longlong nr, ulong sec_part, + MYSQL_TIME *time_res, + ulonglong flags, int *was_cut); +int number_to_time_only(my_bool neg, ulonglong nr, ulong sec_part, + MYSQL_TIME *ltime, int *was_cut); + ulonglong TIME_to_ulonglong_datetime(const MYSQL_TIME *); ulonglong TIME_to_ulonglong_date(const MYSQL_TIME *); ulonglong TIME_to_ulonglong_time(const MYSQL_TIME *); |