Commit c562aece authored by Davi Arnaut's avatar Davi Arnaut

Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled

Post-merge fix: remove --with-debug=full, it was only used for safemalloc.
parent 37da529d
......@@ -52,7 +52,6 @@ EXTRA_DIST = FINISH.sh \
compile-pentium-icc-yassl \
compile-pentium-max \
compile-pentium-myodbc \
compile-pentium-mysqlfs-debug \
compile-pentium-pgcc \
compile-pentium-valgrind-max \
compile-pentium64 \
......
......@@ -14,7 +14,6 @@ Usage: $0 [-h|-n] [configure-options]
-h, --help Show this help message.
-n, --just-print Don't actually run any commands; just print them.
-c, --just-configure Stop after running configure.
--with-debug=full Build with full debug.
--warning-mode=[old|pedantic|maintainer]
Influences the debug flags. Old is default.
--prefix=path Build with prefix 'path'.
......@@ -30,8 +29,6 @@ parse_options()
case "$1" in
--prefix=*)
prefix=`get_key_value "$1"`;;
--with-debug=full)
full_debug="=full";;
--warning-mode=*)
warning_mode=`get_key_value "$1"`;;
-c | --just-configure)
......@@ -60,7 +57,6 @@ fi
prefix="/usr/local/mysql"
just_print=
just_configure=
full_debug=
warning_mode=
maintainer_mode=
......@@ -116,7 +112,6 @@ else
cxx_warnings="$warnings -Wno-unused-parameter"
# cxx_warnings="$cxx_warnings -Woverloaded-virtual -Wsign-promo"
cxx_warnings="$cxx_warnings -Wctor-dtor-privacy -Wnon-virtual-dtor"
# Added unless --with-debug=full
debug_extra_cflags="-O0 -g3 -gdwarf-2"
fi
......@@ -141,11 +136,8 @@ base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti"
# Be as fast as we can be without losing our ability to backtrace.
fast_cflags="-O3 -fno-omit-frame-pointer"
debug_configs="--with-debug$full_debug"
if [ -z "$full_debug" ]
then
debug_cflags="$debug_cflags $debug_extra_cflags"
fi
debug_configs="--with-debug"
debug_cflags="$debug_cflags $debug_extra_cflags"
#
# Configuration options.
......
......@@ -148,7 +148,6 @@ Usage: $0 [options]
--extended-help Show extended help message
--without-debug Build non-debug version
--with-debug Build debug version
--with-debug=full Build with full debug.
--configure-only Stop after running configure.
--use-autotools Start by running autoconf, automake,.. tools
--no-autotools Start from configure
......@@ -262,10 +261,6 @@ extended_usage()
This flag prevents the use of GPL libraries which cannot be used
under a commercial license, such as the readline library.
--with-debug[=full]
This option will ensure that the version is built with debug
information enabled; the optimisation level is decreased to -O.
--developer
This option changes a number of things to make the version built
more appropriate to the debugging and testing needs of developers.
......@@ -658,11 +653,6 @@ parse_options()
--datadir=*)
datadir=`get_key_value "$1"`
;;
--with-debug=full)
full_debug="=full"
with_debug_flag="yes"
fast_flag="no"
;;
--without-debug)
with_debug_flag="no"
if test "x$fast_flag" != "xyes" ; then
......@@ -1044,10 +1034,7 @@ set_warning_flags()
# C++ warnings
cxx_warnings="$warnings -Woverloaded-virtual -Wsign-promo -Wreorder"
cxx_warnings="$warnings -Wctor-dtor-privacy -Wnon-virtual-dtor"
# Added unless --with-debug=full
if test "x$full_debug" = "x" ; then
compiler_flags="$compiler_flags -Wuninitialized"
fi
elif test "x$warning_mode" = "xpedantic" ; then
warnings="-W -Wall -ansi -pedantic -Wno-long-long -D_POSIX_SOURCE"
c_warnings="$warnings"
......@@ -1113,7 +1100,7 @@ set_base_configs()
base_configs="$base_configs --localstatedir=$datadir"
fi
if test "x$with_debug_flag" = "xyes" ; then
base_configs="$base_configs --with-debug$full_debug"
base_configs="$base_configs --with-debug"
fi
base_configs="$base_configs --enable-local-infile"
base_configs="$base_configs --enable-thread-safe-client"
......@@ -1546,7 +1533,6 @@ gpl="yes"
version_text=
developer_flag="no"
just_configure=
full_debug=
warning_mode=
with_flags=
error_inject_flag=
......
......@@ -4,16 +4,6 @@ path=`dirname $0`
. "$path/SETUP.sh"
extra_configs="$max_configs --with-ndb-test --with-ndb-ccflags='-DERROR_INSERT'"
if [ "$full_debug" ]
then
extra_flags="$debug_cflags"
c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$debug_configs $extra_configs"
else
extra_flags="$fast_cflags"
fi
extra_flags="$extra_flags $max_cflags -g"
extra_flags="$fast_cflags $max_cflags -g"
. "$path/FINISH.sh"
#! /bin/sh
path=`dirname $0`
set -- "$@" --with-debug=full
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags"
......
#! /bin/sh
path=`dirname $0`
set -- "$@" --with-debug=full
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags"
......
#! /bin/sh
path=`dirname $0`
set -- "$@" --with-debug=full
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags"
......
......@@ -6,6 +6,6 @@ path=`dirname $0`
extra_flags="$pentium_cflags $debug_cflags"
extra_configs="$pentium_configs $debug_configs"
extra_configs="$extra_configs --with-debug=full --with-ssl=/usr"
extra_configs="$extra_configs --with-debug --with-ssl=/usr"
. "$path/FINISH.sh"
......@@ -6,6 +6,6 @@ path=`dirname $0`
extra_flags="$pentium_cflags $debug_cflags"
extra_configs="$pentium_configs $debug_configs"
extra_configs="$extra_configs --with-debug=full --with-ssl"
extra_configs="$extra_configs --with-debug --with-ssl"
. "$path/FINISH.sh"
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags"
extra_configs="$pentium_configs $debug_configs $static_link"
extra_configs="$extra_configs --with-debug=full --with-mysqlfs --without-server --without-pstack"
. "$path/FINISH.sh"
#! /bin/sh
path=`dirname $0`
set -- "$@" --with-debug=full
. "$path/SETUP.sh"
extra_flags="$pentium64_cflags $debug_cflags"
......
#! /bin/sh
path=`dirname $0`
set -- "$@" --with-debug=full
. "$path/SETUP.sh"
extra_flags="$pentium64_cflags $debug_cflags"
......
......@@ -34,7 +34,6 @@ ENDIF()
SET(CUSTOM_C_FLAGS $ENV{CFLAGS})
OPTION(WITH_DEBUG "Use dbug/safemutex" OFF)
OPTION(WITH_DEBUG_FULL "Use dbug and safemutex. Slow." OFF)
# Distinguish between community and non-community builds, with the
# default being a community build. This does not impact the feature
......@@ -60,7 +59,7 @@ SET(BUILDTYPE_DOCSTRING
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel")
IF(WITH_DEBUG OR WITH_DEBUG_FULL)
IF(WITH_DEBUG)
SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING ${BUILDTYPE_DOCSTRING} FORCE)
SET(OLD_WITH_DEBUG 1 CACHE INTERNAL "" FORCE)
ELSEIF(NOT HAVE_CMAKE_BUILD_TYPE OR OLD_WITH_DEBUG)
......@@ -202,15 +201,10 @@ ENDIF()
# Add safemutex for debug configurations, except on Windows
# (safemutex has never worked on Windows)
IF(WITH_DEBUG OR WITH_DEBUG_FULL AND NOT WIN32)
IF(WITH_DEBUG AND NOT WIN32)
FOREACH(LANG C CXX)
IF(WITH_DEBUG_FULL)
SET(CMAKE_${LANG}_FLAGS_DEBUG
"${CMAKE_${LANG}_FLAGS_DEBUG} -DSAFE_MUTEX")
ELSE()
SET(CMAKE_${LANG}_FLAGS_DEBUG
"${CMAKE_${LANG}_FLAGS_DEBUG} -DSAFE_MUTEX")
ENDIF()
ENDFOREACH()
ENDIF()
......
......@@ -179,11 +179,6 @@ foreach my $option (@ARGV)
$cmakeargs = $cmakeargs." -DMYSQL_DATADIR=".substr($option,14);
next;
}
if ($option =~ /with-debug=full/)
{
$cmakeargs = $cmakeargs." -DWITH_DEBUG_FULL=1";
next;
}
if ($option =~ /mysql-maintainer-mode/)
{
$cmakeargs = $cmakeargs." -DMYSQL_MAINTAINER_MODE=" .
......
......@@ -206,7 +206,7 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [
NDB_DEFS="-DNDB_DEBUG_FULL -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD"
else
# no extra ndb debug but still do asserts if debug version
if test "$with_debug" = "yes" -o "$with_debug" = "full"
if test "$with_debug" = "yes"
then
NDB_DEFS=""
else
......
......@@ -1732,22 +1732,14 @@ then
fi
AC_ARG_WITH(debug,
[ --with-debug Add debug code
--with-debug=full Add debug code (adds memory checker, very slow)],
[AS_HELP_STRING([--with-debug], [Add debug code @<:@default=no@:>@])]
[with_debug=$withval],
[with_debug=no])
if test "$with_debug" = "yes"
then
# Medium debug.
AC_DEFINE([DBUG_ON], [1], [Use libdbug])
CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC -DSAFE_MUTEX $CFLAGS"
CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX -DSAFE_MUTEX $CXXFLAGS"
elif test "$with_debug" = "full"
then
# Full debug. Very slow in some cases
AC_DEFINE([DBUG_ON], [1], [Use libdbug])
CFLAGS="$DEBUG_CFLAGS -DSAFE_MUTEX $CFLAGS"
CXXFLAGS="$DEBUG_CXXFLAGS -DSAFE_MUTEX $CXXFLAGS"
else
# Optimized version. No debug
AC_DEFINE([DBUG_OFF], [1], [Don't use libdbug])
......
......@@ -43,7 +43,7 @@ ENDIF()
# Enable InnoDB's UNIV_DEBUG if MySQL's WITH_DEBUG[_FULL] is defined
# enable when this bug is resolved:
# Bug#54861 Additional connections not handled properly in mtr --embedded
#IF(WITH_DEBUG OR WITH_DEBUG_FULL)
#IF(WITH_DEBUG)
# ADD_DEFINITIONS("-DUNIV_DEBUG")
#ENDIF()
......
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