summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorholyfoot/hf@hfmain.(none) <>2007-11-30 22:29:34 +0400
committerholyfoot/hf@hfmain.(none) <>2007-11-30 22:29:34 +0400
commitad52a590cf4eb9b4c995ad57d2c809a6291a7f36 (patch)
tree219166fb878a5ed568770341729df71f4fadafa0 /sql
parent83e0fef8473fe3b9184b6a36cfe915eb309d77dc (diff)
parentd02855d9156385b821671c39fc128d2816c6c2be (diff)
downloadmariadb-git-ad52a590cf4eb9b4c995ad57d2c809a6291a7f36.tar.gz
Merge mysql.com:/home/hf/work/mrg/my41-mrg
into mysql.com:/home/hf/work/mrg/my50-mrg
Diffstat (limited to 'sql')
-rw-r--r--sql/mysqld.cc20
1 files changed, 17 insertions, 3 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 4c459d34a55..4e06a8d1551 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -184,7 +184,7 @@ typedef fp_except fp_except_t;
this on freebsd
*/
-inline void reset_floating_point_exceptions()
+inline void set_proper_floating_point_mode()
{
/* Don't fall for overflow, underflow,divide-by-zero or loss of precision */
#if defined(__i386__)
@@ -195,8 +195,22 @@ inline void reset_floating_point_exceptions()
FP_X_IMP));
#endif
}
+#elif defined(__sgi)
+/* for IRIX to use set_fpc_csr() */
+#include <sys/fpu.h>
+
+inline void set_proper_floating_point_mode()
+{
+ /* Enable denormalized DOUBLE values support for IRIX */
+ {
+ union fpc_csr n;
+ n.fc_word = get_fpc_csr();
+ n.fc_struct.flush = 0;
+ set_fpc_csr(n.fc_word);
+ }
+}
#else
-#define reset_floating_point_exceptions()
+#define set_proper_floating_point_mode()
#endif /* __FreeBSD__ && HAVE_IEEEFP_H */
} /* cplusplus */
@@ -3125,7 +3139,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();
+ set_proper_floating_point_mode();
init_thr_lock();
#ifdef HAVE_REPLICATION
init_slave_list();