diff options
author | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-12-01 13:09:57 +0400 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-12-01 13:09:57 +0400 |
commit | d4a9a422f79a5e72dbe51e598680006f353ba075 (patch) | |
tree | 5395b48c6f660b139bf2f96507fa8863beabfdbd | |
parent | 6facf554bde0d1e6810ae008a007a994abb475d6 (diff) | |
parent | d87a75c15d93216d92cac33f6d504aabca34ff92 (diff) | |
download | mariadb-git-d4a9a422f79a5e72dbe51e598680006f353ba075.tar.gz |
Merge bk@192.168.21.1:mysql-4.1-opt
into mysql.com:/home/hf/work/mrg/my41-mrg
-rw-r--r-- | include/mysql_com.h | 10 | ||||
-rw-r--r-- | sql/mysqld.cc | 20 |
2 files changed, 22 insertions, 8 deletions
diff --git a/include/mysql_com.h b/include/mysql_com.h index 56c7f7d2ab5..016df41476b 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -325,11 +325,11 @@ typedef struct st_udf_args typedef struct st_udf_init { - my_bool maybe_null; /* 1 if function can return NULL */ - unsigned int decimals; /* for real functions */ - unsigned long max_length; /* For string functions */ - char *ptr; /* free pointer for function data */ - my_bool const_item; /* 0 if result is independent of arguments */ + my_bool maybe_null; /* 1 if function can return NULL */ + unsigned int decimals; /* for real functions */ + unsigned long max_length; /* For string functions */ + char *ptr; /* free pointer for function data */ + my_bool const_item; /* 1 if function always returns the same value */ } UDF_INIT; /* Constants when using compression */ diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 51332053df6..62105e0093a 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -193,7 +193,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__) @@ -204,8 +204,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 */ @@ -2876,7 +2890,7 @@ static int init_server_components() query_cache_init(); query_cache_resize(query_cache_size); randominit(&sql_rand,(ulong) start_time,(ulong) start_time/2); - reset_floating_point_exceptions(); + set_proper_floating_point_mode(); init_thr_lock(); #ifdef HAVE_REPLICATION init_slave_list(); |