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

into  mysql.com:/usr/home/ram/work/bug22229/my50-bug22229
parents 3a505289 d39a0124
...@@ -1204,3 +1204,6 @@ fmtddate field2 ...@@ -1204,3 +1204,6 @@ fmtddate field2
Sep-4 12:00AM abcd Sep-4 12:00AM abcd
DROP TABLE testBug8868; DROP TABLE testBug8868;
SET NAMES DEFAULT; SET NAMES DEFAULT;
select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE
NULL
...@@ -707,3 +707,9 @@ SELECT DATE_FORMAT(field1,'%b-%e %l:%i%p') as fmtddate, field2 FROM testBug8868; ...@@ -707,3 +707,9 @@ SELECT DATE_FORMAT(field1,'%b-%e %l:%i%p') as fmtddate, field2 FROM testBug8868;
DROP TABLE testBug8868; DROP TABLE testBug8868;
SET NAMES DEFAULT; SET NAMES DEFAULT;
#
# Bug #22229: bug in DATE_ADD()
#
select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
...@@ -3323,7 +3323,9 @@ bool Item_func_str_to_date::get_date(TIME *ltime, uint fuzzy_date) ...@@ -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.str= (char*) format->ptr();
date_time_format.format.length= format->length(); date_time_format.format.length= format->length();
if (extract_date_time(&date_time_format, val->ptr(), val->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; goto null_date;
if (cached_timestamp_type == MYSQL_TIMESTAMP_TIME && ltime->day) if (cached_timestamp_type == MYSQL_TIMESTAMP_TIME && ltime->day)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment