diff options
author | ramil/ram@myoffice.izhnet.ru <> | 2006-11-29 10:59:52 +0400 |
---|---|---|
committer | ramil/ram@myoffice.izhnet.ru <> | 2006-11-29 10:59:52 +0400 |
commit | e4c17c72b7a6d6ed8d70458f22f7ea4aa13212f7 (patch) | |
tree | bf48fef99c7a06afa17dc5d638d3dfd2fb6acd76 /sql/item_timefunc.cc | |
parent | 2a0e2d1d3860aea8f6b6b4287214b491c87c8cce (diff) | |
parent | 726af26ac799ac25e4d3852b02903af3245dd92f (diff) | |
download | mariadb-git-e4c17c72b7a6d6ed8d70458f22f7ea4aa13212f7.tar.gz |
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into mysql.com:/usr/home/ram/work/bug22229/my51-bug22229
Diffstat (limited to 'sql/item_timefunc.cc')
-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 7231a9eb027..008496b1e90 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -3208,7 +3208,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) { |