The problem was that a pthread.h header used by gcc did not
declare the pthread_setscheprio, yet the function is implemented
by the function is implemented, causing a autoconf check to pass
and compilation with C++ to fail. The solution is to add a
autoconf check to ensure that the function is properly declared.
configure.in:
Check that the pthread_setschedprio is declared.
Change the default optimization level for Sun Studio to "-O1".
This is a workaround for a Sun Studio bug (see bug #41710
comments for details):
1. Use $GCC instead of $ac_cv_prog_gcc to check for gcc, since
the first one is the only documented way to do it.
2. Use $GXX instead of $ac_cv_prog_cxx_g to check for g++,
since the latter is set to "yes" when the C++ compiler accepts
"-g" which is the case for both g++ and CC.
3. When building with Sun Studio, set the default values for
CFLAGS/CXXFLAGS to "-O1", since unlike GCC, Sun Studio
interprets "-O" as "-xO3" (see the manual pages for cc and CC).
configure.in:
1. Use $GCC instead of $ac_cv_prog_gcc to check for gcc, since
the first one is the only documented way to do it.
2. Use $GXX instead of $ac_cv_prog_cxx_g to check for g++,
since the latter is set to "yes" when the C++ compiler accepts
"-g" which is the case for both g++ and CC.
3. When building with Sun Studio, set the default values for
CFLAGS/CXXFLAGS to "-O1", since unlike GCC, Sun Studio
interprets "-O" as "-xO3" (see the manual pages for cc and CC).
produce incorrect results for ROUND()
Added a workaround and a configure check to test whether
isinf() is affected by the GCC bug #39228.
Since no code in MySQL server is currently affected by that
bug, the patch is actually a safeguard for possible future
code modifications. No test cases or changelog entries are
needed.
configure.in:
Added a configure check to test whether isinf() is safe to use
in C code.
include/my_global.h:
Added a workaround for GCC bug #39228.
Both of our own implementations of rint(3) were inconsistent with the
most common behavior of rint() on those platforms that have it: round
to nearest, break ties by rounding to nearest even.
Fixed by leaving just one implementation of rint() in our source tree,
and changing its behavior to match the most common native
implementations on other platforms.
configure.in:
Added checks for fenv.h and fesetround().
include/config-win.h:
Removed the incorrect implementation of rint() for Windows.
include/my_global.h:
Added an rint() implementation for platforms that do not have it.
mysql-test/r/func_math.result:
Added a test case for bug #15936.
mysql-test/t/func_math.test:
Added a test case for bug #15936.
sql/mysqld.cc:
Explicitly set the FPU rounding mode with fesetround().
The problem is that MySQL use of pthread_setschedprio is not
supported by i5/OS and the default system behavior for unsupported
calls is to emit a SIGILL signal which causes the server to
abort.
The solution is to treat the pthread_setschedprio as inexistent
when compiling binaries for i5/OS. This also does not invalidate
the fix for bug 38477 as the only supported dispatch class is
SCHED_OTHER (which is passed to pthread_setschedparam).
configure.in:
Skip pthread_setschedprio check on i5/OS.
conflicts:
Text conflict in client/mysqltest.cc
Text conflict in mysql-test/include/wait_until_connected_again.inc
Text conflict in mysql-test/lib/mtr_report.pm
Text conflict in mysql-test/mysql-test-run.pl
Text conflict in mysql-test/r/events_bugs.result
Text conflict in mysql-test/r/log_state.result
Text conflict in mysql-test/r/myisam_data_pointer_size_func.result
Text conflict in mysql-test/r/mysqlcheck.result
Text conflict in mysql-test/r/query_cache.result
Text conflict in mysql-test/r/status.result
Text conflict in mysql-test/suite/binlog/r/binlog_index.result
Text conflict in mysql-test/suite/binlog/r/binlog_innodb.result
Text conflict in mysql-test/suite/rpl/r/rpl_packet.result
Text conflict in mysql-test/suite/rpl/t/rpl_packet.test
Text conflict in mysql-test/t/disabled.def
Text conflict in mysql-test/t/events_bugs.test
Text conflict in mysql-test/t/log_state.test
Text conflict in mysql-test/t/myisam_data_pointer_size_func.test
Text conflict in mysql-test/t/mysqlcheck.test
Text conflict in mysql-test/t/query_cache.test
Text conflict in mysql-test/t/rpl_init_slave_func.test
Text conflict in mysql-test/t/status.test