diff options
author | unknown <holyfoot/hf@hfmain.(none)> | 2007-11-30 22:29:34 +0400 |
---|---|---|
committer | unknown <holyfoot/hf@hfmain.(none)> | 2007-11-30 22:29:34 +0400 |
commit | 4100e3e4c2408cb1f28823842db8d8d448aebe4b (patch) | |
tree | 219166fb878a5ed568770341729df71f4fadafa0 | |
parent | 11c17294216119ed521003226888a6f7199671d0 (diff) | |
parent | d87a75c15d93216d92cac33f6d504aabca34ff92 (diff) | |
download | mariadb-git-4100e3e4c2408cb1f28823842db8d8d448aebe4b.tar.gz |
Merge mysql.com:/home/hf/work/mrg/my41-mrg
into mysql.com:/home/hf/work/mrg/my50-mrg
include/mysql_com.h:
Auto merged
sql/mysqld.cc:
Auto merged
-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 fc03d98194b..94b34c1c3f0 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -387,11 +387,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; /* TODO: add a notion for determinism of the UDF. 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(); |