Commit 19a3c29d authored by Sergei Golubchik's avatar Sergei Golubchik

lp:730627 TIME_to_ulonglong: Assertion `0' failed in 5.1-micro on wrong argument to MAKETIME

correct the return value of Item_func_maketime::get_date()
parent a8a757c6
...@@ -1427,3 +1427,6 @@ Warning 1292 Incorrect datetime value: '2010-40-50' ...@@ -1427,3 +1427,6 @@ Warning 1292 Incorrect datetime value: '2010-40-50'
select subtime('0000-00-10 10:10:10', '30 10:00:00'); select subtime('0000-00-10 10:10:10', '30 10:00:00');
subtime('0000-00-10 10:10:10', '30 10:00:00') subtime('0000-00-10 10:10:10', '30 10:00:00')
NULL NULL
select maketime(20,61,10)+0;
maketime(20,61,10)+0
NULL
...@@ -886,3 +886,8 @@ select truncate(date('2010-40-10'), 6); ...@@ -886,3 +886,8 @@ select truncate(date('2010-40-10'), 6);
select extract(month from '2010-40-50'); select extract(month from '2010-40-50');
select subtime('0000-00-10 10:10:10', '30 10:00:00'); select subtime('0000-00-10 10:10:10', '30 10:00:00');
#
# lp:730627 TIME_to_ulonglong: Assertion `0' failed in 5.1-micro on wrong argument to MAKETIME
#
select maketime(20,61,10)+0;
...@@ -2582,7 +2582,7 @@ bool Item_func_maketime::get_date(MYSQL_TIME *ltime, uint fuzzy_date) ...@@ -2582,7 +2582,7 @@ bool Item_func_maketime::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
args[2]->null_value || args[2]->null_value ||
minute < 0 || minute > 59 || minute < 0 || minute > 59 ||
second < 0 || second > 59))) second < 0 || second > 59)))
return 0; return 1;
bzero(ltime, sizeof(*ltime)); bzero(ltime, sizeof(*ltime));
ltime->time_type= MYSQL_TIMESTAMP_TIME; ltime->time_type= MYSQL_TIMESTAMP_TIME;
......
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