diff --git a/BUILD/FINISH.sh b/BUILD/FINISH.sh deleted file mode 100644 index 1b730dee3771a..0000000000000 --- a/BUILD/FINISH.sh +++ /dev/null @@ -1,99 +0,0 @@ -# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; version 2 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public -# License along with this library; if not, write to the Free -# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -# MA 02110-1335 USA - -cflags="$c_warnings $extra_flags $EXTRA_FLAGS $EXTRA_CFLAGS" -cxxflags="$cxx_warnings $base_cxxflags $extra_flags $EXTRA_FLAGS $EXTRA_CXXFLAGS" -extra_configs="$extra_configs $local_infile_configs $EXTRA_CONFIGS" - -configure="./configure $base_configs $extra_configs" - -if test "$just_print" = "1" -a "$just_configure" = "1" -then - just_print="" - configure="$configure --print" -fi - -if test "$AM_EXTRA_MAKEFLAGS" = "VERBOSE=1" -o "$verbose_make" = "1" -then - configure="$configure --verbose" -fi - -commands="" -# git clean -fdX removes all ignored (build) files -if test -d .git && test -d libmariadb/CMakeFiles -then - commands="\ -git clean -fdX -cd ./libmariadb -git submodule update -git clean -fdX -cd ../storage/rocksdb/rocksdb -git clean -fdX -git submodule update -git clean -fdX -cd ../../maria/libmarias3 -git submodule update -git clean -fdX -cd ../../.. -cd storage/columnstore/columnstore -git submodule update -git clean -fdX -cd ../../.. -cd wsrep-lib -git submodule update -git clean -fdX -cd .." -fi -commands="$commands -path=`dirname $0` -. \"$path/autorun.sh\"" - -if [ -z "$just_clean"] -then - if test -d .git - then - commands="$commands - git submodule update" - fi - commands="$commands - CC=\"$CC\" CFLAGS=\"$cflags\" CXX=\"$CXX\" CXXFLAGS=\"$cxxflags\" CXXLDFLAGS=\"$CXXLDFLAGS\" $configure" -fi - -if [ -z "$just_configure" -a -z "$just_clean" ] -then - commands="$commands - -$make $AM_MAKEFLAGS $AM_EXTRA_MAKEFLAGS -$make tags" - - if [ "x$strip" = "xyes" ] - then - commands="$commands - -mkdir -p tmp -nm --numeric-sort sql/mysqld > tmp/mysqld.sym -objdump -d sql/mysqld > tmp/mysqld.S -strip sql/mysqld" - fi -fi - -if test -z "$just_print" -then - eval "set -x; $commands" -else - echo "$commands" -fi diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh deleted file mode 100755 index 3c4cf829b36e7..0000000000000 --- a/BUILD/SETUP.sh +++ /dev/null @@ -1,329 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; version 2 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public -# License along with this library; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1335 USA - -######################################################################## - -get_key_value() -{ - echo "$1" | sed 's/^--[a-zA-Z_-]*=//' -} - -usage() -{ -cat < /dev/null 2>&1 -then - make=gmake -else - make=make -fi - -if test -z "$CC" ; then - CC=gcc -fi - -if test -z "$CXX" ; then - CXX=g++ -fi - - -# -# Set -Wuninitialized to debug flags for gcc 4.4 and above -# because it is allowed there without -O -# -if test `$CC -v 2>&1 | tail -1 | sed 's/ .*$//'` = 'gcc' ; then - GCCVERSION=`$CC -v 2>&1 | tail -1 | \ - sed 's/^[a-zA-Z][a-zA-Z]* [a-zA-Z][a-zA-Z]* //' | sed 's/ .*$//'` - GCCV1=`echo $GCCVERSION | sed 's/\..*$//'` - GCCV2=`echo $GCCVERSION | sed 's/[0-9][0-9]*\.//'|sed 's/\..*$//'` - if test '(' "$GCCV1" -gt '4' ')' -o \ - '(' '(' "$GCCV1" -eq '4' ')' -a '(' "$GCCV2" -ge '4' ')' ')' - then - debug_cflags="$debug_cflags -DFORCE_INIT_OF_VARS -Wuninitialized" - fi - if (test '(' "$GCCV1" -gt '6' ')') - then - c_warnings="$c_warnings -Wimplicit-fallthrough=2" - cxx_warnings="$cxx_warnings -Wimplicit-fallthrough=2" - fi -fi - -if test `$CC -v 2>&1 | head -1 | sed 's/ .*$//'` = 'clang' ; then - dbug_cflags="$dbug_cflags -Wframe-larger-than=16384 -fno-inline" - c_warnings="$c_warnings -Wframe-larger-than=16384" - cxx_warnings="$cxx_warnings -Wframe-larger-than=16384" -fi - - -# If ccache (a compiler cache which reduces build time) -# (http://samba.org/ccache) is installed, use it. -# We use 'grep' and hope 'grep' will work as expected -# (returns 0 if finds lines) - -# As cmake doesn't like CC and CXX with a space, use symlinks from -# /usr/lib64/ccache if they exits. - -if ccache -V > /dev/null 2>&1 && test "$CCACHE_DISABLE" != "1" && test "$CC" = "gcc" -then - if test -x /usr/lib64/ccache/gcc - then - CC=/usr/lib64/ccache/gcc - fi - if test -x /usr/lib64/ccache/g++ - then - CXX=/usr/lib64/ccache/g++ - fi -fi - -# gcov - -# The -fprofile-arcs and -ftest-coverage options cause GCC to instrument the -# code with profiling information used by gcov. -# The -DDISABLE_TAO_ASM is needed to avoid build failures in Yassl. -# The -DHAVE_gcov enables code to write out coverage info even when crashing. - -gcov_compile_flags="-fprofile-arcs -ftest-coverage" -gcov_compile_flags="$gcov_compile_flags -DDISABLE_TAO_ASM" -gcov_compile_flags="$gcov_compile_flags -DMYSQL_SERVER_SUFFIX=-gcov -DHAVE_gcov" - -# -# The following plugins doesn't work on 32 bit systems -disable_64_bit_plugins="--without-plugin-rocksdb" - - -# GCC4 needs -fprofile-arcs -ftest-coverage on the linker command line (as well -# as on the compiler command line), and this requires setting LDFLAGS for BDB. - -gcov_link_flags="-fprofile-arcs -ftest-coverage -lgcov" - -gcov_configs="--with-gcov" - -# gprof - -gprof_compile_flags="-O2" - -# Rest of the flags are set in CmakeFile.txt -gprof_link_flags="--disable-shared $static_link" - -disable_gprof_plugins="--with-zlib-dir=bundled --without-plugin-oqgraph --without-plugin-mroonga --with-gprof" - -disable_asan_plugins="--without-plugin-rocksdb" diff --git a/BUILD/autorun.sh b/BUILD/autorun.sh deleted file mode 100755 index a705c726e4562..0000000000000 --- a/BUILD/autorun.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; version 2 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public -# License along with this library; if not, write to the Free -# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -# MA 02110-1335 USA - -# Create MySQL cmake configure wrapper - -# Use a configure script that will call CMake. -path=`dirname $0` -cp $path/cmake_configure.sh $path/../configure -chmod +x $path/../configure diff --git a/BUILD/check-cpu b/BUILD/check-cpu deleted file mode 100755 index d62e154588f84..0000000000000 --- a/BUILD/check-cpu +++ /dev/null @@ -1,330 +0,0 @@ -#!/bin/sh -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA - -# -# Check cpu of current machine and find the -# best compiler optimization flags for gcc -# Will return result in: -# cpu_arg : Type of CPU -# low_cpu_arg : Type of CPU used up until GCC v3.3 -# check_cpu_args : Arguments for GCC compiler settings -# - -check_compiler_cpu_flags () { - # different compiler versions have different option names - # for CPU specific command line options - if test -z "$CC" ; then - cc="gcc"; - else - cc=$CC - fi - - # check if compiler is gcc and dump its version - cc_verno=`$cc -dumpversion 2>/dev/null` - if test "x$?" = "x0" ; then - set -- `echo $cc_verno | tr '.' ' '` - cc_ver="GCC" - cc_major=$1 - cc_minor=$2 - cc_patch=$3 - if test -z "$cc_minor"; then - cc_minor="0"; - fi - if test -z "$cc_patch"; then - cc_minor="0"; - fi - cc_comp=`expr $cc_major '*' 100 '+' $cc_minor` - fi - - case "$cc_ver--$cc_verno" in - *GCC*) - # different gcc backends (and versions) have different CPU flags - case `gcc -dumpmachine` in - i?86-* | x86_64-*) - if test "$cc_comp" -lt 304 ; then - check_cpu_cflags="-mcpu=${low_cpu_arg}" - elif test "$cc_comp" -ge 402 ; then - check_cpu_cflags="-mtune=native" - else - check_cpu_cflags="-mtune=${cpu_arg}" - fi - ;; - ppc-*) - check_cpu_cflags="-mcpu=${cpu_arg} -mtune=${cpu_arg}" - ;; - *) - check_cpu_cflags="" - return - ;; - esac - ;; - 2.95.*) - # GCC 2.95 doesn't expose its name in --version output - check_cpu_cflags="-m${cpu_arg}" - ;; - *) - check_cpu_cflags="" - return - ;; - esac - - # now we check whether the compiler really understands the cpu type - touch __test.c - - while [ "$cpu_arg" ] ; do - printf "testing $cpu_arg ... " >&2 - - # compile check - eval "$cc -c $check_cpu_cflags __test.c" 2>/dev/null - if test "x$?" = "x0" ; then - echo ok >&2 - break; - fi - - echo failed >&2 - check_cpu_cflags="" - break; - done - rm __test.* - return 0 -} - -check_cpu () { - CPUINFO=/proc/cpuinfo - if test -n "$TEST_CPUINFO" ; then - CPUINFO=$TEST_CPUINFO - fi - if test -r "$CPUINFO" -a "$CPUINFO" != " " ; then - # on Linux (and others?) we can get detailed CPU information out of /proc - cpuinfo="cat $CPUINFO" - - # detect CPU architecture - cpu_arch=`$cpuinfo | grep 'arch' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1` - - # detect CPU family - cpu_family=`$cpuinfo | grep 'family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1` - if test -z "$cpu_family" ; then - cpu_family=`$cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1` - fi - - # detect CPU vendor and model - cpu_vendor=`$cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1` - model_name=`$cpuinfo | grep 'model name' | cut -d ':' -f 2 | head -1` - if test -z "$model_name" ; then - model_name=`$cpuinfo | grep 'cpu model' | cut -d ':' -f 2 | head -1` - fi - - # fallback: get CPU model from uname output - if test -z "$model_name" ; then - model_name=`uname -m` - fi - - # parse CPU flags - for flag in `$cpuinfo | grep '^flags' | sed -e 's/^flags.*: //' -e 's/[^a-zA-Z0-9_ ]/_/g'`; do - eval cpu_flag_$flag=yes - done - else - # Fallback when there is no /proc/cpuinfo - CPUINFO=" " - case "`uname -s`" in - FreeBSD|OpenBSD) - cpu_family=`uname -m`; - model_name=`sysctl -n hw.model` - ;; - Darwin) - cpu_family=`sysctl -n machdep.cpu.vendor` - model_name=`sysctl -n machdep.cpu.brand_string` - if [ -z "$cpu_family" -o -z "$model_name" ] - then - cpu_family=`uname -p` - model_name=`machine` - fi - ;; - *) - cpu_family=`uname -p`; - model_name=`uname -m`; - ;; - esac - fi - - # detect CPU shortname as used by gcc options - # this list is not complete, feel free to add further entries - cpu_arg="" - low_cpu_arg="" - case "$cpu_vendor--$cpu_family--$model_name--$spu_arch" in - # DEC Alpha - *Alpha*EV6*) - cpu_arg="ev6"; - ;; - #Core 2 Duo - *Intel*Core\(TM\)2*) - cpu_arg="nocona" - core2="yes" - ;; - # Intel ia32 - *Intel*Core*|*X[eE][oO][nN]*) - # a Xeon is just another pentium4 ... - # ... unless it has the "lm" (long-mode) flag set, - # in that case it's a Xeon with EM64T support - # If SSE3 support exists it is a Core2 Duo or newer - # So is Intel Core. - if [ -z "$cpu_flag_lm" ]; then - cpu_arg="pentium4" - else - cpu_arg="nocona" - fi - if test -z "$cpu_flag_ssse3" ; then - core2="no" - else - core2="yes" - fi - ;; - *Pentium*4*Mobile*) - cpu_arg="pentium4m" - ;; - *Pentium\(R\)*\ M*) - cpu_arg="pentium-m" - low_cpu_arg="pentium3" - ;; - *Pentium\(R\)*\ D*) - cpu_arg="prescott" - ;; - *Pentium*4*) - cpu_arg="pentium4" - ;; - *Pentium*III*Mobile*) - cpu_arg="pentium3m" - ;; - *Pentium*III*) - cpu_arg="pentium3" - ;; - *Pentium*M*pro*) - cpu_arg="pentium-m" - ;; - *Celeron\(R\)*\ M*) - cpu_arg="pentium-m" - ;; - *Celeron*Coppermine*) - cpu_arg="pentium3" - ;; - *Celeron\(R\)*) - cpu_arg="pentium4" - ;; - *Celeron*) - cpu_arg="pentium2" - ;; - *Atom*) - cpu_arg="prescott" - ;; - *GenuineIntel*) - cpu_arg="pentium" - ;; - *Turion*) - cpu_arg="athlon64" - ;; - *Athlon*64*) - cpu_arg="athlon64" - ;; - *Athlon*) - cpu_arg="athlon" - ;; - *AMD-K7*) - cpu_arg="athlon" - ;; - *Athlon*XP\ *) - cpu_arg="athlon-xp" - ;; - *AMD*Sempron\(tm\)*) - cpu_arg="athlon-mp" - ;; - *AMD*Athlon\(tm\)\ 64*) - cpu_arg="k8" - ;; - *Opteron*) - cpu_arg="opteron" - ;; - *Phenom*) - cpu_arg="k8" - ;; - *AuthenticAMD*) - cpu_arg="k6" - ;; - *HygonGenuine*) - cpu_arg="k8" - ;; - *VIA\ *) - cpu_arg="i686" - ;; - # MacOSX / Intel - *i386*i486*) - cpu_arg="pentium-m" - ;; - *i386*) - cpu_arg="i386" - ;; - # Intel ia64 - *Itanium*) - cpu_arg="itanium" - ;; - *IA-64*) - cpu_arg="itanium" - ;; - # Solaris Sparc - *sparc*sun4[uv]*) - cpu_arg="sparc" - ;; - # Power PC - *ppc*) - cpu_arg="powerpc" - ;; - *powerpc*) - cpu_arg="powerpc" - ;; - # unknown - *) - cpu_arg="" - ;; - esac - - if test "x$low_cpu_arg" = "x" ; then - low_cpu_arg="$cpu_arg" - fi - - if test -z "$cpu_arg" ; then - if test "$CPUINFO" != " " ; then - # fallback to uname if necessary - TEST_CPUINFO=" " - check_cpu_cflags="" - check_cpu - return - fi - echo "BUILD/check-cpu: Oops, could not find out what kind of cpu this machine is using." >&2 - check_cpu_cflags="" - return - fi - - if test "x$compiler" = "x" ; then - check_compiler_cpu_flags - fi - - if test "x$core2" = "xyes" ; then - cpu_arg="core2" - fi - - return 0 -} - -check_cpu diff --git a/BUILD/cleanup b/BUILD/cleanup deleted file mode 100755 index 3d79129655489..0000000000000 --- a/BUILD/cleanup +++ /dev/null @@ -1,23 +0,0 @@ -#! /bin/sh - -# Copyright (C) 2003 MySQL AB -# Use is subject to license terms -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -just_clean=1; - -. "$path/FINISH.sh" diff --git a/BUILD/cmake_configure.sh b/BUILD/cmake_configure.sh deleted file mode 100644 index fb0c432026aa8..0000000000000 --- a/BUILD/cmake_configure.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; version 2 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public -# License along with this library; if not, write to the Free -# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -# MA 02110-1335 USA - -# Ensure cmake and perl are there -cmake --help >/dev/null 2>&1 || HAVE_CMAKE=no -perl --version >/dev/null 2>&1 || HAVE_PERL=no -scriptdir=`dirname $0` -if test "$HAVE_CMAKE" = "no" -then - echo "CMake is required to build MySQL." - exit 1 -elif test "$HAVE_PERL" = "no" -then - echo "Perl is required to build MySQL using the configure to CMake translator." - exit 1 -else - perl $scriptdir/cmake/configure.pl "$@" -fi - diff --git a/BUILD/compile-amd64-debug-all b/BUILD/compile-amd64-debug-all deleted file mode 100755 index 66f6f3309e2d6..0000000000000 --- a/BUILD/compile-amd64-debug-all +++ /dev/null @@ -1,10 +0,0 @@ -#! /bin/sh - -path=`dirname $0` -set -- "$@" --with-debug=full -. "$path/SETUP.sh" - -extra_flags="$amd64_cflags $debug_cflags" -extra_configs="$amd64_configs $debug_configs $all_configs" -CC="$CC --pipe" -. "$path/FINISH.sh" diff --git a/BUILD/compile-amd64-debug-max b/BUILD/compile-amd64-debug-max deleted file mode 100755 index 0af32f5decd9a..0000000000000 --- a/BUILD/compile-amd64-debug-max +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/sh - -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$amd64_cflags $debug_cflags" -extra_configs="$amd64_configs $debug_configs $max_configs" - -CC="$CC --pipe" -. "$path/FINISH.sh" diff --git a/BUILD/compile-amd64-debug-wsrep b/BUILD/compile-amd64-debug-wsrep deleted file mode 100755 index 995a8afcca962..0000000000000 --- a/BUILD/compile-amd64-debug-wsrep +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/sh - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$amd64_cflags $debug_cflags -g -O0 $wsrep_cflags" -c_warnings="$c_warnings $debug_extra_warnings" -cxx_warnings="$cxx_warnings $debug_extra_warnings" -extra_configs="$amd64_configs $debug_configs $wsrep_configs --with-wsrep" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-amd64-gcov b/BUILD/compile-amd64-gcov deleted file mode 100755 index 83c6b64d67869..0000000000000 --- a/BUILD/compile-amd64-gcov +++ /dev/null @@ -1,33 +0,0 @@ -#! /bin/sh - -# Copyright (C) 2007 MySQL AB -# Use is subject to license terms -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` - -# Need to disable ccache, or we loose the gcov-needed compiler output files. -CCACHE_DISABLE=1 -export CCACHE_DISABLE - -. "$path/SETUP.sh" - -export LDFLAGS="$gcov_link_flags" - -extra_flags="$amd64_cflags $debug_cflags $max_cflags $gcov_compile_flags" -c_warnings="$c_warnings $debug_extra_warnings" -cxx_warnings="$cxx_warnings $debug_extra_warnings" -extra_configs="$amd64_configs $debug_configs $gcov_configs $max_configs" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-amd64-gprof b/BUILD/compile-amd64-gprof deleted file mode 100755 index 2be4fdfaf3ed8..0000000000000 --- a/BUILD/compile-amd64-gprof +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/sh - -# Copyright (C) 2007 MySQL AB -# Use is subject to license terms -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$amd64_cflags $gprof_compile_flags" -extra_configs="$amd64_configs $debug_configs $gprof_link_flags" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-amd64-max b/BUILD/compile-amd64-max deleted file mode 100755 index 6d3470deb1afb..0000000000000 --- a/BUILD/compile-amd64-max +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/sh - -# Copyright (c) 2005, 2006 MySQL AB -# Use is subject to license terms -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" -extra_flags="$amd64_cflags $fast_cflags -g" -extra_configs="$amd64_configs $max_configs" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-amd64-valgrind-max b/BUILD/compile-amd64-valgrind-max deleted file mode 100755 index 2d6fa68bd5e6e..0000000000000 --- a/BUILD/compile-amd64-valgrind-max +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/sh - -# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; version 2 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public -# License along with this library; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$amd64_cflags $debug_cflags $valgrind_flags" -extra_configs="$amd64_configs $debug_configs $valgrind_configs $max_configs" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-amd64-wsrep b/BUILD/compile-amd64-wsrep deleted file mode 100755 index 57dfbdd6da2fe..0000000000000 --- a/BUILD/compile-amd64-wsrep +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$amd64_cflags $fast_cflags -g $wsrep_cflags" -extra_configs="$amd64_configs $wsrep_configs --with-wsrep" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-bintar b/BUILD/compile-bintar deleted file mode 100755 index 56c3cb7258b1e..0000000000000 --- a/BUILD/compile-bintar +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash -# -# MariaDB SQL server. -# Copyright (C) 2010 Kristian Nielsen and Monty Program AB -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA. - - -# This script's purpose is to build the binary tarball packages for MariaDB -# (currently only on Linux systems). -# -# Thus BUILD/compile-bintar from the appropriate source tarball will reproduce -# such a release, provided the build environment (gcc version etc.) matches -# (use scripts/make_binary_distribution after running this script to actually -# create the binary tarball package). -# -# Note that packages are built from source tarballs not bzr checkouts. -# Therefore, this script assumes autotools have already been run. -# -# We link libc dynamically, otherwise we get lots of problems loading -# .so files at runtime (either system stuff like NSS, or server -# plugins). -# -# We link libgcc statically to avoid reduce nasty library version dependencies. - -test -f Makefile && make distclean - -path=`dirname $0` -. $path/util.sh - -SYSTEM_TYPE="$(uname -o)" -MACHINE_TYPE="$(uname -m)" - -# We cannot have a slash '/' in tarfile name. -SYSTEM_TYPE="$(echo ${SYSTEM_TYPE} | sed -e 's/GNU\///')" - -# Get correct options for architecture into CPUOPT. -get_cpuopt -# Get correct -j option into AM_MAKEFLAGS -get_make_parallel_flag - -# Use gcc rather than g++ to avoid linking libstdc++.so (which we don't need). -FLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall $CPUOPT" - -# Don't press on in case of error. -set -e - -CC="gcc -static-libgcc" CXX="g++ -static-libgcc" CFLAGS="$FLAGS" CXXFLAGS="$FLAGS" \ - ./configure \ - --prefix=/usr/local/mysql \ - --exec-prefix=/usr/local/mysql \ - --libexecdir=/usr/local/mysql/bin \ - --localstatedir=/usr/local/mysql/data \ - \ - --with-comment="(MariaDB - http://mariadb.com/)" \ - --with-system-type="${SYSTEM_TYPE}" \ - --with-machine-type="${MACHINE_TYPE}" \ - \ - --enable-shared --enable-static \ - --with-client-ldflags=-static --with-mysqld-ldflags=-static \ - --enable-thread-safe-client --enable-local-infile --with-big-tables \ - --without-docs --with-extra-charsets=all \ - --with-libwrap --with-ssl --with-readline --with-libevent --with-zlib-dir=bundled \ - --with-partition --with-embedded-server \ - --with-plugins=max \ - --without-plugin-innodb_plugin - -make $AM_MAKEFLAGS diff --git a/BUILD/compile-darwin-mwcc b/BUILD/compile-darwin-mwcc deleted file mode 100755 index 811de47e276f3..0000000000000 --- a/BUILD/compile-darwin-mwcc +++ /dev/null @@ -1,66 +0,0 @@ -#! /bin/sh - -# Copyright (c) 2005, 2006 MySQL AB -# Use is subject to license terms -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -c_warnings="" -cxx_warnings="" -fast_cflags="-O3" -base_cxxflags="-fno-handle-exceptions" - -# FIXME do we need to link static, not to depend on CodeWarrior libs? - -if [ x$MODE = x ] ; then - echo "You need to give an argument, 'standard', 'max', 'debug' or 'debug-max'" - echo "Like: MODE=standard BUILD/compile-darwin-codewarrior" - exit 1 -else - case $MODE in - standard|pro-gpl) - # FIXME pro/pro-gpl different libedit/readline - extra_flags="$ppc_cflags $fast_cflags" - ;; - pro) - # FIXME pro/pro-gpl different libedit/readline - extra_flags="$ppc_cflags $fast_cflags" - extra_configs="--with-libedit" - ;; - max) - extra_flags="$ppc_cflags $fast_cflags" - extra_configs="$max_configs" - ;; - debug) - extra_flags="$ppc_cflags $debug_cflags" - extra_configs="$debug_configs" - ;; - debug-max) - extra_flags="$ppc_cflags $debug_cflags" - extra_configs="$debug_configs $max_configs" - ;; - *) - echo "You need to give an argument, 'standard', 'max', 'debug' or 'debug-max'" - echo "Like: MODE=standard BUILD/compile-darwin-codewarrior" - exit 1 - ;; - esac -fi - -extra_configs="$extra_configs --with-darwin-mwcc" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-dist b/BUILD/compile-dist deleted file mode 100755 index 64147b7af8003..0000000000000 --- a/BUILD/compile-dist +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/sh -# Copyright (c) 2004-2008 MySQL AB, 2008, 2009 Sun Microsystems, Inc. -# Use is subject to license terms. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA - -# -# This script's purpose is to update the automake/autoconf helper scripts and -# to run a plain "configure" without any special compile flags. Only features -# that affect the content of the source distribution are enabled. The resulting -# tree can then be picked up by "make dist" to create the "pristine source -# package" that is used as the basis for all other binary builds. -# -test -f Makefile && make maintainer-clean - -path=`dirname $0` -. $path/autorun.sh - -gmake= -for x in gmake gnumake make; do - if $x --version 2>/dev/null | grep GNU > /dev/null; then - gmake=$x - break; - fi -done - -if [ -z "$gmake" ]; then - # Our build may not depend on GNU make, but I wouldn't count on it - echo "Please install GNU make, and ensure it is in your path as gnumake, gmake, or make" >&2 - exit 2 -fi - -# Default to gcc for CC and CXX -if test -z "$CXX" ; then - export CXX - CXX=g++ - # Set some required compile options - if test -z "$CXXFLAGS" ; then - export CXXFLAGS - CXXFLAGS="-felide-constructors -fno-exceptions" - fi -fi - -if test -z "$CC" ; then - export CC - CC=gcc -fi - - -# Use ccache, if available -if ccache -V > /dev/null 2>&1 -then - if echo "$CC" | grep -v ccache > /dev/null - then - export CC - CC="ccache $CC" - fi - if echo "$CXX" | grep -v ccache > /dev/null - then - export CXX - CXX="ccache $CXX" - fi -fi - -# Make sure to enable all features that affect "make dist" -# Remember that configure restricts the man pages to the configured features ! -./configure \ - --with-embedded-server \ - --with-perfschema \ - --with-plugins=max -$gmake -j4 diff --git a/BUILD/compile-hpux11-parisc2-aCC b/BUILD/compile-hpux11-parisc2-aCC deleted file mode 100755 index 15e9b9644503e..0000000000000 --- a/BUILD/compile-hpux11-parisc2-aCC +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2004, 2005, 2007 MySQL AB -# Use is subject to license terms -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -if [ ! -f "sql/mysqld.cc" ]; then - echo "You must run this script from the MySQL top-level directory." - exit 1 -fi - -# -fast Expand into a set of compiler options to result in -# improved application run-time. Options include: +O3, -# +Onolooptransform, +Olibcalls, +FPD, +Oentryschedule, -# +Ofastaccess. -# +O4 Perform level 3 as well as doing link time optimizations. -# Also sends +Oprocelim and +Ofastaccess to the linker -# (see ld(1)). - -release_flags="-fast +O3" - -# -z Do not bind anything to address zero. This option -# allows runtime detection of null pointers. See the -# note on pointers below. -cflags="-g -z +O0" -cxxflags="-g0 -z +O0" -debug_configure_options="--with-debug" - -while [ "$#" != 0 ]; do - case "$1" in - --help) - echo "Usage: $0 [options]" - echo "Options:" - echo "--help print this message" - echo "--debug build debug binary [default] " - echo "--release build optimised binary" - echo "-32 build 32 bit binary [default]" - echo "-64 build 64 bit binary" - exit 0 - ;; - --debug) - echo "Building debug binary" - ;; - --release) - echo "Building release binary" - cflags="$release_flags" - cxxflags="$release_flags" - debug_configure_options="" - ;; - -32) - echo "Building 32-bit binary" - ;; - -64) - echo "Building 64-bit binary" - cflags="$cflags +DA2.0W +DD64" - cxxflags="$cxxflags +DA2.0W +DD64" - ;; - *) - echo "$0: invalid option '$1'; use --help to show usage" - exit 1 - ;; - esac - shift -done - - -set -x -make maintainer-clean - -path=`dirname $0` -. "$path/autorun.sh" - -CC=cc CXX=aCC CFLAGS="$cflags" CXXFLAGS="$cxxflags" \ -./configure --prefix=/usr/local/mysql --disable-shared \ - --with-extra-charsets=complex --enable-thread-safe-client \ - --without-extra-tools $debug_configure_options \ - --disable-dependency-tracking - -gmake diff --git a/BUILD/compile-irix-mips64-mipspro b/BUILD/compile-irix-mips64-mipspro deleted file mode 100755 index 94d19358aca81..0000000000000 --- a/BUILD/compile-irix-mips64-mipspro +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2004, 2005, 2007 MySQL AB -# Use is subject to license terms -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -if [ ! -f "sql/mysqld.cc" ]; then - echo "You must run this script from the MySQL top-level directory." - exit 1 -fi - -cflags="-64 -mips4" -config_args= -if [ "$#" != 0 ]; then - case "$1" in - --help) - echo "Usage: $0 [options]" - echo "Options:" - echo "--help print this message" - echo "-32 build 32-bit binary" - echo "-64 build 64-bit binary [default]" - exit 0 - ;; - -64) - echo "Building 64-bit binary" - ;; - -32) - echo "Building 32-bit binary" - cflags="" - ;; - *) - config_args="$config_args $1"; shift - ;; - esac -else - echo "Building 64-bit binary" -fi - -set -x -make maintainer-clean - -path=`dirname $0` -. "$path/autorun.sh" - -# C options: -# -apo - auto-parallelize for multiprocessors (implies -mp) -# -mp - generate multiprocessor code -# These two common optimization options apparently use 'sproc' model of -# threading, which is not compatible with PTHREADS: don't add them unless you -# know what you're doing. -# -# -c99 - enable C features standardized in C99, such as long long, -# strtoll, stroull etc. -# This option is vital to compile MySQL. -# -woff - turn off some warnings -# -64 - generate 64 bit object (implies -mips4) -# -mips4 - produce code for MIPS R10000, MIPS R12000 and further 64 bit -# processors -# -OPT:Olimit=0 - no limits exists to size of function for compiler to optimize -# it -nowarn="-woff 1064,1188,1460,1552,1681,1682,3303" -cflags="$cflags $nowarn -O3 -c99 -OPT:Olimit=0" - -# C++ only options: -# -LANG:exceptions=OFF - don't generate exception handling code -# MySQL doesn't use exceptions. -# -LANG:std=OFF - don't link standard C++ library, such as -# , , etc. -# -LANG:libc_in_namespace_std=OFF - libstdc functions can be -# declared in namespace 'std', when included -# into C++ code. Switch this feature off. -# This option is vital to compile MySQL - -cxxflags="$cflags -LANG:exceptions=OFF -LANG:std=OFF" -cxxflags="$cxxflags -LANG:libc_in_namespace_std=OFF" - -CC=cc CXX=CC CFLAGS="$cflags" CXXFLAGS="$cxxflags" \ -./configure --prefix=/usr/local/mysql --disable-shared \ - --with-extra-charsets=complex --enable-thread-safe-client \ - --without-extra-tools --disable-dependency-tracking \ - $config_args - -make diff --git a/BUILD/compile-pentium-icc b/BUILD/compile-pentium-icc deleted file mode 100755 index 510cbb1abb050..0000000000000 --- a/BUILD/compile-pentium-icc +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh - -# Copyright (C) 2005 MySQL AB -# Use is subject to license terms -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -# Note that we can't use ccache with icc as the generated .deps file will -# then contain wrong information -CC=icc -CXX=icpc -CXXLD="$CXX -static-libcxa" -export CC CXX CXXLD - -c_warnings="" -cxx_warnings="" -extra_flags="$fast_cflags -unroll2 -ip -mp -restrict" - -# Use -no-ipo if you get this error -# IPO link: can not find "-lstdc++_shared" -# icpc: error: problem during multi-file optimization compilation (code 1) -extra_flags="$extra_flags -no-ipo" -base_cxxflags="-fno-exceptions" -extra_configs="$pentium_configs $static_link $disable_64_bit_plugins" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-icc-yassl b/BUILD/compile-pentium-icc-yassl deleted file mode 100755 index f5cc27c34f009..0000000000000 --- a/BUILD/compile-pentium-icc-yassl +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh - -# Copyright (C) 2005 MySQL AB -# Use is subject to license terms -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -# Note that we can't use ccache with icc as the generated .deps file will -# then contain wrong information -CC=icc -CXX=icpc -CXXLD="$CXX -static-libcxa" -export CC CXX CXXLD - -c_warnings="" -cxx_warnings="" -extra_flags="$fast_cflags -unroll2 -ip -mp -restrict" - -# Use -no-ipo if you get this error -# IPO link: can not find "-lstdc++_shared" -# icpc: error: problem during multi-file optimization compilation (code 1) -extra_flags="$extra_flags -no-ipo" -base_cxxflags="-fno-exceptions" -extra_configs="$pentium_configs $static_link --with-yassl" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-pgcc b/BUILD/compile-pentium-pgcc deleted file mode 100755 index b6073d745b1b4..0000000000000 --- a/BUILD/compile-pentium-pgcc +++ /dev/null @@ -1,18 +0,0 @@ -#! /bin/sh - -AM_MAKEFLAGS="-j 2" -gmake -k maintainer-clean || true -/bin/rm -f */.deps/*.P config.cache - -path=`dirname $0` -. "$path/autorun.sh" - -export PATH=/usr/local/pgcc/bin:$PATH -CFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O6 -mpentiumpro -fomit-frame-pointer -mstack-align-double" CXX=g++ CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -O6 -fomit-frame-pointer -mpentiumpro -mstack-align-double" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static - -gmake -j 4 - -mkdir -p tmp -nm --numeric-sort sql/mysqld > tmp/mysqld.sym -objdump -d sql/mysqld > tmp/mysqld.S -strip sql/mysqld diff --git a/BUILD/compile-pentium32 b/BUILD/compile-pentium32 deleted file mode 100755 index 84dfbcf38782f..0000000000000 --- a/BUILD/compile-pentium32 +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/sh - -# Copyright (c) 2000-2002, 2007 MySQL AB -# Use is subject to license terms -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium_cflags $fast_cflags" -extra_configs="$pentium_configs $disable_64_bit_plugins" -strip=yes - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium32-cybozu b/BUILD/compile-pentium32-cybozu deleted file mode 100755 index 4ff01e73a26e6..0000000000000 --- a/BUILD/compile-pentium32-cybozu +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/sh - -# Copyright (C) 2005 MySQL AB -# Use is subject to license terms -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium_cflags $fast_cflags -g" -extra_configs="$pentium_configs --with-charset=utf8 --with-collation=utf8_general_cs" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium32-debug b/BUILD/compile-pentium32-debug deleted file mode 100755 index 3f5e7b50c533e..0000000000000 --- a/BUILD/compile-pentium32-debug +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/sh - -# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium_cflags $debug_cflags" -extra_configs="$pentium_configs $debug_configs $disable_64_bit_plugins" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium32-debug-max b/BUILD/compile-pentium32-debug-max deleted file mode 100755 index 2938aaaaa966b..0000000000000 --- a/BUILD/compile-pentium32-debug-max +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/sh - -# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium_cflags $debug_cflags" -extra_configs="$pentium_configs $debug_configs $max_configs $error_inject --with-experimental-collations $disable_64_bit_plugins" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium32-debug-openssl b/BUILD/compile-pentium32-debug-openssl deleted file mode 100755 index 469495b101140..0000000000000 --- a/BUILD/compile-pentium32-debug-openssl +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/sh - -# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium_cflags $debug_cflags" -extra_configs="$pentium_configs $debug_configs $disable_64_bit_plugins" - -extra_configs="$extra_configs --with-debug --with-ssl=/usr" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium32-gcov b/BUILD/compile-pentium32-gcov deleted file mode 100755 index 44b672b256c7c..0000000000000 --- a/BUILD/compile-pentium32-gcov +++ /dev/null @@ -1,45 +0,0 @@ -#! /bin/sh - -# Copyright (C) 2000, 2007 MySQL AB -# Use is subject to license terms -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -# Need to disable ccache, or we loose the gcov-needed compiler output files. - -USING_GCOV=1 -CCACHE_GCOV_VERSION_ENABLED=0 -if ccache -V > /dev/null 2>&1 -then - CCACHE_VER=`ccache -V | head -1 | sed s/"ccache version "//` - if test "$CCACHE_VER" == "2.4-gcov" - then - CCACHE_GCOV_VERSION_ENABLED=1 - else - CCACHE_DISABLE=1 - export CCACHE_DISABLE - fi -fi -export CCACHE_GCOV_VERSION_ENABLED - -path=`dirname $0` -. "$path/SETUP.sh" - -export LDFLAGS="$gcov_link_flags" - -extra_flags="$pentium_cflags $debug_cflags $max_cflags $gcov_compile_flags" -c_warnings="$c_warnings $debug_extra_warnings" -cxx_warnings="$cxx_warnings $debug_extra_warnings" -extra_configs="$pentium_configs $debug_configs $gcov_configs $max_configs $disable_64_bit_plugins" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium32-gprof b/BUILD/compile-pentium32-gprof deleted file mode 100755 index 878a358e10bbe..0000000000000 --- a/BUILD/compile-pentium32-gprof +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/sh - -# Copyright (C) 2001, 2007 MySQL AB -# Use is subject to license terms -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium_cflags $gprof_compile_flags" -extra_configs="$pentium_configs $debug_configs $gprof_link_flags $disable_64_bit_plugins $disable_gprof_plugins" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium32-icc-valgrind-max b/BUILD/compile-pentium32-icc-valgrind-max deleted file mode 100755 index 7d7a1a197efc1..0000000000000 --- a/BUILD/compile-pentium32-icc-valgrind-max +++ /dev/null @@ -1,63 +0,0 @@ -#! /bin/sh -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA - -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -# Note that we can't use ccache with icc as the generated .deps file will -# then contain wrong information -CC=icc -CXX=icpc -export CC CXX - -extra_flags="$pentium_cflags $debug_cflags $valgrind_flags" - -# Disable following warnings as these are generated by header files: -# 161 unrecognized pragma -# 444 destructor for base class xxx is not virtual -# 279 controlling expression is constant -# 810 conversion from ulonglong to ulong with cast -# 981 operands are evaluated in unspecified order -# 1292 warning for unknown 'attribute' options -# 1469 "xxx" clobber ignored -# 1572 floating-point equality and inequality comparisons are unreliable - -# In C++ -# 869 parameter "xxx" was never referenced -# (Problem with virtual functions) -# 874 support for placement delete is disabled - -c_warnings="-Wall -Wcheck -wd161,444,279,810,981,1292,1469,1572" -cxx_warnings="$c_warnings -wd869,874" -base_cxxflags="-fno-exceptions" -extra_configs="$pentium_configs $debug_configs $valgrind_configs" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium32-max b/BUILD/compile-pentium32-max deleted file mode 100755 index f2766ab03b3d7..0000000000000 --- a/BUILD/compile-pentium32-max +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/sh - -# Copyright (c) 2001-2006 MySQL AB -# Use is subject to license terms -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium_cflags $fast_cflags -g" -extra_configs="$pentium_configs $max_configs $disable_64_bit_plugins" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium32-valgrind-max b/BUILD/compile-pentium32-valgrind-max deleted file mode 100755 index 6784d202030be..0000000000000 --- a/BUILD/compile-pentium32-valgrind-max +++ /dev/null @@ -1,38 +0,0 @@ -#! /bin/sh -# Copyright (c) 2002, 2010, Oracle and/or its affiliates. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA - -# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium_cflags $debug_cflags $valgrind_flags" -extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs $disable_64_bit_plugins" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium32-wsrep b/BUILD/compile-pentium32-wsrep deleted file mode 100755 index b0b8e40837040..0000000000000 --- a/BUILD/compile-pentium32-wsrep +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/sh - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium_cflags $fast_cflags $wsrep_cflags" -extra_configs="$pentium_configs $wsrep_configs --with-wsrep $disable_64_bit_plugins" - -#strip=yes - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64 b/BUILD/compile-pentium64 deleted file mode 100755 index 01eb2adf88b81..0000000000000 --- a/BUILD/compile-pentium64 +++ /dev/null @@ -1,14 +0,0 @@ -#! /bin/sh - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium64_cflags $fast_cflags" -# On CentOS/Fedora Core 10 amd64, there is system libz.so but not -# libz.a, so need to use bundled zlib when building static -# binary. Hence we use --with-zlib-dir=bundled -extra_configs="$pentium_configs $static_link --with-zlib-dir=bundled" -CC="$CC --pipe" -strip=yes - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64-asan-max b/BUILD/compile-pentium64-asan-max deleted file mode 100755 index f2ebc146b27c2..0000000000000 --- a/BUILD/compile-pentium64-asan-max +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/sh -# Copyright (c) 2018, MariaDB Corporation. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -# -# Enable AddressSanitzer, a fast memory error detector. -# Detects "Out of bounds" and "use-after-free" memory errors -# - -extra_flags="$pentium64_cflags $debug_cflags -lasan -O -g -fsanitize=address -USAFEMALLOC -UFORCE_INIT_OF_VARS -Wno-uninitialized -Wno-maybe-uninitialized -DMYSQL_SERVER_SUFFIX=-asan-max" -extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs $disable_asan_plugins --with-asan=ON" -export LDFLAGS="-ldl" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64-debug b/BUILD/compile-pentium64-debug deleted file mode 100755 index f30c6634ea89d..0000000000000 --- a/BUILD/compile-pentium64-debug +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/sh - -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium64_cflags $debug_cflags" -extra_configs="$pentium_configs $debug_configs $static_link" - -extra_configs="$extra_configs " -CC="$CC --pipe" -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64-debug-all b/BUILD/compile-pentium64-debug-all deleted file mode 100755 index 8733ad00c0208..0000000000000 --- a/BUILD/compile-pentium64-debug-all +++ /dev/null @@ -1,10 +0,0 @@ -#! /bin/sh - -path=`dirname $0` -set -- "$@" --with-debug=full -. "$path/SETUP.sh" - -extra_flags="$pentium64_cflags $debug_cflags" -extra_configs="$pentium_configs $debug_configs $all_configs" -CC="$CC --pipe" -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64-debug-max b/BUILD/compile-pentium64-debug-max deleted file mode 100755 index c68a6326e7f7f..0000000000000 --- a/BUILD/compile-pentium64-debug-max +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/sh - -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium64_cflags $debug_cflags" -extra_configs="$pentium_configs $debug_configs $max_configs" - -CC="$CC --pipe" -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64-gcov b/BUILD/compile-pentium64-gcov deleted file mode 100755 index f66499cbc36b9..0000000000000 --- a/BUILD/compile-pentium64-gcov +++ /dev/null @@ -1,35 +0,0 @@ -#! /bin/sh - -# Copyright (C) 2007 MySQL AB -# Use is subject to license terms -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -set -x -v -path=`dirname $0` - -# Need to disable ccache, or we loose the gcov-needed compiler output files. -CCACHE_DISABLE=1 -export CCACHE_DISABLE - -. "$path/SETUP.sh" - -export LDFLAGS="$gcov_link_flags" - -extra_flags="$pentium64_cflags $max_cflags $gcov_compile_flags" -c_warnings="$c_warnings $debug_extra_warnings" -cxx_warnings="$cxx_warnings $debug_extra_warnings" -extra_configs="$pentium_configs $debug_configs $gcov_configs $max_configs --without-oqgraph" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64-gprof b/BUILD/compile-pentium64-gprof deleted file mode 100755 index 2baba1c441290..0000000000000 --- a/BUILD/compile-pentium64-gprof +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/sh - -# Copyright (C) 2007 MySQL AB -# Use is subject to license terms -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium64_cflags $gprof_compile_flags" -extra_configs="$pentium_configs $max_configs $gprof_link_flags $disable_gprof_plugins" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64-max b/BUILD/compile-pentium64-max deleted file mode 100755 index a7bf969d09320..0000000000000 --- a/BUILD/compile-pentium64-max +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh - -# Copyright (C) 2007 MySQL AB -# Use is subject to license terms -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; version 2 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public -# License along with this library; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium64_cflags $fast_cflags" -# On CentOS/Fedora Core 10 amd64, there is system libz.so but not -# libz.a, so need to use bundled zlib when building static -# binary. Hence we use --with-zlib-dir=bundled -extra_configs="$pentium_configs $max_configs $static_link --with-zlib-dir=bundled" -CC="$CC --pipe" -strip=yes - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64-ubsan b/BUILD/compile-pentium64-ubsan deleted file mode 100755 index d14b2f9911537..0000000000000 --- a/BUILD/compile-pentium64-ubsan +++ /dev/null @@ -1,37 +0,0 @@ -#! /bin/sh -# Copyright (c) 2018, MariaDB Corporation. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -# Compilation with UBSAN, The Undefined Behavior Sanitizer -# We have to use -Wno-uninitialized and we get a lot of false -# positive warnings for this when compiling with -fsanitize=undefined. -# We also have to compile without Spider as linking with Spider library does -# not work. (errno: 11, undefined symbol: _ZTI12ha_partition) - -path=`dirname $0` -. "$path/SETUP.sh" - -# -# Enable UBSAN, UndefinedBehaviorSanitizer. Detects undefined behavior like: -# - Using misaligned or null pointer -# - Signed integer overflow -# - Conversion to, from, or between floating-point types which would overflow -# the destination -# - -extra_flags="$pentium64_cflags $debug_cflags -fsanitize=undefined -DWITH_UBSAN -Wno-conversion -Wno-uninitialized -Wno-unused-parameter" -extra_configs="$pentium_configs $debug_configs -DWITH_UBSAN=ON -DMYSQL_MAINTAINER_MODE=NO --without-spider" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64-valgrind-max b/BUILD/compile-pentium64-valgrind-max deleted file mode 100755 index 0653fb7fe759f..0000000000000 --- a/BUILD/compile-pentium64-valgrind-max +++ /dev/null @@ -1,38 +0,0 @@ -#! /bin/sh -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA - -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium64_cflags $debug_cflags $valgrind_flags" -extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64-wsrep b/BUILD/compile-pentium64-wsrep deleted file mode 100755 index 285cdaca3e52c..0000000000000 --- a/BUILD/compile-pentium64-wsrep +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/sh - -# Copyright (C) 2006, 2007 MySQL AB -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; version 2 -# of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. -# -# You should have received a copy of the GNU Library General Public -# License along with this library; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium64_cflags $fast_cflags -g $wsrep_cflags" -extra_configs="$pentium_configs $static_link $wsrep_configs --with-wsrep" -CC="$CC --pipe" -strip=yes - -. "$path/FINISH.sh" diff --git a/BUILD/compile-ppc b/BUILD/compile-ppc deleted file mode 100755 index 18c8842d724ca..0000000000000 --- a/BUILD/compile-ppc +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/sh - -# Copyright (C) 2004 MySQL AB -# Use is subject to license terms -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$ppc_cflags $fast_cflags" -extra_configs="$static_link" -strip=yes - -. "$path/FINISH.sh" diff --git a/BUILD/compile-ppc-debug b/BUILD/compile-ppc-debug deleted file mode 100755 index 504ffcf8d79b6..0000000000000 --- a/BUILD/compile-ppc-debug +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/sh - -# Copyright (c) 2004, 2006 MySQL AB -# Use is subject to license terms -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$ppc_cflags $debug_cflags" -extra_configs="$debug_configs " - -extra_configs="$extra_configs" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-ppc-debug-max b/BUILD/compile-ppc-debug-max deleted file mode 100755 index ef8d798429e1c..0000000000000 --- a/BUILD/compile-ppc-debug-max +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/sh - -# Copyright (c) 2004-2006 MySQL AB -# Use is subject to license terms -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$ppc_cflags $debug_cflags" -extra_configs="$debug_configs $max_configs" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-ppc-max b/BUILD/compile-ppc-max deleted file mode 100755 index 10ffdfc560467..0000000000000 --- a/BUILD/compile-ppc-max +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/sh - -# Copyright (c) 2004-2006 MySQL AB -# Use is subject to license terms -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$ppc_cflags $fast_cflags -g" -extra_configs="$extra_configs $max_configs" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-solaris-amd64 b/BUILD/compile-solaris-amd64 deleted file mode 100755 index b24c1460dc4e6..0000000000000 --- a/BUILD/compile-solaris-amd64 +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# used for sol10-64 builder in buildbot, don't use it elsewhere -export LDFLAGS='-m64 -lmtmalloc -R/usr/sfw/lib/64' -export CFLAGS='-mtune=i386 -D__sun -m64 -mtune=athlon64' -export CXXFLAGS='-mtune=i386 -D__sun -m64 -mtune=athlon64' -cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DWITH_EXTRA_CHARSETS=complex -DWITH_READLINE=ON -DWITH_SSL=bundled -DWITH_MAX=ON -DWITH_EMBEDDED_SERVER=ON -DWITH_ZLIB=bundled -DPLUGIN_INNOBASE=NO -gmake -j6 VERBOSE=1 - diff --git a/BUILD/compile-solaris-amd64-debug b/BUILD/compile-solaris-amd64-debug deleted file mode 100755 index 78d6649546364..0000000000000 --- a/BUILD/compile-solaris-amd64-debug +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -# Copyright (C) 2007 MySQL AB -# Use is subject to license terms -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA - -path=`dirname $0` -. "$path/SETUP.sh" -extra_flags="$amd64_cflags -D__sun -m64 -mtune=athlon64 $debug_cflags" -extra_configs="$amd64_configs $debug_configs $max_configs --with-libevent" - -LDFLAGS="-m64 -lmtmalloc -R/usr/sfw/lib/64" -export LDFLAGS - -. "$path/FINISH.sh" diff --git a/BUILD/compile-solaris-amd64-debug-forte b/BUILD/compile-solaris-amd64-debug-forte deleted file mode 100755 index 7ccf0f3a9a398..0000000000000 --- a/BUILD/compile-solaris-amd64-debug-forte +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -path=`dirname $0` -. "$path/SETUP.sh" - -# Take only #define options - the others are gcc specific. -# (real fix is for SETUP.sh not to put gcc specific options in $debug_cflags) -DEFS="" -for F in $debug_cflags ; do - expr "$F" : "^-D" && DEFS="$DEFS $F" -done -debug_cflags="-O0 -g $DEFS" - -extra_flags="-m64 -mt -D_FORTEC_ -xlibmopt -fns=no $debug_cflags" -extra_configs="$max_configs --with-libevent $debug_configs" - -warnings="" -c_warnings="" -cxx_warnings="" -base_cxxflags="-noex" - -CC=cc -CFLAGS="-xstrconst" -CXX=CC -LDFLAGS="-lmtmalloc" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-solaris-amd64-forte b/BUILD/compile-solaris-amd64-forte deleted file mode 100755 index 4dee546b23c2b..0000000000000 --- a/BUILD/compile-solaris-amd64-forte +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# Copyright (c) 2007 MySQL AB, 2008 Sun Microsystems, Inc. -# Use is subject to license terms. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA - -# See file compile-solaris-amd64 for basic pre-requisites. - -# This build uses the Sun Studio compilers (cc, CC), available from: -# http://developers.sun.com/sunstudio/downloads/index.jsp -# Note that you may want to apply current patches, as the downloaded version -# is typically out of date. Download the PKG version if you intend to patch! - -# After installing, add /opt/SUNWspro/bin to your $PATH - -gmake -k clean || true -/bin/rm -f */.deps/*.P config.cache - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="-m64 -fast -mt -D_FORTEC_ -xbuiltin=%all -xlibmil -xlibmopt -fns=no -xprefetch=auto -xprefetch_level=3" -extra_configs="$max_configs --with-libevent" - -warnings="" -c_warnings="" -cxx_warnings="" -base_cxxflags="-noex" - -CC=cc -CFLAGS="-xstrconst" -CXX=CC -LDFLAGS="-lmtmalloc" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-solaris-amd64-forte-debug b/BUILD/compile-solaris-amd64-forte-debug deleted file mode 100755 index 08a095b05c838..0000000000000 --- a/BUILD/compile-solaris-amd64-forte-debug +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -# See file compile-solaris-amd64 for basic pre-requisites. - -# This build uses the Sun Studio compilers (cc, CC), available from: -# http://developers.sun.com/sunstudio/downloads/index.jsp -# Note that you may want to apply current patches, as the downloaded version -# is typically out of date. Download the PKG version if you intend to patch! - -# After installing, add /opt/SUNWspro/bin to your $PATH - - -gmake -k clean || true -/bin/rm -f */.deps/*.P config.cache - -. "$path/SETUP.sh" - -extra_flags="-g -m64 -mt -D_FORTEC_ -xbuiltin=%all -xlibmil -xlibmopt -fns=no -xprefetch=auto -xprefetch_level=3" -extra_configs="$max_configs --with-libevent" - -warnings="" -c_warnings="" -cxx_warnings="" -base_cxxflags="-noex" - -CC=cc -CFLAGS="-xstrconst" -CXX=CC -LDFLAGS="-lmtmalloc" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-solaris-sparc b/BUILD/compile-solaris-sparc deleted file mode 100755 index 27c611ec73a67..0000000000000 --- a/BUILD/compile-solaris-sparc +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/sh -# Copyright (c) 2000-2002, 2005-2007 MySQL AB, 2008 Sun Microsystems, Inc. -# Use is subject to license terms. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA - -make -k clean || true -/bin/rm -f */.deps/*.P config.cache - -# gcc is often in /usr/ccs/bin or /usr/local/bin -PATH=$PATH:/usr/ccs/bin:/usr/local/bin - -path=`dirname $0` -. "$path/autorun.sh" - -CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa $EXTRA_FLAGS $EXTRA_CFLAGS" CXX=g++ CXXFLAGS="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g $EXTRA_FLAGS $EXTRA_CXXFLAGS" LIBS="-lmtmalloc" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client - -make -j 4 diff --git a/BUILD/compile-solaris-sparc-debug b/BUILD/compile-solaris-sparc-debug deleted file mode 100755 index 194b4b94a2acf..0000000000000 --- a/BUILD/compile-solaris-sparc-debug +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -make -k clean || true -/bin/rm -f */.deps/*.P config.cache - -path=`dirname $0` -. "$path/autorun.sh" - -CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer" CXX=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -O3 -fno-omit-frame-pointer" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug - -make -j 4 diff --git a/BUILD/compile-solaris-sparc-forte b/BUILD/compile-solaris-sparc-forte deleted file mode 100755 index 5e513ebcf62c4..0000000000000 --- a/BUILD/compile-solaris-sparc-forte +++ /dev/null @@ -1,70 +0,0 @@ -#! /bin/sh -# Copyright (c) 2001, 2002, 2005, 2007 MySQL AB, 2008 Sun Microsystems, Inc. -# Use is subject to license terms. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA - -# Copyright (c) 2001, 2002, 2005, 2007 MySQL AB, 2008 Sun Microsystems, Inc. -# Use is subject to license terms. -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA - -# Assume Forte is installed in /opt/SUNWSpro and ld is installed in -# /usr/ccs/bin - -PATH=/opt/SUNWspro/bin:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:$PATH - -prefix="/usr/local/mysql" -if test -n "$MYSQL_BUILD_PREFIX" -then - prefix="$MYSQL_BUILD_PREFIX" -fi - -make -k maintainer-clean || true -/bin/rm -f */.deps/*.P config.cache - -path=`dirname $0` -. "$path/autorun.sh" - -# For "optimal" code for this computer add -fast to EXTRA -# To compile 32/64 bit, uncomment/comment EXTRA_64_BIT - -EXTRA_64_BIT="-m64" -EXTRA="-fast" # Remove comment to target current machine - -# -# The following should not need to be touched -# - -STD="-mt -D_FORTEC_ $EXTRA $EXTRA_64_BIT" -CC=cc-5.0 CFLAGS="-Xa -xstrconst $STD" \ -CXX=CC CXXFLAGS="-noex $STD" LIBS="-lmtmalloc" \ -./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --prefix=$PREFIX - -make -j 4 -if [ $? = 0 ] -then - make test -fi diff --git a/BUILD/compile-solaris-sparc-purify b/BUILD/compile-solaris-sparc-purify deleted file mode 100755 index a4b7ec63214a4..0000000000000 --- a/BUILD/compile-solaris-sparc-purify +++ /dev/null @@ -1,110 +0,0 @@ -#! /bin/sh - -mode="" -cxxfilt="" - -# For g++ 3.X, the PurifyPlus tools needs a program named "cxxfilt", -# "c++file" or similar. It is part of libtool. If not found, you can -# specify the path to it. - -while test $# -gt 0 -do - case "$1" in - --debug) EXTRA_CONFIG_FLAGS=--with-debug ;; - --purify) mode=purify ;; - --purecov*) mode=purecov ;; - --quantify) mode=quantify ;; - --cxxfilt) shift ; cxxfilt=$1 ;; - -h | --help ) - echo "Usage: $0 [ options ]" - echo "Where the 'options' are" - echo " --help | -h Display this help" - echo " --debug Compile with DBUG enabled" - echo " --purify Only prepare for Purify" - echo " --purecov Only prepare for PureCover" - echo " --quantify Only prepare for Quantify" - echo " --cxxfilt Path to cxxfilt/c++filt program" - echo " This program is needed for gcc 3.X" - exit 0 ;; - *) echo "No such option '$1'" ; exit 1 ;; - esac - shift -done - -make -k maintainer-clean || true -/bin/rm -f */.deps/*.P config.cache - -path=`dirname $0` -. "$path/autorun.sh" - -CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_valgrind -DEXTRA_DEBUG -O2" CXX=g++ CXXLD=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -DHAVE_valgrind -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-embedded-server --with-innodb $EXTRA_CONFIG_FLAGS - -make -j 4 - -# ---------------------------------------------------------------------- - -#set -x - -purifying_binaries () -{ - while test $1 - do - dir=$1 - shift - target=$1 - shift - binary=$1 - shift - - opts="" - if [ -n "$cxxfilt" ] ; then - opts="$opts -demangle-program=$cxxfilt" - fi - opts="$opts -best-effort" - - back=`pwd` - cd $dir - - # Because of libtool magic, the target and binary - # created might not be the same. To trigger rebuild, - # we need to move them both. - - mv $binary $binary-old - if [ -f $target ] ; then - mv $target $target-old - fi - - if [ -n "$mode" -a $mode = purify ] ; then - make CCLD="purify $opts gcc" CXXLD="purify $opts g++" $target - mv $binary $binary-purify - fi - - if [ -n "$mode" -a $mode = quantify ] ; then - make CCLD="quantify $opts gcc" CXXLD="quantify $opts g++" $target - mv $binary $binary-quantify - fi - - if [ -n "$mode" -a $mode = purecov ] ; then - make CCLD="purecov $opts gcc" CXXLD="purecov $opts g++" $target - mv $binary $binary-purecov - fi - - mv $binary-old $binary - if [ -f $target-old ] ; then - mv $target-old $target - fi - - cd $back - done -} - - -purifying_binaries \ - sql mysqld mysqld \ - client mysqltest .libs/mysqltest \ - tests mysql_client_test mysql_client_test \ - libmysqld/examples mysqltest_embedded mysqltest_embedded \ - libmysqld/examples mysql_client_test_embedded mysql_client_test_embedded - -# ---------------------------------------------------------------------- - diff --git a/BUILD/util.sh b/BUILD/util.sh deleted file mode 100644 index d1f4722b62c1c..0000000000000 --- a/BUILD/util.sh +++ /dev/null @@ -1,48 +0,0 @@ -# MariaDB SQL server. -# Copyright (C) 2010 Kristian Nielsen and Monty Program AB -# -# 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA. - -# Setting cpu options. -get_cpuopt () { - case "$(uname -o)" in - *Linux*) - case "$(gcc -dumpmachine)" in - x86_64-*) - # gcc barfs on -march=... on x64 - CPUOPT="-m64 -mtune=generic" - ;; - *) - # we'd use i586 to not trip up mobile/lowpower devices - CPUOPT="-m32 -march=i586 -mtune=generic" - ;; - esac - ;; - *Solaris*) - # ToDo: handle 32-bit build? For now default to 64-bit. - CPUOPT="-D__sun -m64 -mtune=athlon64" - ;; - esac - return 0 -} - -# Default to a parallel build, but only if AM_MAKEFLAGS is not set. -# (So buildbots can easily disable this behaviour if required.) -get_make_parallel_flag () { - if test -z "$AM_MAKEFLAGS" - then - AM_MAKEFLAGS="-j 6" - fi - return 0 -} diff --git a/mysql-test/main/comments.result b/mysql-test/main/comments.result index ccafe46a58be4..8c03d9db4383b 100644 --- a/mysql-test/main/comments.result +++ b/mysql-test/main/comments.result @@ -120,46 +120,3 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!998765' AND b = 'bar';*"; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '/*!998765' AND b = 'bar';*' at line 1 drop table table_28779; -# -# MDEV-7381: Reversed executable comments -# -# Server version is >= 100000, so reversed comments with version -# <= current should NOT execute (server is not older than that version). -SELECT 1 /*!!50101 +1 */; -1 -1 -SELECT 1 /*!!100000 +1 */; -1 -1 -# Reversed comment with version higher than current SHOULD execute. -SELECT 1 /*!!999999 +1 */; -1 +1 -2 -# MariaDB-specific reversed executable comments -SELECT 1 /*M!!50101 +1 */; -1 -1 -SELECT 1 /*M!!999999 +1 */; -1 +1 -2 -# Without version number (just /*!! with no digits) should still work -# as a regular executable comment expanding the content. -SELECT 1 /*!! +1 */; -1 +1 -2 -SELECT 1 /*M!! +1 */; -1 +1 -2 -# Combined forward and reversed in the same statement (MDEV-7381 use case). -# On this server (>= 10.0.0): /*!100000 OR REPLACE */ executes, -# /*!!100000 IF NOT EXISTS */ is skipped. -# Effective statement: CREATE OR REPLACE TABLE t1 (a INT); -CREATE /*!100000 OR REPLACE */ TABLE /*!!100000 IF NOT EXISTS */ t1 (a INT); -INSERT INTO t1 VALUES (1); -# Run again. OR REPLACE should drop and recreate the table, losing the row. -CREATE /*!100000 OR REPLACE */ TABLE /*!!100000 IF NOT EXISTS */ t1 (a INT); -# Table should be empty, proving OR REPLACE was used (not IF NOT EXISTS). -SELECT COUNT(*) FROM t1; -COUNT(*) -0 -DROP TABLE t1; diff --git a/mysql-test/main/comments.test b/mysql-test/main/comments.test index 49d18c332f928..671e5d6583555 100644 --- a/mysql-test/main/comments.test +++ b/mysql-test/main/comments.test @@ -101,36 +101,3 @@ prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!998765' AND b = ' drop table table_28779; - ---echo # ---echo # MDEV-7381: Reversed executable comments ---echo # - ---echo # Server version is >= 100000, so reversed comments with version ---echo # <= current should NOT execute (server is not older than that version). -SELECT 1 /*!!50101 +1 */; -SELECT 1 /*!!100000 +1 */; - ---echo # Reversed comment with version higher than current SHOULD execute. -SELECT 1 /*!!999999 +1 */; - ---echo # MariaDB-specific reversed executable comments -SELECT 1 /*M!!50101 +1 */; -SELECT 1 /*M!!999999 +1 */; - ---echo # Without version number (just /*!! with no digits) should still work ---echo # as a regular executable comment expanding the content. -SELECT 1 /*!! +1 */; -SELECT 1 /*M!! +1 */; - ---echo # Combined forward and reversed in the same statement (MDEV-7381 use case). ---echo # On this server (>= 10.0.0): /*!100000 OR REPLACE */ executes, ---echo # /*!!100000 IF NOT EXISTS */ is skipped. ---echo # Effective statement: CREATE OR REPLACE TABLE t1 (a INT); -CREATE /*!100000 OR REPLACE */ TABLE /*!!100000 IF NOT EXISTS */ t1 (a INT); -INSERT INTO t1 VALUES (1); ---echo # Run again. OR REPLACE should drop and recreate the table, losing the row. -CREATE /*!100000 OR REPLACE */ TABLE /*!!100000 IF NOT EXISTS */ t1 (a INT); ---echo # Table should be empty, proving OR REPLACE was used (not IF NOT EXISTS). -SELECT COUNT(*) FROM t1; -DROP TABLE t1; diff --git a/mysql-test/main/mdev_38904.result b/mysql-test/main/mdev_38904.result new file mode 100644 index 0000000000000..202e4b4fa5744 --- /dev/null +++ b/mysql-test/main/mdev_38904.result @@ -0,0 +1,12 @@ +# +# MDEV-38904: latin7 collation corruption +# +CREATE TABLE t1 ( +c1 VARCHAR(10) CHARACTER SET latin7 COLLATE latin7_general_ci, +KEY(c1) +) ENGINE=InnoDB; +INSERT INTO t1 VALUES ('a-b'), ('a b'); +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; \ No newline at end of file diff --git a/mysql-test/main/mdev_38904.test b/mysql-test/main/mdev_38904.test new file mode 100644 index 0000000000000..eabea4deedb2f --- /dev/null +++ b/mysql-test/main/mdev_38904.test @@ -0,0 +1,15 @@ +--source include/have_innodb.inc + +--echo # +--echo # MDEV-38904: latin7 collation corruption +--echo # + +CREATE TABLE t1 ( + c1 VARCHAR(10) CHARACTER SET latin7 COLLATE latin7_general_ci, + KEY(c1) +) ENGINE=InnoDB; + +INSERT INTO t1 VALUES ('a-b'), ('a b'); +CHECK TABLE t1; + +DROP TABLE t1; \ No newline at end of file diff --git a/mysql-test/suite/plugins/r/server_audit.result b/mysql-test/suite/plugins/r/server_audit.result index 2406c2b6d3ef4..9276a38bde4ef 100644 --- a/mysql-test/suite/plugins/r/server_audit.result +++ b/mysql-test/suite/plugins/r/server_audit.result @@ -230,17 +230,6 @@ select 3; 7 7 /*M!999999 SELECT 'should not log' */; -/*!! SELECT 8 */; -8 -8 -/*!!999999 SELECT 9 */; -9 -9 -/*!!100100 SELECT 'reversed should not log' */; -/*M!!999999 SELECT 10 */; -10 -10 -/*M!!100100 SELECT 'reversed should not log' */; drop table t1; set global server_audit_events='query_dcl'; create table t1(id int); @@ -306,7 +295,7 @@ set global server_audit_logging= off; set global server_audit_incl_users='root'; set global server_audit_logging= on; disconnect cn1; -Line count in file: 169 +Line count in file: 166 drop user user1@localhost; set global server_audit_events=''; set global server_audit_incl_users='root, plug_dest, ssl_user1'; @@ -322,7 +311,7 @@ USER() CURRENT_USER() plug@localhost plug_dest@% connection default; disconnect plug_con; -Line count in file: 203 +Line count in file: 200 DROP USER plug; DROP USER plug_dest; CREATE USER ssl_user1@localhost require SSL; @@ -332,7 +321,7 @@ select variable_value > '' as 'have_ssl' from information_schema.session_status have_ssl 1 disconnect conssl1; -Line count in file: 234 +Line count in file: 231 connection default; DROP USER ssl_user1@localhost; set global server_audit_query_log_limit= 15; @@ -552,9 +541,6 @@ TIME,HOSTNAME,root,localhost:PORT,ID,ID,QUERY,sa_db,'/*! SELECT 4 */',0 TIME,HOSTNAME,root,localhost:PORT,ID,ID,QUERY,sa_db,'/*M! SELECT 5 */',0 TIME,HOSTNAME,root,localhost:PORT,ID,ID,QUERY,sa_db,'/*!100100 SELECT 6 */',0 TIME,HOSTNAME,root,localhost:PORT,ID,ID,QUERY,sa_db,'/*M!100100 SELECT 7 */',0 -TIME,HOSTNAME,root,localhost:PORT,ID,ID,QUERY,sa_db,'/*!! SELECT 8 */',0 -TIME,HOSTNAME,root,localhost:PORT,ID,ID,QUERY,sa_db,'/*!!999999 SELECT 9 */',0 -TIME,HOSTNAME,root,localhost:PORT,ID,ID,QUERY,sa_db,'/*M!!999999 SELECT 10 */',0 TIME,HOSTNAME,root,localhost:PORT,ID,ID,QUERY,sa_db,'CREATE USER u1 IDENTIFIED BY *****',0 TIME,HOSTNAME,root,localhost:PORT,ID,ID,QUERY,sa_db,'GRANT ALL ON sa_db TO u2 IDENTIFIED BY *****',0 TIME,HOSTNAME,root,localhost:PORT,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0 diff --git a/mysql-test/suite/plugins/t/server_audit.test b/mysql-test/suite/plugins/t/server_audit.test index 77a483d36b4a1..94b2129425aff 100644 --- a/mysql-test/suite/plugins/t/server_audit.test +++ b/mysql-test/suite/plugins/t/server_audit.test @@ -167,12 +167,6 @@ query /*!999999 SELECT 'should not log' */; query /*M!100100 SELECT 7 */; query /*M!999999 SELECT 'should not log' */; -query /*!! SELECT 8 */; -query /*!!999999 SELECT 9 */; -query /*!!100100 SELECT 'reversed should not log' */; -query /*M!!999999 SELECT 10 */; -query /*M!!100100 SELECT 'reversed should not log' */; - drop table t1; set global server_audit_events='query_dcl'; create table t1(id int); @@ -236,7 +230,7 @@ set global server_audit_logging= off; set global server_audit_incl_users='root'; set global server_audit_logging= on; disconnect cn1; -let SEARCH_COUNT= 169; +let SEARCH_COUNT= 166; source include/wait_for_line_count_in_file.inc; drop user user1@localhost; @@ -257,7 +251,7 @@ connect(plug_con,localhost,plug,plug_dest,"*NO-ONE*"); select USER(),CURRENT_USER(); connection default; disconnect plug_con; -let SEARCH_COUNT= 203; +let SEARCH_COUNT= 200; source include/wait_for_line_count_in_file.inc; DROP USER plug; DROP USER plug_dest; @@ -268,7 +262,7 @@ connect (conssl1,localhost,ssl_user1,,sa_db,,,SSL); --let $ssl_version = query_get_value(SHOW STATUS LIKE 'Ssl_version', Value, 1) select variable_value > '' as 'have_ssl' from information_schema.session_status where variable_name='ssl_cipher'; disconnect conssl1; -let SEARCH_COUNT= 234; +let SEARCH_COUNT= 231; source include/wait_for_line_count_in_file.inc; connection default; DROP USER ssl_user1@localhost; diff --git a/mysql-test/suite/rpl/r/rpl_noblob_unique_blob.result b/mysql-test/suite/rpl/r/rpl_noblob_unique_blob.result new file mode 100644 index 0000000000000..bfeedfe2af214 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_noblob_unique_blob.result @@ -0,0 +1,21 @@ +include/master-slave.inc +[connection master] +# +# Assertion `!((f->flags & 4096U) && f->vcol_info)' +# upon RBR with NOBLOB and unique blob +# +SET binlog_row_image = NOBLOB; +CREATE TABLE t (pk INT PRIMARY KEY, a BLOB NOT NULL, UNIQUE(a)); +INSERT IGNORE INTO t (pk) VALUES (1),(2); +Warnings: +Warning 1364 Field 'a' doesn't have a default value +Warning 1364 Field 'a' doesn't have a default value +include/sync_slave_sql_with_master.inc +# Verify data on slave +SELECT pk FROM t ORDER BY pk; +pk +1 +2 +[connection master] +DROP TABLE t; +include/rpl_end.inc \ No newline at end of file diff --git a/mysql-test/suite/rpl/r/rpl_noblob_unique_blob.test b/mysql-test/suite/rpl/r/rpl_noblob_unique_blob.test new file mode 100644 index 0000000000000..6ef431ea51465 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_noblob_unique_blob.test @@ -0,0 +1,22 @@ +--source include/have_binlog_format_row.inc +--source include/master-slave.inc + +--echo # +--echo # Assertion `!((f->flags & 4096U) && f->vcol_info)' +--echo # upon RBR with NOBLOB and unique blob +--echo # + +SET binlog_row_image = NOBLOB; +CREATE TABLE t (pk INT PRIMARY KEY, a BLOB NOT NULL, UNIQUE(a)); + +--echo # This insert ignores the blob to trigger the missing column on replica +INSERT IGNORE INTO t (pk) VALUES (1),(2); + +--sync_slave_with_master + +--echo # Verify data on slave +SELECT pk FROM t ORDER BY pk; + +--connection master +DROP TABLE t; +--source include/rpl_end.inc \ No newline at end of file diff --git a/sql/rpl_master_info_file.h b/sql/rpl_master_info_file.h index 24cbcf55f7278..90bc08fb6781f 100644 --- a/sql/rpl_master_info_file.h +++ b/sql/rpl_master_info_file.h @@ -83,7 +83,7 @@ inline const char *master_ssl_key = ""; inline const char *master_ssl_cipher = ""; inline bool master_ssl_verify_server_cert= true; /// `ulong` is the data type `my_getopt` expects. -inline ulong master_use_gtid= static_cast(enum_master_use_gtid::DEFAULT); +inline auto master_use_gtid= static_cast(enum_master_use_gtid::DEFAULT); inline uint64_t master_retry_count= 100000; /// }@ @@ -612,11 +612,9 @@ struct Master_info_file: Info_file ignore_server_ids(ignore_server_ids), do_domain_ids(do_domain_ids), ignore_domain_ids(ignore_domain_ids) { - for (std::unordered_map::const_iterator it= VALUE_MAP.begin(); - it != VALUE_MAP.end(); ++it) - if (it->second) - it->second(this).set_default(); + for(auto &[_, mem_fn]: VALUE_MAP) + if (mem_fn) + mem_fn(this).set_default(); } bool load_from_file() override @@ -697,15 +695,12 @@ break_for:; /* Write MariaDB `key=value` lines: The "value" can then be written individually after generating the`key=`. */ - for (std::unordered_map::const_iterator it= VALUE_MAP.begin(); - it != VALUE_MAP.end(); ++it) - { - if (it->second) + for (auto &[key, pm]: VALUE_MAP) + if (pm) { - Persistent &value= it->second(this); + Persistent &value= pm(this); my_b_write(&file, - reinterpret_cast(it->first.data()), it->first.size()); + reinterpret_cast(key.data()), key.size()); if (!value.is_default()) { my_b_write_byte(&file, '='); @@ -713,11 +708,11 @@ break_for:; } my_b_write_byte(&file, '\n'); } - } my_b_write(&file, reinterpret_cast(END_MARKER), - sizeof(END_MARKER) - /* the '\0' */ 1); + sizeof(END_MARKER) - /* the '\0' */ 1); my_b_write_byte(&file, '\n'); } + }; #endif // C++ standard guard diff --git a/sql/rpl_record.cc b/sql/rpl_record.cc index 0c725660083bd..f87cb7372d5f7 100644 --- a/sql/rpl_record.cc +++ b/sql/rpl_record.cc @@ -584,7 +584,7 @@ int prepare_record(TABLE *const table) continue; Field *const f= *field_ptr; - DBUG_ASSERT(!((f->flags & NO_DEFAULT_VALUE_FLAG) && f->vcol_info)); // QQ + if ((f->flags & NO_DEFAULT_VALUE_FLAG) && (f->real_type() != MYSQL_TYPE_ENUM) && !f->vcol_info) { @@ -600,4 +600,4 @@ int prepare_record(TABLE *const table) DBUG_RETURN(0); } -#endif // HAVE_REPLICATION +#endif // HAVE_REPLICATION \ No newline at end of file diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 8fedc08645837..b492dbe8411a2 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -2425,16 +2425,6 @@ int Lex_input_stream::lex_one_token(YYSTYPE *yylval, THD *thd) set_echo(FALSE); yySkipn(maria_comment_syntax ? 4 : 3); - /* - Check for reversed executable comment syntax: '/' '*' '!' '!' - A reversed comment is executed only on versions OLDER than - the specified version (i.e. when MYSQL_VERSION_ID < version). - See MDEV-7381. - */ - bool reversed_comment= (yyPeekn(0) == '!'); - if (reversed_comment) - yySkipn(1); - /* The special comment format is very strict: '/' '*' '!', followed by an optional 'M' and exactly @@ -2468,16 +2458,9 @@ int Lex_input_stream::lex_one_token(YYSTYPE *yylval, THD *thd) MariaDB-10.0 does not understand. Ignore all versioned comments with MySQL versions in the range 50700-999999, but do not ignore MariaDB specific comments for the same versions. - - Reversed executable comments (MDEV-7381): execute the content - only when the server version is strictly less than the specified - version. The MySQL 5.7 range exclusion does not apply to - reversed comments. */ - if ((!reversed_comment && - version <= MYSQL_VERSION_ID && - (version < 50700 || version > 99999 || maria_comment_syntax)) || - (reversed_comment && MYSQL_VERSION_ID < version)) + if (version <= MYSQL_VERSION_ID && + (version < 50700 || version > 99999 || maria_comment_syntax)) { /* Accept 'M' 'm' 'm' 'd' 'd' */ yySkipn(length); diff --git a/storage/innobase/dict/dict0stats_bg.cc b/storage/innobase/dict/dict0stats_bg.cc index 135ffb6000580..5f11790888be6 100644 --- a/storage/innobase/dict/dict0stats_bg.cc +++ b/storage/innobase/dict/dict0stats_bg.cc @@ -31,17 +31,18 @@ Created Apr 25, 2012 Vasil Dimov #include "srv0start.h" #include "fil0fil.h" #include "mysqld.h" +#include "log.h" + #ifdef WITH_WSREP # include "trx0trx.h" # include "mysql/service_wsrep.h" # include "wsrep.h" -# include "log.h" #endif #include /** Minimum time interval between stats recalc for a given table */ -#define MIN_RECALC_INTERVAL 10 /* seconds */ +#define MIN_RECALC_INTERVAL 10 /* seconds */ static void dict_stats_schedule(int ms); /** Protects recalc_pool */ @@ -64,9 +65,9 @@ typedef std::vector> recalc_pool_t; /** Pool where we store information on which tables are to be processed by background statistics gathering. */ -static recalc_pool_t recalc_pool; +static recalc_pool_t recalc_pool; /** Whether the global data structures have been initialized */ -static bool stats_initialised; +static bool stats_initialised; static THD *dict_stats_thd; @@ -75,9 +76,9 @@ Free the resources occupied by the recalc pool, called once during thread de-initialization. */ static void dict_stats_recalc_pool_deinit() { - ut_ad(!srv_read_only_mode); + ut_ad(!srv_read_only_mode); - recalc_pool.clear(); + recalc_pool.clear(); /* recalc_pool may still have its buffer allocated. It will free it when its destructor is called. @@ -86,11 +87,13 @@ static void dict_stats_recalc_pool_deinit() memory. To avoid that, we force recalc_pool to surrender its buffer to empty_pool object, which will free it when leaving this function: */ - recalc_pool_t recalc_empty_pool; - recalc_pool.swap(recalc_empty_pool); + recalc_pool_t recalc_empty_pool; + recalc_pool.swap(recalc_empty_pool); - if (dict_stats_thd) - destroy_background_thd(dict_stats_thd); + if (dict_stats_thd) { + destroy_background_thd(dict_stats_thd); + dict_stats_thd = nullptr; + } } /*****************************************************************//** @@ -120,78 +123,78 @@ static void dict_stats_recalc_pool_add(table_id_t id) /** Update the table modification counter and if necessary, schedule new estimates for table and index statistics to be calculated. -@param[in,out] table persistent or temporary table -@param[in,out] thd current session */ +@param[in,out] table persistent or temporary table +@param[in,out] thd current session */ void dict_stats_update_if_needed(dict_table_t *table, trx_t &trx) noexcept { uint32_t stat{table->stat}; - if (UNIV_UNLIKELY(!table->stat_initialized(stat))) { - /* The table may have been evicted from dict_sys - and reloaded internally by InnoDB for FOREIGN KEY - processing, but not reloaded by the SQL layer. + if (UNIV_UNLIKELY(!table->stat_initialized(stat))) { + /* The table may have been evicted from dict_sys + and reloaded internally by InnoDB for FOREIGN KEY + processing, but not reloaded by the SQL layer. - We can (re)compute the transient statistics when the - table is actually loaded by the SQL layer. + We can (re)compute the transient statistics when the + table is actually loaded by the SQL layer. - Note: If InnoDB persistent statistics are enabled, - we will skip the updates. We must do this, because - dict_table_get_n_rows() below assumes that the - statistics have been initialized. The DBA may have - to execute ANALYZE TABLE. */ - return; - } + Note: If InnoDB persistent statistics are enabled, + we will skip the updates. We must do this, because + dict_table_get_n_rows() below assumes that the + statistics have been initialized. The DBA may have + to execute ANALYZE TABLE. */ + return; + } - ulonglong counter = table->stat_modified_counter++; - ulonglong n_rows = dict_table_get_n_rows(table); + ulonglong counter = table->stat_modified_counter++; + ulonglong n_rows = dict_table_get_n_rows(table); - if (table->stats_is_persistent(stat)) { - if (table->stats_is_auto_recalc(stat) - && counter > n_rows / 10 && !table->name.is_temporary()) { + if (table->stats_is_persistent(stat)) { + if (table->stats_is_auto_recalc(stat) + && counter > n_rows / 10 && !table->name.is_temporary()) { #ifdef WITH_WSREP - /* Do not add table to background - statistic calculation if this thread is not a - applier (as all DDL, which is replicated (i.e - is binlogged in master node), will be executed - with high priority (a.k.a BF) in slave nodes) - and is BF. This could again lead BF lock - waits in applier node but it is better than - no persistent index/table statistics at - applier nodes. TODO: allow BF threads - wait for these InnoDB internal SQL-parser - generated row locks and allow BF thread - lock waits to be enqueued at head of waiting - queue. */ - if (trx.is_wsrep() - && !wsrep_thd_is_applying(trx.mysql_thd) - && wsrep_thd_is_BF(trx.mysql_thd, 0)) { - WSREP_DEBUG("Avoiding background statistics" - " calculation for table %s.", - table->name.m_name); - return; - } + /* Do not add table to background + statistic calculation if this thread is not a + applier (as all DDL, which is replicated (i.e + is binlogged in master node), will be executed + with high priority (a.k.a BF) in slave nodes) + and is BF. This could again lead BF lock + waits in applier node but it is better than + no persistent index/table statistics at + applier nodes. TODO: allow BF threads + wait for these InnoDB internal SQL-parser + generated row locks and allow BF thread + lock waits to be enqueued at head of waiting + queue. */ + if (trx.is_wsrep() + && !wsrep_thd_is_applying(trx.mysql_thd) + && wsrep_thd_is_BF(trx.mysql_thd, 0)) { + WSREP_DEBUG("Avoiding background statistics" + " calculation for table %s.", + table->name.m_name); + return; + } #endif /* WITH_WSREP */ - dict_stats_recalc_pool_add(table->id); - table->stat_modified_counter = 0; - } - return; - } - - /* Calculate new statistics if 1 / 16 of table has been modified - since the last time a statistics batch was run. - We calculate statistics at most every 16th round, since we may have - a counter table which is very small and updated very often. */ - ulonglong threshold = 16 + n_rows / 16; /* 6.25% */ - - if (srv_stats_modified_counter) { - threshold = std::min(srv_stats_modified_counter, threshold); - } - - if (counter > threshold) { - /* this will reset table->stat_modified_counter to 0 */ - dict_stats_update_transient(&trx, table); - } + dict_stats_recalc_pool_add(table->id); + table->stat_modified_counter = 0; + } + return; + } + + /* Calculate new statistics if 1 / 16 of table has been modified + since the last time a statistics batch was run. + We calculate statistics at most every 16th round, since we may have + a counter table which is very small and updated very often. */ + ulonglong threshold = 16 + n_rows / 16; /* 6.25% */ + + if (srv_stats_modified_counter) { + threshold = std::min(srv_stats_modified_counter, threshold); + } + + if (counter > threshold) { + /* this will reset table->stat_modified_counter to 0 */ + dict_stats_update_transient(&trx, table); + } } /** Delete a table from the auto recalc pool, and ensure that @@ -255,17 +258,17 @@ Free resources allocated by dict_stats_init(), must be called after dict_stats task has exited. */ void dict_stats_deinit() { - if (!stats_initialised) { - return; - } + if (!stats_initialised) { + return; + } - ut_ad(!srv_read_only_mode); - stats_initialised = false; + ut_ad(!srv_read_only_mode); + stats_initialised = false; - dict_stats_recalc_pool_deinit(); + dict_stats_recalc_pool_deinit(); - mysql_mutex_destroy(&recalc_pool_mutex); - pthread_cond_destroy(&recalc_pool_cond); + mysql_mutex_destroy(&recalc_pool_mutex); + pthread_cond_destroy(&recalc_pool_cond); } /** @@ -371,14 +374,15 @@ static bool is_recalc_pool_empty() static tpool::timer* dict_stats_timer; static void dict_stats_func(void*) { - if (!dict_stats_thd) - dict_stats_thd= innobase_create_background_thd("InnoDB statistics"); + DBUG_ASSERT(dict_stats_thd != nullptr); + set_current_thd(dict_stats_thd); while (dict_stats_process_entry_from_recalc_pool(dict_stats_thd)) {} innobase_reset_background_thd(dict_stats_thd); set_current_thd(nullptr); + if (!is_recalc_pool_empty()) dict_stats_schedule(MIN_RECALC_INTERVAL * 1000); } @@ -387,7 +391,17 @@ static void dict_stats_func(void*) void dict_stats_start() { DBUG_ASSERT(!dict_stats_timer); - dict_stats_timer= srv_thread_pool->create_timer(dict_stats_func); + + if (!dict_stats_thd) { + dict_stats_thd = innobase_create_background_thd("InnoDB statistics"); + } + + if (dict_stats_thd) { + dict_stats_timer = srv_thread_pool->create_timer(dict_stats_func); + } else { + sql_print_warning("InnoDB: Failed to create background THD for statistics. " + "Automatic statistics recalculation will be disabled."); + } } @@ -405,6 +419,14 @@ void dict_stats_schedule_now() /** Shut down the dict_stats_thread. */ void dict_stats_shutdown() { - delete dict_stats_timer; - dict_stats_timer= 0; -} + if (dict_stats_timer) { + delete dict_stats_timer; + dict_stats_timer= 0; + } + + // Safely destroy the THD during shutdown + if (dict_stats_thd) { + destroy_background_thd(dict_stats_thd); + dict_stats_thd = nullptr; + } +} \ No newline at end of file diff --git a/strings/ctype-extra.c b/strings/ctype-extra.c index 8a25a9c6a611e..58cf407040c09 100644 --- a/strings/ctype-extra.c +++ b/strings/ctype-extra.c @@ -2518,22 +2518,22 @@ static const uchar to_upper_latin7_general_ci[] = { }; static const uchar sort_order_latin7_general_ci[] = { -0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, -0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, -0x30,0x32,0x33,0x34,0x35,0x36,0x37,0x2B,0x38,0x39,0x3A,0x5C,0x3B,0x2C,0x3C,0x3D, -0x76,0x7A,0x7C,0x7E,0x80,0x81,0x82,0x83,0x84,0x85,0x3E,0x3F,0x5D,0x5E,0x5F,0x40, -0x41,0x86,0x92,0x94,0x9A,0x9C,0xA6,0xA8,0xAC,0xAE,0xB4,0xB6,0xBA,0xC0,0xC2,0xC8, -0xD4,0xD6,0xD8,0xDC,0xE3,0xE6,0xEE,0xF0,0xF2,0xF4,0xF6,0x42,0x43,0x44,0x45,0x46, -0x47,0x86,0x92,0x94,0x9A,0x9C,0xA6,0xA8,0xAC,0xAE,0xB4,0xB6,0xBA,0xC0,0xC2,0xC8, -0xD4,0xD6,0xD8,0xDC,0xE2,0xE6,0xEE,0xF0,0xF2,0xF4,0xF6,0x48,0x49,0x4A,0x4B,0x20, -0x75,0x21,0x56,0x22,0x59,0x73,0x70,0x71,0x23,0x74,0x24,0x5A,0x25,0x4D,0x51,0x50, -0x26,0x54,0x55,0x57,0x58,0x72,0x2E,0x2F,0x27,0xE5,0x28,0x5B,0x29,0x4E,0x53,0x2A, -0x31,0xFE,0x65,0x66,0x67,0xFF,0x4C,0x68,0x2D,0x69,0xDA,0x61,0x6A,0x2D,0x6B,0x90, -0x6C,0x60,0x7D,0x7F,0x4F,0x6D,0x6E,0x6F,0xD3,0x7B,0xDB,0x62,0x77,0x78,0x79,0x90, -0x8E,0xB2,0x8A,0x96,0x88,0x8C,0xA4,0xA2,0x98,0x9E,0xF8,0xA0,0xAA,0xB8,0xB0,0xBE, -0xE1,0xC4,0xC6,0xCA,0xCE,0xD0,0xCC,0x63,0xEC,0xBC,0xDE,0xEA,0xE8,0xFA,0xFC,0xE0, -0x8E,0xB2,0x8A,0x96,0x88,0x8C,0xA4,0xA2,0x98,0x9E,0xF8,0xA0,0xAA,0xB8,0xB0,0xBE, -0xE1,0xC4,0xC6,0xCA,0xCE,0xD0,0xCC,0x64,0xEC,0xBC,0xDE,0xEA,0xE8,0xFA,0xFC,0x52 + 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, + 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, + 0x20,0x32,0x33,0x34,0x35,0x36,0x37,0x2B,0x38,0x39,0x3A,0x5C,0x3B,0x2D,0x3C,0x3D, + 0x76,0x7A,0x7C,0x7E,0x80,0x81,0x82,0x83,0x84,0x85,0x3E,0x3F,0x5D,0x5E,0x5F,0x40, + 0x41,0x86,0x92,0x94,0x9A,0x9C,0xA6,0xA8,0xAC,0xAE,0xB4,0xB6,0xBA,0xC0,0xC2,0xC8, + 0xD4,0xD6,0xD8,0xDC,0xE3,0xE6,0xEE,0xF0,0xF2,0xF4,0xF6,0x42,0x43,0x44,0x45,0x46, + 0x47,0x86,0x92,0x94,0x9A,0x9C,0xA6,0xA8,0xAC,0xAE,0xB4,0xB6,0xBA,0xC0,0xC2,0xC8, + 0xD4,0xD6,0xD8,0xDC,0xE2,0xE6,0xEE,0xF0,0xF2,0xF4,0xF6,0x48,0x49,0x4A,0x4B,0x4C, + 0x75,0x21,0x56,0x22,0x59,0x73,0x70,0x71,0x23,0x74,0x24,0x5A,0x25,0x4D,0x51,0x50, + 0x26,0x54,0x55,0x57,0x58,0x72,0x2E,0x2F,0x27,0xE5,0x28,0x5B,0x29,0x4E,0x53,0x2A, + 0x31,0xFE,0x65,0x66,0x67,0xFF,0x4C,0x68,0x2C,0x69,0xDA,0x61,0x6A,0x2C,0x6B,0x90, + 0x6C,0x60,0x7D,0x7F,0x4F,0x6D,0x6E,0x6F,0xD3,0x7B,0xDB,0x62,0x77,0x78,0x79,0x90, + 0x8E,0xB2,0x8A,0x96,0x88,0x8C,0xA4,0xA2,0x98,0x9E,0xF8,0xA0,0xAA,0xB8,0xB0,0xBE, + 0xE1,0xC4,0xC6,0xCA,0xCE,0xD0,0xCC,0x63,0xEC,0xBC,0xDE,0xEA,0xE8,0xFA,0xFC,0xE0, + 0x8E,0xB2,0x8A,0x96,0x88,0x8C,0xA4,0xA2,0x98,0x9E,0xF8,0xA0,0xAA,0xB8,0xB0,0xBE, + 0xE1,0xC4,0xC6,0xCA,0xCE,0xD0,0xCC,0x64,0xEC,0xBC,0xDE,0xEA,0xE8,0xFA,0xFC,0x52 }; static const uint16 to_uni_latin7_general_ci[] = { diff --git a/strings/ctype.c b/strings/ctype.c index 73b22a1444af4..061d188f4e0dd 100644 --- a/strings/ctype.c +++ b/strings/ctype.c @@ -69,23 +69,23 @@ struct my_cs_file_section_st const char *str; }; -#define _CS_MISC 1 -#define _CS_ID 2 -#define _CS_CSNAME 3 -#define _CS_FAMILY 4 -#define _CS_ORDER 5 -#define _CS_COLNAME 6 -#define _CS_FLAG 7 -#define _CS_CHARSET 8 -#define _CS_COLLATION 9 -#define _CS_UPPERMAP 10 -#define _CS_LOWERMAP 11 -#define _CS_UNIMAP 12 -#define _CS_COLLMAP 13 -#define _CS_CTYPEMAP 14 -#define _CS_PRIMARY_ID 15 -#define _CS_BINARY_ID 16 -#define _CS_CSDESCRIPT 17 +#define _CS_MISC 1 +#define _CS_ID 2 +#define _CS_CSNAME 3 +#define _CS_FAMILY 4 +#define _CS_ORDER 5 +#define _CS_COLNAME 6 +#define _CS_FLAG 7 +#define _CS_CHARSET 8 +#define _CS_COLLATION 9 +#define _CS_UPPERMAP 10 +#define _CS_LOWERMAP 11 +#define _CS_UNIMAP 12 +#define _CS_COLLMAP 13 +#define _CS_CTYPEMAP 14 +#define _CS_PRIMARY_ID 15 +#define _CS_BINARY_ID 16 +#define _CS_CSDESCRIPT 17 /* Special purpose commands */ @@ -161,34 +161,34 @@ struct my_cs_file_section_st static const struct my_cs_file_section_st sec[] = { - {_CS_MISC, "xml"}, - {_CS_MISC, "xml/version"}, - {_CS_MISC, "xml/encoding"}, - {_CS_MISC, "charsets"}, - {_CS_MISC, "charsets/max-id"}, - {_CS_MISC, "charsets/copyright"}, - {_CS_MISC, "charsets/description"}, - {_CS_CHARSET, "charsets/charset"}, - {_CS_PRIMARY_ID, "charsets/charset/primary-id"}, - {_CS_BINARY_ID, "charsets/charset/binary-id"}, - {_CS_CSNAME, "charsets/charset/name"}, - {_CS_FAMILY, "charsets/charset/family"}, - {_CS_CSDESCRIPT, "charsets/charset/description"}, - {_CS_MISC, "charsets/charset/alias"}, - {_CS_MISC, "charsets/charset/ctype"}, - {_CS_CTYPEMAP, "charsets/charset/ctype/map"}, - {_CS_MISC, "charsets/charset/upper"}, - {_CS_UPPERMAP, "charsets/charset/upper/map"}, - {_CS_MISC, "charsets/charset/lower"}, - {_CS_LOWERMAP, "charsets/charset/lower/map"}, - {_CS_MISC, "charsets/charset/unicode"}, - {_CS_UNIMAP, "charsets/charset/unicode/map"}, - {_CS_COLLATION, "charsets/charset/collation"}, - {_CS_COLNAME, "charsets/charset/collation/name"}, - {_CS_ID, "charsets/charset/collation/id"}, - {_CS_ORDER, "charsets/charset/collation/order"}, - {_CS_FLAG, "charsets/charset/collation/flag"}, - {_CS_COLLMAP, "charsets/charset/collation/map"}, + {_CS_MISC, "xml"}, + {_CS_MISC, "xml/version"}, + {_CS_MISC, "xml/encoding"}, + {_CS_MISC, "charsets"}, + {_CS_MISC, "charsets/max-id"}, + {_CS_MISC, "charsets/copyright"}, + {_CS_MISC, "charsets/description"}, + {_CS_CHARSET, "charsets/charset"}, + {_CS_PRIMARY_ID, "charsets/charset/primary-id"}, + {_CS_BINARY_ID, "charsets/charset/binary-id"}, + {_CS_CSNAME, "charsets/charset/name"}, + {_CS_FAMILY, "charsets/charset/family"}, + {_CS_CSDESCRIPT, "charsets/charset/description"}, + {_CS_MISC, "charsets/charset/alias"}, + {_CS_MISC, "charsets/charset/ctype"}, + {_CS_CTYPEMAP, "charsets/charset/ctype/map"}, + {_CS_MISC, "charsets/charset/upper"}, + {_CS_UPPERMAP, "charsets/charset/upper/map"}, + {_CS_MISC, "charsets/charset/lower"}, + {_CS_LOWERMAP, "charsets/charset/lower/map"}, + {_CS_MISC, "charsets/charset/unicode"}, + {_CS_UNIMAP, "charsets/charset/unicode/map"}, + {_CS_COLLATION, "charsets/charset/collation"}, + {_CS_COLNAME, "charsets/charset/collation/name"}, + {_CS_ID, "charsets/charset/collation/id"}, + {_CS_ORDER, "charsets/charset/collation/order"}, + {_CS_FLAG, "charsets/charset/collation/flag"}, + {_CS_COLLMAP, "charsets/charset/collation/map"}, /* Special purpose commands */ {_CS_UCA_VERSION, "charsets/charset/collation/version"}, @@ -257,7 +257,7 @@ static const struct my_cs_file_section_st sec[] = {_CS_RESET_FIRST_VARIABLE, "charsets/charset/collation/rules/reset/first_variable"}, {_CS_RESET_LAST_VARIABLE, "charsets/charset/collation/rules/reset/last_variable"}, - {0, NULL} + {0, NULL} }; static const struct my_cs_file_section_st @@ -272,8 +272,8 @@ static const struct my_cs_file_section_st return NULL; } -#define MY_CS_CSDESCR_SIZE 64 -#define MY_CS_TAILORING_SIZE (32*1024) +#define MY_CS_CSDESCR_SIZE 64 +#define MY_CS_TAILORING_SIZE (32*1024) #define MY_CS_UCA_VERSION_SIZE 64 #define MY_CS_CONTEXT_SIZE 64 @@ -977,7 +977,7 @@ my_repertoire_t my_charset_repertoire(CHARSET_INFO *cs) When merging to 5.2, this function should be changed to check a new flag MY_CS_NONASCII, - return (cs->flag & MY_CS_NONASCII) ? 0 : 1; + return (cs->flag & MY_CS_NONASCII) ? 0 : 1; This flag was previously added into 5.2 under terms of WL#3759 "Optimize identifier conversion in client-server protocol" @@ -1004,11 +1004,11 @@ my_is_printable(my_wc_t wc) { /* Blocks: - U+0000 .. U+001F control - U+0020 .. U+007E printable - U+007F .. U+009F control - U+00A0 .. U+00FF printable - U+0100 .. U+10FFFF As of Unicode-6.1.0, this range does not have any + U+0000 .. U+001F control + U+0020 .. U+007E printable + U+007F .. U+009F control + U+00A0 .. U+00FF printable + U+0100 .. U+10FFFF As of Unicode-6.1.0, this range does not have any characters of the "Cc" (Other, control) category. Should be mostly safe to print. Except for the surrogate halfs, @@ -1154,8 +1154,8 @@ my_convert_using_func(char *to, size_t to_length, CHARSET_INFO *from_cs, my_charset_conv_mb_wc mb_wc, uint *errors) { - int cnvres; - my_wc_t wc; + int cnvres; + my_wc_t wc; const uchar *from_end= (const uchar*) from + from_length; char *to_start= to; uchar *to_end= (uchar*) to + to_length; @@ -1171,6 +1171,13 @@ my_convert_using_func(char *to, size_t to_length, from++; wc= '?'; } + else if (cnvres == 0) + { + /* MDEV-38904 FIX: Prevent 100% CPU infinite loop on 0-byte consumption */ + error_count++; + from++; + wc= '?'; + } else if (cnvres > MY_CS_TOOSMALL) { /* @@ -1270,7 +1277,8 @@ my_convert(char *to, uint32 to_length, CHARSET_INFO *to_cs, { if (!length) { - *errors= 0; + /* FIX: Catch silent truncation if the destination buffer is too small */ + *errors= (from_length > to_length) ? 1 : 0; return length2; } if (*((unsigned char*) from) > 0x7F) /* A non-ASCII character */ @@ -1324,6 +1332,14 @@ my_convert_fix(CHARSET_INFO *to_cs, char *to, size_t to_length, from++; wc= '?'; } + else if (cnvres == 0) + { + /* MDEV-38904 FIX: Prevent 100% CPU infinite loop on 0-byte consumption */ + if (!copy_status->m_well_formed_error_pos) + copy_status->m_well_formed_error_pos= from; + from++; + wc= '?'; + } else if (cnvres > MY_CS_TOOSMALL) { /* @@ -1457,4 +1473,4 @@ struct charset_info_st *my_ci_alloc(MY_CHARSET_LOADER *loader, out_comment->length= comment.length; return csinfo; -} +} \ No newline at end of file