List:Commits« Previous MessageNext Message »
From:Alexey Kopytov Date:December 13 2007 11:40am
Subject:bk commit into 6.0 tree (kaa:1.2757) WL#2934
View as plain text  
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-13 13:39:47+03:00, kaa@polly.(none) +3 -0
  Various portability fixes for failing tests after the patch for WL#2934.

  configure.in@stripped, 2007-12-13 13:39:36+03:00, kaa@polly.(none) +15 -0
    Added -mno-fused-madd to CFLAGS on PowerPC.

  mysql-test/t/gis.test@stripped, 2007-12-13 13:39:37+03:00, kaa@polly.(none) +6 -0
    Do --replace_result, because IA-64 gcc backend has no way to turn off
    fused multiply-add code generation.

  mysql-test/t/parser.test@stripped, 2007-12-13 13:39:37+03:00, kaa@polly.(none) +4 -0
    --replace_result due to buggy atan() in 64-bit version of libm.so on
    Solaris.

diff -Nrup a/configure.in b/configure.in
--- a/configure.in	2007-12-10 21:59:20 +03:00
+++ b/configure.in	2007-12-13 13:39:36 +03:00
@@ -351,6 +351,21 @@ case "$target_os" in
     AC_SUBST(TARGET_SOLARIS)
   ;;
 esac
+
+# The following is required for portable results of floating point calculations
+# on PowerPC. The same must also be done for IA-64, but this options is missing
+# in the IA-64 gcc backend.
+
+if test "$GCC" = "yes"
+then
+  case "$host_cpu" in
+    *ppc* | *powerpc*)
+      CFLAGS="$CFLAGS -mno-fused-madd"
+      CXXFLAGS="$CXXFLAGS -mno-fused-madd"
+    ;;
+  esac
+fi
+
 AC_SUBST(CC)
 AC_SUBST(CFLAGS)
 AC_SUBST(CXX)
diff -Nrup a/mysql-test/t/gis.test b/mysql-test/t/gis.test
--- a/mysql-test/t/gis.test	2007-10-23 12:33:17 +04:00
+++ b/mysql-test/t/gis.test	2007-12-13 13:39:37 +03:00
@@ -353,9 +353,15 @@ insert into t1 values ('85984',GeomFromT
 36.248666,-115.263639 36.247466,-115.263839 36.252766,-115.261439
 36.252666,-115.261439 36.247366,-115.247239 36.247066)))'));
 
+# Expected result is 115.31877315203187, but IA64 returns 115.31877315203188
+# due to fused multiply-add
+--replace_result 115.31877315203188 115.31877315203187
 select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
 t1 where object_id=85998;
 
+# Expected result is -114.87787186923313, but IA64 returns -114.87787186923326
+# due to fused multiply-add
+--replace result -114.87787186923326 -114.87787186923313
 select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
 t1 where object_id=85984;
 
diff -Nrup a/mysql-test/t/parser.test b/mysql-test/t/parser.test
--- a/mysql-test/t/parser.test	2007-11-30 14:34:22 +03:00
+++ b/mysql-test/t/parser.test	2007-12-13 13:39:37 +03:00
@@ -599,6 +599,10 @@ select conv(255 AS p1, 10 AS p2, 16 AS p
 
 # Native function with a variable number of arguments
 
+# Bug in libm.so on Solaris:
+#   atan(10) from 32-bit version returns 1.4711276743037347
+#   atan(10) from 64-bit version returns 1.4711276743037345
+--replace_result 1.4711276743037345 1.4711276743037347
 select atan(10);
 -- error ER_WRONG_PARAMETERS_TO_NATIVE_FCT
 select atan(10 AS p1);
Thread
bk commit into 6.0 tree (kaa:1.2757) WL#2934Alexey Kopytov13 Dec