Merge 5.3->5.5

This commit is contained in:
Alexander Barkov 2014-06-05 09:15:25 +04:00
commit 7d3a67a976

View File

@ -372,8 +372,15 @@ static bool number_to_time_with_warn(bool neg, ulonglong nr, ulong sec_part,
else
{
f_type= MYSQL_TYPE_DATETIME;
res= neg ? -1 : number_to_datetime(nr, sec_part, ltime, fuzzydate, &was_cut);
have_warnings= was_cut && (fuzzydate & TIME_NO_ZERO_IN_DATE);
if (neg)
{
res= -1;
}
else
{
res= number_to_datetime(nr, sec_part, ltime, fuzzydate, &was_cut);
have_warnings= was_cut && (fuzzydate & TIME_NO_ZERO_IN_DATE);
}
}
if (res < 0 || have_warnings)