summaryrefslogtreecommitdiff
path: root/sql/field.cc
diff options
context:
space:
mode:
authorramil@mysql.com <>2005-11-29 18:06:58 +0400
committerramil@mysql.com <>2005-11-29 18:06:58 +0400
commitb46c240b961b131aba3f92142643e46d38c842f5 (patch)
tree23c0dfc09e0062efed62db97e74b6c9eb564addd /sql/field.cc
parent65e6ecb861c22a6a80c76457a0d340fcaf7f0d28 (diff)
downloadmariadb-git-b46c240b961b131aba3f92142643e46d38c842f5.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/field.cc')
-rw-r--r--sql/field.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/field.cc b/sql/field.cc
index b70e2a92618..6de2a731030 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -3953,7 +3953,7 @@ longlong Field_float::val_int(void)
else
#endif
memcpy_fixed((byte*) &j,ptr,sizeof(j));
- return ((longlong) j);
+ return (longlong) rint(j);
}
@@ -4241,7 +4241,7 @@ longlong Field_double::val_int(void)
else
#endif
doubleget(j,ptr);
- return ((longlong) j);
+ return (longlong) rint(j);
}