diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-07-03 09:46:20 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-07-03 09:46:20 +0200 |
commit | 78cc6db44a9f1344dd5c00cf4f3cdde158fe108e (patch) | |
tree | 3f6ad0e92adf22f242be974da029d4194dec2cf2 /include/my_time.h | |
parent | cfae3065d7ed5b7c5aa35596933d9f234f221878 (diff) | |
download | mariadb-git-78cc6db44a9f1344dd5c00cf4f3cdde158fe108e.tar.gz |
MDEV-4667 DATE('string') incompability between mysql and mariadb
Cleanup: remove TIME_FUZZY_DATE.
Introduce TIME_FUZZY_DATES which means "very fuzzy, the resulting
value is only used for comparison. It can be invalid date, fine, as long as it can be
compared".
Updated many tests results (they're better now).
Diffstat (limited to 'include/my_time.h')
-rw-r--r-- | include/my_time.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/include/my_time.h b/include/my_time.h index dbef712a038..4d8ea0c2eda 100644 --- a/include/my_time.h +++ b/include/my_time.h @@ -68,14 +68,17 @@ typedef long my_time_t; #endif /* Flags to str_to_datetime */ -#define TIME_FUZZY_DATE 1 + +/* + TIME_FUZZY_DATES is used for the result will only be used for comparison + purposes. Conversion is as relaxed as possible. +*/ +#define TIME_FUZZY_DATES 1 #define TIME_DATETIME_ONLY 2 #define TIME_TIME_ONLY 4 -/* Must be same as MODE_NO_ZERO_IN_DATE */ -#define TIME_NO_ZERO_IN_DATE (65536L*2*2*2*2*2*2*2) -/* Must be same as MODE_NO_ZERO_DATE */ -#define TIME_NO_ZERO_DATE (TIME_NO_ZERO_IN_DATE*2) -#define TIME_INVALID_DATES (TIME_NO_ZERO_DATE*2) +#define TIME_NO_ZERO_IN_DATE (1UL << 23) /* == MODE_NO_ZERO_IN_DATE */ +#define TIME_NO_ZERO_DATE (1UL << 24) /* == MODE_NO_ZERO_DATE */ +#define TIME_INVALID_DATES (1UL << 25) /* == MODE_INVALID_DATES */ #define MYSQL_TIME_WARN_TRUNCATED 1 #define MYSQL_TIME_WARN_OUT_OF_RANGE 2 |