diff options
author | unknown <ramil/ram@myoffice.izhnet.ru> | 2006-11-22 12:13:09 +0400 |
---|---|---|
committer | unknown <ramil/ram@myoffice.izhnet.ru> | 2006-11-22 12:13:09 +0400 |
commit | 96de5fabb2a8917ced402d31014399570b14f4e1 (patch) | |
tree | f00a12589d0ab6cf45d552e9ab048c10defb1615 /sql-common/my_time.c | |
parent | c6e2a2a49be73689944a47ce12c78dc0abd960a2 (diff) | |
parent | b275e4f01989316fe2acdb9f85f1274e26393638 (diff) | |
download | mariadb-git-96de5fabb2a8917ced402d31014399570b14f4e1.tar.gz |
Merge mysql.com:/usr/home/ram/work/bug21789/my50-bug21789
into mysql.com:/usr/home/ram/work/bug21789/my51-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 b4cfe041529..868b1b2172d 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 */ |