Below is the list of changes that have just been committed into a local
6.0 repository of kaa. When kaa does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-12-10 21:59:26+03:00, kaa@polly.(none) +7 -0
Explicit type casts to make VC++ happy.
For x86, set FPU to the 64-bit mode. We get portability of results at
the cost of losing precision on x86.
configure.in@stripped, 2007-12-10 21:59:20+03:00, kaa@polly.(none) +2 -2
Added a check for fpu_control.h
mysql-test/r/archive_gis.result@stripped, 2007-12-10 21:59:20+03:00, kaa@polly.(none) +2 -2
Fixed test results. We get portability from the 64-bit FPU mode, but
lose precision.
mysql-test/r/gis.result@stripped, 2007-12-10 21:59:20+03:00, kaa@polly.(none) +4 -4
Fixed test results. We get portability from the 64-bit FPU mode, but
lose precision.
mysql-test/r/innodb_gis.result@stripped, 2007-12-10 21:59:20+03:00, kaa@polly.(none) +2 -2
Fixed test results. We get portability from the 64-bit FPU mode, but
lose precision.
mysql-test/suite/ndb/r/ndb_gis.result@stripped, 2007-12-10 21:59:20+03:00, kaa@polly.(none) +4 -4
Fixed test results. We get portability from the 64-bit FPU mode, but
lose precision.
sql/mysqld.cc@stripped, 2007-12-10 21:59:20+03:00, kaa@polly.(none) +23 -13
For x86, set FPU to the 64-bit mode. We get portability of results at
the cost of losing precision on x86.
strings/dtoa.c@stripped, 2007-12-10 21:59:20+03:00, kaa@polly.(none) +10 -10
Explicit type casts to make VC++ happy.
diff -Nrup a/configure.in b/configure.in
--- a/configure.in 2007-12-04 12:27:46 +03:00
+++ b/configure.in 2007-12-10 21:59:20 +03:00
@@ -778,8 +778,8 @@ AC_TYPE_SIZE_T
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \
- memory.h pwd.h select.h \
+AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h fpu_control.h ieeefp.h \
+ limits.h memory.h pwd.h select.h \
stdlib.h stddef.h \
strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
diff -Nrup a/mysql-test/r/archive_gis.result b/mysql-test/r/archive_gis.result
--- a/mysql-test/r/archive_gis.result 2007-12-07 19:56:08 +03:00
+++ b/mysql-test/r/archive_gis.result 2007-12-10 21:59:20 +03:00
@@ -326,8 +326,8 @@ fid IsClosed(g)
116 0
SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid;
fid AsText(Centroid(g))
-117 POINT(55.58852775304244 17.42653606411398)
-118 POINT(55.58852775304244 17.42653606411398)
+117 POINT(55.58852775304245 17.426536064113982)
+118 POINT(55.58852775304245 17.426536064113982)
119 POINT(2 2)
SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid;
fid Area(g)
diff -Nrup a/mysql-test/r/gis.result b/mysql-test/r/gis.result
--- a/mysql-test/r/gis.result 2007-12-08 20:14:04 +03:00
+++ b/mysql-test/r/gis.result 2007-12-10 21:59:20 +03:00
@@ -318,8 +318,8 @@ fid IsClosed(g)
116 0
SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon;
fid AsText(Centroid(g))
-117 POINT(55.58852775304244 17.42653606411398)
-118 POINT(55.58852775304244 17.42653606411398)
+117 POINT(55.58852775304245 17.426536064113982)
+118 POINT(55.58852775304245 17.426536064113982)
119 POINT(2 2)
SELECT fid, Area(g) FROM gis_multi_polygon;
fid Area(g)
@@ -651,11 +651,11 @@ insert into t1 values ('85984',GeomFromT
select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
t1 where object_id=85998;
object_id geometrytype(geo) ISSIMPLE(GEO) ASTEXT(centroid(geo))
-85998 MULTIPOLYGON 0 POINT(115.31877315203185 -36.23747282102153)
+85998 MULTIPOLYGON 0 POINT(115.31877315203187 -36.23747282102153)
select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
t1 where object_id=85984;
object_id geometrytype(geo) ISSIMPLE(GEO) ASTEXT(centroid(geo))
-85984 MULTIPOLYGON 0 POINT(-114.87787186923329 36.33101763469042)
+85984 MULTIPOLYGON 0 POINT(-114.87787186923313 36.33101763469049)
drop table t1;
create table t1 (fl geometry not null);
insert into t1 values (1);
diff -Nrup a/mysql-test/r/innodb_gis.result b/mysql-test/r/innodb_gis.result
--- a/mysql-test/r/innodb_gis.result 2007-12-08 20:14:04 +03:00
+++ b/mysql-test/r/innodb_gis.result 2007-12-10 21:59:20 +03:00
@@ -326,8 +326,8 @@ fid IsClosed(g)
116 0
SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid;
fid AsText(Centroid(g))
-117 POINT(55.58852775304244 17.42653606411398)
-118 POINT(55.58852775304244 17.42653606411398)
+117 POINT(55.58852775304245 17.426536064113982)
+118 POINT(55.58852775304245 17.426536064113982)
119 POINT(2 2)
SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid;
fid Area(g)
diff -Nrup a/mysql-test/suite/ndb/r/ndb_gis.result b/mysql-test/suite/ndb/r/ndb_gis.result
--- a/mysql-test/suite/ndb/r/ndb_gis.result 2007-12-08 20:14:06 +03:00
+++ b/mysql-test/suite/ndb/r/ndb_gis.result 2007-12-10 21:59:20 +03:00
@@ -326,8 +326,8 @@ fid IsClosed(g)
116 0
SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid;
fid AsText(Centroid(g))
-117 POINT(55.58852775304244 17.42653606411398)
-118 POINT(55.58852775304244 17.42653606411398)
+117 POINT(55.58852775304245 17.426536064113982)
+118 POINT(55.58852775304245 17.426536064113982)
119 POINT(2 2)
SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid;
fid Area(g)
@@ -878,8 +878,8 @@ fid IsClosed(g)
116 0
SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid;
fid AsText(Centroid(g))
-117 POINT(55.58852775304244 17.42653606411398)
-118 POINT(55.58852775304244 17.42653606411398)
+117 POINT(55.58852775304245 17.426536064113982)
+118 POINT(55.58852775304245 17.426536064113982)
119 POINT(2 2)
SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid;
fid Area(g)
diff -Nrup a/sql/mysqld.cc b/sql/mysqld.cc
--- a/sql/mysqld.cc 2007-12-08 20:14:08 +03:00
+++ b/sql/mysqld.cc 2007-12-10 21:59:20 +03:00
@@ -170,25 +170,35 @@ int initgroups(const char *,unsigned int
#ifdef HAVE_FP_EXCEPT // Fix type conflict
typedef fp_except fp_except_t;
#endif
+#endif /* __FreeBSD__ && HAVE_IEEEFP_H */
- /* We can't handle floating point exceptions with threads, so disable
- this on freebsd
- */
-
-inline void reset_floating_point_exceptions()
+#ifdef HAVE_FPU_CONTROL_H
+#include <fpu_control.h>
+#endif
+
+inline void setup_fpu()
{
- /* Don't fall for overflow, underflow,divide-by-zero or loss of precision */
+#if defined(__FreeBSD__) && defined(HAVE_IEEEFP_H)
+ /*
+ We can't handle floating point exceptions with threads, so disable
+ this on freebsd.
+ Don't fall for overflow, underflow,divide-by-zero or loss of precision
+ */
#if defined(__i386__)
fpsetmask(~(FP_X_INV | FP_X_DNML | FP_X_OFL | FP_X_UFL | FP_X_DZ |
FP_X_IMP));
#else
- fpsetmask(~(FP_X_INV | FP_X_OFL | FP_X_UFL | FP_X_DZ |
- FP_X_IMP));
-#endif
-}
-#else
-#define reset_floating_point_exceptions()
+ fpsetmask(~(FP_X_INV | FP_X_OFL | FP_X_UFL | FP_X_DZ |
+ FP_X_IMP));
+#endif /* __i386__ */
#endif /* __FreeBSD__ && HAVE_IEEEFP_H */
+#if defined(__i386__) && defined(HAVE_FPU_CONTROL_H) && defined(_FPU_DOUBLE)
+ fpu_control_t cw;
+ _FPU_GETCW(cw);
+ cw= (cw & ~_FPU_EXTENDED) | _FPU_DOUBLE;
+ _FPU_SETCW(cw);
+#endif /* __i386__ && HAVE_FPU_CONTROL_H && _FPU_DOUBLE */
+}
} /* cplusplus */
@@ -3303,7 +3313,7 @@ static int init_server_components()
query_cache_init();
query_cache_resize(query_cache_size);
randominit(&sql_rand,(ulong) server_start_time,(ulong) server_start_time/2);
- reset_floating_point_exceptions();
+ setup_fpu();
init_thr_lock();
#ifdef HAVE_REPLICATION
init_slave_list();
diff -Nrup a/strings/dtoa.c b/strings/dtoa.c
--- a/strings/dtoa.c 2007-12-10 18:31:10 +03:00
+++ b/strings/dtoa.c 2007-12-10 21:59:20 +03:00
@@ -728,7 +728,7 @@ static Bigint *multadd(Bigint *b, int m,
{
y= *x * (ULLong)m + carry;
carry= y >> 32;
- *x++= y & FFFFFFFF;
+ *x++= (ULong)(y & FFFFFFFF);
}
while (++i < wds);
if (carry)
@@ -740,7 +740,7 @@ static Bigint *multadd(Bigint *b, int m,
Bfree(b, alloc);
b= b1;
}
- b->p.x[wds++]= carry;
+ b->p.x[wds++]= (ULong) carry;
b->wds= wds;
}
return b;
@@ -914,10 +914,10 @@ static Bigint *mult(Bigint *a, Bigint *b
{
z= *x++ * (ULLong)y + *xc + carry;
carry= z >> 32;
- *xc++= z & FFFFFFFF;
+ *xc++= (ULong) (z & FFFFFFFF);
}
while (x < xae);
- *xc= carry;
+ *xc= (ULong) carry;
}
}
for (xc0= c->p.x, xc= xc0 + wc; wc > 0 && !*--xc; --wc) ;
@@ -1107,14 +1107,14 @@ static Bigint *diff(Bigint *a, Bigint *b
{
y= (ULLong)*xa++ - *xb++ - borrow;
borrow= y >> 32 & (ULong)1;
- *xc++= y & FFFFFFFF;
+ *xc++= (ULong) (y & FFFFFFFF);
}
while (xb < xbe);
while (xa < xae)
{
y= *xa++ - borrow;
borrow= y >> 32 & (ULong)1;
- *xc++= y & FFFFFFFF;
+ *xc++= (ULong) (y & FFFFFFFF);
}
while (!*--xc)
wa--;
@@ -1920,7 +1920,7 @@ static double my_strtod_int(const char *
{
if (aadj <= 0x7fffffff)
{
- if ((z= aadj) <= 0)
+ if ((z= (ULong) aadj) <= 0)
z= 1;
aadj= z;
aadj1= dsign ? aadj : -aadj;
@@ -2017,7 +2017,7 @@ static int quorem(Bigint *b, Bigint *S)
carry= ys >> 32;
y= *bx - (ys & FFFFFFFF) - borrow;
borrow= y >> 32 & (ULong)1;
- *bx++= y & FFFFFFFF;
+ *bx++= (ULong) (y & FFFFFFFF);
}
while (sx <= sxe);
if (!*bxe)
@@ -2041,7 +2041,7 @@ static int quorem(Bigint *b, Bigint *S)
carry= ys >> 32;
y= *bx - (ys & FFFFFFFF) - borrow;
borrow= y >> 32 & (ULong)1;
- *bx++= y & FFFFFFFF;
+ *bx++= (ULong) (y & FFFFFFFF);
}
while (sx <= sxe);
bx= b->p.x;
@@ -2377,7 +2377,7 @@ static char *dtoa(double d, int mode, in
dval(eps)= 0.5/tens[ilim-1] - dval(eps);
for (i= 0;;)
{
- L= dval(d);
+ L= (Long) dval(d);
dval(d)-= L;
*s++= '0' + (int)L;
if (dval(d) < dval(eps))
| Thread |
|---|
| • bk commit into 6.0 tree (kaa:1.2751) | Alexey Kopytov | 10 Dec |