#At file:///home/andrei/MySQL/BZR/FIXES/5.0-bug33420-rpl_packet_Exec_Master_Log_Pos/
2735 Andrei Elkin 2008-12-08 [merge]
merge 5.0->5.0-bugteam for a local tree containing bug#33420 Test 'rpl_packet' fails randomly.
modified:
.bzr-mysql/default.conf
include/config-win.h
include/my_global.h
mysql-test/r/type_float.result
mysql-test/t/type_float.test
=== modified file '.bzr-mysql/default.conf'
--- a/.bzr-mysql/default.conf 2008-12-02 12:50:40 +0000
+++ b/.bzr-mysql/default.conf 2008-12-08 09:54:41 +0000
@@ -1,4 +1,4 @@
[MYSQL]
post_commit_to = "commits@stripped"
post_push_to = "commits@stripped"
-tree_name = "mysql-5.0"
+tree_name = "mysql-5.0-bugteam"
=== modified file 'include/config-win.h'
--- a/include/config-win.h 2008-03-27 22:35:56 +0000
+++ b/include/config-win.h 2008-12-03 16:15:39 +0000
@@ -245,6 +245,15 @@ inline double ulonglong2double(ulonglong
#define my_off_t2double(A) ulonglong2double(A)
#endif /* _WIN64 */
+inline ulonglong double2ulonglong(double d)
+{
+ double t= d - (double) 0x8000000000000000ULL;
+
+ if (t >= 0)
+ return ((ulonglong) t) + 0x8000000000000000ULL;
+ return (ulonglong) d;
+}
+
#if SIZEOF_OFF_T > 4
#define lseek(A,B,C) _lseeki64((A),(longlong) (B),(C))
#define tell(A) _telli64(A)
=== modified file 'include/my_global.h'
--- a/include/my_global.h 2008-04-28 18:58:32 +0000
+++ b/include/my_global.h 2008-12-03 16:15:39 +0000
@@ -713,6 +713,9 @@ typedef SOCKET_SIZE_TYPE size_socket;
#define ulonglong2double(A) ((double) (ulonglong) (A))
#define my_off_t2double(A) ((double) (my_off_t) (A))
#endif
+#ifndef double2ulonglong
+#define double2ulonglong(A) ((ulonglong) (double) (A))
+#endif
#endif
#ifndef offsetof
=== modified file 'mysql-test/r/type_float.result'
--- a/mysql-test/r/type_float.result 2007-10-15 07:22:11 +0000
+++ b/mysql-test/r/type_float.result 2008-12-03 16:15:39 +0000
@@ -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
=== modified file 'mysql-test/t/type_float.test'
--- a/mysql-test/t/type_float.test 2007-12-01 07:48:41 +0000
+++ b/mysql-test/t/type_float.test 2008-12-03 16:15:39 +0000
@@ -252,4 +252,21 @@ insert into t1 values (2e30), (-2e30);
select f1 + 0e0 from t1;
drop table t1;
+#
+# Bug #27483: Casting 'scientific notation type' to 'unsigned bigint' fails on
+# windows.
+#
+
+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;
+
+drop table t1;
+
--echo End of 5.0 tests
| Thread |
|---|
| • bzr commit into mysql-5.0-bugteam branch (aelkin:2735) Bug#33420 | Andrei Elkin | 8 Dec |