diff options
author | unknown <ramil@mysql.com> | 2005-11-30 11:17:25 +0400 |
---|---|---|
committer | unknown <ramil@mysql.com> | 2005-11-30 11:17:25 +0400 |
commit | 490a1e2855078d661b584ef690a05ca4defceebd (patch) | |
tree | 52f17b933d9481353fbb7a4d8bfe99acc842c9c9 /sql/item_sum.cc | |
parent | d54359ffdada0d949931c7cbe1ba816c3724d49f (diff) | |
download | mariadb-git-490a1e2855078d661b584ef690a05ca4defceebd.tar.gz |
Addition to fix for bug #12956: cast make differ rounding.
- use rint() in some other val_int() methods as well.
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r-- | sql/item_sum.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 506d2a16108..626eb63d04f 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -452,7 +452,7 @@ longlong Item_sum_sum::val_int() &result); return result; } - return (longlong) val_real(); + return (longlong) rint(val_real()); } @@ -1285,7 +1285,7 @@ longlong Item_sum_hybrid::val_int() return sum_int; } default: - return (longlong) Item_sum_hybrid::val_real(); + return (longlong) rint(Item_sum_hybrid::val_real()); } } @@ -2001,7 +2001,7 @@ double Item_avg_field::val_real() longlong Item_avg_field::val_int() { - return (longlong) val_real(); + return (longlong) rint(val_real()); } |