1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00
This commit is contained in:
Mikael Ronstrom
2011-01-04 18:46:01 +01:00
2667 changed files with 65582 additions and 410864 deletions

View File

@ -9,15 +9,20 @@
*.core *.core
*.d *.d
*.da *.da
*.dll
*.dylib
*.exe *.exe
*.exp
*.gcda *.gcda
*.gcno *.gcno
*.gcov *.gcov
*.idb *.idb
*.ilk
*.la *.la
*.lai *.lai
*.lib *.lib
*.lo *.lo
*.manifest
*.map *.map
*.o *.o
*.obj *.obj
@ -148,6 +153,7 @@ Makefile
Makefile.in Makefile.in
Makefile.in' Makefile.in'
PENDING/* PENDING/*
scripts/scripts
TAGS TAGS
VC++Files/client/mysql_amd64.dsp VC++Files/client/mysql_amd64.dsp
ac_available_languages_fragment ac_available_languages_fragment
@ -606,6 +612,7 @@ include/mysql_version.h
include/mysqld_ername.h include/mysqld_ername.h
include/mysqld_error.h include/mysqld_error.h
include/openssl include/openssl
include/probes_mysql_dtrace.h
include/readline include/readline
include/readline/*.h include/readline/*.h
include/readline/readline.h include/readline/readline.h
@ -1981,6 +1988,7 @@ sql-bench/test-transactions
sql-bench/test-wisconsin sql-bench/test-wisconsin
sql/*.cpp sql/*.cpp
sql/*.ds? sql/*.ds?
sql/*.def
sql/*.vcproj sql/*.vcproj
sql/.deps/client.Po sql/.deps/client.Po
sql/.deps/derror.Po sql/.deps/derror.Po
@ -2116,6 +2124,7 @@ sql/.libs/udf_example.lai
sql/.libs/udf_example.so.0 sql/.libs/udf_example.so.0
sql/.libs/udf_example.so.0.0.0 sql/.libs/udf_example.so.0.0.0
sql/client.c sql/client.c
sql/cmake_dummy.cc
sql/Doxyfile sql/Doxyfile
sql/f.c sql/f.c
sql/gen_lex_hash sql/gen_lex_hash
@ -3046,6 +3055,7 @@ vio/viotest.cpp
win/configure.data win/configure.data
win/vs71cache.txt win/vs71cache.txt
win/vs8cache.txt win/vs8cache.txt
win/nmake_cache.txt
ylwrap ylwrap
zlib/*.ds? zlib/*.ds?
zlib/*.vcproj zlib/*.vcproj
@ -3105,3 +3115,4 @@ libmysqld/mysqlserver_depends.c
libmysqld/examples/mysql_embedded libmysqld/examples/mysql_embedded
sql/.empty sql/.empty
mysys/thr_lock mysys/thr_lock
VERSION.dep

View File

@ -1,11 +1,27 @@
# Copyright (C) 2000, 2005 MySQL AB, 2008 Sun Microsystems, Inc.
#
# 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., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
cflags="$c_warnings $extra_flags" cflags="$c_warnings $extra_flags"
cxxflags="$cxx_warnings $base_cxxflags $extra_flags" cxxflags="$cxx_warnings $base_cxxflags $extra_flags"
extra_configs="$extra_configs $local_infile_configs" extra_configs="$extra_configs $local_infile_configs"
configure="./configure $base_configs $extra_configs" configure="./configure $base_configs $extra_configs"
commands="\ commands="\
$make -k maintainer-clean || true /bin/rm -rf configure;
/bin/rm -rf */.deps/*.P configure config.cache storage/*/configure storage/*/config.cache autom4te.cache storage/*/autom4te.cache;
/bin/rm -rf CMakeCache.txt CMakeFiles/ /bin/rm -rf CMakeCache.txt CMakeFiles/
path=`dirname $0` path=`dirname $0`

View File

@ -1,77 +0,0 @@
# Copyright (C) 2002, 2004-2005 MySQL AB
#
# This library 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 library 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., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
## Process this file with automake to create Makefile.in
EXTRA_DIST = FINISH.sh \
SETUP.sh \
autorun.sh \
cmake_configure.sh \
build_mccge.sh \
check-cpu \
cleanup \
compile-alpha \
compile-alpha-debug \
compile-amd64-debug-max \
compile-amd64-debug-max-no-ndb \
compile-amd64-gcov \
compile-amd64-gprof \
compile-amd64-max \
compile-amd64-max-sci \
compile-amd64-valgrind-max \
compile-darwin-mwcc \
compile-dist \
compile-hpux11-parisc2-aCC \
compile-ia64-debug-max \
compile-irix-mips64-mipspro \
compile-pentium \
compile-pentium-debug \
compile-pentium-debug-max \
compile-pentium-debug-max-no-embedded \
compile-pentium-debug-max-no-ndb \
compile-pentium-debug-openssl \
compile-pentium-debug-yassl \
compile-pentium-gcov \
compile-pentium-gprof \
compile-pentium-icc \
compile-pentium-icc-valgrind-max \
compile-pentium-icc-yassl \
compile-pentium-max \
compile-pentium-myodbc \
compile-pentium-pgcc \
compile-pentium-valgrind-max \
compile-pentium64 \
compile-pentium64-debug \
compile-pentium64-debug-max \
compile-pentium64-gcov \
compile-pentium64-gprof \
compile-pentium64-max \
compile-pentium64-max-sci \
compile-pentium64-valgrind-max \
compile-ppc \
compile-ppc-debug \
compile-ppc-debug-max \
compile-ppc-debug-max-no-ndb \
compile-ppc-max \
compile-solaris-amd64 \
compile-solaris-amd64-debug \
compile-solaris-amd64-forte \
compile-solaris-amd64-forte-debug \
compile-solaris-sparc \
compile-solaris-sparc-debug \
compile-solaris-sparc-forte \
compile-solaris-sparc-purify

View File

@ -1,5 +1,22 @@
#!/bin/sh #!/bin/sh
# Copyright (C) 2000, 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., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
######################################################################## ########################################################################
get_key_value() get_key_value()
@ -111,7 +128,7 @@ else
# C++ warnings # C++ warnings
cxx_warnings="$warnings -Wno-unused-parameter" cxx_warnings="$warnings -Wno-unused-parameter"
# cxx_warnings="$cxx_warnings -Woverloaded-virtual -Wsign-promo" # cxx_warnings="$cxx_warnings -Woverloaded-virtual -Wsign-promo"
cxx_warnings="$cxx_warnings -Wctor-dtor-privacy -Wnon-virtual-dtor" cxx_warnings="$cxx_warnings -Wnon-virtual-dtor"
debug_extra_cflags="-O0 -g3 -gdwarf-2" debug_extra_cflags="-O0 -g3 -gdwarf-2"
fi fi

View File

@ -1,38 +1,27 @@
#!/bin/sh #!/bin/sh
# Create MySQL autotools infrastructure
# Copyright (C) 2005 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., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
# Create MySQL cmake configure wrapper
die() { echo "$@"; exit 1; } die() { echo "$@"; exit 1; }
# Handle "glibtoolize" (e.g., for native OS X autotools) as another # Use a configure script that will call CMake.
# name for "libtoolize". Use the first one, either name, found in PATH. path=`dirname $0`
LIBTOOLIZE=libtoolize # Default cp $path/cmake_configure.sh $path/../configure
IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' chmod +x $path/../configure
for dir in $PATH
do
if test -x $dir/glibtoolize
then
LIBTOOLIZE=glibtoolize
break
elif test -x $dir/libtoolize
then
break
fi
done
IFS="$save_ifs"
rm -rf configure
aclocal || die "Can't execute aclocal"
autoheader || die "Can't execute autoheader"
# --force means overwrite ltmain.sh script if it already exists
$LIBTOOLIZE --automake --force --copy || die "Can't execute libtoolize"
# --add-missing instructs automake to install missing auxiliary files
# and --force to overwrite them if they already exist
automake --add-missing --force --copy || die "Can't execute automake"
autoconf || die "Can't execute autoconf"
# Do not use autotools generated configure directly. Instead, use a script
# that will either call CMake or original configure shell script at build
# time (CMake is preferred if installed).
mv configure configure.am
cp BUILD/cmake_configure.sh configure
chmod a+x configure

View File

@ -1,5 +1,22 @@
#!/bin/sh #!/bin/sh
# Copyright (c) 2008, 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., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
die() die()
{ {
echo "ERROR: $@"; exit 1; echo "ERROR: $@"; exit 1;
@ -42,9 +59,7 @@ cat <<EOF
Options used with this script always override any default behaviour. Options used with this script always override any default behaviour.
The default package is MySQL Cluster Carrier Grade (standard) Edition. The default package is MySQL Cluster Carrier Grade (standard) Edition.
For developers, the default package is MySQL Cluster Carrier Grade For developers, the default package is MySQL Cluster Carrier Grade
Extended Edition, and the default build behaviour is to build with Extended Edition.
autotools. If you want to skip autotools and start from a source code
release you can use the --no-autotools flag.
More information for developers can be found in --help, More information for developers can be found in --help,
--sysadmin-help, and --extended-help. --sysadmin-help, and --extended-help.
@ -102,7 +117,8 @@ cat <<EOF
If your building on a Solaris SPARC machine and you want to compile If your building on a Solaris SPARC machine and you want to compile
using SunStudio you must set using SunStudio you must set
--compiler=forte; if you want to build using the Intel compiler on --compiler=forte; if you want to build using the Intel compiler on
Linux, you need to set --compiler=icc. Linux, you need to set --compiler=icc. If you want to use the AMD
compiler Open64 set --compiler=open64.
A synonym for forte is SunStudio, so one can also use A synonym for forte is SunStudio, so one can also use
--compiler=SunStudio. --compiler=SunStudio.
@ -150,14 +166,32 @@ Usage: $0 [options]
--without-debug Build non-debug version --without-debug Build non-debug version
--use-comment Set the comment in the build --use-comment Set the comment in the build
--with-fast-mutexes Use try/retry method of acquiring mutex --with-fast-mutexes Use try/retry method of acquiring mutex
--without-fast-mutexes Don't use try/retry method of acquiring mutex
--without-perfschema Don't build with performance schema
--generate-feedback path Compile with feedback using the specified directory
to store the feedback files
--use-feedback path Compile using feedback information from the specified
directory
--with-debug Build debug version --with-debug Build debug version
--extra-debug-flag flag Add -Dflag to compiler flags
InnoDB supports the following debug flags,
UNIV_DEBUG, UNIV_SYNC_DEBUG, UNIV_MEM_DEBUG,
UNIV_DEBUG_THREAD_CREATION, UNIV_DEBUG_LOCK_VALIDATE,
UNIV_DEBUG_PRINT, UNIV_DEBUG_FILE_ACCESS,
UNIV_LIGHT_MEM_DEBUG, UNIV_LOG_DEBUG,
UNIV_IBUF_COUNT_DEBUG, UNIV_SEARCH_DEBUG,
UNIV_LOG_LSN_DEBUG, UNIV_ZIP_DEBUG, UNIV_AHI_DEBUG,
UNIV_DEBUG_VALGRIND, UNIV_SQL_DEBUG, UNIV_AIO_DEBUG,
UNIV_BTR_DEBUG, UNIV_LRU_DEBUG, UNIV_BUF_DEBUG,
UNIV_HASH_DEBUG, UNIV_LIST_DEBUG, UNIV_IBUF_DEBUG
--with-link-time-optimizer --with-link-time-optimizer
Link time optimizations enabled (Requires GCC 4.5 Link time optimizations enabled (Requires GCC 4.5
if GCC used), available for icc as well. This flag if GCC used), available for icc as well. This flag
is only considered if also fast is set. is only considered if also fast is set.
--with-mso Special flag used by Open64 compiler (requres at
least version 4.2.3) that enables optimisations
for multi-core scalability.
--configure-only Stop after running configure. --configure-only Stop after running configure.
--use-autotools Start by running autoconf, automake,.. tools
--no-autotools Start from configure
--print-only Print commands that the script will execute, --print-only Print commands that the script will execute,
but do not actually execute but do not actually execute
--prefix=path Build with prefix 'path' --prefix=path Build with prefix 'path'
@ -170,7 +204,7 @@ Usage: $0 [options]
MySQL use MySQL use
--commercial Use commercial libraries --commercial Use commercial libraries
--gpl Use gpl libraries --gpl Use gpl libraries
--compiler=[gcc|icc|forte|SunStudio] Select compiler --compiler=[gcc|icc|forte|SunStudio|open64] Select compiler
--cpu=[x86|x86_64|sparc|itanium] Select CPU type --cpu=[x86|x86_64|sparc|itanium] Select CPU type
x86 => x86 and 32-bit binary x86 => x86 and 32-bit binary
x86_64 => x86 and 64 bit binary x86_64 => x86 and 64 bit binary
@ -389,7 +423,8 @@ extended_usage()
platforms supported by this script. platforms supported by this script.
The --fast option adds -mtune=cpu_arg to the C/C++ flags (provides The --fast option adds -mtune=cpu_arg to the C/C++ flags (provides
support for Nocona, K8, and other processors). support for Nocona, K8, and other processors), this option is valid
when gcc is the compiler.
Use of the --debug option adds -g to the C/C++ flags. Use of the --debug option adds -g to the C/C++ flags.
@ -397,10 +432,35 @@ extended_usage()
by calling the script as follows: by calling the script as follows:
CC="/usr/local/bin/gcc" CXX="/usr/local/bin/gcc" BUILD/build_mccge.sh CC="/usr/local/bin/gcc" CXX="/usr/local/bin/gcc" BUILD/build_mccge.sh
FreeBSD/x86/gcc Feedback profiler on gcc
--------------- ------------------------
No flags are used. Instead, configure determines the proper flags to Using gcc --generate-feedback=path causes the following flags to be added
use. to the compiler flags.
--fprofile-generate
--fprofile-dir=path
Using gcc with --use-feedback=path causes the following flags to be added
to the compiler flags. --fprofile-correction indicates MySQL is a multi-
threaded application and thus counters can be inconsistent with each other
and the compiler should take this into account.
--fprofile-use
--fprofile-dir=path
--fprofile-correction
Feedback compilation using Open64
---------------------------------
Using Open64 with --generate-feedback=path causes the following flags to
be added to the compiler flags.
-fb-create path/feedback
Using Open64 with --use-feedback=path causes the following flags to be
added to the compiler flags.
--fb-opt path/feedback
Linux/x86+Itanium/gcc Linux/x86+Itanium/gcc
------------- -------------
@ -410,6 +470,9 @@ extended_usage()
added to the C/C++ flags. (To build a 32-bit binary on a 64-bit CPU, added to the C/C++ flags. (To build a 32-bit binary on a 64-bit CPU,
use the --32 option as described previously.) use the --32 option as described previously.)
When gcc 4.5 is used and the user set --with-link-time-optimizer then
also --flto is added to compiler flags and linker flags.
Linux/x86+Itanium/icc Linux/x86+Itanium/icc
------------- -------------
Flags used: Flags used:
@ -433,6 +496,19 @@ extended_usage()
added to the C/C++ flags; this provides optimisations specific to Core added to the C/C++ flags; this provides optimisations specific to Core
2 Duo. This is added only when the --fast flag is set. 2 Duo. This is added only when the --fast flag is set.
Linux/x86/Open64
----------------
For normal builds use -O3, when fast flag is set one also adds
--march=auto to generate optimized builds for the CPU used. If
--with-link-time-optimizer is set also -ipa is set. There is also
a special flag --with-mso which can be set to get --mso set which
activates optimisation for multi-core scalability.
FreeBSD/x86/gcc
---------------
No flags are used. Instead, configure determines the proper flags to
use.
Solaris/x86/gcc Solaris/x86/gcc
--------------- ---------------
All builds on Solaris are by default 64-bit, so -m64 is always used in All builds on Solaris are by default 64-bit, so -m64 is always used in
@ -653,6 +729,9 @@ parse_compiler()
forte | SunStudio | sunstudio ) forte | SunStudio | sunstudio )
compiler="forte" compiler="forte"
;; ;;
open64 | Open64 )
compiler="open64"
;;
*) *)
echo "Unknown compiler '$compiler'" echo "Unknown compiler '$compiler'"
exit 1 exit 1
@ -686,6 +765,15 @@ parse_options()
--with-fast-mutexes) --with-fast-mutexes)
with_fast_mutexes="yes" with_fast_mutexes="yes"
;; ;;
--without-fast-mutexes)
with_fast_mutexes="no"
;;
--without-perfschema)
with_perfschema="no"
;;
--with-mso)
with_mso="yes"
;;
--use-tcmalloc) --use-tcmalloc)
use_tcmalloc="yes" use_tcmalloc="yes"
;; ;;
@ -693,6 +781,10 @@ parse_options()
with_debug_flag="yes" with_debug_flag="yes"
fast_flag="no" fast_flag="no"
;; ;;
--extra-debug-flag)
shift
extra_debug_flags="$extra_debug_flags -D$1"
;;
--debug) --debug)
compile_debug_flag="yes" compile_debug_flag="yes"
;; ;;
@ -712,6 +804,14 @@ parse_options()
compiler=`get_key_value "$1"` compiler=`get_key_value "$1"`
parse_compiler parse_compiler
;; ;;
--generate-feedback)
shift
GENERATE_FEEDBACK_PATH="$1"
;;
--use-feedback)
shift
USE_FEEDBACK_PATH="$1"
;;
--cpu=*) --cpu=*)
cpu_type=`get_key_value "$1"` cpu_type=`get_key_value "$1"`
parse_cpu_type parse_cpu_type
@ -746,12 +846,6 @@ parse_options()
--parallelism=*) --parallelism=*)
parallelism=`get_key_value "$1"` parallelism=`get_key_value "$1"`
;; ;;
--use-autotools)
use_autotools="yes"
;;
--no-autotools)
use_autotools="no"
;;
--configure-only) --configure-only)
just_configure="yes" just_configure="yes"
;; ;;
@ -896,6 +990,9 @@ set_cpu_base()
# #
init_configure_commands() init_configure_commands()
{ {
path=`dirname $0`
cp $path/cmake_configure.sh $path/../configure
chmod +x $path/../configure
cflags="$c_warnings $base_cflags $compiler_flags" cflags="$c_warnings $base_cflags $compiler_flags"
cxxflags="$cxx_warnings $base_cxxflags $compiler_flags" cxxflags="$cxx_warnings $base_cxxflags $compiler_flags"
configure="./configure $base_configs $with_flags" configure="./configure $base_configs $with_flags"
@ -1084,6 +1181,7 @@ set_with_debug_flags()
loc_debug_flags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS " loc_debug_flags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
compiler_flags="$compiler_flags $loc_debug_flags" compiler_flags="$compiler_flags $loc_debug_flags"
fi fi
compiler_flags="$compiler_flags $extra_debug_flags"
fi fi
} }
@ -1105,7 +1203,7 @@ set_no_omit_frame_pointer_for_developers()
# #
set_debug_flag() set_debug_flag()
{ {
if test "x$compile_debug_flags" = "xyes" ; then if test "x$compile_debug_flag" = "xyes" ; then
compiler_flags="$compiler_flags -g" compiler_flags="$compiler_flags -g"
fi fi
} }
@ -1152,7 +1250,9 @@ set_base_configs()
fi fi
base_configs="$base_configs --with-pic" base_configs="$base_configs --with-pic"
base_configs="$base_configs --with-csv-storage-engine" base_configs="$base_configs --with-csv-storage-engine"
base_configs="$base_configs --with-perfschema" if test "x$with_perfschema" != "xno" ; then
base_configs="$base_configs --with-perfschema"
fi
} }
# #
@ -1251,6 +1351,19 @@ set_gcc_special_options()
fi fi
} }
#
# If we discover a Core 2 Duo architecture and we have enabled the fast
# flag, we enable a compile especially optimised for Core 2 Duo. This
# feature is currently available on Intel's icc compiler only.
#
set_icc_special_options()
{
if test "x$fast_flag" = "xyes" && test "x$cpu_arg" = "xcore2" && \
test "x$compiler" = "xicc" ; then
compiler_flags="$compiler_flags -xT"
fi
}
set_cc_and_cxx_for_gcc() set_cc_and_cxx_for_gcc()
{ {
if test "x$CC" = "x" ; then if test "x$CC" = "x" ; then
@ -1271,6 +1384,16 @@ set_cc_and_cxx_for_icc()
fi fi
} }
set_cc_and_cxx_for_open64()
{
if test "x$CC" = "x" ; then
CC="opencc -static-libgcc -fno-exceptions"
fi
if test "x$CXX" = "x" ; then
CXX="openCC -static-libgcc -fno-exceptions"
fi
}
set_cc_and_cxx_for_forte() set_cc_and_cxx_for_forte()
{ {
if test "x$CC" = "x" ; then if test "x$CC" = "x" ; then
@ -1281,19 +1404,6 @@ set_cc_and_cxx_for_forte()
fi fi
} }
#
# If we discover a Core 2 Duo architecture and we have enabled the fast
# flag, we enable a compile especially optimised for Core 2 Duo. This
# feature is currently available on Intel's icc compiler only.
#
set_icc_special_options()
{
if test "x$fast_flag" = "xyes" && test "x$cpu_arg" = "xcore2" && \
test "x$compiler" = "xicc" ; then
compiler_flags="$compiler_flags -xT"
fi
}
# #
# FreeBSD Section # FreeBSD Section
# #
@ -1357,12 +1467,45 @@ get_gcc_version()
fi fi
} }
#
# Link time optimizer (interprocedural optimizations) for Open64
#
check_for_open64_link_time_optimizer()
{
if test "x$with_link_time_optimizer" = "xyes" ; then
compiler_flags="$compiler_flags -ipa"
LDFLAGS="$LDFLAGS -ipa"
fi
}
#
# Link time optimizer (interprocedural optimizations) for icc
#
check_for_icc_link_time_optimizer()
{
if test "x$with_link_time_optimizer" = "xyes" ; then
compiler_flags="$compiler_flags -ipo"
LDFLAGS="$LDFLAGS -ipo"
fi
}
#
# Link time optimizer (interprocedural optimizations) for forte
#
check_for_forte_link_time_optimizer()
{
if test "x$with_link_time_optimizer" = "xyes" ; then
compiler_flags="$compiler_flags -ipo"
LDFLAGS="$LDFLAGS -ipo"
fi
}
# #
# Link Time Optimizer in GCC (LTO) uses a parameter -flto # Link Time Optimizer in GCC (LTO) uses a parameter -flto
# which was added to GCC 4.5, if --with-link-time-optimizer # which was added to GCC 4.5, if --with-link-time-optimizer
# is set then use this feature # is set then use this feature
# #
check_for_link_time_optimizer() check_for_gcc_link_time_optimizer()
{ {
get_gcc_version get_gcc_version
if test "$gcc_version" -ge 405 && \ if test "$gcc_version" -ge 405 && \
@ -1371,11 +1514,37 @@ check_for_link_time_optimizer()
LDFLAGS="$LDFLAGS -flto" LDFLAGS="$LDFLAGS -flto"
fi fi
} }
set_feedback_for_gcc()
{
if test "x$GENERATE_FEEDBACK_PATH" != "x" ; then
compiler_flags="$compiler_flags -fprofile-generate"
compiler_flags="$compiler_flags -fprofile-dir=$GENERATE_FEEDBACK_PATH"
elif test "x$USE_FEEDBACK_PATH" != "x" ; then
compiler_flags="$compiler_flags -fprofile-use"
compiler_flags="$compiler_flags -fprofile-correction"
compiler_flags="$compiler_flags -fprofile-dir=$USE_FEEDBACK_PATH"
fi
}
set_feedback_for_open64()
{
if test "x$GENERATE_FEEDBACK_PATH" != "x" ; then
compiler_flags="$compiler_flags --fb-create=$GENERATE_FEEDBACK_PATH/feedback"
elif test "x$USE_FEEDBACK_PATH" != "x" ; then
compiler_flags="$compiler_flags --fb-opt=$USE_FEEDBACK_PATH/feedback"
fi
}
# #
# Linux Section # Linux Section
# #
set_linux_configs() set_linux_configs()
{ {
# Default to use --with-fast-mutexes on Linux
if test "x$with_fast_mutexes" = "x" ; then
base_configs="$base_configs --with-fast-mutexes"
fi
if test "x$cpu_base_type" != "xx86" && \ if test "x$cpu_base_type" != "xx86" && \
test "x$cpu_base_type" != "xitanium" ; then test "x$cpu_base_type" != "xitanium" ; then
usage "Only x86 and Itanium CPUs supported for Linux" usage "Only x86 and Itanium CPUs supported for Linux"
@ -1392,19 +1561,14 @@ set_linux_configs()
if test "x$fast_flag" != "xno" ; then if test "x$fast_flag" != "xno" ; then
if test "x$fast_flag" = "xyes" ; then if test "x$fast_flag" = "xyes" ; then
compiler_flags="$compiler_flags -O3" compiler_flags="$compiler_flags -O3"
check_for_link_time_optimizer check_for_gcc_link_time_optimizer
else else
compiler_flags="$compiler_flags -O2" compiler_flags="$compiler_flags -O3"
fi fi
else else
compiler_flags="$compiler_flags -O0" compiler_flags="$compiler_flags -O0"
fi fi
check_64_bits set_feedback_for_gcc
if test "x$m64" = "xyes" ; then
compiler_flags="$compiler_flags -m64"
else
compiler_flags="$compiler_flags -m32"
fi
# configure will set proper compiler flags for gcc on Linux # configure will set proper compiler flags for gcc on Linux
elif test "x$compiler" = "xicc" ; then elif test "x$compiler" = "xicc" ; then
compiler_flags="$compiler_flags -mp -restrict" compiler_flags="$compiler_flags -mp -restrict"
@ -1414,16 +1578,36 @@ set_linux_configs()
fi fi
if test "x$fast_flag" != "xno" ; then if test "x$fast_flag" != "xno" ; then
compiler_flags="$compiler_flags -O3 -unroll2 -ip" compiler_flags="$compiler_flags -O3 -unroll2 -ip"
if test "x$fast_flag" = "xyes" && \ if test "x$fast_flag" = "xyes" ; then
test "x$with_link_time_optimizer" = "xyes" ; then check_for_icc_link_time_optimizer
compiler_flags="$compiler_flags -ipo"
LDFLAGS="$LDFLAGS -ipo"
fi fi
fi fi
elif test "x$compiler" = "xopen64" ; then
set_cc_and_cxx_for_open64
if test "x$fast_flag" != "xno" ; then
if test "x$fast_flag" = "xyes" ; then
compiler_flags="$compiler_flags -O3"
# Generate code specific for the machine you run on
compiler_flags="$compiler_flags -march=auto"
check_for_open64_link_time_optimizer
if test "x$with_mso" = "xyes" ; then
compiler_flags="$compiler_flags -mso"
fi
else
compiler_flags="$compiler_flags -O3"
fi
fi
set_feedback_for_open64
else else
usage "Only gcc and icc compilers supported for Linux" usage "Only gcc,icc and Open64 compilers supported for Linux"
exit 1 exit 1
fi fi
check_64_bits
if test "x$m64" = "xyes" ; then
compiler_flags="$compiler_flags -m64"
else
compiler_flags="$compiler_flags -m32"
fi
} }
# #
@ -1475,7 +1659,7 @@ set_solaris_configs()
if test "x$fast_flag" = "xyes" ; then if test "x$fast_flag" = "xyes" ; then
LDFLAGS="$LDFLAGS -O3" LDFLAGS="$LDFLAGS -O3"
compiler_flags="$compiler_flags -O3" compiler_flags="$compiler_flags -O3"
check_for_link_time_optimizer check_for_gcc_link_time_optimizer
else else
if test "x$fast_flag" = "xgeneric" ; then if test "x$fast_flag" = "xgeneric" ; then
LDFLAGS="$LDFLAGS -O2" LDFLAGS="$LDFLAGS -O2"
@ -1498,10 +1682,7 @@ set_solaris_configs()
if test "x$fast_flag" = "xyes" ; then if test "x$fast_flag" = "xyes" ; then
compiler_flags="$compiler_flags -xtarget=native" compiler_flags="$compiler_flags -xtarget=native"
compiler_flags="$compiler_flags -xunroll=3" compiler_flags="$compiler_flags -xunroll=3"
if test "x$with_link_time_optimizer" = "xyes" ; then check_for_forte_link_time_optimizer
compiler_flags="$compiler_flags -xipo"
LDFLAGS="$LDFLAGS -xipo"
fi
else else
compiler_flags="$compiler_flags -xtarget=generic" compiler_flags="$compiler_flags -xtarget=generic"
fi fi
@ -1612,17 +1793,6 @@ set_default_package()
fi fi
} }
set_autotool_flags()
{
if test "x$use_autotools" = "x" ; then
if test "x$developer_flag" = "xno" ; then
use_autotools="no"
else
use_autotools="yes"
fi
fi
}
set_defaults_based_on_environment() set_defaults_based_on_environment()
{ {
if test ! -z "$MYSQL_DEVELOPER" ; then if test ! -z "$MYSQL_DEVELOPER" ; then
@ -1674,25 +1844,28 @@ base_cxxflags=
base_configs= base_configs=
debug_flags= debug_flags=
cxxflags= cxxflags=
extra_debug_flags=
m64= m64=
explicit_size_set= explicit_size_set=
datadir= datadir=
commands= commands=
use_autotools=
engine_configs= engine_configs=
ASFLAGS= ASFLAGS=
LDFLAGS= LDFLAGS=
use_tcmalloc= use_tcmalloc=
without_comment="yes" without_comment="yes"
with_fast_mutexes= with_fast_mutexes=
with_perfschema="yes"
with_link_time_optimizer= with_link_time_optimizer=
with_mso=
gcc_version="0" gcc_version="0"
generate_feedback_path=
use_feedback_path=
set_defaults_based_on_environment set_defaults_based_on_environment
parse_options "$@" parse_options "$@"
set_autotool_flags
set_default_package set_default_package
set -e set -e
@ -1793,9 +1966,6 @@ set_ccache_usage
# Set up commands variable from variables prepared for base # Set up commands variable from variables prepared for base
# configurations, compiler flags, and warnings flags. # configurations, compiler flags, and warnings flags.
# #
if test "x$use_autotools" = "xyes" ; then
init_auto_commands
fi
init_configure_commands init_configure_commands
if test "x$just_configure" != "xyes" ; then if test "x$just_configure" != "xyes" ; then
@ -1806,8 +1976,8 @@ fi
# The commands variable now contains the entire command to be run for # The commands variable now contains the entire command to be run for
# the build; we either execute it, or merely print it out. # the build; we either execute it, or merely print it out.
# #
if test "x$just_print" = "xyes" ; then echo "Running command:"
echo "$commands" echo "$commands"
else if test "x$just_print" != "xyes" ; then
eval "set -x; $commands" eval "set -x; $commands"
fi fi

View File

@ -1,4 +1,20 @@
#!/bin/sh #!/bin/sh
# Copyright (C) 2005, 2008 MySQL AB, 2009 Sun Microsystems, Inc.
#
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
# Check cpu of current machine and find the # Check cpu of current machine and find the
# best compiler optimization flags for gcc # best compiler optimization flags for gcc

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2003 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,14 +1,34 @@
#!/bin/sh #!/bin/sh
# Choose whether to use autoconf created configure
# of perl script that calls cmake. # Copyright (c) 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., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
# Ensure cmake and perl are there # Ensure cmake and perl are there
cmake -P cmake/check_minimal_version.cmake >/dev/null 2>&1 || HAVE_CMAKE=no cmake -P cmake/check_minimal_version.cmake >/dev/null 2>&1 || HAVE_CMAKE=no
perl --version >/dev/null 2>&1 || HAVE_CMAKE=no perl --version >/dev/null 2>&1 || HAVE_PERL=no
scriptdir=`dirname $0` scriptdir=`dirname $0`
if test "$HAVE_CMAKE" = "no" if test "$HAVE_CMAKE" = "no"
then then
sh $scriptdir/configure.am "$@" 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 else
perl $scriptdir/cmake/configure.pl "$@" perl $scriptdir/cmake/configure.pl "$@"
fi fi

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2000, 2002 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2000, 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
/bin/rm -f */.deps/*.P */*.o /bin/rm -f */.deps/*.P */*.o
make -k maintainer-clean make -k maintainer-clean
/bin/rm -f */.deps/*.P */*.o /bin/rm -f */.deps/*.P */*.o

View File

@ -1,4 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
extra_flags="$amd64_cflags $debug_cflags" extra_flags="$amd64_cflags $debug_cflags"

View File

@ -1,4 +1,22 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2005, 2006 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., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
extra_flags="$amd64_cflags $debug_cflags" extra_flags="$amd64_cflags $debug_cflags"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2007 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2007 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
extra_flags="$amd64_cflags $fast_cflags -g" extra_flags="$amd64_cflags $fast_cflags -g"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2007 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
extra_flags="$amd64_cflags $fast_cflags -g" extra_flags="$amd64_cflags $fast_cflags -g"

View File

@ -1,5 +1,22 @@
#! /bin/sh #! /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., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
@ -7,18 +24,3 @@ extra_flags="$amd64_cflags $debug_cflags $valgrind_flags"
extra_configs="$amd64_configs $debug_configs $valgrind_configs $max_configs" extra_configs="$amd64_configs $debug_configs $valgrind_configs $max_configs"
. "$path/FINISH.sh" . "$path/FINISH.sh"
if test -z "$just_print"
then
set +v +x
echo "\
******************************************************************************
Note that by default BUILD/compile-pentium-valgrind-max calls 'configure' with
--enable-assembler. When Valgrind detects an error involving an assembly
function (for example an uninitialized value used as an argument of an
assembly function), Valgrind will not print the stacktrace and 'valgrind
--gdb-attach=yes' will not work either. If you need a stacktrace in those
cases, you have to run BUILD/compile-pentium-valgrind-max with the
--disable-assembler argument.
******************************************************************************"
fi

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# Copyright (C) 2009 Sun Microsystems, Inc # Copyright (C) 2004, 2006 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,20 @@
#!/bin/sh #!/bin/sh
# Copyright (C) 2004, 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
if [ ! -f "sql/mysqld.cc" ]; then if [ ! -f "sql/mysqld.cc" ]; then
echo "You must run this script from the MySQL top-level directory." echo "You must run this script from the MySQL top-level directory."
exit 1 exit 1

View File

@ -1,3 +1,20 @@
#! /bin/sh
# Copyright (C) 2001, 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
gmake -k maintainer-clean || true gmake -k maintainer-clean || true
/bin/rm -f */.deps/*.P config.cache storage/innobase/config.cache /bin/rm -f */.deps/*.P config.cache storage/innobase/config.cache

View File

@ -1,5 +1,20 @@
#!/bin/sh #!/bin/sh
# Copyright (C) 2004, 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
if [ ! -f "sql/mysqld.cc" ]; then if [ ! -f "sql/mysqld.cc" ]; then
echo "You must run this script from the MySQL top-level directory." echo "You must run this script from the MySQL top-level directory."
exit 1 exit 1

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2006 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2000, 2002 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2000, 2007 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2001, 2007 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2004, 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2005, 2007 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2001, 2003 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2000, 2007 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Need to disable ccache, or we loose the gcov-needed compiler output files. # Need to disable ccache, or we loose the gcov-needed compiler output files.
USING_GCOV=1 USING_GCOV=1

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2001, 2007 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2001, 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2000 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2000, 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
AM_MAKEFLAGS="-j 2" AM_MAKEFLAGS="-j 2"
gmake -k maintainer-clean || true gmake -k maintainer-clean || true
/bin/rm -f */.deps/*.P config.cache /bin/rm -f */.deps/*.P config.cache

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2002, 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
@ -7,18 +22,3 @@ extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs" extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
. "$path/FINISH.sh" . "$path/FINISH.sh"
if test -z "$just_print"
then
set +v +x
echo "\
******************************************************************************
Note that by default BUILD/compile-pentium-valgrind-max calls 'configure' with
--enable-assembler. When Valgrind detects an error involving an assembly
function (for example an uninitialized value used as an argument of an
assembly function), Valgrind will not print the stacktrace and 'valgrind
--gdb-attach=yes' will not work either. If you need a stacktrace in those
cases, you have to run BUILD/compile-pentium-valgrind-max with the
--disable-assembler argument.
******************************************************************************"
fi

View File

@ -1,5 +1,22 @@
#! /bin/sh #! /bin/sh
# Copyright (c) 2008, 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., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
@ -7,18 +24,3 @@ extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_no_ndb_configs" extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_no_ndb_configs"
. "$path/FINISH.sh" . "$path/FINISH.sh"
if test -z "$just_print"
then
set +v +x
echo "\
******************************************************************************
Note that by default BUILD/compile-pentium-valgrind-max calls 'configure' with
--enable-assembler. When Valgrind detects an error involving an assembly
function (for example an uninitialized value used as an argument of an
assembly function), Valgrind will not print the stacktrace and 'valgrind
--gdb-attach=yes' will not work either. If you need a stacktrace in those
cases, you have to run BUILD/compile-pentium-valgrind-max with the
--disable-assembler argument.
******************************************************************************"
fi

View File

@ -1,5 +1,22 @@
#! /bin/sh #! /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., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2005, 2007 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2005, 2007 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2007 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2007 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,22 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 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., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2007 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
@ -7,18 +22,3 @@ extra_flags="$pentium64_cflags $debug_cflags $valgrind_flags"
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs" extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
. "$path/FINISH.sh" . "$path/FINISH.sh"
if test -z "$just_print"
then
set +v +x
echo "\
******************************************************************************
Note that by default BUILD/compile-pentium-valgrind-max calls 'configure' with
--enable-assembler. When Valgrind detects an error involving an assembly
function (for example an uninitialized value used as an argument of an
assembly function), Valgrind will not print the stacktrace and 'valgrind
--gdb-attach=yes' will not work either. If you need a stacktrace in those
cases, you have to run BUILD/compile-pentium-valgrind-max with the
--disable-assembler argument.
******************************************************************************"
fi

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2004 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2004 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2004, 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2004, 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"

View File

@ -1,5 +1,22 @@
#!/usr/bin/bash #!/usr/bin/bash
# Copyright (C) 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., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
function _find_mysql_root () ( function _find_mysql_root () (
while [ "x$PWD" != "x/" ]; do while [ "x$PWD" != "x/" ]; do
# Check if some directories are present # Check if some directories are present

View File

@ -1,4 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2007 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
amd64_cflags="-m64 -mtune=athlon64" amd64_cflags="-m64 -mtune=athlon64"

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2007 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
gmake -k clean || true gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache /bin/rm -f */.deps/*.P config.cache

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2007 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
gmake -k clean || true gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache /bin/rm -f */.deps/*.P config.cache

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2000, 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
make -k clean || true make -k clean || true
/bin/rm -f */.deps/*.P config.cache /bin/rm -f */.deps/*.P config.cache

View File

@ -1,5 +1,20 @@
#!/bin/sh #!/bin/sh
# Copyright (C) 2001, 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
make -k clean || true make -k clean || true
/bin/rm -f */.deps/*.P config.cache /bin/rm -f */.deps/*.P config.cache

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2001, 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Assume Forte is installed in /opt/SUNWSpro and ld is installed in # Assume Forte is installed in /opt/SUNWSpro and ld is installed in
# /usr/ccs/bin # /usr/ccs/bin

View File

@ -1,5 +1,20 @@
#! /bin/sh #! /bin/sh
# Copyright (C) 2000, 2005 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
mode="" mode=""
cxxfilt="" cxxfilt=""

View File

@ -61,6 +61,13 @@ SET(BUILDTYPE_DOCSTRING
IF(WITH_DEBUG) IF(WITH_DEBUG)
SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING ${BUILDTYPE_DOCSTRING} FORCE) SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING ${BUILDTYPE_DOCSTRING} FORCE)
SET(MYSQL_MAINTAINER_MODE ON CACHE BOOL
"MySQL maintainer-specific development environment")
IF(UNIX AND NOT APPLE)
# Compiling with PIC speeds up embedded build, on PIC sensitive systems
# Predefine it to ON, in case user chooses to build embedded.
SET(WITH_PIC ON CACHE BOOL "Compile with PIC")
ENDIF()
SET(OLD_WITH_DEBUG 1 CACHE INTERNAL "" FORCE) SET(OLD_WITH_DEBUG 1 CACHE INTERNAL "" FORCE)
ELSEIF(NOT HAVE_CMAKE_BUILD_TYPE OR OLD_WITH_DEBUG) ELSEIF(NOT HAVE_CMAKE_BUILD_TYPE OR OLD_WITH_DEBUG)
IF(CUSTOM_C_FLAGS) IF(CUSTOM_C_FLAGS)
@ -72,12 +79,12 @@ ELSEIF(NOT HAVE_CMAKE_BUILD_TYPE OR OLD_WITH_DEBUG)
SET(OLD_WITH_DEBUG 0 CACHE INTERNAL "" FORCE) SET(OLD_WITH_DEBUG 0 CACHE INTERNAL "" FORCE)
ENDIF() ENDIF()
IF(BUILD_CONFIG)
SET(CMAKE_USER_MAKE_RULES_OVERRIDE
${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake)
ENDIF()
PROJECT(MySQL) PROJECT(MySQL)
IF(BUILD_CONFIG)
INCLUDE(
${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake)
ENDIF()
# Include the platform-specific file. To allow exceptions, this code # Include the platform-specific file. To allow exceptions, this code
# looks for files in order of how specific they are. If there is, for # looks for files in order of how specific they are. If there is, for
@ -108,21 +115,24 @@ ENDIF()
# Control aspects of the development environment which are # Control aspects of the development environment which are
# specific to MySQL maintainers and developers. # specific to MySQL maintainers and developers.
# #
OPTION(MYSQL_MAINTAINER_MODE "MySQL maintainer-specific development environment" OFF) INCLUDE(maintainer)
# Whether the maintainer mode should be enabled.
OPTION(MYSQL_MAINTAINER_MODE
"MySQL maintainer-specific development environment" OFF)
# Whether the maintainer mode compiler options should be enabled.
IF(MYSQL_MAINTAINER_MODE) IF(MYSQL_MAINTAINER_MODE)
IF(CMAKE_COMPILER_IS_GNUCC) IF(CMAKE_C_COMPILER_ID MATCHES "GNU")
SET(MY_MAINTAINER_C_WARNINGS SET_MYSQL_MAINTAINER_GNU_C_OPTIONS()
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror"
CACHE STRING "C warning options used in maintainer builds.")
ENDIF() ENDIF()
IF(CMAKE_COMPILER_IS_GNUCXX) IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
SET(MY_MAINTAINER_CXX_WARNINGS "${MY_MAINTAINER_C_WARNINGS} -Wno-unused-parameter" SET_MYSQL_MAINTAINER_GNU_CXX_OPTIONS()
CACHE STRING "C++ warning options used in maintainer builds.")
ENDIF() ENDIF()
# Do not make warnings in checks into errors. IF(CMAKE_C_COMPILER_ID MATCHES "Intel")
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX) SET_MYSQL_MAINTAINER_INTEL_C_OPTIONS()
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Wno-error") ENDIF()
IF(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
SET_MYSQL_MAINTAINER_INTEL_CXX_OPTIONS()
ENDIF() ENDIF()
ENDIF() ENDIF()
@ -315,23 +325,33 @@ ELSE()
SET(CPACK_GENERATOR "TGZ") SET(CPACK_GENERATOR "TGZ")
ENDIF() ENDIF()
ADD_SUBDIRECTORY(packaging/WiX) ADD_SUBDIRECTORY(packaging/WiX)
# Create a single package with "make package"
# (see http://public.kitware.com/Bug/view.php?id=11452)
SET(CPACK_MONOLITHIC_INSTALL 1 CACHE INTERNAL "")
INCLUDE(CPack) INCLUDE(CPack)
IF(UNIX) IF(UNIX)
INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL) INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL COMPONENT Info)
ENDIF() ENDIF()
# #
# RPM installs documentation directly from the source tree # RPM installs documentation directly from the source tree
# #
IF(NOT INSTALL_LAYOUT MATCHES "RPM") IF(NOT INSTALL_LAYOUT MATCHES "RPM")
INSTALL(FILES COPYING EXCEPTIONS-CLIENT LICENSE.mysql DESTINATION ${INSTALL_DOCREADMEDIR} OPTIONAL) INSTALL(FILES COPYING LICENSE.mysql
INSTALL(FILES README DESTINATION ${INSTALL_DOCREADMEDIR}) DESTINATION ${INSTALL_DOCREADMEDIR}
COMPONENT Readme
OPTIONAL
)
INSTALL(FILES README DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme)
IF(UNIX) IF(UNIX)
INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR}) INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme)
ENDIF() ENDIF()
# MYSQL_DOCS_LOCATON is used in "make dist", points to the documentation directory # MYSQL_DOCS_LOCATON is used in "make dist", points to the documentation directory
SET(MYSQL_DOCS_LOCATION "" CACHE PATH "Location from where documentation is copied") SET(MYSQL_DOCS_LOCATION "" CACHE PATH "Location from where documentation is copied")
MARK_AS_ADVANCED(MYSQL_DOCS_LOCATION) MARK_AS_ADVANCED(MYSQL_DOCS_LOCATION)
INSTALL(DIRECTORY Docs/ DESTINATION ${INSTALL_DOCDIR} INSTALL(DIRECTORY Docs/ DESTINATION ${INSTALL_DOCDIR}
COMPONENT Documentation
PATTERN "INSTALL-BINARY" EXCLUDE PATTERN "INSTALL-BINARY" EXCLUDE
PATTERN "Makefile.*" EXCLUDE PATTERN "Makefile.*" EXCLUDE
PATTERN "glibc*" EXCLUDE PATTERN "glibc*" EXCLUDE

View File

@ -1,39 +0,0 @@
# Copyright (C) 2000-2006 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
EXTRA_DIST = mysql.info INSTALL-BINARY @extra_docs@
# make sure that "make install" installs the info page, too
# automake only seems to take care of this automatically,
# if we're building the info page from texi directly.
install-data-hook: $(srcdir)/mysql.info
if test `basename $(prefix)` = "mysql" ; then \
$(mkinstalldirs) $(DESTDIR)$(prefix)/docs ; \
$(INSTALL_DATA) $(srcdir)/mysql.info $(DESTDIR)$(prefix)/docs ; \
test ! -f $(top_srcdir)/ChangeLog || $(INSTALL_DATA) $(top_srcdir)/ChangeLog $(DESTDIR)$(prefix)/docs ; \
else \
$(mkinstalldirs) $(DESTDIR)$(infodir) $(DESTDIR)$(pkgdatadir) ; \
$(INSTALL_DATA) $(srcdir)/mysql.info $(DESTDIR)$(infodir) ; \
test ! -f $(top_srcdir)/ChangeLog || $(INSTALL_DATA) $(top_srcdir)/ChangeLog $(DESTDIR)$(pkgdatadir) ; \
fi
uninstall-local:
if test `basename $(prefix)` = "mysql" ; then \
@RM@ -f $(DESTDIR)$(prefix)/docs/mysql.info ; \
@RM@ -f $(DESTDIR)$(prefix)/docs/ChangeLog ; \
else \
@RM@ -f $(DESTDIR)$(infodir)/mysql.info ; \
@RM@ -f $(DESTDIR)$(pkgdatadir)/ChangeLog ; \
fi

View File

@ -1,119 +0,0 @@
MySQL FLOSS License Exception
The MySQL AB Exception for Free/Libre and Open Source
Software-only Applications Using MySQL Client Libraries (the
"FLOSS Exception").
Version 0.6, 7 March 2007
Exception Intent
We want specified Free/Libre and Open Source Software (``FLOSS'')
applications to be able to use specified GPL-licensed MySQL client
libraries (the ``Program'') despite the fact that not all FLOSS
licenses are compatible with version 2 of the GNU General Public
License (the ``GPL'').
Legal Terms and Conditions
As a special exception to the terms and conditions of version 2.0
of the GPL:
1. You are free to distribute a Derivative Work that is formed
entirely from the Program and one or more works (each, a
"FLOSS Work") licensed under one or more of the licenses
listed below in section 1, as long as:
a. You obey the GPL in all respects for the Program and the
Derivative Work, except for identifiable sections of the
Derivative Work which are not derived from the Program,
and which can reasonably be considered independent and
separate works in themselves,
b. all identifiable sections of the Derivative Work which
are not derived from the Program, and which can
reasonably be considered independent and separate works
in themselves,
i. are distributed subject to one of the FLOSS licenses
listed below, and
ii. the object code or executable form of those sections
are accompanied by the complete corresponding
machine-readable source code for those sections on
the same medium and under the same FLOSS license as
the corresponding object code or executable forms of
those sections, and
c. any works which are aggregated with the Program or with a
Derivative Work on a volume of a storage or distribution
medium in accordance with the GPL, can reasonably be
considered independent and separate works in themselves
which are not derivatives of either the Program, a
Derivative Work or a FLOSS Work.
If the above conditions are not met, then the Program may only
be copied, modified, distributed or used under the terms and
conditions of the GPL or another valid licensing option from
MySQL AB.
2. FLOSS License List
License name Version(s)/Copyright Date
Academic Free License 2.0
Apache Software License 1.0/1.1/2.0
Apple Public Source License 2.0
Artistic license From Perl 5.8.0
BSD license "July 22 1999"
Common Development and Distribution License (CDDL) 1.0
Common Public License 1.0
Eclipse Public License 1.0
GNU Library or "Lesser" General Public License (LGPL) 2.0/2.1
Jabber Open Source License 1.0
MIT license (As listed in file MIT-License.txt) ---
Mozilla Public License (MPL) 1.0/1.1
Open Software License 2.0
OpenSSL license (with original SSLeay license) "2003" ("1998")
PHP License 3.0
Python license (CNRI Python License) ---
Python Software Foundation License 2.1.1
Sleepycat License "1999"
University of Illinois/NCSA Open Source License ---
W3C License "2001"
X11 License "2001"
Zlib/libpng License ---
Zope Public License 2.0
Due to the many variants of some of the above licenses, we
require that any version follow the 2003 version of the Free
Software Foundation's Free Software Definition
(http://www.gnu.org/philosophy/free-sw.html) or version 1.9 of
the Open Source Definition by the Open Source Initiative
(http://www.opensource.org/docs/definition.php).
3. Definitions
a. Terms used, but not defined, herein shall have the
meaning provided in the GPL.
b. Derivative Work means a derivative work under copyright
law.
4. Applicability: This FLOSS Exception applies to all Programs
that contain a notice placed by MySQL AB saying that the
Program may be distributed under the terms of this FLOSS
Exception. If you create or distribute a work which is a
Derivative Work of both the Program and any other work
licensed under the GPL, then this FLOSS Exception is not
available for that work; thus, you must remove the FLOSS
Exception notice from that work and comply with the GPL in all
respects, including by retaining all GPL notices. You may
choose to redistribute a copy of the Program exclusively under
the terms of the GPL by removing the FLOSS Exception notice
from that copy of the Program, provided that the copy has
never been modified by you or any third party.
Appendix A. Qualified Libraries and Packages
The following is a non-exhaustive list of libraries and packages
which are covered by the FLOSS License Exception. Please note that
this appendix is provided merely as an additional service to
specific FLOSS projects wishing to simplify licensing information
for their users. Compliance with one of the licenses noted under
the "FLOSS license list" section remains a prerequisite.
Package Name Qualifying License and Version
Apache Portable Runtime (APR) Apache Software License 2.0

View File

@ -1,333 +0,0 @@
# Copyright 2000-2008 MySQL AB, 2009 Sun Microsystems, Inc.
#
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Process this file with automake to create Makefile.in
AUTOMAKE_OPTIONS = foreign
# These are built from source in the Docs directory
EXTRA_DIST = INSTALL-SOURCE INSTALL-WIN-SOURCE \
README COPYING EXCEPTIONS-CLIENT \
CMakeLists.txt configure.cmake config.h.cmake BUILD-CMAKE
SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
@readline_topdir@ sql-common scripts \
@pstack_dir@ libservices \
@sql_union_dirs@ unittest \
@sql_server@ @man_dirs@ tests \
@libmysqld_dirs@ \
mysql-test support-files sql-bench \
win \
packaging \
cmake
DIST_SUBDIRS = . include Docs zlib \
cmd-line-utils sql-common scripts \
pstack libservices \
strings mysys dbug extra regex libmysql libmysql_r client unittest storage plugin \
vio sql man tests \
libmysqld \
mysql-test support-files sql-bench \
win \
cmake \
packaging \
BUILD
DISTCLEANFILES = ac_available_languages_fragment
# Create permission databases
init-db: all
$(top_builddir)/scripts/mysql_install_db
bin-dist: all
$(top_builddir)/scripts/make_binary_distribution @MAKE_BINARY_DISTRIBUTION_OPTIONS@
# Remove BK's "SCCS" subdirectories from source distribution
# Create initial database files for Windows installations and check them.
dist-hook:
rm -rf `find $(distdir) -type d -name SCCS -print`
mkdir -p $(distdir)/win
scripts/mysql_install_db --no-defaults --cross-bootstrap \
--builddir=$(top_builddir) \
--datadir=$(distdir)/win/data \
--srcdir=$(top_srcdir)
storage/myisam/myisamchk --silent --fast $(distdir)/win/data/mysql/*.MYI
test ! -f $(top_srcdir)/configure.am || \
$(INSTALL_DATA) $(top_srcdir)/configure.am $(distdir)
all-local: @ABI_CHECK@
tags:
support-files/build-tags
.PHONY: init-db bin-dist \
test test-force test-full test-force-full test-force-mem \
test-pl test-force-pl test-full-pl test-force-full-pl test-force-pl-mem \
test-unit test-ps test-nr test-pr test-ns test-binlog-statement \
test-ext-funcs test-ext-rpl test-ext-partitions test-ext-jp \
test-ext-stress test-ext test-embedded test-reprepare \
test-fast test-fast-cursor test-fast-view test-fast-prepare \
test-full-qa
# Target 'test' will run the regression test suite using the built server.
#
# If you are running in a shared environment, users can avoid clashing
# port numbers by setting individual small numbers 1-100 to the
# environment variable MTR_BUILD_THREAD. The script "mysql-test-run"
# will then calculate the various port numbers it needs from this,
# making sure each user use different ports.
test-unit:
cd unittest && $(MAKE) test
test-ps:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl $(force) --ps-protocol --mysqld=--binlog-format=mixed
test-nr:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=row
test-pr:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl $(force) $(mem) --ps-protocol --mysqld=--binlog-format=row
test-ns:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl $(force) $(mem) --mysqld=--binlog-format=mixed ; \
@PERL@ ./mysql-test-run.pl $(force) $(mem) --suite=funcs_1
test-binlog-statement:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=statement
# This code is duplicated in "test-bt", see the Changeset comment of 2007-Dec-07
test-embedded:
if [ -e bin/mysqltest_embedded -o -e libmysqld/examples/mysqltest_embedded ] ; then \
cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=embedded --force --timer \
--embedded-server --skip-rpl --skip-ndbcluster ; \
else \
echo "no program found for 'embedded' tests - skipped testing" ; \
fi
test-reprepare:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl $(force) $(mem) --ps-protocol \
--mysqld=--debug=+d,reprepare_each_statement
test: test-unit test-ns test-pr
smoke:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl --do-test=s
test-full: test test-nr test-ps
test-force:
$(MAKE) -k force=--force test
test-force-full:
$(MAKE) -k force=--force test-full
#used by autopush.pl to run memory based tests
test-force-mem:
$(MAKE) -k force=--force mem=--mem test
EXP = --experimental=collections/default.experimental
test-bt:
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=normal --force --timer \
--skip-ndbcluster --report-features $(EXP)
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=ps --force --timer \
--skip-ndbcluster --ps-protocol $(EXP)
-if [ -e bin/ndbd -o -e storage/ndb/src/kernel/ndbd ] ; then \
cd mysql-test ; \
MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=ndb+ps --force --timer \
--ps-protocol --mysqld=--binlog-format=row --suite=ndb $(EXP) ; \
MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=ndb --force --timer \
--with-ndbcluster-only $(EXP) ; \
else \
echo "no program found for 'ndbcluster' tests - skipped testing" ; \
fi
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=funcs1+ps --ps-protocol --reorder --suite=funcs_1 $(EXP)
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=funcs2 --suite=funcs_2 $(EXP)
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=partitions --suite=parts $(EXP)
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress $(EXP)
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=jp --suite=jp $(EXP)
-if [ -d mysql-test/suite/nist ] ; then \
cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=nist --force --suite=nist $(EXP) ; \
fi
-if [ -d mysql-test/suite/nist ] ; then \
cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=nist+ps --force --suite=nist --ps-protocol $(EXP) ; \
fi
-if [ -e bin/mysqltest_embedded -o -e libmysqld/examples/mysqltest_embedded ] ; then \
cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=embedded --force --timer \
--embedded-server --skip-rpl --skip-ndbcluster $(EXP) ; \
else \
echo "no program found for 'embedded' tests - skipped testing" ; \
fi
test-bt-fast:
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=ps --force --timer \
--skip-ndbcluster --ps-protocol --report-features $(EXP)
-if [ -e bin/ndbd -o -e storage/ndb/src/kernel/ndbd ] ; then \
cd mysql-test ; \
MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=ndb --force --timer \
--with-ndbcluster-only $(EXP) ; \
else \
echo "no program found for 'ndbcluster' tests - skipped testing" ; \
fi
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress $(EXP)
test-bt-debug:
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=debug --force --timer \
--skip-ndbcluster --skip-rpl --report-features $(EXP)
# Keep these for a while
test-pl: test
test-full-pl: test-full
test-force-pl: test-force
test-force-pl-mem: test-force-mem
test-force-full-pl: test-force-full
test-ext-funcs:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl --force --reorder --suite=funcs_1 ; \
@PERL@ ./mysql-test-run.pl --force --suite=funcs_2
test-ext-rpl:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl --force --suite=rpl
test-ext-partitions:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl --force --suite=parts
test-ext-jp:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl --force --suite=jp
test-ext-stress:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl --force --big-test --suite=stress
test-ext: test-ext-funcs test-ext-rpl test-ext-partitions test-ext-jp test-ext-stress
test-fast:
cd mysql-test ; \
@PERL@ ./mysql-test-run.pl $(subset) --force --skip-ndb --skip-innodb --skip-im --skip-rpl ; \
@PERL@ ./mysql-test-run.pl $(subset) --force --suite=funcs_1 --do-test=myisam ; \
@PERL@ ./mysql-test-run.pl $(subset) --force --suite=stress --do-test=ddl_myisam
test-fast-view:
$(MAKE) subset=--view-protocol test-fast
test-fast-cursor:
$(MAKE) subset=--cursor-protocol test-fast
test-fast-prepare:
$(MAKE) subset=--ps-protocol test-fast
test-full-qa:
$(MAKE) force=--force test-pr \
test-binlog-statement test-ext test-fast-view \
test-fast-cursor test-unit
#
# Headers which need to be checked for abi/api compatibility.
#
API_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql/plugin_audit.h \
$(top_srcdir)/include/mysql/plugin_ftparser.h \
$(top_srcdir)/include/mysql.h \
$(top_srcdir)/include/mysql/psi/psi_abi_v1.h \
$(top_srcdir)/include/mysql/psi/psi_abi_v2.h
#
# Rules for checking that the abi/api has not changed.
#
# The following steps are followed in the do_abi_check rule below
#
# 1) Generate preprocessor output for the files that need to
# be tested for abi/api changes. use -nostdinc to prevent
# generation of preprocessor output for system headers. This
# results in messages in stderr saying that these headers
# were not found. Redirect the stderr output to /dev/null
# to prevent seeing these messages.
# 2) sed the output to
# 2.1) remove blank lines and lines that begin with "# "
# 2.2) When gcc -E is run on the Mac OS and solaris sparc platforms it
# introduces a line of output that shows up as a difference between
# the .pp and .out files. Remove these OS specific preprocessor text
# inserted by the preprocessor.
# 3) diff the generated file and the canons (.pp files already in
# the repository).
# 4) delete the .out file that is generated.
#
# If the diff fails, the generated file is not removed. This will
# be useful for analysis of ABI differences (e.g. using a visual
# diff tool).
#
# A ABI change that causes a build to fail will always be accompanied
# by new canons (.out files). The .out files that are not removed will
# be replaced as the new .pp files.
#
# e.g. If include/mysql/plugin.h has an ABI change then this rule would
# leave a <build directory>/abi_check.out file.
#
# A developer with a justified API change will then do a
# mv <build directory>/abi_check.out include/mysql/plugin.pp
# to replace the old canons with the new ones.
#
abi_check: $(API_PREPROCESSOR_HEADER)
$(MAKE) abi_headers="$^" do_abi_check
abi_check_all: abi_check
do_abi_check:
set -ex; \
for file in $(abi_headers); do \
@CC@ -E -nostdinc -dI -DMYSQL_ABI_CHECK \
-I$(top_srcdir)/include \
-I$(top_srcdir)/include/mysql \
-I$(top_srcdir)/sql \
-I$(top_builddir)/include \
-I$(top_builddir)/include/mysql \
-I$(top_builddir)/sql \
$$file 2>/dev/null | \
@SED@ -e '/^# /d' \
-e '/^[ ]*$$/d' \
-e '/^#pragma GCC set_debug_pwd/d' \
-e '/^#ident/d' > \
$(top_builddir)/abi_check.out; \
@DIFF@ -w $$file.pp $(top_builddir)/abi_check.out; \
@RM@ $(top_builddir)/abi_check.out; \
done

614
README
View File

@ -1,58 +1,56 @@
This is a release of MySQL, a dual-license SQL DBMS. MySQL Server
MySQL is brought to you by the MySQL team at Oracle Corporation.
************************************************************ This is a release of MySQL, a dual-license SQL database server.
LICENSE For the avoidance of doubt, this particular copy of the software
************************************************************ is released under the version 2 of the GNU General Public License.
License information and use restrictions of this software can MySQL is brought to you by the MySQL team at Oracle.
be found in these files:
- For GPL (free) distributions, see the COPYING file and Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
the EXCEPTIONS-CLIENT file.
- For commercial distributions, see the LICENSE.mysql file. License information can be found in the COPYING file.
This distribution may include materials developed by third
parties. For license and attribution notices for these
materials, please refer to the documentation that accompanies
this distribution (see the Licenses for Third-Party Components
appendix). A copy of the license/notices is also reproduced
below.
GPLv2 Disclaimer GPLv2 Disclaimer
For the avoidance of doubt, except that if any license choice For the avoidance of doubt, except that if any license choice
other than GPL or LGPL is available it will apply instead, Oracle other than GPL or LGPL is available it will apply instead,
elects to use only the General Public License version 2 (GPLv2) Oracle elects to use only the General Public License version 2
at this time for any software where a choice of GPL license versions (GPLv2) at this time for any software where a choice of GPL
is made available with the language indicating that GPLv2 or any license versions is made available with the language indicating
later version may be used, or where a choice of which version of that GPLv2 or any later version may be used, or where a choice
the GPL is applied is otherwise unspecified. of which version of the GPL is applied is otherwise unspecified.
************************************************************ For further information about MySQL or additional documentation,
FURTHER INFORMATION see:
************************************************************ - The latest information about MySQL: http://www.mysql.com
For further information about MySQL or additional documentation, see: - The current MySQL documentation: http://dev.mysql.com/doc
- The latest information about MySQL: http://dev.mysql.com/
- The current MySQL documentation: http://dev.mysql.com/doc/
Some manual sections of special interest: Some Reference Manual sections of special interest:
- If you are migrating from an older version of MySQL, please read - If you are migrating from an older version of MySQL, please
the "Upgrading from..." section first! read the "Upgrading from..." section.
- To see what MySQL can do, take a look at the features section. - To see what MySQL can do, take a look at the features section.
- For installation instructions, see the Installing and Upgrading - For installation instructions, see the Installing and Upgrading
chapter. chapter.
- For the new features/bugfix history, see the Change History appendix. - For the new features/bugfix history, see the MySQL Change History
- For the currently known bugs/misfeatures (known errors) see the appendix.
Problems and Common Errors appendix. - For currently known bugs, see the Errors and Common Problems
- For a list of developers and other contributors, see the Credits appendix.
appendix.
A local copy of the MySQL Reference Manual can be found in the Docs You can browse the MySQL Reference Manual online or download it
directory in GNU Info format. You can also browse the manual online or in any of several formats at the URL given earlier in this file.
download it in any of several formats at the URL given earlier in this Source distributions include a local copy of the manual in the
file. Docs directory.
************************************************************ ********************************************************************
IMPORTANT:
Bug or error reports should be sent to http://bugs.mysql.com. Third-Party Component Notices
************************************************************
*********************************************************************
************************************************************
THIRD-PARTY SOFTWARE
************************************************************
%%The following software may be included in this product: %%The following software may be included in this product:
FindGTest.cmake (part of CMake 2.8.0) FindGTest.cmake (part of CMake 2.8.0)
@ -70,7 +68,6 @@ Use of any of this software is governed by the terms of the license below:
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information. # See the License for more information.
#=========================================================================== #===========================================================================
==
# (To distributed this file outside of CMake, substitute the full # (To distributed this file outside of CMake, substitute the full
# License text for the above reference.) # License text for the above reference.)
# #
@ -124,27 +121,30 @@ CMake is distributed under BSD License
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright
this list of conditions and the following disclaimer. notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright * Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the notice, this list of conditions and the following disclaimer in
documentation and/or other materials provided with the distribution. the documentation and/or other materials provided with the
* Neither the name of Kitware, Inc. nor the names of its contributors distribution.
may be used to endorse or promote products derived from this software without * Neither the name of Kitware, Inc. nor the names of its
specific prior written permission. contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY Kitware, Inc. "AS IS" AND ANY EXPRESS OR THIS SOFTWARE IS PROVIDED BY Kitware, Inc. "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
SHALL Kitware Inc. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, DISCLAIMED. IN NO EVENT SHALL Kitware Inc. BE LIABLE FOR ANY DIRECT,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
OF SUCH DAMAGE. IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Additional License(s) Additional License(s)
@ -188,20 +188,16 @@ cmake-2.4.8/Utilities/cmtar/compat/gethostname.c:
************************************************************************** **************************************************************************
* * Author : Per Foreby, perf@efd.lth.se
Author : Per Foreby, perf@efd.lth.se * Author : Juergen Pfeifer, juergen.pfeifer@gmx.net
*
Author : Juergen Pfeifer, juergen.pfeifer@gmx.net
*
*
************************************************************************** **************************************************************************
---------------------------------------- ----------------------------------------
Copyright (c) 2002 Insight Consortium. All rights reserved. Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for
details. details.
This software is distributed WITHOUT ANY WARRANTY; without even This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
@ -210,9 +206,8 @@ details.
-------------------------------------------- --------------------------------------------
Skeleton parser for Yacc-like parsing with Bison, Skeleton parser for Yacc-like parsing with Bison,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software
Software Foundati Foundation, Inc.
on, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -255,35 +250,27 @@ cmake-2.4.8/Utilities/cmzlib/zlib.h:
in a product, an acknowledgment in the product documentation would be in a product, an acknowledgment in the product documentation would be
appreciated but is not required. appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must 2. Altered source versions must be plainly marked as such, and must
not be not be misrepresented as being the original software.
misrepresented as being the original software.
3. This notice may not be removed or altered from any source 3. This notice may not be removed or altered from any source
distribution. distribution.
Jean-loup Gailly Mark Adler Jean-loup Gailly Mark Adler
---------------------------------------------- ----------------------------------------------
This source code was modified by Martin Hedenfalk This source code was modified by Martin Hedenfalk for use in Curl. His
for latest changes were done 2000-09-18.
use in Curl. His latest changes were done 2000-09-18.
It has since been patched away like a madman by Daniel Stenberg It has since been patched away like a madman by Daniel Stenberg to make it
to make it better applied to curl conditions, and to better applied to curl conditions, and to make it not use globals, pollute
make name space and more. This source code awaits a rewrite to work around the
it not use globals, pollute name space and more. This source code paragraph 2 in the BSD licenses as explained below.
awaits a
rewrite to work around the paragraph 2 in the BSD licenses as explained
below.
Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Hgskolan Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Hgskolan
It has since been patched and modified a lot by Daniel Stenberg It has since been patched and modified a lot by Daniel Stenberg to make it
to make it better applied to curl conditions, and to better applied to curl conditions, and to make it not use globals, pollute
make name space and more. This source code awaits a rewrite to work around the
it not use globals, pollute name space and more. This source code paragraph 2 in the BSD licenses as explained below.
awaits a
rewrite to work around the paragraph 2 in the BSD licenses as explained
below.
Copyright (c) 1998, 1999 Kungliga Tekniska Hgskolan Copyright (c) 1998, 1999 Kungliga Tekniska Hgskolan
(Royal Institute of Technology, Stockholm, Sweden). (Royal Institute of Technology, Stockholm, Sweden).
@ -306,19 +293,15 @@ awaits a
THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
LIABLE DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CONSEQUENTIAL CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. SUCH DAMAGE.
--------------------------------------------- ---------------------------------------------
@ -334,8 +317,7 @@ STRICT
-------------------------------------------------- --------------------------------------------------
cmake-2.4.8/Utilities/cmcurl/inet_pton.c, cmake-2.4.8/Utilities/cmcurl/inet_pton.c,
cmake-2.4.8/Source/CTest/Curl/inet_pto cmake-2.4.8/Source/CTest/Curl/inet_pton.c:
n.c:
This is from the BIND 4.9.4 release, modified to compile by itself This is from the BIND 4.9.4 release, modified to compile by itself
Copyright (c) 1996 by Internet Software Consortium. Copyright (c) 1996 by Internet Software Consortium.
@ -345,16 +327,13 @@ n.c:
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
DISCLAIMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
WARRANTIES INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT,
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS PERFORMANCE OF THIS SOFTWARE.
ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
OF THIS
SOFTWARE.
------------------------------------------------------- -------------------------------------------------------
@ -371,24 +350,19 @@ OF THIS
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products * 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written * derived from this software without specific prior written permission.
permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
PURPOSE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
CONSEQUENTIAL * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
** SUCH DAMAGE. * SUCH DAMAGE.
--------------------------------------------------- ---------------------------------------------------
@ -435,23 +409,20 @@ ANY WAY
documentation and/or other materials provided with the distribution. documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software 3. All advertising materials mentioning features or use of this software
must display the following acknowledgement: must display the following acknowledgement:
This product includes software developed by the University of This product includes software developed by the University of
California, Berkeley and its contributors. California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors 4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software may be used to endorse or promote products derived from this software
without specific prior written permission. without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE. SUCH DAMAGE.
@ -482,60 +453,33 @@ STRICT
*************************************************************************** ***************************************************************************
Copyright (c) 1998 Free Software Foundation, Inc. Copyright (c) 1998 Free Software Foundation, Inc.
*
Copyright (c) 1998,2000 Free Software Foundation, Inc. Copyright (c) 1998,2000 Free Software Foundation, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
Permission is hereby granted, free of charge, to any person obtaining
a *
copy of this software and associated documentation files (the copy of this software and associated documentation files (the
*
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
*
without limitation the rights to use, copy, modify, merge, publish, without limitation the rights to use, copy, modify, merge, publish,
* distribute, distribute with modifications, sublicense, and/or sell copies
distribute, distribute with modifications, sublicense, and/or sell of the Software, and to permit persons to whom the Software is furnished
* to do so, subject to the following conditions:
copies of the Software, and to permit persons to whom the Software is
*
furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
The above copyright notice and this permission notice shall be all copies or substantial portions of the Software.
included *
in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
EXPRESS * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
*
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. *
IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, *
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR USE OR OTHER DEALINGS IN THE SOFTWARE.
*
THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
* Except as contained in this notice, the name(s) of the above copyright
Except as contained in this notice, the name(s) of the above holders shall not be used in advertising or otherwise to promote the sale,
copyright * use or other dealings in this Software without prior written
holders shall not be used in advertising or otherwise to promote the
*
sale, use or other dealings in this Software without prior written
*
authorization. authorization.
* ***************************************************************************
***************************************************************************
------------------------------------------------------ ------------------------------------------------------
@ -553,30 +497,25 @@ copyright *
3. The name of the author may not be used to endorse or promote products 3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission. derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
PURPOSE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
CONSEQUENTIAL SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE. SUCH DAMAGE.
@ -588,31 +527,29 @@ Fred Fish's Dbug Library
Use of any of this software is governed by the terms of the license below: Use of any of this software is governed by the terms of the license below:
* * N O T I C E *
* N O T I C E * * *
* * * Copyright Abandoned, 1987, Fred Fish *
* Copyright Abandoned, 1987, Fred Fish * * *
* * * *
* *
* This previously copyrighted work has been placed into the public * * This previously copyrighted work has been placed into the public *
* domain by the author and may be freely used for any purpose, * * domain by the author and may be freely used for any purpose, *
* private or commercial. * * private or commercial. *
* * * *
* Because of the number of inquiries I was receiving about the use * * Because of the number of inquiries I was receiving about the use *
* of this product in commercially developed works I have decided to * * of this product in commercially developed works I have decided to *
* simply make it public domain to further its unrestricted use. I * * simply make it public domain to further its unrestricted use. I *
* specifically would be most happy to see this material become a * * specifically would be most happy to see this material become a *
* part of the standard Unix distributions by AT&T and the Berkeley * * part of the standard Unix distributions by AT&T and the Berkeley *
* Computer Science Research Group, and a standard part of the GNU * * Computer Science Research Group, and a standard part of the GNU *
* system from the Free Software Foundation. * * system from the Free Software Foundation. *
* * * *
* I would appreciate it, as a courtesy, if this notice is left in * * I would appreciate it, as a courtesy, if this notice is left in *
* all copies and derivative works. Thank you. * * all copies and derivative works. Thank you. *
* * * *
* The author makes no warranty of any kind with respect to this * * The author makes no warranty of any kind with respect to this *
* product and explicitly disclaims any implied warranties of mer- * * product and explicitly disclaims any implied warranties of mer- *
* chantability or fitness for any particular purpose. * * chantability or fitness for any particular purpose. *
*
*************************************************************************** ***************************************************************************
@ -621,28 +558,27 @@ dbug_analyze.c (part of Fred Fish's Dbug Library)
Use of any of this software is governed by the terms of the license below: Use of any of this software is governed by the terms of the license below:
* * * Copyright Abandoned, 1987, Fred Fish *
* Copyright Abandoned, 1987, Fred Fish * * *
* * * *
* * * This previously copyrighted work has been placed into the public *
* This previously copyrighted work has been placed into the public * * domain by the author and may be freely used for any purpose, *
* domain by the author and may be freely used for any purpose, * * private or commercial. *
* private or commercial. * * *
* * * Because of the number of inquiries I was receiving about the use *
* Because of the number of inquiries I was receiving about the use * * of this product in commercially developed works I have decided to *
* of this product in commercially developed works I have decided to * * simply make it public domain to further its unrestricted use. I *
* simply make it public domain to further its unrestricted use. I * * specifically would be most happy to see this material become a *
* specifically would be most happy to see this material become a * * part of the standard Unix distributions by AT&T and the Berkeley *
* part of the standard Unix distributions by AT&T and the Berkeley * * Computer Science Research Group, and a standard part of the GNU *
* Computer Science Research Group, and a standard part of the GNU * * system from the Free Software Foundation. *
* system from the Free Software Foundation. * * *
* * * I would appreciate it, as a courtesy, if this notice is left in *
* I would appreciate it, as a courtesy, if this notice is left in * * all copies and derivative works. Thank you. *
* all copies and derivative works. Thank you. * * *
* * * The author makes no warranty of any kind with respect to this *
* The author makes no warranty of any kind with respect to this * * product and explicitly disclaims any implied warranties of mer- *
* product and explicitly disclaims any implied warranties of mer- * * chantability or fitness for any particular purpose. *
* chantability or fitness for any particular purpose.
*************************************************************************** ***************************************************************************
@ -1456,11 +1392,9 @@ text:
Library General Public License for more details. Library General Public License for more details.
You should have received a copy of the GNU Library General Public You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If License along with the GNU C Library; see the file COPYING.LIB. If not,
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite
write to the Free Software Foundation, Inc., 59 Temple Place - 330, Boston, MA 02111-1307, USA. */
Suite 330,
Boston, MA 02111-1307, USA. */
@ -1551,103 +1485,120 @@ Use of any of this software is governed by the terms of the license below:
Unicode Terms of Use Unicode Terms of Use
For the general privacy policy governing access to this site, see the For the general privacy policy governing access to this site, see the
Unicode Privacy Policy. For trademark usage, see the Unicode Consortium<75> Unicode Privacy Policy. For trademark usage, see the Unicode
Trademarks and Logo Policy. Consortium (R) Trademarks and Logo Policy.
Notice to End User: Terms of Use Notice to End User: Terms of Use
Carefully read the following legal agreement ("Agreement"). Use or copying Carefully read the following legal agreement ("Agreement"). Use or
of the software and/or codes provided with this agreement (The "Software") copying of the software and/or codes provided with this agreement (The
constitutes your acceptance of these terms "Software") constitutes your acceptance of these terms
1. Unicode Copyright. 1. Unicode Copyright.
1. Copyright <EFBFBD> 1991-2008 Unicode, Inc. All rights reserved. 1. Copyright (c) 1991-2008 Unicode, Inc. All rights reserved.
2. Certain documents and files on this website contain a legend 2. Certain documents and files on this website contain a
indicating that "Modification is permitted." Any person is hereby authorized, legend indicating that "Modification is permitted." Any person
without fee, to modify such documents and files to create derivative works is hereby authorized, without fee, to modify such documents
conforming to the Unicode<64> Standard, subject to Terms and Conditions herein. and files to create derivative works conforming to the
Unicode (R) Standard, subject to Terms and Conditions herein.
3. Any person is hereby authorized, without fee, to view, use, 3. Any person is hereby authorized, without fee, to view, use,
reproduce, and distribute all documents and files solely for informational reproduce, and distribute all documents and files solely for
purposes in the creation of products supporting the Unicode Standard, subject to informational purposes in the creation of products supporting
the Terms and Conditions herein. the Unicode Standard, subject to the Terms and Conditions
4. Further specifications of rights and restrictions pertaining to herein.
the use of the particular set of data files known as the "Unicode Character 4. Further specifications of rights and restrictions
Database" can be found in Exhibit 1. pertaining to the use of the particular set of data files
5. Each version of the Unicode Standard has further specifications known as the "Unicode Character Database" can be found in
of rights and restrictions of use. For the book editions, these are found on the Exhibit 1.
back of the title page. For the online edition, certain files (such as the PDF 5. Each version of the Unicode Standard has further
files for book chapters and code charts) carry specific restrictions. All other specifications of rights and restrictions of use. For the book
files are covered under these general Terms of Use. To request a permission to editions, these are found on the back of the title page. For
reproduce any part of the Unicode Standard, please contact the Unicode Consortium. the online edition, certain files (such as the PDF files for
6. No license is granted to "mirror" the Unicode website where a book chapters and code charts) carry specific restrictions.
fee is charged for access to the "mirror" site. All other files are covered under these general Terms of Use.
7. Modification is not permitted with respect to this document. All To request a permission to reproduce any part of the Unicode
copies of this document must be verbatim. Standard, please contact the Unicode Consortium.
6. No license is granted to "mirror" the Unicode website where
a fee is charged for access to the "mirror" site.
7. Modification is not permitted with respect to this
document. All copies of this document must be verbatim.
2. Restricted Rights Legend. Any technical data or software which is 2. Restricted Rights Legend. Any technical data or software which is
licensed to the United States of America, its agencies and/or instrumentalities licensed to the United States of America, its agencies and/or
under this Agreement is commercial technical data or commercial computer instrumentalities under this Agreement is commercial technical data
software developed exclusively at private expense as defined in FAR 2.101, or or commercial computer software developed exclusively at private
DFARS 252.227-7014 (June 1995), as applicable. For technical data, use, expense as defined in FAR 2.101, or DFARS 252.227-7014 (June 1995),
duplication, or disclosure by the Government is subject to restrictions as set as applicable. For technical data, use, duplication, or disclosure
forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995) and by the Government is subject to restrictions as set forth in DFARS
this Agreement. For Software, in accordance with FAR 12-212 or DFARS 227-7202, 202.227-7015 Technical Data, Commercial and Items (Nov 1995) and
as applicable, use, duplication or disclosure by the Government is subject to this Agreement. For Software, in accordance with FAR 12-212 or DFARS
the restrictions set forth in this Agreement. 227-7202, as applicable, use, duplication or disclosure by the
Government is subject to the restrictions set forth in this
Agreement.
3. Warranties and Disclaimers. 3. Warranties and Disclaimers.
1. This publication and/or website may include technical or 1. This publication and/or website may include technical or
typographical errors or other inaccuracies . Changes are periodically added to typographical errors or other inaccuracies . Changes are
the information herein; these changes will be incorporated in new editions of periodically added to the information herein; these changes
the publication and/or website. Unicode may make improvements and/or changes in will be incorporated in new editions of the publication and/or
the product(s) and/or program(s) described in this publication and/or website at website. Unicode may make improvements and/or changes in the
any time. product(s) and/or program(s) described in this publication
2. If this file has been purchased on magnetic or optical media and/or website at any time.
from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange 2. If this file has been purchased on magnetic or optical
of the defective media within ninety (90) days of original purchase. media from Unicode, Inc. the sole and exclusive remedy for any
claim will be exchange of the defective media within ninety
(90) days of original purchase.
3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR 3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR
SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND
IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF EITHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN THIS PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE AND ITS
PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR LINKED LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN
TO THIS PUBLICATION OR THE UNICODE WEBSITE. THIS PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE
REFERENCED BY OR LINKED TO THIS PUBLICATION OR THE UNICODE
WEBSITE.
4. Waiver of Damages. In no event shall Unicode or its licensors be 4. Waiver of Damages. In no event shall Unicode or its licensors be
liable for any special, incidental, indirect or consequential damages of any liable for any special, incidental, indirect or consequential
kind, or any damages whatsoever, whether or not Unicode was advised of the damages of any kind, or any damages whatsoever, whether or not
possibility of the damage, including, without limitation, those resulting from Unicode was advised of the possibility of the damage, including,
the following: loss of use, data or profits, in connection with the use, without limitation, those resulting from the following: loss of use,
modification or distribution of this information or its derivatives. data or profits, in connection with the use, modification or
distribution of this information or its derivatives.
5. Trademarks. 5. Trademarks.
1. Unicode and the Unicode logo are registered trademarks of 1. Unicode and the Unicode logo are registered trademarks of
Unicode, Inc. Unicode, Inc.
2. This site contains product names and corporate names of other 2. This site contains product names and corporate names of
companies. All product names and company names and logos mentioned herein are other companies. All product names and company names and logos
the trademarks or registered trademarks of their respective owners. Other mentioned herein are the trademarks or registered trademarks
products and corporate names mentioned herein which are trademarks of a third of their respective owners. Other products and corporate names
party are used only for explanation and for the owners' benefit and with no mentioned herein which are trademarks of a third party are
intent to infringe. used only for explanation and for the owners' benefit and with
3. Use of third party products or information referred to herein is no intent to infringe.
at the user<65>s risk. 3. Use of third party products or information referred to
herein is at the user's risk.
6. Miscellaneous. 6. Miscellaneous.
1. Jurisdiction and Venue. This server is operated from a location 1. Jurisdiction and Venue. This server is operated from a
in the State of California, United States of America. Unicode makes no location in the State of California, United States of America.
representation that the materials are appropriate for use in other locations. If Unicode makes no representation that the materials are
you access this server from other locations, you are responsible for compliance appropriate for use in other locations. If you access this
with local laws. This Agreement, all use of this site and any claims and damages server from other locations, you are responsible for
resulting from use of this site are governed solely by the laws of the State of compliance with local laws. This Agreement, all use of this
California without regard to any principles which would apply the laws of a site and any claims and damages resulting from use of this
different jurisdiction. The user agrees that any disputes regarding this site site are governed solely by the laws of the State of
shall be resolved solely in the courts located in Santa Clara County, California without regard to any principles which would apply
California. The user agrees said courts have personal jurisdiction and agree to the laws of a different jurisdiction. The user agrees that any
waive any right to transfer the dispute to any other forum. disputes regarding this site shall be resolved solely in the
2. Modification by Unicode Unicode shall have the right to modify courts located in Santa Clara County, California. The user
this Agreement at any time by posting it to this site. The user may not assign agrees said courts have personal jurisdiction and agree to
any part of this Agreement without Unicode<64>s prior written consent. waive any right to transfer the dispute to any other forum.
3. Taxes. The user agrees to pay any taxes arising from access to 2. Modification by Unicode Unicode shall have the right to
this website or use of the information herein, except for those based on modify this Agreement at any time by posting it to this site.
Unicode<EFBFBD>s net income. The user may not assign any part of this Agreement without
4. Severability. If any provision of this Agreement is declared Unicode's prior written consent.
invalid or unenforceable, the remaining provisions of this Agreement shall 3. Taxes. The user agrees to pay any taxes arising from access
remain in effect. to this website or use of the information herein, except for
those based on Unicode's net income.
4. Severability. If any provision of this Agreement is
declared invalid or unenforceable, the remaining provisions of
this Agreement shall remain in effect.
5. Entire Agreement. This Agreement constitutes the entire 5. Entire Agreement. This Agreement constitutes the entire
agreement between the parties. agreement between the parties.
EXHIBIT 1 EXHIBIT 1
UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
@ -1668,7 +1619,7 @@ OR SOFTWARE.
COPYRIGHT AND PERMISSION NOTICE COPYRIGHT AND PERMISSION NOTICE
Copyright <EFBFBD> 1991-2008 Unicode, Inc. All rights reserved. Distributed under Copyright (c) 1991-2008 Unicode, Inc. All rights reserved. Distributed under
the Terms of Use in http://www.unicode.org/copyright.html. the Terms of Use in http://www.unicode.org/copyright.html.
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
@ -2267,7 +2218,7 @@ http://src.opensolaris.org/source/xref//sfw/usr/src/cmd/gdb/gdb-6.3/include/ieee
/* IEEE Standard 695-1980 "Universal Format for Object Modules" /* IEEE Standard 695-1980 "Universal Format for Object Modules"
header file header file
Contributed by Cygnus Support. */ Contributed by Cygnus Support. */
*************************************************************************** ***************************************************************************
@ -2297,8 +2248,7 @@ Use of any of this software is governed by the terms of the license below:
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
02111-1307, USA.
*/ */
*************************************************************************** **********************************************************************

4
VERSION Normal file
View File

@ -0,0 +1,4 @@
MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=9
MYSQL_VERSION_EXTRA=

View File

@ -72,3 +72,5 @@ ENDIF(WIN32)
SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysqlslap SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysqlslap
PROPERTIES HAS_CXX TRUE) PROPERTIES HAS_CXX TRUE)
ADD_DEFINITIONS(-DHAVE_DLOPEN)

View File

@ -1,125 +0,0 @@
# Copyright (C) 2000-2006 MySQL 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# This file is public domain and comes with NO WARRANTY of any kind
if THREAD_SAFE_CLIENT
LIBMYSQLCLIENT_LA = $(top_builddir)/libmysql_r/libmysqlclient_r.la
else
LIBMYSQLCLIENT_LA = $(top_builddir)/libmysql/libmysqlclient.la
endif
INCLUDES = -I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(top_srcdir)/regex \
$(openssl_includes)
LIBS = @CLIENT_LIBS@
LDADD= @CLIENT_EXTRA_LDFLAGS@ $(CLIENT_THREAD_LIBS) \
$(top_builddir)/libmysql/libmysqlclient.la
noinst_HEADERS = sql_string.h completion_hash.h my_readline.h \
client_priv.h
EXTRA_DIST = get_password.c CMakeLists.txt echo.c
BUILT_SOURCES = link_sources
CLEANFILES = $(BUILT_SOURCES)
bin_PROGRAMS = mysql \
mysqladmin \
mysqlbinlog \
mysqlcheck \
mysqldump \
mysqlimport \
mysqlshow \
mysqlslap \
mysqltest \
mysql_upgrade
mysql_SOURCES = mysql.cc readline.cc sql_string.cc \
completion_hash.cc
mysql_LDADD = @readline_link@ @TERMCAP_LIB@ \
$(LDADD) $(CXXLDFLAGS)
mysqladmin_SOURCES = mysqladmin.cc
mysqlbinlog_SOURCES = mysqlbinlog.cc \
$(top_srcdir)/mysys/mf_tempdir.c \
$(top_srcdir)/mysys/my_new.cc \
$(top_srcdir)/mysys/my_bit.c \
$(top_srcdir)/mysys/my_bitmap.c \
$(top_srcdir)/mysys/base64.c
mysqlbinlog_LDADD = $(LDADD) $(CXXLDFLAGS)
mysqldump_SOURCES= mysqldump.c \
my_user.c \
$(top_srcdir)/mysys/mf_getdate.c
mysqlimport_SOURCES= mysqlimport.c
mysqlimport_CFLAGS= -DTHREAD -UUNDEF_THREADS_HACK
mysqlimport_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
@CLIENT_EXTRA_LDFLAGS@ \
$(LIBMYSQLCLIENT_LA) \
$(top_builddir)/mysys/libmysys.a
mysqlshow_SOURCES= mysqlshow.c
mysqlslap_SOURCES= mysqlslap.c
mysqlslap_CFLAGS= -DTHREAD -UMYSQL_CLIENT_NO_THREADS
mysqlslap_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
@CLIENT_EXTRA_LDFLAGS@ \
$(LIBMYSQLCLIENT_LA) \
$(top_builddir)/mysys/libmysys.a
mysqltest_SOURCES= mysqltest.cc
mysqltest_CXXFLAGS= -DTHREAD -UMYSQL_CLIENT_NO_THREADS
mysqltest_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
@CLIENT_EXTRA_LDFLAGS@ \
$(LIBMYSQLCLIENT_LA) \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/regex/libregex.a \
$(CLIENT_THREAD_LIBS)
mysql_upgrade_SOURCES= mysql_upgrade.c \
$(top_srcdir)/mysys/my_getpagesize.c
# Fix for mit-threads
DEFS = -DMYSQL_CLIENT_NO_THREADS \
-DDEFAULT_MYSQL_HOME="\"$(prefix)\"" \
-DMYSQL_DATADIR="\"$(localstatedir)\""
sql_src=log_event.h sql_priv.h rpl_constants.h \
rpl_tblmap.h rpl_tblmap.cc \
log_event.cc my_decimal.h my_decimal.cc \
log_event_old.h log_event_old.cc \
rpl_record_old.h rpl_record_old.cc \
rpl_utility.h rpl_utility.cc \
transaction.h sql_const.h
strings_src=decimal.c dtoa.c
link_sources:
for f in $(sql_src) ; do \
rm -f $$f; \
@LN_CP_F@ $(top_srcdir)/sql/$$f $$f; \
done; \
for f in $(strings_src) ; do \
rm -f $(srcdir)/$$f; \
@LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \
done; \
rm -f $(srcdir)/my_user.c; \
@LN_CP_F@ $(top_srcdir)/sql-common/my_user.c my_user.c;
echo timestamp > link_sources;

View File

@ -84,6 +84,8 @@ enum options_client
OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE, OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE,
OPT_WRITE_BINLOG, OPT_DUMP_DATE, OPT_WRITE_BINLOG, OPT_DUMP_DATE,
OPT_INIT_COMMAND, OPT_INIT_COMMAND,
OPT_PLUGIN_DIR,
OPT_DEFAULT_PLUGIN,
OPT_MAX_CLIENT_OPTION OPT_MAX_CLIENT_OPTION
}; };

View File

@ -1,11 +1,11 @@
/* Copyright (C) 2000-2002 MySQL AB /* Copyright (C) 2000-2002 MySQL AB
This library is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; version 2 License as published by the Free Software Foundation; version 2
of the License. of the License.
This library is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details. Library General Public License for more details.

View File

@ -13,11 +13,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#define COPYRIGHT_NOTICE "\
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.\n\
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
and you are welcome to modify and redistribute it under the GPL v2 license\n"
/* mysql command tool /* mysql command tool
* Commands compatible with mSQL by David J. Hughes * Commands compatible with mSQL by David J. Hughes
* *
@ -110,6 +105,7 @@ extern "C" {
#endif #endif
#include "completion_hash.h" #include "completion_hash.h"
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
#define PROMPT_CHAR '\\' #define PROMPT_CHAR '\\'
#define DEFAULT_DELIMITER ";" #define DEFAULT_DELIMITER ";"
@ -166,6 +162,7 @@ static int wait_time = 5;
static STATUS status; static STATUS status;
static ulong select_limit,max_join_size,opt_connect_timeout=0; static ulong select_limit,max_join_size,opt_connect_timeout=0;
static char mysql_charsets_dir[FN_REFLEN+1]; static char mysql_charsets_dir[FN_REFLEN+1];
static char *opt_plugin_dir= 0, *opt_default_auth;
static const char *xmlmeta[] = { static const char *xmlmeta[] = {
"&", "&amp;", "&", "&amp;",
"<", "&lt;", "<", "&lt;",
@ -1176,7 +1173,7 @@ int main(int argc,char *argv[])
mysql_thread_id(&mysql), server_version_string(&mysql)); mysql_thread_id(&mysql), server_version_string(&mysql));
put_info((char*) glob_buffer.ptr(),INFO_INFO); put_info((char*) glob_buffer.ptr(),INFO_INFO);
put_info(COPYRIGHT_NOTICE, INFO_INFO); put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"), INFO_INFO);
#ifdef HAVE_READLINE #ifdef HAVE_READLINE
initialize_readline((char*) my_progname); initialize_readline((char*) my_progname);
@ -1459,8 +1456,8 @@ static struct my_option my_long_options[] =
&opt_sigint_ignore, &opt_sigint_ignore, 0, GET_BOOL, &opt_sigint_ignore, &opt_sigint_ignore, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"one-database", 'o', {"one-database", 'o',
"Only update the default database. This is useful for skipping updates " "Ignore statements except those that occur while the default "
"to other database in the update log.", "database is the one named at the command line.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#ifdef USE_POPEN #ifdef USE_POPEN
{"pager", OPT_PAGER, {"pager", OPT_PAGER,
@ -1564,6 +1561,13 @@ static struct my_option my_long_options[] =
{"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.", {"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.",
&show_warnings, &show_warnings, 0, GET_BOOL, NO_ARG, &show_warnings, &show_warnings, 0, GET_BOOL, NO_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"default_auth", OPT_PLUGIN_DIR,
"Default authentication client-side plugin to use.",
(uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
@ -1587,7 +1591,7 @@ static void usage(int version)
if (version) if (version)
return; return;
printf("%s", COPYRIGHT_NOTICE); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
printf("Usage: %s [OPTIONS] [database]\n", my_progname); printf("Usage: %s [OPTIONS] [database]\n", my_progname);
my_print_help(my_long_options); my_print_help(my_long_options);
print_defaults("my", load_default_groups); print_defaults("my", load_default_groups);
@ -2688,6 +2692,10 @@ static void get_current_db()
{ {
MYSQL_RES *res; MYSQL_RES *res;
/* If one_database is set, current_db is not supposed to change. */
if (one_database)
return;
my_free(current_db); my_free(current_db);
current_db= NULL; current_db= NULL;
/* In case of error below current_db will be NULL */ /* In case of error below current_db will be NULL */
@ -3735,7 +3743,8 @@ print_tab_data(MYSQL_RES *result)
} }
static int static int
com_tee(String *buffer, char *line __attribute__((unused))) com_tee(String *buffer __attribute__((unused)),
char *line __attribute__((unused)))
{ {
char file_name[FN_REFLEN], *end, *param; char file_name[FN_REFLEN], *end, *param;
@ -3794,7 +3803,8 @@ com_notee(String *buffer __attribute__((unused)),
#ifdef USE_POPEN #ifdef USE_POPEN
static int static int
com_pager(String *buffer, char *line __attribute__((unused))) com_pager(String *buffer __attribute__((unused)),
char *line __attribute__((unused)))
{ {
char pager_name[FN_REFLEN], *end, *param; char pager_name[FN_REFLEN], *end, *param;
@ -3919,7 +3929,8 @@ com_rehash(String *buffer __attribute__((unused)),
#ifdef USE_POPEN #ifdef USE_POPEN
static int static int
com_shell(String *buffer, char *line __attribute__((unused))) com_shell(String *buffer __attribute__((unused)),
char *line __attribute__((unused)))
{ {
char *shell_cmd; char *shell_cmd;
@ -4011,7 +4022,8 @@ com_connect(String *buffer, char *line)
} }
static int com_source(String *buffer, char *line) static int com_source(String *buffer __attribute__((unused)),
char *line)
{ {
char source_name[FN_REFLEN], *end, *param; char source_name[FN_REFLEN], *end, *param;
LINE_BUFFER *line_buff; LINE_BUFFER *line_buff;
@ -4295,9 +4307,15 @@ sql_real_connect(char *host,char *database,char *user,char *password,
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset); mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
if (opt_plugin_dir && *opt_plugin_dir)
mysql_options(&mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
if (opt_default_auth && *opt_default_auth)
mysql_options(&mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
if (!mysql_real_connect(&mysql, host, user, password, if (!mysql_real_connect(&mysql, host, user, password,
database, opt_mysql_port, opt_mysql_unix_port, database, opt_mysql_port, opt_mysql_unix_port,
connect_flag | CLIENT_MULTI_STATEMENTS)) connect_flag | CLIENT_MULTI_STATEMENTS))
{ {
if (!silent || if (!silent ||
(mysql_errno(&mysql) != CR_CONN_HOST_ERROR && (mysql_errno(&mysql) != CR_CONN_HOST_ERROR &&
@ -4919,7 +4937,8 @@ static void init_username()
} }
} }
static int com_prompt(String *buffer, char *line) static int com_prompt(String *buffer __attribute__((unused)),
char *line)
{ {
char *ptr=strchr(line, ' '); char *ptr=strchr(line, ' ');
prompt_counter = 0; prompt_counter = 0;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2000 MySQL AB /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -17,6 +17,8 @@
#include <sslopt-vars.h> #include <sslopt-vars.h>
#include "../scripts/mysql_fix_privilege_tables_sql.c" #include "../scripts/mysql_fix_privilege_tables_sql.c"
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
#define VER "1.1" #define VER "1.1"
#ifdef HAVE_SYS_WAIT_H #ifdef HAVE_SYS_WAIT_H
@ -232,6 +234,7 @@ get_one_option(int optid, const struct my_option *opt,
case '?': case '?':
printf("%s Ver %s Distrib %s, for %s (%s)\n", printf("%s Ver %s Distrib %s, for %s (%s)\n",
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE); my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
puts("MySQL utility for upgrading databases to new MySQL versions.\n"); puts("MySQL utility for upgrading databases to new MySQL versions.\n");
my_print_help(my_long_options); my_print_help(my_long_options);
exit(0); exit(0);

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2000-2006 MySQL AB /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -23,6 +23,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <mysql.h> #include <mysql.h>
#include <sql_common.h> #include <sql_common.h>
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
#define ADMIN_VERSION "8.42" #define ADMIN_VERSION "8.42"
#define MAX_MYSQL_VAR 512 #define MAX_MYSQL_VAR 512
@ -43,6 +44,7 @@ static uint tcp_port = 0, option_wait = 0, option_silent=0, nr_iterations;
static uint opt_count_iterations= 0, my_end_arg; static uint opt_count_iterations= 0, my_end_arg;
static ulong opt_connect_timeout, opt_shutdown_timeout; static ulong opt_connect_timeout, opt_shutdown_timeout;
static char * unix_port=0; static char * unix_port=0;
static char *opt_plugin_dir= 0, *opt_default_auth;
#ifdef HAVE_SMEM #ifdef HAVE_SMEM
static char *shared_memory_base_name=0; static char *shared_memory_base_name=0;
@ -205,6 +207,13 @@ static struct my_option my_long_options[] =
{"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", &opt_shutdown_timeout, {"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", &opt_shutdown_timeout,
&opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG, &opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG,
SHUTDOWN_DEF_TIMEOUT, 0, 3600*12, 0, 1, 0}, SHUTDOWN_DEF_TIMEOUT, 0, 3600*12, 0, 1, 0},
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"default_auth", OPT_PLUGIN_DIR,
"Default authentication client-side plugin to use.",
(uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
@ -341,6 +350,12 @@ int main(int argc,char *argv[])
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset); mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
error_flags= (myf)(opt_nobeep ? 0 : ME_BELL); error_flags= (myf)(opt_nobeep ? 0 : ME_BELL);
if (opt_plugin_dir && *opt_plugin_dir)
mysql_options(&mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
if (opt_default_auth && *opt_default_auth)
mysql_options(&mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
if (sql_connect(&mysql, option_wait)) if (sql_connect(&mysql, option_wait))
{ {
/* /*
@ -671,8 +686,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
case ADMIN_VER: case ADMIN_VER:
new_line=1; new_line=1;
print_version(); print_version();
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc."); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
printf("Server version\t\t%s\n", mysql_get_server_info(mysql)); printf("Server version\t\t%s\n", mysql_get_server_info(mysql));
printf("Protocol version\t%d\n", mysql_get_proto_info(mysql)); printf("Protocol version\t%d\n", mysql_get_proto_info(mysql));
printf("Connection\t\t%s\n",mysql_get_host_info(mysql)); printf("Connection\t\t%s\n",mysql_get_host_info(mysql));
@ -1070,8 +1084,7 @@ static void print_version(void)
static void usage(void) static void usage(void)
{ {
print_version(); print_version();
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc."); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
puts("Administration program for the mysqld daemon."); puts("Administration program for the mysqld daemon.");
printf("Usage: %s [OPTIONS] command command....\n", my_progname); printf("Usage: %s [OPTIONS] command command....\n", my_progname);
my_print_help(my_long_options); my_print_help(my_long_options);

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2001-2004 MySQL AB /* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -34,6 +34,7 @@
#include "sql_priv.h" #include "sql_priv.h"
#include "log_event.h" #include "log_event.h"
#include "sql_common.h" #include "sql_common.h"
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
#define BIN_LOG_HEADER_SIZE 4 #define BIN_LOG_HEADER_SIZE 4
#define PROBE_HEADER_LEN (EVENT_LEN_OFFSET+4) #define PROBE_HEADER_LEN (EVENT_LEN_OFFSET+4)
@ -1009,10 +1010,11 @@ static struct my_option my_long_options[] =
"row-based events; 'decode-rows' decodes row events into commented SQL " "row-based events; 'decode-rows' decodes row events into commented SQL "
"statements if the --verbose option is also given; 'auto' prints base64 " "statements if the --verbose option is also given; 'auto' prints base64 "
"only when necessary (i.e., for row-based events and format description " "only when necessary (i.e., for row-based events and format description "
"events); 'always' prints base64 whenever possible. 'always' is for " "events); 'always' prints base64 whenever possible. 'always' is "
"debugging only and should not be used in a production system. If this " "deprecated, will be removed in a future version, and should not be used "
"argument is not given, the default is 'auto'; if it is given with no " "in a production system. --base64-output with no 'name' argument is "
"argument, 'always' is used.", "equivalent to --base64-output=always and is also deprecated. If no "
"--base64-output[=name] option is given at all, the default is 'auto'.",
&opt_base64_output_mode_str, &opt_base64_output_mode_str, &opt_base64_output_mode_str, &opt_base64_output_mode_str,
0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
/* /*
@ -1239,10 +1241,7 @@ static void print_version()
static void usage() static void usage()
{ {
print_version(); print_version();
puts("By Monty and Sasha, for your professional use\n\ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2001, 2010"));
This software comes with NO WARRANTY: This is free software,\n\
and you are welcome to modify and redistribute it under the GPL license.\n");
printf("\ printf("\
Dumps a MySQL binary log in a format usable for viewing or for piping to\n\ Dumps a MySQL binary log in a format usable for viewing or for piping to\n\
the mysql command line client.\n\n"); the mysql command line client.\n\n");
@ -2026,6 +2025,13 @@ int main(int argc, char** argv)
if (opt_base64_output_mode == BASE64_OUTPUT_UNSPEC) if (opt_base64_output_mode == BASE64_OUTPUT_UNSPEC)
opt_base64_output_mode= BASE64_OUTPUT_AUTO; opt_base64_output_mode= BASE64_OUTPUT_AUTO;
if (opt_base64_output_mode == BASE64_OUTPUT_ALWAYS)
warning("The --base64-output=always flag and the --base64-output flag "
"(with '=MODE' omitted), are deprecated. "
"The output generated when these flags are used cannot be "
"parsed by mysql 5.6.0 and later. "
"The flags will be removed in a future version. "
"Please use --base64-output=auto instead.");
my_set_max_open_files(open_files_limit); my_set_max_open_files(open_files_limit);

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2000 MySQL AB, 2009 Sun Microsystems, Inc /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -13,8 +13,6 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* By Jani Tolonen, 2001-04-20, MySQL Development Team */
#define CHECK_VERSION "2.5.0" #define CHECK_VERSION "2.5.0"
#include "client_priv.h" #include "client_priv.h"
@ -22,6 +20,7 @@
#include <mysql_version.h> #include <mysql_version.h>
#include <mysqld_error.h> #include <mysqld_error.h>
#include <sslopt-vars.h> #include <sslopt-vars.h>
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
/* Exit codes */ /* Exit codes */
@ -48,7 +47,7 @@ static char *shared_memory_base_name=0;
#endif #endif
static uint opt_protocol=0; static uint opt_protocol=0;
enum operations { DO_CHECK, DO_REPAIR, DO_ANALYZE, DO_OPTIMIZE, DO_UPGRADE }; enum operations { DO_CHECK=1, DO_REPAIR, DO_ANALYZE, DO_OPTIMIZE, DO_UPGRADE };
static struct my_option my_long_options[] = static struct my_option my_long_options[] =
{ {
@ -215,9 +214,7 @@ static void print_version(void)
static void usage(void) static void usage(void)
{ {
print_version(); print_version();
puts("By Jani Tolonen, 2001-04-20, MySQL Development Team.\n"); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n");
puts("and you are welcome to modify and redistribute it under the GPL license.\n");
puts("This program can be used to CHECK (-c, -m, -C), REPAIR (-r), ANALYZE (-a),"); puts("This program can be used to CHECK (-c, -m, -C), REPAIR (-r), ANALYZE (-a),");
puts("or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be"); puts("or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be");
puts("used at the same time. Not all options are supported by all storage engines."); puts("used at the same time. Not all options are supported by all storage engines.");
@ -244,6 +241,8 @@ static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)), get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument) char *argument)
{ {
int orig_what_to_do= what_to_do;
switch(optid) { switch(optid) {
case 'a': case 'a':
what_to_do = DO_ANALYZE; what_to_do = DO_ANALYZE;
@ -318,6 +317,13 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
opt->name); opt->name);
break; break;
} }
if (orig_what_to_do && (what_to_do != orig_what_to_do))
{
fprintf(stderr, "Error: %s doesn't support multiple contradicting commands.\n",
my_progname);
return 1;
}
return 0; return 0;
} }

View File

@ -1,4 +1,4 @@
/* Copyright 2000-2008 MySQL AB, 2008, 2009 Sun Microsystems, Inc. /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -51,6 +51,8 @@
#include "mysql_version.h" #include "mysql_version.h"
#include "mysqld_error.h" #include "mysqld_error.h"
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
/* Exit codes */ /* Exit codes */
#define EX_USAGE 1 #define EX_USAGE 1
@ -135,6 +137,7 @@ FILE *stderror_file=0;
static char *shared_memory_base_name=0; static char *shared_memory_base_name=0;
#endif #endif
static uint opt_protocol= 0; static uint opt_protocol= 0;
static char *opt_plugin_dir= 0, *opt_default_auth;
/* /*
Dynamic_string wrapper functions. In this file use these Dynamic_string wrapper functions. In this file use these
@ -497,6 +500,13 @@ static struct my_option my_long_options[] =
&where, &where, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, &where, &where, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"xml", 'X', "Dump a database as well formed XML.", 0, 0, 0, GET_NO_ARG, {"xml", 'X', "Dump a database as well formed XML.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0}, NO_ARG, 0, 0, 0, 0, 0, 0},
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"default_auth", OPT_PLUGIN_DIR,
"Default authentication client-side plugin to use.",
(uchar**) &opt_default_auth, (uchar**) &opt_default_auth, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
@ -584,8 +594,7 @@ static void short_usage_sub(void)
static void usage(void) static void usage(void)
{ {
print_version(); print_version();
puts("By Igor Romanenko, Monty, Jani & Sinisa."); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license.\n");
puts("Dumping structure and contents of MySQL databases and tables."); puts("Dumping structure and contents of MySQL databases and tables.");
short_usage_sub(); short_usage_sub();
print_defaults("my",load_default_groups); print_defaults("my",load_default_groups);
@ -1451,6 +1460,13 @@ static int connect_to_db(char *host, char *user,char *passwd)
mysql_options(&mysql_connection,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); mysql_options(&mysql_connection,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
#endif #endif
mysql_options(&mysql_connection, MYSQL_SET_CHARSET_NAME, default_charset); mysql_options(&mysql_connection, MYSQL_SET_CHARSET_NAME, default_charset);
if (opt_plugin_dir && *opt_plugin_dir)
mysql_options(&mysql_connection, MYSQL_PLUGIN_DIR, opt_plugin_dir);
if (opt_default_auth && *opt_default_auth)
mysql_options(&mysql_connection, MYSQL_DEFAULT_AUTH, opt_default_auth);
if (!(mysql= mysql_real_connect(&mysql_connection,host,user,passwd, if (!(mysql= mysql_real_connect(&mysql_connection,host,user,passwd,
NULL,opt_mysql_port,opt_mysql_unix_port, NULL,opt_mysql_port,opt_mysql_unix_port,
0))) 0)))

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2000-2006 MySQL AB, 2009 Sun Microsystems, Inc. /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -32,6 +32,8 @@
#include <my_pthread.h> #include <my_pthread.h>
#endif #endif
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
/* Global Thread counter */ /* Global Thread counter */
uint counter; uint counter;
@ -191,8 +193,7 @@ static void print_version(void)
static void usage(void) static void usage(void)
{ {
print_version(); print_version();
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc."); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license.\n");
printf("\ printf("\
Loads tables from text files in various formats. The base name of the\n\ Loads tables from text files in various formats. The base name of the\n\
text file must be the name of the table that should be used.\n\ text file must be the name of the table that should be used.\n\

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2000-2006 MySQL AB /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -25,6 +25,7 @@
#include <signal.h> #include <signal.h>
#include <stdarg.h> #include <stdarg.h>
#include <sslopt-vars.h> #include <sslopt-vars.h>
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
static char * host=0, *opt_password=0, *user=0; static char * host=0, *opt_password=0, *user=0;
static my_bool opt_show_keys= 0, opt_compress= 0, opt_count=0, opt_status= 0; static my_bool opt_show_keys= 0, opt_compress= 0, opt_count=0, opt_status= 0;
@ -247,8 +248,7 @@ static void print_version(void)
static void usage(void) static void usage(void)
{ {
print_version(); print_version();
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc."); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010)"));
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license.\n");
puts("Shows the structure of a MySQL database (databases, tables, and columns).\n"); puts("Shows the structure of a MySQL database (databases, tables, and columns).\n");
printf("Usage: %s [OPTIONS] [database [table [column]]]\n",my_progname); printf("Usage: %s [OPTIONS] [database [table [column]]]\n",my_progname);
puts("\n\ puts("\n\

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2005 MySQL AB, 2009 Sun Microsystems, Inc. /* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -11,12 +11,7 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
original idea: Brian Aker via playing with ab for too many years
coded by: Patrick Galbraith
*/
/* /*
MySQL Slap MySQL Slap
@ -94,6 +89,7 @@ TODO:
#include <sys/wait.h> #include <sys/wait.h>
#endif #endif
#include <ctype.h> #include <ctype.h>
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
#ifdef __WIN__ #ifdef __WIN__
#define srandom srand #define srandom srand
@ -686,8 +682,7 @@ static void print_version(void)
static void usage(void) static void usage(void)
{ {
print_version(); print_version();
puts("Copyright (C) 2005 MySQL AB"); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2005, 2010"));
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license.\n");
puts("Run a query multiple times against the server.\n"); puts("Run a query multiple times against the server.\n");
printf("Usage: %s [OPTIONS]\n",my_progname); printf("Usage: %s [OPTIONS]\n",my_progname);
print_defaults("my",load_default_groups); print_defaults("my",load_default_groups);

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2000 MySQL AB /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -36,6 +36,7 @@
#include "client_priv.h" #include "client_priv.h"
#include <mysql_version.h> #include <mysql_version.h>
#include <mysqld_error.h> #include <mysqld_error.h>
#include <sql_common.h>
#include <m_ctype.h> #include <m_ctype.h>
#include <my_dir.h> #include <my_dir.h>
#include <hash.h> #include <hash.h>
@ -51,6 +52,8 @@
#include <signal.h> #include <signal.h>
#include <my_stacktrace.h> #include <my_stacktrace.h>
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
#ifdef __WIN__ #ifdef __WIN__
#include <crtdbg.h> #include <crtdbg.h>
#define SIGNAL_FMT "exception 0x%x" #define SIGNAL_FMT "exception 0x%x"
@ -112,6 +115,7 @@ static my_bool parsing_disabled= 0;
static my_bool display_result_vertically= FALSE, display_result_lower= FALSE, static my_bool display_result_vertically= FALSE, display_result_lower= FALSE,
display_metadata= FALSE, display_result_sorted= FALSE; display_metadata= FALSE, display_result_sorted= FALSE;
static my_bool disable_query_log= 0, disable_result_log= 0; static my_bool disable_query_log= 0, disable_result_log= 0;
static my_bool disable_connect_log= 1;
static my_bool disable_warnings= 0; static my_bool disable_warnings= 0;
static my_bool disable_info= 1; static my_bool disable_info= 1;
static my_bool abort_on_error= 1; static my_bool abort_on_error= 1;
@ -190,6 +194,8 @@ static ulonglong timer_now(void);
static ulong connection_retry_sleep= 100000; /* Microseconds */ static ulong connection_retry_sleep= 100000; /* Microseconds */
static char *opt_plugin_dir= 0;
/* Precompiled re's */ /* Precompiled re's */
static my_regex_t ps_re; /* the query can be run using PS protocol */ static my_regex_t ps_re; /* the query can be run using PS protocol */
static my_regex_t sp_re; /* the query can be run as a SP */ static my_regex_t sp_re; /* the query can be run as a SP */
@ -227,8 +233,9 @@ typedef struct
int str_val_len; int str_val_len;
int int_val; int int_val;
int alloced_len; int alloced_len;
int int_dirty; /* do not update string if int is updated until first read */ bool int_dirty; /* do not update string if int is updated until first read */
int alloced; bool is_int;
bool alloced;
} VAR; } VAR;
/*Perl/shell-like variable registers */ /*Perl/shell-like variable registers */
@ -257,6 +264,7 @@ struct st_connection
pthread_mutex_t result_mutex; pthread_mutex_t result_mutex;
pthread_cond_t result_cond; pthread_cond_t result_cond;
int query_done; int query_done;
my_bool has_thread;
#endif /*EMBEDDED_LIBRARY*/ #endif /*EMBEDDED_LIBRARY*/
}; };
@ -286,6 +294,7 @@ enum enum_commands {
Q_EVAL_RESULT, Q_EVAL_RESULT,
Q_ENABLE_QUERY_LOG, Q_DISABLE_QUERY_LOG, Q_ENABLE_QUERY_LOG, Q_DISABLE_QUERY_LOG,
Q_ENABLE_RESULT_LOG, Q_DISABLE_RESULT_LOG, Q_ENABLE_RESULT_LOG, Q_DISABLE_RESULT_LOG,
Q_ENABLE_CONNECT_LOG, Q_DISABLE_CONNECT_LOG,
Q_WAIT_FOR_SLAVE_TO_STOP, Q_WAIT_FOR_SLAVE_TO_STOP,
Q_ENABLE_WARNINGS, Q_DISABLE_WARNINGS, Q_ENABLE_WARNINGS, Q_DISABLE_WARNINGS,
Q_ENABLE_INFO, Q_DISABLE_INFO, Q_ENABLE_INFO, Q_DISABLE_INFO,
@ -351,6 +360,8 @@ const char *command_names[]=
/* Enable/disable that the _result_ from a query is logged to result file */ /* Enable/disable that the _result_ from a query is logged to result file */
"enable_result_log", "enable_result_log",
"disable_result_log", "disable_result_log",
"enable_connect_log",
"disable_connect_log",
"wait_for_slave_to_stop", "wait_for_slave_to_stop",
"enable_warnings", "enable_warnings",
"disable_warnings", "disable_warnings",
@ -447,7 +458,7 @@ struct st_command
char *query, *query_buf,*first_argument,*last_argument,*end; char *query, *query_buf,*first_argument,*last_argument,*end;
DYNAMIC_STRING content; DYNAMIC_STRING content;
int first_word_len, query_len; int first_word_len, query_len;
my_bool abort_on_error; my_bool abort_on_error, used_replace;
struct st_expected_errors expected_errors; struct st_expected_errors expected_errors;
char require_file[FN_REFLEN]; char require_file[FN_REFLEN];
enum enum_commands type; enum enum_commands type;
@ -476,7 +487,8 @@ VAR* var_init(VAR* v, const char *name, int name_len, const char *val,
int val_len); int val_len);
VAR* var_get(const char *var_name, const char** var_name_end, VAR* var_get(const char *var_name, const char** var_name_end,
my_bool raw, my_bool ignore_not_existing); my_bool raw, my_bool ignore_not_existing);
void eval_expr(VAR* v, const char *p, const char** p_end); void eval_expr(VAR* v, const char *p, const char** p_end,
bool open_end=false, bool backtick=true);
my_bool match_delimiter(int c, const char *delim, uint length); my_bool match_delimiter(int c, const char *delim, uint length);
void dump_result_to_reject_file(char *buf, int size); void dump_result_to_reject_file(char *buf, int size);
void dump_warning_messages(); void dump_warning_messages();
@ -763,10 +775,9 @@ end_thread:
return 0; return 0;
} }
static void wait_query_thread_done(struct st_connection *con) static void wait_query_thread_done(struct st_connection *con)
{ {
DBUG_ASSERT(con->tid); DBUG_ASSERT(con->has_thread);
if (!con->query_done) if (!con->query_done)
{ {
pthread_mutex_lock(&con->result_mutex); pthread_mutex_lock(&con->result_mutex);
@ -779,7 +790,7 @@ static void wait_query_thread_done(struct st_connection *con)
static void signal_connection_thd(struct st_connection *cn, int command) static void signal_connection_thd(struct st_connection *cn, int command)
{ {
DBUG_ASSERT(cn->tid); DBUG_ASSERT(cn->has_thread);
cn->query_done= 0; cn->query_done= 0;
cn->command= command; cn->command= command;
pthread_mutex_lock(&cn->query_mutex); pthread_mutex_lock(&cn->query_mutex);
@ -791,13 +802,13 @@ static void signal_connection_thd(struct st_connection *cn, int command)
/* /*
Sometimes we try to execute queries when the connection is closed. Sometimes we try to execute queries when the connection is closed.
It's done to make sure it was closed completely. It's done to make sure it was closed completely.
So that if our connection is closed (cn->tid == 0), we just return So that if our connection is closed (cn->has_thread == 0), we just return
the mysql_send_query() result which is an error in this case. the mysql_send_query() result which is an error in this case.
*/ */
static int do_send_query(struct st_connection *cn, const char *q, int q_len) static int do_send_query(struct st_connection *cn, const char *q, int q_len)
{ {
if (!cn->tid) if (!cn->has_thread)
return mysql_send_query(&cn->mysql, q, q_len); return mysql_send_query(&cn->mysql, q, q_len);
cn->cur_query= q; cn->cur_query= q;
cn->cur_query_len= q_len; cn->cur_query_len= q_len;
@ -805,10 +816,9 @@ static int do_send_query(struct st_connection *cn, const char *q, int q_len)
return 0; return 0;
} }
static int do_read_query_result(struct st_connection *cn) static int do_read_query_result(struct st_connection *cn)
{ {
DBUG_ASSERT(cn->tid); DBUG_ASSERT(cn->has_thread);
wait_query_thread_done(cn); wait_query_thread_done(cn);
signal_connection_thd(cn, EMB_READ_QUERY_RESULT); signal_connection_thd(cn, EMB_READ_QUERY_RESULT);
wait_query_thread_done(cn); wait_query_thread_done(cn);
@ -819,12 +829,12 @@ static int do_read_query_result(struct st_connection *cn)
static void emb_close_connection(struct st_connection *cn) static void emb_close_connection(struct st_connection *cn)
{ {
if (!cn->tid) if (!cn->has_thread)
return; return;
wait_query_thread_done(cn); wait_query_thread_done(cn);
signal_connection_thd(cn, EMB_END_CONNECTION); signal_connection_thd(cn, EMB_END_CONNECTION);
pthread_join(cn->tid, NULL); pthread_join(cn->tid, NULL);
cn->tid= 0; cn->has_thread= FALSE;
pthread_mutex_destroy(&cn->query_mutex); pthread_mutex_destroy(&cn->query_mutex);
pthread_cond_destroy(&cn->query_cond); pthread_cond_destroy(&cn->query_cond);
pthread_mutex_destroy(&cn->result_mutex); pthread_mutex_destroy(&cn->result_mutex);
@ -842,9 +852,9 @@ static void init_connection_thd(struct st_connection *cn)
pthread_cond_init(&cn->result_cond, NULL) || pthread_cond_init(&cn->result_cond, NULL) ||
pthread_create(&cn->tid, &cn_thd_attrib, connection_thread, (void*)cn)) pthread_create(&cn->tid, &cn_thd_attrib, connection_thread, (void*)cn))
die("Error in the thread library"); die("Error in the thread library");
cn->has_thread=TRUE;
} }
#else /*EMBEDDED_LIBRARY*/ #else /*EMBEDDED_LIBRARY*/
#define do_send_query(cn,q,q_len) mysql_send_query(&cn->mysql, q, q_len) #define do_send_query(cn,q,q_len) mysql_send_query(&cn->mysql, q, q_len)
@ -1159,8 +1169,8 @@ void handle_command_error(struct st_command *command, uint error)
int i; int i;
if (command->abort_on_error) if (command->abort_on_error)
die("command \"%.*s\" failed with error %d", die("command \"%.*s\" failed with error %d. my_errno=%d",
command->first_word_len, command->query, error); command->first_word_len, command->query, error, my_errno);
i= match_expected_error(command, error, NULL); i= match_expected_error(command, error, NULL);
@ -1171,8 +1181,8 @@ void handle_command_error(struct st_command *command, uint error)
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
if (command->expected_errors.count > 0) if (command->expected_errors.count > 0)
die("command \"%.*s\" failed with wrong error: %d", die("command \"%.*s\" failed with wrong error: %d. my_errno=%d",
command->first_word_len, command->query, error); command->first_word_len, command->query, error, my_errno);
} }
else if (command->expected_errors.err[0].type == ERR_ERRNO && else if (command->expected_errors.err[0].type == ERR_ERRNO &&
command->expected_errors.err[0].code.errnum != 0) command->expected_errors.err[0].code.errnum != 0)
@ -2036,6 +2046,23 @@ static void var_free(void *v)
C_MODE_END C_MODE_END
void var_check_int(VAR *v)
{
char *endptr;
char *str= v->str_val;
/* Initially assume not a number */
v->int_val= 0;
v->is_int= false;
v->int_dirty= false;
if (!str) return;
v->int_val = (int) strtol(str, &endptr, 10);
/* It is an int if strtol consumed something up to end/space/tab */
if (endptr > str && (!*endptr || *endptr == ' ' || *endptr == '\t'))
v->is_int= true;
}
VAR *var_init(VAR *v, const char *name, int name_len, const char *val, VAR *var_init(VAR *v, const char *name, int name_len, const char *val,
int val_len) int val_len)
@ -2046,9 +2073,11 @@ VAR *var_init(VAR *v, const char *name, int name_len, const char *val,
name_len = strlen(name); name_len = strlen(name);
if (!val_len && val) if (!val_len && val)
val_len = strlen(val) ; val_len = strlen(val) ;
if (!val)
val_len= 0;
val_alloc_len = val_len + 16; /* room to grow */ val_alloc_len = val_len + 16; /* room to grow */
if (!(tmp_var=v) && !(tmp_var = (VAR*)my_malloc(sizeof(*tmp_var) if (!(tmp_var=v) && !(tmp_var = (VAR*)my_malloc(sizeof(*tmp_var)
+ name_len+1, MYF(MY_WME)))) + name_len+2, MYF(MY_WME))))
die("Out of memory"); die("Out of memory");
if (name != NULL) if (name != NULL)
@ -2066,15 +2095,13 @@ VAR *var_init(VAR *v, const char *name, int name_len, const char *val,
die("Out of memory"); die("Out of memory");
if (val) if (val)
{
memcpy(tmp_var->str_val, val, val_len); memcpy(tmp_var->str_val, val, val_len);
tmp_var->str_val[val_len]= 0; tmp_var->str_val[val_len]= 0;
}
var_check_int(tmp_var);
tmp_var->name_len = name_len; tmp_var->name_len = name_len;
tmp_var->str_val_len = val_len; tmp_var->str_val_len = val_len;
tmp_var->alloced_len = val_alloc_len; tmp_var->alloced_len = val_alloc_len;
tmp_var->int_val = (val) ? atoi(val) : 0;
tmp_var->int_dirty = 0;
return tmp_var; return tmp_var;
} }
@ -2135,7 +2162,7 @@ VAR* var_get(const char *var_name, const char **var_name_end, my_bool raw,
if (!raw && v->int_dirty) if (!raw && v->int_dirty)
{ {
sprintf(v->str_val, "%d", v->int_val); sprintf(v->str_val, "%d", v->int_val);
v->int_dirty = 0; v->int_dirty= false;
v->str_val_len = strlen(v->str_val); v->str_val_len = strlen(v->str_val);
} }
if (var_name_end) if (var_name_end)
@ -2197,7 +2224,7 @@ void var_set(const char *var_name, const char *var_name_end,
if (v->int_dirty) if (v->int_dirty)
{ {
sprintf(v->str_val, "%d", v->int_val); sprintf(v->str_val, "%d", v->int_val);
v->int_dirty= 0; v->int_dirty=false;
v->str_val_len= strlen(v->str_val); v->str_val_len= strlen(v->str_val);
} }
/* setenv() expects \0-terminated strings */ /* setenv() expects \0-terminated strings */
@ -2267,8 +2294,14 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
DBUG_ENTER("var_query_set"); DBUG_ENTER("var_query_set");
LINT_INIT(res); LINT_INIT(res);
/* Only white space or ) allowed past ending ` */
while (end > query && *end != '`') while (end > query && *end != '`')
{
if (*end && (*end != ' ' && *end != '\t' && *end != '\n' && *end != ')'))
die("Spurious text after `query` expression");
--end; --end;
}
if (query == end) if (query == end)
die("Syntax error in query, missing '`'"); die("Syntax error in query, missing '`'");
++query; ++query;
@ -2306,7 +2339,8 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
dynstr_append_mem(&result, "\t", 1); dynstr_append_mem(&result, "\t", 1);
} }
end= result.str + result.length-1; end= result.str + result.length-1;
eval_expr(var, result.str, (const char**) &end); /* Evaluation should not recurse via backtick */
eval_expr(var, result.str, (const char**) &end, false, false);
dynstr_free(&result); dynstr_free(&result);
} }
else else
@ -2497,6 +2531,7 @@ void var_set_query_get_value(struct st_command *command, VAR *var)
void var_copy(VAR *dest, VAR *src) void var_copy(VAR *dest, VAR *src)
{ {
dest->int_val= src->int_val; dest->int_val= src->int_val;
dest->is_int= src->is_int;
dest->int_dirty= src->int_dirty; dest->int_dirty= src->int_dirty;
/* Alloc/realloc data for str_val in dest */ /* Alloc/realloc data for str_val in dest */
@ -2515,7 +2550,8 @@ void var_copy(VAR *dest, VAR *src)
} }
void eval_expr(VAR *v, const char *p, const char **p_end) void eval_expr(VAR *v, const char *p, const char **p_end,
bool open_end, bool backtick)
{ {
DBUG_ENTER("eval_expr"); DBUG_ENTER("eval_expr");
@ -2533,14 +2569,14 @@ void eval_expr(VAR *v, const char *p, const char **p_end)
/* Make sure there was just a $variable and nothing else */ /* Make sure there was just a $variable and nothing else */
const char* end= *p_end + 1; const char* end= *p_end + 1;
if (end < expected_end) if (end < expected_end && !open_end)
die("Found junk '%.*s' after $variable in expression", die("Found junk '%.*s' after $variable in expression",
(int)(expected_end - end - 1), end); (int)(expected_end - end - 1), end);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
if (*p == '`') if (*p == '`' && backtick)
{ {
var_query_set(v, p, p_end); var_query_set(v, p, p_end);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
@ -2580,9 +2616,7 @@ void eval_expr(VAR *v, const char *p, const char **p_end)
v->str_val_len = new_val_len; v->str_val_len = new_val_len;
memcpy(v->str_val, p, new_val_len); memcpy(v->str_val, p, new_val_len);
v->str_val[new_val_len] = 0; v->str_val[new_val_len] = 0;
v->int_val=atoi(p); var_check_int(v);
DBUG_PRINT("info", ("atoi on '%s', returns: %d", p, v->int_val));
v->int_dirty=0;
} }
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
@ -2929,6 +2963,8 @@ int do_modify_var(struct st_command *command,
die("The argument to %.*s must be a variable (start with $)", die("The argument to %.*s must be a variable (start with $)",
command->first_word_len, command->query); command->first_word_len, command->query);
v= var_get(p, &p, 1, 0); v= var_get(p, &p, 1, 0);
if (! v->is_int)
die("Cannot perform inc/dec on a non-numeric value");
switch (op) { switch (op) {
case DO_DEC: case DO_DEC:
v->int_val--; v->int_val--;
@ -2940,7 +2976,7 @@ int do_modify_var(struct st_command *command,
die("Invalid operator to do_modify_var"); die("Invalid operator to do_modify_var");
break; break;
} }
v->int_dirty= 1; v->int_dirty= true;
command->last_argument= (char*)++p; command->last_argument= (char*)++p;
return 0; return 0;
} }
@ -3414,7 +3450,7 @@ static int get_list_files(DYNAMIC_STRING *ds, const DYNAMIC_STRING *ds_dirname,
if (ds_wild && ds_wild->length && if (ds_wild && ds_wild->length &&
wild_compare(file->name, ds_wild->str, 0)) wild_compare(file->name, ds_wild->str, 0))
continue; continue;
dynstr_append(ds, file->name); replace_dynstr_append(ds, file->name);
dynstr_append(ds, "\n"); dynstr_append(ds, "\n");
} }
set_wild_chars(0); set_wild_chars(0);
@ -3444,6 +3480,7 @@ static void do_list_files(struct st_command *command)
{"file", ARG_STRING, FALSE, &ds_wild, "Filename (incl. wildcard)"} {"file", ARG_STRING, FALSE, &ds_wild, "Filename (incl. wildcard)"}
}; };
DBUG_ENTER("do_list_files"); DBUG_ENTER("do_list_files");
command->used_replace= 1;
check_command_args(command, command->first_argument, check_command_args(command, command->first_argument,
list_files_args, list_files_args,
@ -3485,6 +3522,7 @@ static void do_list_files_write_file_command(struct st_command *command,
{"file", ARG_STRING, FALSE, &ds_wild, "Filename (incl. wildcard)"} {"file", ARG_STRING, FALSE, &ds_wild, "Filename (incl. wildcard)"}
}; };
DBUG_ENTER("do_list_files_write_file"); DBUG_ENTER("do_list_files_write_file");
command->used_replace= 1;
check_command_args(command, command->first_argument, check_command_args(command, command->first_argument,
list_files_args, list_files_args,
@ -3870,13 +3908,15 @@ void do_change_user(struct st_command *command)
} }
if (!ds_user.length) if (!ds_user.length)
{
dynstr_set(&ds_user, mysql->user); dynstr_set(&ds_user, mysql->user);
if (!ds_passwd.length) if (!ds_passwd.length)
dynstr_set(&ds_passwd, mysql->passwd); dynstr_set(&ds_passwd, mysql->passwd);
if (!ds_db.length) if (!ds_db.length)
dynstr_set(&ds_db, mysql->db); dynstr_set(&ds_db, mysql->db);
}
DBUG_PRINT("info",("connection: '%s' user: '%s' password: '%s' database: '%s'", DBUG_PRINT("info",("connection: '%s' user: '%s' password: '%s' database: '%s'",
cur_con->name, ds_user.str, ds_passwd.str, ds_db.str)); cur_con->name, ds_user.str, ds_passwd.str, ds_db.str));
@ -3982,7 +4022,18 @@ void do_perl(struct st_command *command)
if (!error) if (!error)
my_delete(temp_file_path, MYF(0)); my_delete(temp_file_path, MYF(0));
handle_command_error(command, WEXITSTATUS(error)); /* Check for error code that indicates perl could not be started */
int exstat= WEXITSTATUS(error);
#ifdef __WIN__
if (exstat == 1)
/* Text must begin 'perl not found' as mtr looks for it */
abort_not_supported_test("perl not found in path or did not start");
#else
if (exstat == 127)
abort_not_supported_test("perl not found in path");
#endif
else
handle_command_error(command, exstat);
} }
dynstr_free(&ds_delimiter); dynstr_free(&ds_delimiter);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
@ -4195,7 +4246,7 @@ int do_save_master_pos()
const char latest_applied_binlog_epoch_str[]= const char latest_applied_binlog_epoch_str[]=
"latest_applied_binlog_epoch="; "latest_applied_binlog_epoch=";
if (count) if (count)
sleep(1); my_sleep(100*1000); /* 100ms */
if (mysql_query(mysql, query= "show engine ndb status")) if (mysql_query(mysql, query= "show engine ndb status"))
die("failed in '%s': %d %s", query, die("failed in '%s': %d %s", query,
mysql_errno(mysql), mysql_error(mysql)); mysql_errno(mysql), mysql_error(mysql));
@ -4284,7 +4335,7 @@ int do_save_master_pos()
count++; count++;
if (latest_handled_binlog_epoch >= start_epoch) if (latest_handled_binlog_epoch >= start_epoch)
do_continue= 0; do_continue= 0;
else if (count > 30) else if (count > 300) /* 30s */
{ {
break; break;
} }
@ -4896,6 +4947,16 @@ void select_connection_name(const char *name)
set_current_connection(con); set_current_connection(con);
/* Connection logging if enabled */
if (!disable_connect_log && !disable_query_log)
{
DYNAMIC_STRING *ds= &ds_res;
dynstr_append_mem(ds, "connection ", 11);
replace_dynstr_append(ds, name);
dynstr_append_mem(ds, ";\n", 2);
}
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
@ -4983,6 +5044,17 @@ void do_close_connection(struct st_command *command)
var_set_string("$CURRENT_CONNECTION", con->name); var_set_string("$CURRENT_CONNECTION", con->name);
} }
/* Connection logging if enabled */
if (!disable_connect_log && !disable_query_log)
{
DYNAMIC_STRING *ds= &ds_res;
dynstr_append_mem(ds, "disconnect ", 11);
replace_dynstr_append(ds, ds_connection.str);
dynstr_append_mem(ds, ";\n", 2);
}
dynstr_free(&ds_connection);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
@ -5117,6 +5189,13 @@ int connect_n_handle_errors(struct st_command *command,
dynstr_append_mem(ds, delimiter, delimiter_length); dynstr_append_mem(ds, delimiter, delimiter_length);
dynstr_append_mem(ds, "\n", 1); dynstr_append_mem(ds, "\n", 1);
} }
/* Simlified logging if enabled */
if (!disable_connect_log && !disable_query_log)
{
replace_dynstr_append(ds, command->query);
dynstr_append_mem(ds, ";\n", 2);
}
while (!mysql_real_connect(con, host, user, pass, db, port, sock ? sock: 0, while (!mysql_real_connect(con, host, user, pass, db, port, sock ? sock: 0,
CLIENT_MULTI_STATEMENTS)) CLIENT_MULTI_STATEMENTS))
{ {
@ -5207,6 +5286,7 @@ void do_connect(struct st_command *command)
static DYNAMIC_STRING ds_port; static DYNAMIC_STRING ds_port;
static DYNAMIC_STRING ds_sock; static DYNAMIC_STRING ds_sock;
static DYNAMIC_STRING ds_options; static DYNAMIC_STRING ds_options;
static DYNAMIC_STRING ds_default_auth;
#ifdef HAVE_SMEM #ifdef HAVE_SMEM
static DYNAMIC_STRING ds_shm; static DYNAMIC_STRING ds_shm;
#endif #endif
@ -5218,7 +5298,8 @@ void do_connect(struct st_command *command)
{ "database", ARG_STRING, FALSE, &ds_database, "Database to select after connect" }, { "database", ARG_STRING, FALSE, &ds_database, "Database to select after connect" },
{ "port", ARG_STRING, FALSE, &ds_port, "Port to connect to" }, { "port", ARG_STRING, FALSE, &ds_port, "Port to connect to" },
{ "socket", ARG_STRING, FALSE, &ds_sock, "Socket to connect with" }, { "socket", ARG_STRING, FALSE, &ds_sock, "Socket to connect with" },
{ "options", ARG_STRING, FALSE, &ds_options, "Options to use while connecting" } { "options", ARG_STRING, FALSE, &ds_options, "Options to use while connecting" },
{ "default_auth", ARG_STRING, FALSE, &ds_default_auth, "Default authentication to use" }
}; };
DBUG_ENTER("do_connect"); DBUG_ENTER("do_connect");
@ -5324,8 +5405,13 @@ void do_connect(struct st_command *command)
opt_charsets_dir); opt_charsets_dir);
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
if (opt_use_ssl || con_ssl) if (opt_use_ssl)
con_ssl= 1;
#endif
if (con_ssl)
{ {
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
mysql_ssl_set(&con_slot->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, mysql_ssl_set(&con_slot->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
opt_ssl_capath, opt_ssl_cipher); opt_ssl_capath, opt_ssl_cipher);
#if MYSQL_VERSION_ID >= 50000 #if MYSQL_VERSION_ID >= 50000
@ -5334,40 +5420,47 @@ void do_connect(struct st_command *command)
mysql_options(&con_slot->mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, mysql_options(&con_slot->mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
&opt_ssl_verify_server_cert); &opt_ssl_verify_server_cert);
#endif #endif
}
#endif #endif
}
#ifdef __WIN__
if (con_pipe) if (con_pipe)
{ {
#ifdef __WIN__
opt_protocol= MYSQL_PROTOCOL_PIPE; opt_protocol= MYSQL_PROTOCOL_PIPE;
}
#endif #endif
}
if (opt_protocol) if (opt_protocol)
mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol); mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol);
#ifdef HAVE_SMEM
if (con_shm) if (con_shm)
{ {
#ifdef HAVE_SMEM
uint protocol= MYSQL_PROTOCOL_MEMORY; uint protocol= MYSQL_PROTOCOL_MEMORY;
if (!ds_shm.length) if (!ds_shm.length)
die("Missing shared memory base name"); die("Missing shared memory base name");
mysql_options(&con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME, ds_shm.str); mysql_options(&con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME, ds_shm.str);
mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, &protocol); mysql_options(&con_slot->mysql, MYSQL_OPT_PROTOCOL, &protocol);
#endif
} }
else if(shared_memory_base_name) #ifdef HAVE_SMEM
else if (shared_memory_base_name)
{ {
mysql_options(&con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME, mysql_options(&con_slot->mysql, MYSQL_SHARED_MEMORY_BASE_NAME,
shared_memory_base_name); shared_memory_base_name);
} }
#endif #endif
/* Use default db name */ /* Use default db name */
if (ds_database.length == 0) if (ds_database.length == 0)
dynstr_set(&ds_database, opt_db); dynstr_set(&ds_database, opt_db);
if (opt_plugin_dir && *opt_plugin_dir)
mysql_options(&con_slot->mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
if (ds_default_auth.length)
mysql_options(&con_slot->mysql, MYSQL_DEFAULT_AUTH, ds_default_auth.str);
/* Special database to allow one to connect without a database name */ /* Special database to allow one to connect without a database name */
if (ds_database.length && !strcmp(ds_database.str,"*NO-ONE*")) if (ds_database.length && !strcmp(ds_database.str,"*NO-ONE*"))
dynstr_set(&ds_database, ""); dynstr_set(&ds_database, "");
@ -5396,6 +5489,7 @@ void do_connect(struct st_command *command)
dynstr_free(&ds_port); dynstr_free(&ds_port);
dynstr_free(&ds_sock); dynstr_free(&ds_sock);
dynstr_free(&ds_options); dynstr_free(&ds_options);
dynstr_free(&ds_default_auth);
#ifdef HAVE_SMEM #ifdef HAVE_SMEM
dynstr_free(&ds_shm); dynstr_free(&ds_shm);
#endif #endif
@ -5435,6 +5529,40 @@ int do_done(struct st_command *command)
return 0; return 0;
} }
/* Operands available in if or while conditions */
enum block_op {
EQ_OP,
NE_OP,
GT_OP,
GE_OP,
LT_OP,
LE_OP,
ILLEG_OP
};
enum block_op find_operand(const char *start)
{
char first= *start;
char next= *(start+1);
if (first == '=' && next == '=')
return EQ_OP;
if (first == '!' && next == '=')
return NE_OP;
if (first == '>' && next == '=')
return GE_OP;
if (first == '>')
return GT_OP;
if (first == '<' && next == '=')
return LE_OP;
if (first == '<')
return LT_OP;
return ILLEG_OP;
}
/* /*
Process start of a "if" or "while" statement Process start of a "if" or "while" statement
@ -5460,6 +5588,13 @@ int do_done(struct st_command *command)
A '!' can be used before the <expr> to indicate it should A '!' can be used before the <expr> to indicate it should
be executed if it evaluates to zero. be executed if it evaluates to zero.
<expr> can also be a simple comparison condition:
<variable> <op> <expr>
The left hand side must be a variable, the right hand side can be a
variable, number, string or `query`. Operands are ==, !=, <, <=, >, >=.
== and != can be used for strings, all can be used for numerical values.
*/ */
void do_block(enum block_cmd cmd, struct st_command* command) void do_block(enum block_cmd cmd, struct st_command* command)
@ -5495,11 +5630,16 @@ void do_block(enum block_cmd cmd, struct st_command* command)
if (!expr_start++) if (!expr_start++)
die("missing '(' in %s", cmd_name); die("missing '(' in %s", cmd_name);
while (my_isspace(charset_info, *expr_start))
expr_start++;
/* Check for !<expr> */ /* Check for !<expr> */
if (*expr_start == '!') if (*expr_start == '!')
{ {
not_expr= TRUE; not_expr= TRUE;
expr_start++; /* Step past the '!' */ expr_start++; /* Step past the '!', then any whitespace */
while (*expr_start && my_isspace(charset_info, *expr_start))
expr_start++;
} }
/* Find ending ')' */ /* Find ending ')' */
expr_end= strrchr(expr_start, ')'); expr_end= strrchr(expr_start, ')');
@ -5513,14 +5653,110 @@ void do_block(enum block_cmd cmd, struct st_command* command)
die("Missing '{' after %s. Found \"%s\"", cmd_name, p); die("Missing '{' after %s. Found \"%s\"", cmd_name, p);
var_init(&v,0,0,0,0); var_init(&v,0,0,0,0);
eval_expr(&v, expr_start, &expr_end);
/* If expression starts with a variable, it may be a compare condition */
if (*expr_start == '$')
{
const char *curr_ptr= expr_end;
eval_expr(&v, expr_start, &curr_ptr, true);
while (my_isspace(charset_info, *++curr_ptr))
{}
/* If there was nothing past the variable, skip condition part */
if (curr_ptr == expr_end)
goto NO_COMPARE;
enum block_op operand= find_operand(curr_ptr);
if (operand == ILLEG_OP)
die("Found junk '%.*s' after $variable in condition",
(int)(expr_end - curr_ptr), curr_ptr);
/* We could silently allow this, but may be confusing */
if (not_expr)
die("Negation and comparison should not be combined, please rewrite");
/* Skip the 1 or 2 chars of the operand, then white space */
if (operand == LT_OP || operand == GT_OP)
{
curr_ptr++;
}
else
{
curr_ptr+= 2;
}
while (my_isspace(charset_info, *curr_ptr))
curr_ptr++;
if (curr_ptr == expr_end)
die("Missing right operand in comparison");
/* Strip off trailing white space */
while (my_isspace(charset_info, expr_end[-1]))
expr_end--;
/* strip off ' or " around the string */
if (*curr_ptr == '\'' || *curr_ptr == '"')
{
if (expr_end[-1] != *curr_ptr)
die("Unterminated string value");
curr_ptr++;
expr_end--;
}
VAR v2;
var_init(&v2,0,0,0,0);
eval_expr(&v2, curr_ptr, &expr_end);
if ((operand!=EQ_OP && operand!=NE_OP) && ! (v.is_int && v2.is_int))
die ("Only == and != are supported for string values");
/* Now we overwrite the first variable with 0 or 1 (for false or true) */
switch (operand)
{
case EQ_OP:
if (v.is_int)
v.int_val= (v2.is_int && v2.int_val == v.int_val);
else
v.int_val= !strcmp (v.str_val, v2.str_val);
break;
case NE_OP:
if (v.is_int)
v.int_val= ! (v2.is_int && v2.int_val == v.int_val);
else
v.int_val= (strcmp (v.str_val, v2.str_val) != 0);
break;
case LT_OP:
v.int_val= (v.int_val < v2.int_val);
break;
case LE_OP:
v.int_val= (v.int_val <= v2.int_val);
break;
case GT_OP:
v.int_val= (v.int_val > v2.int_val);
break;
case GE_OP:
v.int_val= (v.int_val >= v2.int_val);
break;
case ILLEG_OP:
die("Impossible operator, this cannot happen");
}
v.is_int= TRUE;
var_free(&v2);
} else
{
if (*expr_start != '`' && ! my_isdigit(charset_info, *expr_start))
die("Expression in if/while must beging with $, ` or a number");
eval_expr(&v, expr_start, &expr_end);
}
NO_COMPARE:
/* Define inner block */ /* Define inner block */
cur_block++; cur_block++;
cur_block->cmd= cmd; cur_block->cmd= cmd;
if (v.int_val) if (v.is_int)
{ {
cur_block->ok= TRUE; cur_block->ok= (v.int_val != 0);
} else } else
/* Any non-empty string which does not begin with 0 is also TRUE */ /* Any non-empty string which does not begin with 0 is also TRUE */
{ {
@ -5797,7 +6033,7 @@ int read_line(char *buf, int size)
/* Could be a multibyte character */ /* Could be a multibyte character */
/* This code is based on the code in "sql_load.cc" */ /* This code is based on the code in "sql_load.cc" */
#ifdef USE_MB #ifdef USE_MB
int charlen = my_mbcharlen(charset_info, c); int charlen = my_mbcharlen(charset_info, (unsigned char) c);
/* We give up if multibyte character is started but not */ /* We give up if multibyte character is started but not */
/* completed before we pass buf_end */ /* completed before we pass buf_end */
if ((charlen > 1) && (p + charlen) <= buf_end) if ((charlen > 1) && (p + charlen) <= buf_end)
@ -5809,16 +6045,16 @@ int read_line(char *buf, int size)
for (i= 1; i < charlen; i++) for (i= 1; i < charlen; i++)
{ {
c= my_getc(cur_file->file);
if (feof(cur_file->file)) if (feof(cur_file->file))
goto found_eof; goto found_eof;
c= my_getc(cur_file->file);
*p++ = c; *p++ = c;
} }
if (! my_ismbchar(charset_info, mb_start, p)) if (! my_ismbchar(charset_info, mb_start, p))
{ {
/* It was not a multiline char, push back the characters */ /* It was not a multiline char, push back the characters */
/* We leave first 'c', i.e. pretend it was a normal char */ /* We leave first 'c', i.e. pretend it was a normal char */
while (p > mb_start) while (p-1 > mb_start)
my_ungetc(*--p); my_ungetc(*--p);
} }
} }
@ -6166,6 +6402,9 @@ static struct my_option my_long_options[] =
"Number of seconds before connection timeout.", "Number of seconds before connection timeout.",
&opt_connect_timeout, &opt_connect_timeout, 0, GET_UINT, REQUIRED_ARG, &opt_connect_timeout, &opt_connect_timeout, 0, GET_UINT, REQUIRED_ARG,
120, 0, 3600 * 12, 0, 0, 0}, 120, 0, 3600 * 12, 0, 0, 0},
{"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
(uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
@ -6179,8 +6418,7 @@ void print_version(void)
void usage() void usage()
{ {
print_version(); print_version();
printf("MySQL AB, by Sasha, Matt, Monty & Jani\n"); puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
printf("This software comes with ABSOLUTELY NO WARRANTY\n\n");
printf("Runs a test against the mysql server and compares output with a results file.\n\n"); printf("Runs a test against the mysql server and compares output with a results file.\n\n");
printf("Usage: %s [OPTIONS] [database] < test_file\n", my_progname); printf("Usage: %s [OPTIONS] [database] < test_file\n", my_progname);
my_print_help(my_long_options); my_print_help(my_long_options);
@ -7434,11 +7672,13 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
(flags & QUERY_REAP_FLAG)); (flags & QUERY_REAP_FLAG));
DBUG_ENTER("run_query"); DBUG_ENTER("run_query");
init_dynamic_string(&ds_warnings, NULL, 0, 256);
if (cn->pending && (flags & QUERY_SEND_FLAG)) if (cn->pending && (flags & QUERY_SEND_FLAG))
die ("Cannot run query on connection between send and reap"); die ("Cannot run query on connection between send and reap");
if (!(flags & QUERY_SEND_FLAG) && !cn->pending)
die ("Cannot reap on a connection without pending send");
init_dynamic_string(&ds_warnings, NULL, 0, 256);
/* /*
Evaluate query if this is an eval command Evaluate query if this is an eval command
*/ */
@ -7596,7 +7836,7 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
ds, &ds_warnings); ds, &ds_warnings);
dynstr_free(&ds_warnings); dynstr_free(&ds_warnings);
if (command->type == Q_EVAL) if (command->type == Q_EVAL || command->type == Q_SEND_EVAL)
dynstr_free(&eval_query); dynstr_free(&eval_query);
if (display_result_sorted) if (display_result_sorted)
@ -7702,6 +7942,16 @@ void init_re(void)
int match_re(my_regex_t *re, char *str) int match_re(my_regex_t *re, char *str)
{ {
while (my_isspace(charset_info, *str))
str++;
if (str[0] == '/' && str[1] == '*')
{
char *comm_end= strstr (str, "*/");
if (! comm_end)
die("Statement is unterminated comment");
str= comm_end + 2;
}
int err= my_regexec(re, str, (size_t)0, NULL, 0); int err= my_regexec(re, str, (size_t)0, NULL, 0);
if (err == 0) if (err == 0)
@ -7840,13 +8090,16 @@ static void dump_backtrace(void)
{ {
struct st_connection *conn= cur_con; struct st_connection *conn= cur_con;
my_safe_print_str("read_command_buf", read_command_buf, fprintf(stderr, "read_command_buf (%p): ", read_command_buf);
sizeof(read_command_buf)); my_safe_print_str(read_command_buf, sizeof(read_command_buf));
if (conn) if (conn)
{ {
my_safe_print_str("conn->name", conn->name, conn->name_len); fprintf(stderr, "conn->name (%p): ", conn->name);
my_safe_print_str(conn->name, conn->name_len);
#ifdef EMBEDDED_LIBRARY #ifdef EMBEDDED_LIBRARY
my_safe_print_str("conn->cur_query", conn->cur_query, conn->cur_query_len); fprintf(stderr, "conn->cur_query (%p): ", conn->cur_query);
my_safe_print_str(conn->cur_query, conn->cur_query_len);
#endif #endif
} }
fputs("Attempting backtrace...\n", stderr); fputs("Attempting backtrace...\n", stderr);
@ -8031,6 +8284,14 @@ int main(int argc, char **argv)
var_set_int("$VIEW_PROTOCOL", view_protocol); var_set_int("$VIEW_PROTOCOL", view_protocol);
var_set_int("$CURSOR_PROTOCOL", cursor_protocol); var_set_int("$CURSOR_PROTOCOL", cursor_protocol);
var_set_int("$ENABLED_QUERY_LOG", 1);
var_set_int("$ENABLED_ABORT_ON_ERROR", 1);
var_set_int("$ENABLED_RESULT_LOG", 1);
var_set_int("$ENABLED_CONNECT_LOG", 0);
var_set_int("$ENABLED_WARNINGS", 1);
var_set_int("$ENABLED_INFO", 0);
var_set_int("$ENABLED_METADATA", 0);
DBUG_PRINT("info",("result_file: '%s'", DBUG_PRINT("info",("result_file: '%s'",
result_file_name ? result_file_name : "")); result_file_name ? result_file_name : ""));
verbose_msg("Results saved in '%s'.", verbose_msg("Results saved in '%s'.",
@ -8177,18 +8438,62 @@ int main(int argc, char **argv)
case Q_DISCONNECT: case Q_DISCONNECT:
case Q_DIRTY_CLOSE: case Q_DIRTY_CLOSE:
do_close_connection(command); break; do_close_connection(command); break;
case Q_ENABLE_QUERY_LOG: disable_query_log=0; break; case Q_ENABLE_QUERY_LOG:
case Q_DISABLE_QUERY_LOG: disable_query_log=1; break; disable_query_log= 0;
case Q_ENABLE_ABORT_ON_ERROR: abort_on_error=1; break; var_set_int("$ENABLED_QUERY_LOG", 1);
case Q_DISABLE_ABORT_ON_ERROR: abort_on_error=0; break; break;
case Q_ENABLE_RESULT_LOG: disable_result_log=0; break; case Q_DISABLE_QUERY_LOG:
case Q_DISABLE_RESULT_LOG: disable_result_log=1; break; disable_query_log= 1;
case Q_ENABLE_WARNINGS: disable_warnings=0; break; var_set_int("$ENABLED_QUERY_LOG", 0);
case Q_DISABLE_WARNINGS: disable_warnings=1; break; break;
case Q_ENABLE_INFO: disable_info=0; break; case Q_ENABLE_ABORT_ON_ERROR:
case Q_DISABLE_INFO: disable_info=1; break; abort_on_error= 1;
case Q_ENABLE_METADATA: display_metadata=1; break; var_set_int("$ENABLED_ABORT_ON_ERROR", 1);
case Q_DISABLE_METADATA: display_metadata=0; break; break;
case Q_DISABLE_ABORT_ON_ERROR:
abort_on_error= 0;
var_set_int("$ENABLED_ABORT_ON_ERROR", 0);
break;
case Q_ENABLE_RESULT_LOG:
disable_result_log= 0;
var_set_int("$ENABLED_RESULT_LOG", 1);
break;
case Q_DISABLE_RESULT_LOG:
disable_result_log=1;
var_set_int("$ENABLED_RESULT_LOG", 0);
break;
case Q_ENABLE_CONNECT_LOG:
disable_connect_log=0;
var_set_int("$ENABLED_CONNECT_LOG", 1);
break;
case Q_DISABLE_CONNECT_LOG:
disable_connect_log=1;
var_set_int("$ENABLED_CONNECT_LOG", 0);
break;
case Q_ENABLE_WARNINGS:
disable_warnings= 0;
var_set_int("$ENABLED_WARNINGS", 1);
break;
case Q_DISABLE_WARNINGS:
disable_warnings= 1;
var_set_int("$ENABLED_WARNINGS", 0);
break;
case Q_ENABLE_INFO:
disable_info= 0;
var_set_int("$ENABLED_INFO", 1);
break;
case Q_DISABLE_INFO:
disable_info= 1;
var_set_int("$ENABLED_INFO", 0);
break;
case Q_ENABLE_METADATA:
display_metadata= 1;
var_set_int("$ENABLED_METADATA", 1);
break;
case Q_DISABLE_METADATA:
display_metadata= 0;
var_set_int("$ENABLED_METADATA", 0);
break;
case Q_SOURCE: do_source(command); break; case Q_SOURCE: do_source(command); break;
case Q_SLEEP: do_sleep(command, 0); break; case Q_SLEEP: do_sleep(command, 0); break;
case Q_REAL_SLEEP: do_sleep(command, 1); break; case Q_REAL_SLEEP: do_sleep(command, 1); break;
@ -8479,7 +8784,7 @@ int main(int argc, char **argv)
memset(&saved_expected_errors, 0, sizeof(saved_expected_errors)); memset(&saved_expected_errors, 0, sizeof(saved_expected_errors));
} }
if (command_executed != last_command_executed) if (command_executed != last_command_executed || command->used_replace)
{ {
/* /*
As soon as any command has been executed, As soon as any command has been executed,
@ -9873,6 +10178,7 @@ void free_pointer_array(POINTER_ARRAY *pa)
void replace_dynstr_append_mem(DYNAMIC_STRING *ds, void replace_dynstr_append_mem(DYNAMIC_STRING *ds,
const char *val, int len) const char *val, int len)
{ {
char lower[512];
#ifdef __WIN__ #ifdef __WIN__
fix_win_paths(val, len); fix_win_paths(val, len);
#endif #endif
@ -9880,7 +10186,6 @@ void replace_dynstr_append_mem(DYNAMIC_STRING *ds,
if (display_result_lower) if (display_result_lower)
{ {
/* Convert to lower case, and do this first */ /* Convert to lower case, and do this first */
char lower[512];
char *c= lower; char *c= lower;
for (const char *v= val; *v; v++) for (const char *v= val; *v; v++)
*c++= my_tolower(charset_info, *v); *c++= my_tolower(charset_info, *v);

View File

@ -69,9 +69,13 @@ public:
} }
static void *operator new(size_t size, MEM_ROOT *mem_root) static void *operator new(size_t size, MEM_ROOT *mem_root)
{ return (void*) alloc_root(mem_root, (uint) size); } { return (void*) alloc_root(mem_root, (uint) size); }
static void operator delete(void *ptr_arg,size_t size) static void operator delete(void *ptr_arg, size_t size)
{ TRASH(ptr_arg, size); } {
static void operator delete(void *ptr_arg, MEM_ROOT *mem_root) (void) ptr_arg;
(void) size;
TRASH(ptr_arg, size);
}
static void operator delete(void *, MEM_ROOT *)
{ /* never called */ } { /* never called */ }
~String() { free(); } ~String() { free(); }

View File

@ -1,40 +0,0 @@
EXTRA_DIST = \
cmake_parse_arguments.cmake \
cpack_source_ignore_files.cmake \
package_name.cmake \
configurable_file_content.in \
check_minimal_version.cmake \
create_initial_db.cmake.in \
make_dist.cmake.in \
dtrace.cmake \
abi_check.cmake \
bison.cmake \
configure.pl \
character_sets.cmake \
libutils.cmake \
readline.cmake \
mysql_version.cmake \
install_macros.cmake \
ssl.cmake \
plugin.cmake \
zlib.cmake \
stack_direction.c \
do_abi_check.cmake \
merge_archives_unix.cmake.in \
dtrace_prelink.cmake \
versioninfo.rc.in \
mysql_add_executable.cmake \
tags.cmake \
install_layout.cmake \
build_configurations/mysql_release.cmake \
os/Windows.cmake \
os/WindowsCache.cmake \
os/Linux.cmake \
os/SunOS.cmake \
os/Darwin.cmake \
os/HP-UX.cmake \
os/AIX.cmake \
os/OS400.cmake \
os/Cygwin.cmake

View File

@ -33,6 +33,8 @@ IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_SYSTEM_NAME MATCHES "Linux")
${CMAKE_SOURCE_DIR}/include/mysql.h ${CMAKE_SOURCE_DIR}/include/mysql.h
${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v1.h ${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v1.h
${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v2.h ${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v2.h
${CMAKE_SOURCE_DIR}/include/mysql/client_plugin.h
${CMAKE_SOURCE_DIR}/include/mysql/plugin_auth.h
) )
ADD_CUSTOM_TARGET(abi_check ALL ADD_CUSTOM_TARGET(abi_check ALL

View File

@ -101,8 +101,10 @@ IF(NOT COMPILATION_COMMENT)
ENDIF() ENDIF()
IF(WIN32) IF(WIN32)
# Sign executables with authenticode certificate IF(NOT CMAKE_USING_VC_FREE_TOOLS)
SET(SIGNCODE 1 CACHE BOOL "") # Sign executables with authenticode certificate
SET(SIGNCODE 1 CACHE BOOL "")
ENDIF()
ENDIF() ENDIF()
IF(UNIX) IF(UNIX)
@ -115,13 +117,26 @@ IF(UNIX)
OPTION(WITH_PIC "" ON) # Why? OPTION(WITH_PIC "" ON) # Why?
# Ensure aio is available on Linux (required by InnoDB)
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H) IF(NOT IGNORE_AIO_CHECK)
CHECK_LIBRARY_EXISTS(aio io_queue_init "" HAVE_LIBAIO) # Ensure aio is available on Linux (required by InnoDB)
IF(NOT HAVE_LIBAIO_H OR NOT HAVE_LIBAIO) CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H)
MESSAGE(FATAL_ERROR "aio is required on Linux") CHECK_LIBRARY_EXISTS(aio io_queue_init "" HAVE_LIBAIO)
IF(NOT HAVE_LIBAIO_H OR NOT HAVE_LIBAIO)
MESSAGE(FATAL_ERROR "
aio is required on Linux, you need to install the required library:
Debian/Ubuntu: apt-get install libaio-dev
RedHat/Fedora/Oracle Linux: yum install libaio-devel
SuSE: zypper install libaio-devel
If you really do not want it, pass -DIGNORE_AIO_CHECK to cmake.
")
ENDIF()
ENDIF() ENDIF()
# Enable fast mutexes on Linux
OPTION(WITH_FAST_MUTEXES "" ON)
ENDIF() ENDIF()
ENDIF() ENDIF()
@ -131,12 +146,12 @@ IF(UNIX)
# Default GCC flags # Default GCC flags
IF(CMAKE_COMPILER_IS_GNUCC) IF(CMAKE_COMPILER_IS_GNUCC)
SET(COMMON_C_FLAGS "-g -static-libgcc -fno-omit-frame-pointer") SET(COMMON_C_FLAGS "-g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing")
SET(CMAKE_C_FLAGS_DEBUG "-O ${COMMON_C_FLAGS}") SET(CMAKE_C_FLAGS_DEBUG "-O ${COMMON_C_FLAGS}")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}") SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}")
ENDIF() ENDIF()
IF(CMAKE_COMPILER_IS_GNUCXX) IF(CMAKE_COMPILER_IS_GNUCXX)
SET(COMMON_CXX_FLAGS "-g -static-libgcc -fno-omit-frame-pointer") SET(COMMON_CXX_FLAGS "-g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing")
SET(CMAKE_CXX_FLAGS_DEBUG "-O ${COMMON_CXX_FLAGS}") SET(CMAKE_CXX_FLAGS_DEBUG "-O ${COMMON_CXX_FLAGS}")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}")
ENDIF() ENDIF()
@ -176,9 +191,9 @@ IF(UNIX)
# OSX flags # OSX flags
IF(APPLE) IF(APPLE)
SET(COMMON_C_FLAGS "-g -fno-common") SET(COMMON_C_FLAGS "-g -fno-common -fno-strict-aliasing")
# XXX: why are we using -felide-constructors on OSX? # XXX: why are we using -felide-constructors on OSX?
SET(COMMON_CXX_FLAGS "-g -fno-common -felide-constructors") SET(COMMON_CXX_FLAGS "-g -fno-common -felide-constructors -fno-strict-aliasing")
SET(CMAKE_C_FLAGS_DEBUG "-O ${COMMON_C_FLAGS}") SET(CMAKE_C_FLAGS_DEBUG "-O ${COMMON_C_FLAGS}")
SET(CMAKE_CXX_FLAGS_DEBUG "-O ${COMMON_CXX_FLAGS}") SET(CMAKE_CXX_FLAGS_DEBUG "-O ${COMMON_CXX_FLAGS}")
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os ${COMMON_C_FLAGS}") SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os ${COMMON_C_FLAGS}")
@ -219,22 +234,4 @@ IF(UNIX)
ENDIF() ENDIF()
ENDIF() ENDIF()
ENDIF() ENDIF()
IF(CMAKE_C_FLAGS_DEBUG)
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}"
CACHE STRING "Debug C compile flags")
ENDIF()
IF(CMAKE_CXX_FLAGS_DEBUG)
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}"
CACHE STRING "Debug C++ compile flags")
ENDIF()
IF(CMAKE_C_FLAGS_RELWITHDEBINFO)
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}"
CACHE STRING "RelWithDebInfo C compile flags")
ENDIF()
IF(CMAKE_CXX_FLAGS_RELWITHDEBINFO)
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}"
CACHE STRING "RelWithDebInfo C++ compile flags")
ENDIF()
ENDIF() ENDIF()

View File

@ -15,7 +15,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Handy macro to parse macro arguments # Handy macro to parse macro arguments
MACRO(CMAKE_PARSE_ARGUMENTS prefix arg_names option_names) MACRO(MYSQL_PARSE_ARGUMENTS prefix arg_names option_names)
SET(DEFAULT_ARGS) SET(DEFAULT_ARGS)
FOREACH(arg_name ${arg_names}) FOREACH(arg_name ${arg_names})
SET(${prefix}_${arg_name}) SET(${prefix}_${arg_name})

View File

@ -185,6 +185,11 @@ foreach my $option (@ARGV)
($option =~ /enable/ ? "1" : "0"); ($option =~ /enable/ ? "1" : "0");
next; next;
} }
if ($option =~ /with-comment=/)
{
$cmakeargs = $cmakeargs." \"-DWITH_COMMENT=".substr($option,13)."\"";
next;
}
$option = uc($option); $option = uc($option);
$option =~ s/-/_/g; $option =~ s/-/_/g;

View File

@ -53,23 +53,27 @@
SET(abi_check_out ${BINARY_DIR}/abi_check.out) SET(abi_check_out ${BINARY_DIR}/abi_check.out)
FOREACH(file ${ABI_HEADERS}) FOREACH(file ${ABI_HEADERS})
SET(tmpfile ${file}.pp.tmp) GET_FILENAME_COMPONENT(header_basename ${file} NAME)
EXECUTE_PROCESS( SET(tmpfile ${BINARY_DIR}/${header_basename}.pp.tmp)
COMMAND ${COMPILER}
-E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include EXECUTE_PROCESS(
-I${BINARY_DIR}/include -I${SOURCE_DIR}/include/mysql -I${SOURCE_DIR}/sql COMMAND ${COMPILER}
${file} -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include
ERROR_QUIET OUTPUT_FILE ${tmpfile}) -I${BINARY_DIR}/include -I${SOURCE_DIR}/include/mysql -I${SOURCE_DIR}/sql
EXECUTE_PROCESS( ${file}
COMMAND sed -e ERROR_QUIET OUTPUT_FILE ${tmpfile})
"/^# /d" -e "/^[ ]*$/d" -e "/^#pragma GCC set_debug_pwd/d" -e "/^#ident/d" EXECUTE_PROCESS(
RESULT_VARIABLE result OUTPUT_FILE ${abi_check_out} INPUT_FILE ${tmpfile}) COMMAND sed -e "/^# /d"
-e "/^[ ]*$/d"
-e "/^#pragma GCC set_debug_pwd/d"
-e "/^#ident/d"
RESULT_VARIABLE result OUTPUT_FILE ${abi_check_out} INPUT_FILE ${tmpfile})
IF(NOT ${result} EQUAL 0) IF(NOT ${result} EQUAL 0)
MESSAGE(FATAL_ERROR "sed returned error ${result}") MESSAGE(FATAL_ERROR "sed returned error ${result}")
ENDIF() ENDIF()
FILE(REMOVE ${tmpfile}) FILE(REMOVE ${tmpfile})
EXECUTE_PROCESS(COMMAND diff -w ${file}.pp ${abi_check_out} RESULT_VARIABLE EXECUTE_PROCESS(
result) COMMAND diff -w ${file}.pp ${abi_check_out} RESULT_VARIABLE result)
IF(NOT ${result} EQUAL 0) IF(NOT ${result} EQUAL 0)
MESSAGE(FATAL_ERROR MESSAGE(FATAL_ERROR
"ABI check found difference between ${file}.pp and ${abi_check_out}") "ABI check found difference between ${file}.pp and ${abi_check_out}")

View File

@ -153,13 +153,23 @@ ENDFUNCTION()
# to mysqld. # to mysqld.
MACRO (DTRACE_INSTRUMENT_STATIC_LIBS target libs) MACRO (DTRACE_INSTRUMENT_STATIC_LIBS target libs)
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND ENABLE_DTRACE) IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND ENABLE_DTRACE)
# Filter out non-static libraries in the list, if any
SET(static_libs)
FOREACH(lib ${libs}) FOREACH(lib ${libs})
GET_TARGET_PROPERTY(libtype ${lib} TYPE)
IF(libtype MATCHES STATIC_LIBRARY)
SET(static_libs ${static_lics} ${lib})
ENDIF()
ENDFOREACH()
FOREACH(lib ${static_libs})
SET(dirs ${dirs} ${TARGET_OBJECT_DIRECTORY_${lib}}) SET(dirs ${dirs} ${TARGET_OBJECT_DIRECTORY_${lib}})
ENDFOREACH() ENDFOREACH()
SET (obj ${CMAKE_CURRENT_BINARY_DIR}/${target}_dtrace_all.o) SET (obj ${CMAKE_CURRENT_BINARY_DIR}/${target}_dtrace_all.o)
ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND(
OUTPUT ${obj} OUTPUT ${obj}
DEPENDS ${libs} DEPENDS ${static_libs}
COMMAND ${CMAKE_COMMAND} COMMAND ${CMAKE_COMMAND}
-DDTRACE=${DTRACE} -DDTRACE=${DTRACE}
-DOUTFILE=${obj} -DOUTFILE=${obj}

View File

@ -26,7 +26,7 @@
# Build as per default RPM layout, with prefix=/usr # Build as per default RPM layout, with prefix=/usr
# #
# DEB # DEB
# Build as per STANDALONE, prefix=/opt/mysql-$major.$minor # Build as per STANDALONE, prefix=/opt/mysql/server-$major.$minor
# #
# SVR4 # SVR4
# Solaris package layout suitable for pkg* tools, prefix=/opt/mysql/mysql # Solaris package layout suitable for pkg* tools, prefix=/opt/mysql/mysql
@ -59,19 +59,22 @@
# - INSTALL_SUPPORTFILESDIR (various extra support files) # - INSTALL_SUPPORTFILESDIR (various extra support files)
# #
# - INSTALL_MYSQLDATADIR (data directory) # - INSTALL_MYSQLDATADIR (data directory)
#
# When changing this page, _please_ do not forget to update public Wiki
# http://forge.mysql.com/wiki/CMake#Fine-tuning_installation_paths
IF(NOT INSTALL_LAYOUT) IF(NOT INSTALL_LAYOUT)
SET(DEFAULT_INSTALL_LAYOUT "STANDALONE") SET(DEFAULT_INSTALL_LAYOUT "STANDALONE")
ENDIF() ENDIF()
SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}" SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}"
CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer) or UNIX") CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer), RPM, DEB, SVR4")
IF(UNIX) IF(UNIX)
IF(INSTALL_LAYOUT MATCHES "RPM") IF(INSTALL_LAYOUT MATCHES "RPM")
SET(default_prefix "/usr") SET(default_prefix "/usr")
ELSEIF(INSTALL_LAYOUT MATCHES "DEB") ELSEIF(INSTALL_LAYOUT MATCHES "DEB")
SET(default_prefix "/opt/${MYSQL_BASE_VERSION}") SET(default_prefix "/opt/mysql/server-${MYSQL_BASE_VERSION}")
# This is required to avoid "cpack -GDEB" default of prefix=/usr # This is required to avoid "cpack -GDEB" default of prefix=/usr
SET(CPACK_SET_DESTDIR ON) SET(CPACK_SET_DESTDIR ON)
ELSEIF(INSTALL_LAYOUT MATCHES "SVR4") ELSEIF(INSTALL_LAYOUT MATCHES "SVR4")
@ -83,6 +86,13 @@ IF(UNIX)
SET(CMAKE_INSTALL_PREFIX ${default_prefix} SET(CMAKE_INSTALL_PREFIX ${default_prefix}
CACHE PATH "install prefix" FORCE) CACHE PATH "install prefix" FORCE)
ENDIF() ENDIF()
SET(VALID_INSTALL_LAYOUTS "RPM" "STANDALONE" "DEB" "SVR4")
LIST(FIND VALID_INSTALL_LAYOUTS "${INSTALL_LAYOUT}" ind)
IF(ind EQUAL -1)
MESSAGE(FATAL_ERROR "Invalid INSTALL_LAYOUT parameter:${INSTALL_LAYOUT}."
" Choose between ${VALID_INSTALL_LAYOUTS}" )
ENDIF()
SET(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc" SET(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc"
CACHE PATH "config directory (for my.cnf)") CACHE PATH "config directory (for my.cnf)")
MARK_AS_ADVANCED(SYSCONFDIR) MARK_AS_ADVANCED(SYSCONFDIR)

View File

@ -78,12 +78,14 @@ FUNCTION(INSTALL_MANPAGE file)
ELSE() ELSE()
SET(SECTION man8) SET(SECTION man8)
ENDIF() ENDIF()
INSTALL(FILES "${MANPAGE}" DESTINATION "${INSTALL_MANDIR}/${SECTION}") MESSAGE("huj!")
INSTALL(FILES "${MANPAGE}" DESTINATION "${INSTALL_MANDIR}/${SECTION}"
COMPONENT ManPages)
ENDIF() ENDIF()
ENDFUNCTION() ENDFUNCTION()
FUNCTION(INSTALL_SCRIPT) FUNCTION(INSTALL_SCRIPT)
CMAKE_PARSE_ARGUMENTS(ARG MYSQL_PARSE_ARGUMENTS(ARG
"DESTINATION;COMPONENT" "DESTINATION;COMPONENT"
"" ""
${ARGN} ${ARGN}
@ -137,12 +139,7 @@ IF(UNIX)
STRING(REPLACE "${CMAKE_CFG_INTDIR}" STRING(REPLACE "${CMAKE_CFG_INTDIR}"
"\${CMAKE_INSTALL_CONFIG_NAME}" output ${output}) "\${CMAKE_INSTALL_CONFIG_NAME}" output ${output})
ENDIF() ENDIF()
IF(component) INSTALL(FILES ${output} DESTINATION ${destination} COMPONENT ${component})
SET(COMP COMPONENT ${component})
ELSE()
SET(COMP)
ENDIF()
INSTALL(FILES ${output} DESTINATION ${destination} ${COMP})
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()
@ -205,7 +202,7 @@ ENDMACRO()
# #
FUNCTION(MYSQL_INSTALL_TARGETS) FUNCTION(MYSQL_INSTALL_TARGETS)
CMAKE_PARSE_ARGUMENTS(ARG MYSQL_PARSE_ARGUMENTS(ARG
"DESTINATION;COMPONENT" "DESTINATION;COMPONENT"
"" ""
${ARGN} ${ARGN}
@ -224,8 +221,6 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
IF(SIGNCODE AND SIGNCODE_ENABLED) IF(SIGNCODE AND SIGNCODE_ENABLED)
SIGN_TARGET(${target}) SIGN_TARGET(${target})
ENDIF() ENDIF()
# For Windows, add version info to executables
ADD_VERSION_INFO(${target})
# Install man pages on Unix # Install man pages on Unix
IF(UNIX) IF(UNIX)
GET_TARGET_PROPERTY(target_location ${target} LOCATION) GET_TARGET_PROPERTY(target_location ${target} LOCATION)
@ -249,7 +244,7 @@ SET(DEBUGBUILDDIR "${BINARY_PARENTDIR}/debug" CACHE INTERNAL "Directory of debug
FUNCTION(INSTALL_DEBUG_TARGET target) FUNCTION(INSTALL_DEBUG_TARGET target)
CMAKE_PARSE_ARGUMENTS(ARG MYSQL_PARSE_ARGUMENTS(ARG
"DESTINATION;RENAME;PDB_DESTINATION;COMPONENT" "DESTINATION;RENAME;PDB_DESTINATION;COMPONENT"
"" ""
${ARGN} ${ARGN}

View File

@ -213,7 +213,7 @@ ENDMACRO()
# [OUTPUT_NAME output_name] # [OUTPUT_NAME output_name]
#) #)
MACRO(MERGE_LIBRARIES) MACRO(MERGE_LIBRARIES)
CMAKE_PARSE_ARGUMENTS(ARG MYSQL_PARSE_ARGUMENTS(ARG
"EXPORTS;OUTPUT_NAME;COMPONENT" "EXPORTS;OUTPUT_NAME;COMPONENT"
"STATIC;SHARED;MODULE;NOINSTALL" "STATIC;SHARED;MODULE;NOINSTALL"
${ARGN} ${ARGN}
@ -250,6 +250,9 @@ MACRO(MERGE_LIBRARIES)
ENDFOREACH() ENDFOREACH()
ENDIF() ENDIF()
CREATE_EXPORT_FILE(SRC ${TARGET} "${ARG_EXPORTS}") CREATE_EXPORT_FILE(SRC ${TARGET} "${ARG_EXPORTS}")
IF(NOT ARG_NOINSTALL)
ADD_VERSION_INFO(${TARGET} SHARED SRC)
ENDIF()
ADD_LIBRARY(${TARGET} ${LIBTYPE} ${SRC}) ADD_LIBRARY(${TARGET} ${LIBTYPE} ${SRC})
TARGET_LINK_LIBRARIES(${TARGET} ${LIBS}) TARGET_LINK_LIBRARIES(${TARGET} ${LIBS})
IF(ARG_OUTPUT_NAME) IF(ARG_OUTPUT_NAME)

54
cmake/maintainer.cmake Normal file
View File

@ -0,0 +1,54 @@
# Copyright (c) 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-1301 USA
INCLUDE(CheckCCompilerFlag)
# Setup GCC (GNU C compiler) warning options.
MACRO(SET_MYSQL_MAINTAINER_GNU_C_OPTIONS)
SET(MY_MAINTAINER_WARNINGS
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror")
CHECK_C_COMPILER_FLAG("-Wdeclaration-after-statement"
HAVE_DECLARATION_AFTER_STATEMENT)
IF(HAVE_DECLARATION_AFTER_STATEMENT)
SET(MY_MAINTAINER_DECLARATION_AFTER_STATEMENT
"-Wdeclaration-after-statement")
ENDIF()
SET(MY_MAINTAINER_C_WARNINGS
"${MY_MAINTAINER_WARNINGS} ${MY_MAINTAINER_DECLARATION_AFTER_STATEMENT}"
CACHE STRING "C warning options used in maintainer builds.")
# Do not make warnings in checks into errors.
SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Wno-error")
ENDMACRO()
# Setup G++ (GNU C++ compiler) warning options.
MACRO(SET_MYSQL_MAINTAINER_GNU_CXX_OPTIONS)
SET(MY_MAINTAINER_CXX_WARNINGS
"${MY_MAINTAINER_WARNINGS} -Wno-unused-parameter"
CACHE STRING "C++ warning options used in maintainer builds.")
ENDMACRO()
# Setup ICC (Intel C Compiler) warning options.
MACRO(SET_MYSQL_MAINTAINER_INTEL_C_OPTIONS)
SET(MY_MAINTAINER_WARNINGS "-Wcheck")
SET(MY_MAINTAINER_C_WARNINGS "${MY_MAINTAINER_WARNINGS}"
CACHE STRING "C warning options used in maintainer builds.")
ENDMACRO()
# Setup ICPC (Intel C++ Compiler) warning options.
MACRO(SET_MYSQL_MAINTAINER_INTEL_CXX_OPTIONS)
SET(MY_MAINTAINER_CXX_WARNINGS "${MY_MAINTAINER_WARNINGS}"
CACHE STRING "C++ warning options used in maintainer builds.")
ENDMACRO()

View File

@ -14,19 +14,12 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Make source distribution # Make source distribution
# If bzr is present, run bzr export, add output of BUILD/autorun.sh # If bzr is present, run bzr export.
# if autotools are present, also pack bison output into it.
# Otherwise, just run cpack with source configuration. # Otherwise, just run cpack with source configuration.
SET(CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@") SET(CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@")
SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@") SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "@CPACK_SOURCE_PACKAGE_FILE_NAME@") SET(CPACK_SOURCE_PACKAGE_FILE_NAME "@CPACK_SOURCE_PACKAGE_FILE_NAME@")
SET(GLIBTOOLIZE_EXECUTABLE "@GLIBTOOLIZE_EXECUTABLE@")
SET(LIBTOOLIZE_EXECUTABLE "@LIBTOOLIZE_EXECUTABLE@")
SET(ACLOCAL_EXECUTABLE "@ACLOCAL_EXECUTABLE@")
SET(AUTOCONF_EXECUTABLE "@AUTOCONF_EXECUTABLE@")
SET(AUTOHEADER_EXECUTABLE "@AUTOHEADER_EXECUTABLE@")
SET(AUTOMAKE_EXECUTABLE "@AUTOMAKE_EXECUTABLE@")
SET(CMAKE_CPACK_COMMAND "@CMAKE_CPACK_COMMAND@") SET(CMAKE_CPACK_COMMAND "@CMAKE_CPACK_COMMAND@")
SET(CMAKE_COMMAND "@CMAKE_COMMAND@") SET(CMAKE_COMMAND "@CMAKE_COMMAND@")
SET(BZR_EXECUTABLE "@BZR_EXECUTABLE@") SET(BZR_EXECUTABLE "@BZR_EXECUTABLE@")
@ -101,28 +94,6 @@ IF(NOT BZR_EXECUTABLE)
) )
ENDIF() ENDIF()
# Try to pack output of BUILD/autorun, if autotools are present
IF(GLIBTOOLIZE_EXECUTABLE OR LIBTOOLIZE_EXECUTABLE)
IF(ACLOCAL_EXECUTABLE AND AUTOMAKE_EXECUTABLE AND AUTOCONF_EXECUTABLE
AND AUTOHEADER_EXECUTABLE)
SET(HAVE_AUTOTOOLS 1)
ENDIF()
ENDIF()
IF(HAVE_AUTOTOOLS)
EXECUTE_PROCESS(COMMAND BUILD/autorun.sh
WORKING_DIRECTORY ${PACKAGE_DIR})
ELSE()
MESSAGE( "Autotools not found, resulting source package can only be built"
" with cmake")
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/configure.pl
${PACKAGE_DIR}/configure
COPYONLY)
IF(UNIX)
EXECUTE_PROCESS(COMMAND chmod +x ${PACKAGE_DIR}/configure)
ENDIF()
ENDIF()
# Copy bison output # Copy bison output
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.h CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.h
${PACKAGE_DIR}/sql/sql_yacc.h COPYONLY) ${PACKAGE_DIR}/sql/sql_yacc.h COPYONLY)
@ -138,7 +109,6 @@ ENDIF()
# In case we used CPack, it could have copied some # In case we used CPack, it could have copied some
# extra files that are not usable on different machines. # extra files that are not usable on different machines.
FILE(REMOVE ${PACKAGE_DIR}/CMakeCache.txt) FILE(REMOVE ${PACKAGE_DIR}/CMakeCache.txt)
FILE(REMOVE_RECURSE ${PACKAGE_DIR}/autom4te.cache)
# When packing source, prefer gnu tar to "cmake -P tar" # When packing source, prefer gnu tar to "cmake -P tar"
# cmake does not preserve timestamps.gnuwin32 tar is broken, cygwin is ok # cmake does not preserve timestamps.gnuwin32 tar is broken, cygwin is ok

View File

@ -28,7 +28,7 @@ INCLUDE(cmake_parse_arguments)
FUNCTION (MYSQL_ADD_EXECUTABLE) FUNCTION (MYSQL_ADD_EXECUTABLE)
# Pass-through arguments for ADD_EXECUTABLE # Pass-through arguments for ADD_EXECUTABLE
CMAKE_PARSE_ARGUMENTS(ARG MYSQL_PARSE_ARGUMENTS(ARG
"WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT" "WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT"
"" ""
${ARGN} ${ARGN}
@ -37,7 +37,7 @@ FUNCTION (MYSQL_ADD_EXECUTABLE)
LIST(REMOVE_AT ARG_DEFAULT_ARGS 0) LIST(REMOVE_AT ARG_DEFAULT_ARGS 0)
SET(sources ${ARG_DEFAULT_ARGS}) SET(sources ${ARG_DEFAULT_ARGS})
ADD_VERSION_INFO(${target} EXECUTABLE sources)
ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources}) ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources})
# tell CPack where to install # tell CPack where to install
IF(NOT ARG_EXCLUDE_FROM_ALL) IF(NOT ARG_EXCLUDE_FROM_ALL)

View File

@ -13,17 +13,29 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Read value for a variable from configure.in #
# Global constants, only to be changed between major releases.
#
SET(SHARED_LIB_MAJOR_VERSION "16")
SET(PROTOCOL_VERSION "10")
SET(DOT_FRM_VERSION "6")
# Generate "something" to trigger cmake rerun when VERSION changes
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/VERSION
${CMAKE_BINARY_DIR}/VERSION.dep
)
# Read value for a variable from VERSION.
MACRO(MYSQL_GET_CONFIG_VALUE keyword var) MACRO(MYSQL_GET_CONFIG_VALUE keyword var)
IF(NOT ${var}) IF(NOT ${var})
IF (EXISTS ${CMAKE_SOURCE_DIR}/configure.in) FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION str REGEX "^[ ]*${keyword}=")
FILE (STRINGS ${CMAKE_SOURCE_DIR}/configure.in str REGEX "^[ ]*${keyword}=") IF(str)
IF(str) STRING(REPLACE "${keyword}=" "" str ${str})
STRING(REPLACE "${keyword}=" "" str ${str}) STRING(REGEX REPLACE "[ ].*" "" str "${str}")
STRING(REGEX REPLACE "[ ].*" "" str ${str}) SET(${var} ${str})
SET(${var} ${str} CACHE INTERNAL "Config variable")
ENDIF()
ENDIF() ENDIF()
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()
@ -32,57 +44,32 @@ ENDMACRO()
# Read mysql version for configure script # Read mysql version for configure script
MACRO(GET_MYSQL_VERSION) MACRO(GET_MYSQL_VERSION)
MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_MAJOR" MAJOR_VERSION)
MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_MINOR" MINOR_VERSION)
MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_PATCH" PATCH_VERSION)
MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_EXTRA" EXTRA_VERSION)
IF(NOT VERSION_STRING) IF(NOT MAJOR_VERSION OR NOT MINOR_VERSION OR NOT PATCH_VERSION)
IF(EXISTS ${CMAKE_SOURCE_DIR}/configure.in) MESSAGE(FATAL_ERROR "VERSION file cannot be parsed.")
FILE(STRINGS ${CMAKE_SOURCE_DIR}/configure.in str REGEX "AM_INIT_AUTOMAKE")
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+[-][^ \\)]+" VERSION_STRING "${str}")
IF(NOT VERSION_STRING)
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" VERSION_STRING "${str}")
IF(NOT VERSION_STRING)
FILE(STRINGS configure.in str REGEX "AC_INIT\\(")
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+[-][a-zAZ0-9]+" VERSION_STRING "${str}")
ENDIF()
ENDIF()
ENDIF()
ENDIF() ENDIF()
SET(VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}${EXTRA_VERSION}")
IF(NOT VERSION_STRING) MESSAGE("-- MySQL ${VERSION}")
MESSAGE(FATAL_ERROR
"VERSION_STRING cannot be parsed, please specify -DVERSION_STRING=major.minor.patch-extra"
"when calling cmake")
ENDIF()
SET(VERSION ${VERSION_STRING})
STRING(REPLACE "-" "_" MYSQL_U_SCORE_VERSION "${VERSION_STRING}")
# Remove trailing (non-numeric) part of the version string
STRING(REGEX REPLACE "[^\\.0-9].*" "" VERSION_STRING ${VERSION_STRING})
STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" MAJOR_VERSION "${VERSION_STRING}")
STRING(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" MINOR_VERSION "${VERSION_STRING}")
STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" PATCH "${VERSION_STRING}")
SET(MYSQL_BASE_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}" CACHE INTERNAL "MySQL Base version") SET(MYSQL_BASE_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}" CACHE INTERNAL "MySQL Base version")
SET(MYSQL_NO_DASH_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH}") SET(MYSQL_NO_DASH_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}")
MATH(EXPR MYSQL_VERSION_ID "10000*${MAJOR_VERSION} + 100*${MINOR_VERSION} + ${PATCH}") STRING(REPLACE "-" "_" MYSQL_RPM_VERSION "${VERSION}")
MATH(EXPR MYSQL_VERSION_ID "10000*${MAJOR_VERSION} + 100*${MINOR_VERSION} + ${PATCH_VERSION}")
MARK_AS_ADVANCED(VERSION MYSQL_VERSION_ID MYSQL_BASE_VERSION) MARK_AS_ADVANCED(VERSION MYSQL_VERSION_ID MYSQL_BASE_VERSION)
SET(CPACK_PACKAGE_VERSION_MAJOR ${MAJOR_VERSION}) SET(CPACK_PACKAGE_VERSION_MAJOR ${MAJOR_VERSION})
SET(CPACK_PACKAGE_VERSION_MINOR ${MINOR_VERSION}) SET(CPACK_PACKAGE_VERSION_MINOR ${MINOR_VERSION})
SET(CPACK_PACKAGE_VERSION_PATCH ${PATCH}) SET(CPACK_PACKAGE_VERSION_PATCH ${PATCH_VERSION})
ENDMACRO() ENDMACRO()
# Get mysql version and other interesting variables # Get mysql version and other interesting variables
GET_MYSQL_VERSION() GET_MYSQL_VERSION()
MYSQL_GET_CONFIG_VALUE("PROTOCOL_VERSION" PROTOCOL_VERSION) SET(MYSQL_TCP_PORT_DEFAULT "3306")
MYSQL_GET_CONFIG_VALUE("DOT_FRM_VERSION" DOT_FRM_VERSION)
MYSQL_GET_CONFIG_VALUE("MYSQL_TCP_PORT_DEFAULT" MYSQL_TCP_PORT_DEFAULT)
MYSQL_GET_CONFIG_VALUE("MYSQL_UNIX_ADDR_DEFAULT" MYSQL_UNIX_ADDR_DEFAULT)
MYSQL_GET_CONFIG_VALUE("SHARED_LIB_MAJOR_VERSION" SHARED_LIB_MAJOR_VERSION)
IF(NOT MYSQL_TCP_PORT_DEFAULT)
SET(MYSQL_TCP_PORT_DEFAULT "3306")
ENDIF()
IF(NOT MYSQL_TCP_PORT) IF(NOT MYSQL_TCP_PORT)
SET(MYSQL_TCP_PORT ${MYSQL_TCP_PORT_DEFAULT}) SET(MYSQL_TCP_PORT ${MYSQL_TCP_PORT_DEFAULT})
SET(MYSQL_TCP_PORT_DEFAULT "0") SET(MYSQL_TCP_PORT_DEFAULT "0")
@ -130,9 +117,8 @@ ENDIF()
# Refer to http://msdn.microsoft.com/en-us/library/aa381058(VS.85).aspx # Refer to http://msdn.microsoft.com/en-us/library/aa381058(VS.85).aspx
# for more info. # for more info.
IF(MSVC) IF(MSVC)
GET_TARGET_PROPERTY(location gen_versioninfo LOCATION)
IF(NOT location)
GET_FILENAME_COMPONENT(MYSQL_CMAKE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) GET_FILENAME_COMPONENT(MYSQL_CMAKE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
SET(FILETYPE VFT_APP) SET(FILETYPE VFT_APP)
CONFIGURE_FILE(${MYSQL_CMAKE_SCRIPT_DIR}/versioninfo.rc.in CONFIGURE_FILE(${MYSQL_CMAKE_SCRIPT_DIR}/versioninfo.rc.in
${CMAKE_BINARY_DIR}/versioninfo_exe.rc) ${CMAKE_BINARY_DIR}/versioninfo_exe.rc)
@ -141,30 +127,13 @@ IF(MSVC)
CONFIGURE_FILE(${MYSQL_CMAKE_SCRIPT_DIR}/versioninfo.rc.in CONFIGURE_FILE(${MYSQL_CMAKE_SCRIPT_DIR}/versioninfo.rc.in
${CMAKE_BINARY_DIR}/versioninfo_dll.rc) ${CMAKE_BINARY_DIR}/versioninfo_dll.rc)
ADD_CUSTOM_COMMAND( FUNCTION(ADD_VERSION_INFO target target_type sources_var)
OUTPUT ${CMAKE_BINARY_DIR}/versioninfo_exe.res IF("${target_type}" MATCHES "SHARED" OR "${target_type}" MATCHES "MODULE")
${CMAKE_BINARY_DIR}/versioninfo_dll.res SET(rcfile ${CMAKE_BINARY_DIR}/versioninfo_dll.rc)
COMMAND ${CMAKE_RC_COMPILER} versioninfo_exe.rc ELSEIF("${target_type}" MATCHES "EXE")
COMMAND ${CMAKE_RC_COMPILER} versioninfo_dll.rc SET(rcfile ${CMAKE_BINARY_DIR}/versioninfo_exe.rc)
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
ADD_CUSTOM_TARGET(gen_versioninfo
DEPENDS
${CMAKE_BINARY_DIR}/versioninfo_exe.res
${CMAKE_BINARY_DIR}/versioninfo_dll.res
)
ENDIF()
FUNCTION(ADD_VERSION_INFO target)
GET_TARGET_PROPERTY(target_type ${target} TYPE)
ADD_DEPENDENCIES(${target} gen_versioninfo)
IF(target_type MATCHES "SHARED" OR target_type MATCHES "MODULE")
SET_PROPERTY(TARGET ${target} APPEND PROPERTY LINK_FLAGS
"\"${CMAKE_BINARY_DIR}/versioninfo_dll.res\"")
ELSEIF(target_type MATCHES "EXE")
SET_PROPERTY(TARGET ${target} APPEND PROPERTY LINK_FLAGS
"${target_link_flags} \"${CMAKE_BINARY_DIR}/versioninfo_exe.res\"")
ENDIF() ENDIF()
SET(${sources_var} ${${sources_var}} ${rcfile} PARENT_SCOPE)
ENDFUNCTION() ENDFUNCTION()
ELSE() ELSE()
FUNCTION(ADD_VERSION_INFO) FUNCTION(ADD_VERSION_INFO)

View File

@ -33,7 +33,7 @@ ENDFOREACH()
# Ensure we have clean build for shared libraries # Ensure we have clean build for shared libraries
# without unresolved symbols # without unresolved symbols
SET(LINK_FLAG_NO_UNDEFINED "--Wl,--no-undefined") SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined")
# 64 bit file offset support flag # 64 bit file offset support flag
SET(_FILE_OFFSET_BITS 64) SET(_FILE_OFFSET_BITS 64)

View File

@ -17,7 +17,6 @@ INCLUDE(CheckSymbolExists)
INCLUDE(CheckCSourceRuns) INCLUDE(CheckCSourceRuns)
INCLUDE(CheckCSourceCompiles) INCLUDE(CheckCSourceCompiles)
SET(TARGET_OS_SOLARIS 1)
# Enable 64 bit file offsets # Enable 64 bit file offsets
SET(_FILE_OFFSET_BITS 64) SET(_FILE_OFFSET_BITS 64)

Some files were not shown because too many files have changed in this diff Show More