summaryrefslogtreecommitdiff
path: root/sql/sql_time.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2014-06-05 09:15:25 +0400
committerAlexander Barkov <bar@mariadb.org>2014-06-05 09:15:25 +0400
commit7d3a67a97666adb586e2de0cdf4bca7904642d02 (patch)
tree0633468a67914ade560944491d2c25746a38a5c0 /sql/sql_time.cc
parent284479c085f005a705d31e37e9cd85bb670d615e (diff)
parent30b007a1ab5dd950fe451d78c29805f09cc0b98f (diff)
downloadmariadb-git-7d3a67a97666adb586e2de0cdf4bca7904642d02.tar.gz
Merge 5.3->5.5
Diffstat (limited to 'sql/sql_time.cc')
-rw-r--r--sql/sql_time.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/sql/sql_time.cc b/sql/sql_time.cc
index 66fd9f49cb6..c5c65391758 100644
--- a/sql/sql_time.cc
+++ b/sql/sql_time.cc
@@ -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)