diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-09-20 16:02:58 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2018-09-20 16:02:58 +0400 |
commit | 0c6455aa4658790439a58956f05df200a5e380b8 (patch) | |
tree | b792c811420d76f7b6edc079f1a7e9923aebe9b0 /sql/item_func.cc | |
parent | e43bc02e7b2752f0deb88cd1edc24d827e01dca9 (diff) | |
download | mariadb-git-0c6455aa4658790439a58956f05df200a5e380b8.tar.gz |
MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong result
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 8b3c72dd328..73fc099252b 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -999,7 +999,10 @@ longlong Item_func_hybrid_result_type::val_int() case INT_RESULT: return int_op(); case REAL_RESULT: - return (longlong) rint(real_op()); + { + bool error; + return double_to_longlong(real_op(), unsigned_flag, &error); + } case STRING_RESULT: { if (is_temporal_type(field_type())) |