#At file:///Users/kgeorge/mysql/work/B11749418-5.1/ based on revid:anitha.gopi@stripped
3637 Georgi Kodinov 2011-06-06
Bug #11749418: 38965: TEST CASES GIS-RTREE, TYPE_FLOAT, TYPE_NEWDECIMAL
FAIL IN EMBEDDED SERVER
FreeBSD 64 bit needs the FP_X_DNML to fpsetmask() to prevent exceptions from
propagating into mysql (as a threaded application).
However fpsetmask() itself is deprecated in favor of fedisableexcept().
1. Fixed the #ifdef to check for FP_X_DNML instead of i386.
2. Added a configure.in check for fedisableexcept() and, if present,
this function is called insted of the fpsetmask().
No need for new tests, as the existing tests cover this already.
Removed the affected tests from the experimental list.
modified:
configure.in
mysql-test/collections/default.experimental
sql/mysqld.cc
=== modified file 'configure.in'
--- a/configure.in 2011-05-27 11:09:25 +0000
+++ b/configure.in 2011-06-06 10:13:54 +0000
@@ -2061,7 +2061,8 @@ AC_CHECK_FUNCS(alarm bfill bmove bsearch
sighold sigset sigthreadmask port_create sleep \
snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr \
strtol strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr \
- posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd printstack)
+ posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd printstack \
+ fedisableexcept)
#
#
=== modified file 'mysql-test/collections/default.experimental'
--- a/mysql-test/collections/default.experimental 2011-06-03 08:43:10 +0000
+++ b/mysql-test/collections/default.experimental 2011-06-06 10:13:54 +0000
@@ -46,6 +46,3 @@ parts.partition_mgm_lc1_ndb
parts.partition_mgm_lc2_ndb # joro : NDB tests marked as experimental as agreed with bochklin
parts.partition_syntax_ndb # joro : NDB tests marked as experimental as agreed with bochklin
parts.partition_value_ndb # joro : NDB tests marked as experimental as agreed with bochklin
-main.gis-rtree # svoj: due to BUG#11749418
-main.type_float # svoj: due to BUG#11749418
-main.type_newdecimal # svoj: due to BUG#11749418
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2011-05-26 10:50:43 +0000
+++ b/sql/mysqld.cc 2011-06-06 10:13:54 +0000
@@ -171,12 +171,12 @@ static void getvolumeID(BYTE *volumeName
int initgroups(const char *,unsigned int);
#endif
-#if defined(__FreeBSD__) && defined(HAVE_IEEEFP_H)
+#if defined(__FreeBSD__) && defined(HAVE_IEEEFP_H) && !defined(HAVE_FEDISABLEEXCEPT)
#include <ieeefp.h>
#ifdef HAVE_FP_EXCEPT // Fix type conflict
typedef fp_except fp_except_t;
#endif
-#endif /* __FreeBSD__ && HAVE_IEEEFP_H */
+#endif /* __FreeBSD__ && HAVE_IEEEFP_H && !HAVE_FEDISABLEEXCEPT */
#ifdef HAVE_SYS_FPU_H
/* for IRIX to use set_fpc_csr() */
#include <sys/fpu.h>
@@ -202,19 +202,24 @@ extern "C" my_bool reopen_fstreams(const
inline void setup_fpu()
{
-#if defined(__FreeBSD__) && defined(HAVE_IEEEFP_H)
+#if defined(__FreeBSD__) && defined(HAVE_IEEEFP_H) && !defined(HAVE_FEDISABLEEXCEPT)
/* We can't handle floating point exceptions with threads, so disable
this on freebsd
- Don't fall for overflow, underflow,divide-by-zero or loss of precision
+ Don't fall for overflow, underflow,divide-by-zero or loss of precision.
+ fpsetmask() is deprecated in favor of fedisableexcept() in C99.
*/
-#if defined(__i386__)
+#if defined(FP_X_DNML)
fpsetmask(~(FP_X_INV | FP_X_DNML | FP_X_OFL | FP_X_UFL | FP_X_DZ |
FP_X_IMP));
#else
fpsetmask(~(FP_X_INV | FP_X_OFL | FP_X_UFL | FP_X_DZ |
FP_X_IMP));
-#endif /* __i386__ */
-#endif /* __FreeBSD__ && HAVE_IEEEFP_H */
+#endif /* FP_X_DNML */
+#endif /* __FreeBSD__ && HAVE_IEEEFP_H && !HAVE_FEDISABLEEXCEPT */
+
+#ifdef HAVE_FEDISABLEEXCEPT
+ fedisableexcept(FE_ALL_EXCEPT);
+#endif
#ifdef HAVE_FESETROUND
/* Set FPU rounding mode to "round-to-nearest" */
Attachment: [text/bzr-bundle] bzr/georgi.kodinov@oracle.com-20110606101354-j8vri8ikoli15iu3.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1 branch (Georgi.Kodinov:3637) Bug#11749418 | Georgi Kodinov | 6 Jun |