diff options
author | unknown <ramil/ram@myoffice.izhnet.ru> | 2006-11-29 09:42:59 +0400 |
---|---|---|
committer | unknown <ramil/ram@myoffice.izhnet.ru> | 2006-11-29 09:42:59 +0400 |
commit | b15425adb9166d3f290af7dbea20fcd5839844c7 (patch) | |
tree | e59624f32ca030054ce59b0f3ef1086ad8f2ec9b /sql/item_timefunc.cc | |
parent | 4a488c06ed25e0123a084af49130b0ba35acd1f8 (diff) | |
parent | 4c02f402d48b64c8044832f45845db73b3c9bd9f (diff) | |
download | mariadb-git-b15425adb9166d3f290af7dbea20fcd5839844c7.tar.gz |
Merge mysql.com:/usr/home/ram/work/bug22229/my50-bug22229
into mysql.com:/usr/home/ram/work/bug22229/my51-bug22229
sql/item_timefunc.cc:
Auto merged
mysql-test/r/func_time.result:
SCCS merged
mysql-test/t/func_time.test:
SCCS merged
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 f378e5037dc..f4f41e10015 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -3202,7 +3202,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) { |