List:Commits« Previous MessageNext Message »
From:holyfoot Date:November 28 2007 3:58pm
Subject:bk commit into 4.1 tree (holyfoot:1.2698) BUG#29085
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of hf. When hf 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-11-28 18:58:20+04:00, holyfoot@stripped +1 -0
  Bug #29085 A small double precision number becomes zero.
  
  Denormalized DOUBLE-s can't be properly handled by old MIPS processors.
  So we need to enable specific mode for them so IRIX will do use
  software round to handle such numbers. 

  sql/mysqld.cc@stripped, 2007-11-28 18:58:19+04:00, holyfoot@stripped +15 -0
    Bug #29085 A small double precision number becomes zero.
    
    #ifdef __sgi code added to enable denormalized DOUBLE-s on IRIX

diff -Nrup a/sql/mysqld.cc b/sql/mysqld.cc
--- a/sql/mysqld.cc	2007-03-24 16:03:25 +04:00
+++ b/sql/mysqld.cc	2007-11-28 18:58:19 +04:00
@@ -189,6 +189,11 @@ int initgroups(const char *,unsigned int
 typedef fp_except fp_except_t;
 #endif
 
+/* for IRIX to use set_fpc_csr() */
+#ifdef __sgi
+#include <sys/fpu.h>
+#endif /*__sgi*/
+
   /* We can't handle floating point exceptions with threads, so disable
      this on freebsd
   */
@@ -3154,6 +3159,16 @@ int main(int argc, char **argv)
   DEBUGGER_OFF;
 
   MY_INIT(argv[0]);		// init my_sys library & pthreads
+
+  /* Enable denormalized DOUBLE values support for IRIX */
+#ifdef __sgi
+  {
+    union fpc_csr n;
+    n.fc_word = get_fpc_csr();
+    n.fc_struct.flush = 0;
+    set_fpc_csr(n.fc_word);
+  }
+#endif /*__sgi*/
 
   /* Set signal used to kill MySQL */
 #if defined(SIGUSR2)
Thread
bk commit into 4.1 tree (holyfoot:1.2698) BUG#29085holyfoot28 Nov