diff options
author | unknown <ramil/ram@mysql.com/myoffice.izhnet.ru> | 2006-11-29 13:41:03 +0400 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/myoffice.izhnet.ru> | 2006-11-29 13:41:03 +0400 |
commit | 89d106c1a4efad141e7850373335482ad46aeec5 (patch) | |
tree | de285bb64dc43d94e766f6ade674eb9180dd4d71 /sql | |
parent | a5aa9f64fe99aab251c5cbcdc8ca3d1e2c5ff40e (diff) | |
parent | 4c02f402d48b64c8044832f45845db73b3c9bd9f (diff) | |
download | mariadb-git-89d106c1a4efad141e7850373335482ad46aeec5.tar.gz |
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into mysql.com:/usr/home/ram/work/bug22229/my50-bug22229
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_timefunc.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 72d0ff1cb98..26a6b3f2009 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -3323,7 +3323,9 @@ bool Item_func_str_to_date::get_date(TIME *ltime, uint fuzzy_date) date_time_format.format.str= (char*) format->ptr(); date_time_format.format.length= format->length(); if (extract_date_time(&date_time_format, val->ptr(), val->length(), - ltime, cached_timestamp_type, 0, "datetime")) + ltime, cached_timestamp_type, 0, "datetime") || + ((fuzzy_date & TIME_NO_ZERO_DATE) && + (ltime->year == 0 || ltime->month == 0 || ltime->day == 0))) goto null_date; if (cached_timestamp_type == MYSQL_TIMESTAMP_TIME && ltime->day) { |