Commit d1e9ff36 authored by unknown's avatar unknown

Merge


sql/item_timefunc.cc:
  Auto merged
mysql-test/r/func_time.result:
  SCCS merged
mysql-test/t/func_time.test:
  SCCS merged
parents 5888d039 44af4dbd
......@@ -688,6 +688,21 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select timestamp_diff(WEEK,_latin1'2001-02-01',_latin1'2001-05-01') AS `a1`,timestamp_diff(SECOND_FRAC,_latin1'2001-02-01 12:59:59.120000',_latin1'2001-05-01 12:58:58.119999') AS `a2`
select last_day('2005-00-00');
last_day('2005-00-00')
NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '2005-00-00'
select last_day('2005-00-01');
last_day('2005-00-01')
NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '2005-00-01'
select last_day('2005-01-00');
last_day('2005-01-00')
NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '2005-01-00'
select time_format('100:00:00', '%H %k %h %I %l');
time_format('100:00:00', '%H %k %h %I %l')
100 100 04 04 4
......@@ -337,6 +337,14 @@ DROP TABLE t1;
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2;
#
# Bug #10568
#
select last_day('2005-00-00');
select last_day('2005-00-01');
select last_day('2005-01-00');
#
# Bug #10590: %h, %I, and %l format specifies should all return results in
# the 0-11 range
......
......@@ -3014,7 +3014,7 @@ String *Item_func_str_to_date::val_str(String *str)
bool Item_func_last_day::get_date(TIME *ltime, uint fuzzy_date)
{
if (get_arg0_date(ltime,fuzzy_date))
if (get_arg0_date(ltime, fuzzy_date & ~TIME_FUZZY_DATE))
return 1;
uint month_idx= ltime->month-1;
ltime->day= days_in_month[month_idx];
......
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