diff options
author | unknown <ramil/ram@mysql.com/myoffice.izhnet.ru> | 2006-11-22 12:40:15 +0400 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/myoffice.izhnet.ru> | 2006-11-22 12:40:15 +0400 |
commit | d5988e52d8e7fc3cd43c2cfb357419e7c140e83a (patch) | |
tree | 6f0b4f37cd97a4b543965085d6bcf2f1b0850d6c /sql-common/my_time.c | |
parent | aff59a7021764cc7453f0a27cede9604939faafc (diff) | |
parent | b275e4f01989316fe2acdb9f85f1274e26393638 (diff) | |
download | mariadb-git-d5988e52d8e7fc3cd43c2cfb357419e7c140e83a.tar.gz |
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into mysql.com:/usr/home/ram/work/bug21789/my50-bug21789
mysql-test/r/date_formats.result:
Auto merged
sql-common/my_time.c:
Auto merged
Diffstat (limited to 'sql-common/my_time.c')
-rw-r--r-- | sql-common/my_time.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql-common/my_time.c b/sql-common/my_time.c index 003442e9330..403c645af0b 100644 --- a/sql-common/my_time.c +++ b/sql-common/my_time.c @@ -411,7 +411,9 @@ 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->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))) { /* Only give warning for a zero date if there is some garbage after */ if (!not_zero_date) /* If zero date */ |