MDEV-4804 Date comparing false result

This commit is contained in:
Alexander Barkov 2013-08-22 15:20:27 +04:00
commit c40de1df36
3 changed files with 63 additions and 3 deletions

View file

@ -3155,12 +3155,12 @@ bool Item_func_coalesce::get_date(MYSQL_TIME *ltime,uint fuzzydate)
null_value= 0;
for (uint i= 0; i < arg_count; i++)
{
bool res= args[i]->get_date(ltime, fuzzydate);
bool res= args[i]->get_date(ltime, fuzzydate & ~TIME_FUZZY_DATES);
if (!args[i]->null_value)
return res;
}
null_value=1;
return 1;
bzero((char*) ltime,sizeof(*ltime));
return null_value|= !(fuzzydate & TIME_FUZZY_DATES);
}