diff options
author | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-02-08 12:05:34 +0400 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-02-08 12:05:34 +0400 |
commit | 8567e8b5652de59c42046eb9b845042779b0db2e (patch) | |
tree | b0be33ffae2641ff74a388039554fab3dc086700 /sql-common | |
parent | 61d638f01e2a26f298e8c1a22c922a992b2bbca0 (diff) | |
parent | 34d20085f320334e7d6e561d8f85a90f31fa784a (diff) | |
download | mariadb-git-8567e8b5652de59c42046eb9b845042779b0db2e.tar.gz |
Merge mysql.com:/home/ram/work/b25301/b25301.4.1
into mysql.com:/home/ram/work/b25301/b25301.5.0
mysql-test/r/date_formats.result:
Auto merged
sql-common/my_time.c:
Merging.
Reverted fix for 19370 DateTime datatype in MySQL has two bugs in it
as it's not a bug.
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/my_time.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sql-common/my_time.c b/sql-common/my_time.c index 8496c0ceba1..ab81affdd37 100644 --- a/sql-common/my_time.c +++ b/sql-common/my_time.c @@ -85,8 +85,7 @@ my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date, (!(flags & TIME_INVALID_DATES) && ltime->month && ltime->day > days_in_month[ltime->month-1] && (ltime->month != 2 || calc_days_in_year(ltime->year) != 366 || - ltime->day != 29)) || - (ltime->year == 0 && (ltime->month != 0 || ltime->day != 0))) + ltime->day != 29))) { *was_cut= 2; return TRUE; @@ -410,9 +409,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time, if (number_of_fields < 3 || l_time->year > 9999 || l_time->month > 12 || l_time->day > 31 || l_time->hour > 23 || - l_time->minute > 59 || l_time->second > 59 || - (l_time->year == 0 && l_time->month == 0 && l_time->day == 0 && - (l_time->hour != 0 || l_time->minute != 0 || l_time->second != 0))) + l_time->minute > 59 || l_time->second > 59) { /* Only give warning for a zero date if there is some garbage after */ if (!not_zero_date) /* If zero date */ |