Commit 9d83e2a7 authored by Joerg Bruehe's avatar Joerg Bruehe

Get rid ot the "net retry count" difference which

is not needed any more with current versions of FreeBSD.
(Entries 52410 and 52412 in the Bug DB)

That change is based on Dan Nelson replying on the
FreeBSD mailing list, freebsd-questions@freebsd.org
in a thread running from 2010-Apr-29 to 2010-May-1 titled
    "Need info about FreeBSD and interrupted system
     calls for MySQL code"

Also, ensure the cmake settings correspond to the autotools
ones: Add "HAVE_BROKEN_REALPATH" to cmake.

cmake/os/FreeBSD.cmake:
  With current versions of FreeBSD, threading is not done on
  the user-level any more, so the huge "net retry count"
  is not needed any more.
  However, it is still being kept for now, so that it can be
  re-activated should the need arise.
  
  In addition, set "HAVE_BROKEN_REALPATH" to completely
  mirrot the autotools path.
configure.in:
  With current versions of FreeBSD, threading is not done on
  the user-level any more, so the huge "net retry count"
  is not needed any more.
  However, it is still being kept for now, so that it can be
  re-activated should the need arise.
  
  Adapt the informational messages to the path taken.
parent 35eecf3d
# Copyright (C) 2010 Sun Microsystems, Inc # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This file includes FreeBSD specific options and quirks, related to system checks # This file includes FreeBSD specific options and quirks, related to system checks
#Legacy option, maybe not needed anymore , taken as is from autotools build
ADD_DEFINITIONS(-DNET_RETRY_COUNT=1000000)
# Should not be needed any more, but kept for easy resurrection if needed
# #Legacy option, maybe not needed anymore , taken as is from autotools build
# ADD_DEFINITIONS(-DNET_RETRY_COUNT=1000000)
ADD_DEFINITIONS(-DHAVE_BROKEN_REALPATH)
dnl -*- ksh -*- dnl -*- ksh -*-
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
# Copyright (C) 2008-2009 Sun Microsystems, Inc # Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
...@@ -1235,14 +1235,22 @@ case $SYSTEM_TYPE in ...@@ -1235,14 +1235,22 @@ case $SYSTEM_TYPE in
fi fi
;; ;;
*freebsd*|*dragonfly*) *freebsd*|*dragonfly*)
AC_MSG_WARN([Adding fix for interrupted reads]) dnl These dependencies have not really been checked for some time
OSVERSION=`sysctl -a | grep osreldate | awk '{ print $2 }'` OSVERSION=`sysctl -a | grep osreldate | awk '{ print $2 }'`
if test "$OSVERSION" -gt "480100" && \ if test "$OSVERSION" -gt "600000"
then
# Post user-level threads, MYSQLD_NET_RETRY_COUNT is not needed any more
AC_MSG_WARN([Adding fix for broken realpath])
CFLAGS="$CFLAGS -DHAVE_BROKEN_REALPATH"
CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_REALPATH"
elif test "$OSVERSION" -gt "480100" && \
test "$OSVERSION" -lt "500000" || \ test "$OSVERSION" -lt "500000" || \
test "$OSVERSION" -gt "500109" test "$OSVERSION" -gt "500109"
then then
AC_MSG_WARN([Adding fix for interrupted reads])
CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000" CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000"
else else
AC_MSG_WARN([Adding fix for interrupted reads and broken realpath])
CFLAGS="$CFLAGS -DHAVE_BROKEN_REALPATH" CFLAGS="$CFLAGS -DHAVE_BROKEN_REALPATH"
CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000 -DHAVE_BROKEN_REALPATH" CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000 -DHAVE_BROKEN_REALPATH"
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment