1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.1-maint

into  mysql.com:/usr/home/ram/work/bug22229/my51-bug22229


mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
This commit is contained in:
unknown
2006-11-29 10:59:52 +04:00
3 changed files with 12 additions and 1 deletions

View File

@@ -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)
{