diff options
author | ramil/ram@mysql.com/myoffice.izhnet.ru <> | 2006-11-22 12:40:15 +0400 |
---|---|---|
committer | ramil/ram@mysql.com/myoffice.izhnet.ru <> | 2006-11-22 12:40:15 +0400 |
commit | 802f7fc36619a895e2ab44c2092c7602d6cd3bbd (patch) | |
tree | 6f0b4f37cd97a4b543965085d6bcf2f1b0850d6c /sql-common/my_time.c | |
parent | 711b6a63bedcd57fbeb90a72bfc74c75547376ad (diff) | |
parent | b11dba2f0bebf46e11d8d63b4f440f06a800afee (diff) | |
download | mariadb-git-802f7fc36619a895e2ab44c2092c7602d6cd3bbd.tar.gz |
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into mysql.com:/usr/home/ram/work/bug21789/my50-bug21789
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 */ |