summaryrefslogtreecommitdiff
path: root/mysql-test/r/type_float.result
diff options
context:
space:
mode:
authorAlexey Kopytov <alexeyk@mysql.com>2008-12-03 19:15:39 +0300
committerAlexey Kopytov <alexeyk@mysql.com>2008-12-03 19:15:39 +0300
commit91f0c94c23eb9b48421d9590662666de9e4c75d5 (patch)
tree897de4fad83899e4bae91b9435028a0240815aa6 /mysql-test/r/type_float.result
parent7f9e0b9bfb71bd3e47c48bb77f11df76feb1b7ad (diff)
downloadmariadb-git-91f0c94c23eb9b48421d9590662666de9e4c75d5.tar.gz
Fix for bug #27483: Casting 'scientific notation type' to 'unsigned
bigint' fails on windows. Visual Studio does not take into account some x86 hardware limitations which leads to incorrect results when converting large DOUBLE values to BIGINT UNSIGNED ones. Fixed by adding a workaround for double->ulonglong conversion on Windows. include/config-win.h: Added double2ulonglong(double) function implementing a workaround for broken double->ulonglong conversion on Windows/x86. include/my_global.h: Define double2ulonglong() as a simple typecast for anything but Windows. mysql-test/r/type_float.result: Added a test case for bug #27483. mysql-test/t/type_float.test: Added a test case for bug #27483.
Diffstat (limited to 'mysql-test/r/type_float.result')
-rw-r--r--mysql-test/r/type_float.result13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result
index f1075604ca9..e7f17bd75a7 100644
--- a/mysql-test/r/type_float.result
+++ b/mysql-test/r/type_float.result
@@ -392,4 +392,17 @@ f1 + 0e0
1.0000000150475e+30
-1.0000000150475e+30
drop table t1;
+create table t1(d double, u bigint unsigned);
+insert into t1(d) values (9.2233720368547777e+18),
+(9.223372036854779e18),
+(9.22337203685479e18),
+(1.84e19);
+update t1 set u = d;
+select * from t1;
+d u
+9.22337203685478e+18 9223372036854775808
+9.22337203685478e+18 9223372036854779904
+9.22337203685479e+18 9223372036854790144
+1.84e+19 18400000000000000000
+drop table t1;
End of 5.0 tests