mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 19:11:46 +01:00
Merge mysql-5.5-bugteam -> mysql-5.5-innodb
This commit is contained in:
commit
ab710966a5
335 changed files with 8135 additions and 17341 deletions
|
@ -4,8 +4,7 @@ extra_configs="$extra_configs $local_infile_configs"
|
|||
configure="./configure $base_configs $extra_configs"
|
||||
|
||||
commands="\
|
||||
$make -k maintainer-clean || true
|
||||
/bin/rm -rf */.deps/*.P configure config.cache storage/*/configure storage/*/config.cache autom4te.cache storage/*/autom4te.cache;
|
||||
/bin/rm -rf configure;
|
||||
/bin/rm -rf CMakeCache.txt CMakeFiles/
|
||||
|
||||
path=`dirname $0`
|
||||
|
|
|
@ -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
|
|
@ -1,38 +1,9 @@
|
|||
#!/bin/sh
|
||||
# Create MySQL autotools infrastructure
|
||||
# Create MySQL cmake configure wrapper
|
||||
|
||||
die() { echo "$@"; exit 1; }
|
||||
|
||||
# Handle "glibtoolize" (e.g., for native OS X autotools) as another
|
||||
# name for "libtoolize". Use the first one, either name, found in PATH.
|
||||
LIBTOOLIZE=libtoolize # Default
|
||||
IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
|
||||
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
|
||||
# Use a configure script that will call CMake.
|
||||
path=`dirname $0`
|
||||
cp $path/cmake_configure.sh $path/../configure
|
||||
chmod +x $path/../configure
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
#!/bin/sh
|
||||
# Choose whether to use autoconf created configure
|
||||
# of perl script that calls cmake.
|
||||
|
||||
# Ensure cmake and perl are there
|
||||
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`
|
||||
if test "$HAVE_CMAKE" = "no"
|
||||
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
|
||||
perl $scriptdir/cmake/configure.pl "$@"
|
||||
fi
|
||||
|
|
|
@ -7,18 +7,3 @@ extra_flags="$amd64_cflags $debug_cflags $valgrind_flags"
|
|||
extra_configs="$amd64_configs $debug_configs $valgrind_configs $max_configs"
|
||||
|
||||
. "$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
|
||||
|
|
|
@ -7,18 +7,3 @@ extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
|
|||
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
|
||||
|
||||
. "$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
|
||||
|
|
|
@ -7,18 +7,3 @@ extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
|
|||
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_no_ndb_configs"
|
||||
|
||||
. "$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
|
||||
|
|
|
@ -7,18 +7,3 @@ extra_flags="$pentium64_cflags $debug_cflags $valgrind_flags"
|
|||
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
|
||||
|
||||
. "$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
|
||||
|
|
|
@ -79,12 +79,12 @@ ELSEIF(NOT HAVE_CMAKE_BUILD_TYPE OR OLD_WITH_DEBUG)
|
|||
SET(OLD_WITH_DEBUG 0 CACHE INTERNAL "" FORCE)
|
||||
ENDIF()
|
||||
|
||||
IF(BUILD_CONFIG)
|
||||
SET(CMAKE_USER_MAKE_RULES_OVERRIDE
|
||||
${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake)
|
||||
ENDIF()
|
||||
|
||||
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
|
||||
# looks for files in order of how specific they are. If there is, for
|
||||
|
@ -344,7 +344,7 @@ ENDIF()
|
|||
# RPM installs documentation directly from the source tree
|
||||
#
|
||||
IF(NOT INSTALL_LAYOUT MATCHES "RPM")
|
||||
INSTALL(FILES COPYING EXCEPTIONS-CLIENT LICENSE.mysql
|
||||
INSTALL(FILES COPYING LICENSE.mysql
|
||||
DESTINATION ${INSTALL_DOCREADMEDIR}
|
||||
COMPONENT Readme
|
||||
OPTIONAL
|
||||
|
|
|
@ -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
|
|
@ -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
|
337
Makefile.am
337
Makefile.am
|
@ -1,337 +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 \
|
||||
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 \
|
||||
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.
|
||||
#
|
||||
# Attention: do not forget to also add to cmake/abi_check.cmake
|
||||
#
|
||||
|
||||
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 \
|
||||
$(top_srcdir)/include/mysql/client_plugin.h \
|
||||
$(top_srcdir)/include/mysql/plugin_auth.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
|
4
VERSION
Normal file
4
VERSION
Normal file
|
@ -0,0 +1,4 @@
|
|||
MYSQL_VERSION_MAJOR=5
|
||||
MYSQL_VERSION_MINOR=5
|
||||
MYSQL_VERSION_PATCH=8
|
||||
MYSQL_VERSION_EXTRA=
|
|
@ -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;
|
|
@ -1456,8 +1456,8 @@ static struct my_option my_long_options[] =
|
|||
&opt_sigint_ignore, &opt_sigint_ignore, 0, GET_BOOL,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"one-database", 'o',
|
||||
"Only update the default database. This is useful for skipping updates "
|
||||
"to other database in the update log.",
|
||||
"Ignore statements except those that occur while the default "
|
||||
"database is the one named at the command line.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#ifdef USE_POPEN
|
||||
{"pager", OPT_PAGER,
|
||||
|
@ -2692,6 +2692,10 @@ static void get_current_db()
|
|||
{
|
||||
MYSQL_RES *res;
|
||||
|
||||
/* If one_database is set, current_db is not supposed to change. */
|
||||
if (one_database)
|
||||
return;
|
||||
|
||||
my_free(current_db);
|
||||
current_db= NULL;
|
||||
/* In case of error below current_db will be NULL */
|
||||
|
|
|
@ -487,7 +487,8 @@ VAR* var_init(VAR* v, const char *name, int name_len, const char *val,
|
|||
int val_len);
|
||||
VAR* var_get(const char *var_name, const char** var_name_end,
|
||||
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);
|
||||
void dump_result_to_reject_file(char *buf, int size);
|
||||
void dump_warning_messages();
|
||||
|
@ -2045,9 +2046,11 @@ static void var_free(void *v)
|
|||
|
||||
C_MODE_END
|
||||
|
||||
void var_set_int(VAR *v, const char *str)
|
||||
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;
|
||||
|
@ -2094,7 +2097,7 @@ VAR *var_init(VAR *v, const char *name, int name_len, const char *val,
|
|||
memcpy(tmp_var->str_val, val, val_len);
|
||||
tmp_var->str_val[val_len]= 0;
|
||||
}
|
||||
var_set_int(tmp_var, val);
|
||||
var_check_int(tmp_var);
|
||||
tmp_var->name_len = name_len;
|
||||
tmp_var->str_val_len = val_len;
|
||||
tmp_var->alloced_len = val_alloc_len;
|
||||
|
@ -2335,7 +2338,8 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
|
|||
dynstr_append_mem(&result, "\t", 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);
|
||||
}
|
||||
else
|
||||
|
@ -2545,7 +2549,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");
|
||||
|
@ -2563,14 +2568,14 @@ void eval_expr(VAR *v, const char *p, const char **p_end)
|
|||
|
||||
/* Make sure there was just a $variable and nothing else */
|
||||
const char* end= *p_end + 1;
|
||||
if (end < expected_end)
|
||||
if (end < expected_end && !open_end)
|
||||
die("Found junk '%.*s' after $variable in expression",
|
||||
(int)(expected_end - end - 1), end);
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
if (*p == '`')
|
||||
if (*p == '`' && backtick)
|
||||
{
|
||||
var_query_set(v, p, p_end);
|
||||
DBUG_VOID_RETURN;
|
||||
|
@ -2610,7 +2615,7 @@ void eval_expr(VAR *v, const char *p, const char **p_end)
|
|||
v->str_val_len = new_val_len;
|
||||
memcpy(v->str_val, p, new_val_len);
|
||||
v->str_val[new_val_len] = 0;
|
||||
var_set_int(v, p);
|
||||
var_check_int(v);
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
@ -4240,7 +4245,7 @@ int do_save_master_pos()
|
|||
const char latest_applied_binlog_epoch_str[]=
|
||||
"latest_applied_binlog_epoch=";
|
||||
if (count)
|
||||
sleep(1);
|
||||
my_sleep(100*1000); /* 100ms */
|
||||
if (mysql_query(mysql, query= "show engine ndb status"))
|
||||
die("failed in '%s': %d %s", query,
|
||||
mysql_errno(mysql), mysql_error(mysql));
|
||||
|
@ -4329,7 +4334,7 @@ int do_save_master_pos()
|
|||
count++;
|
||||
if (latest_handled_binlog_epoch >= start_epoch)
|
||||
do_continue= 0;
|
||||
else if (count > 30)
|
||||
else if (count > 300) /* 30s */
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -5521,6 +5526,40 @@ int do_done(struct st_command *command)
|
|||
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
|
||||
|
@ -5546,6 +5585,13 @@ int do_done(struct st_command *command)
|
|||
A '!' can be used before the <expr> to indicate it should
|
||||
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)
|
||||
|
@ -5581,11 +5627,16 @@ void do_block(enum block_cmd cmd, struct st_command* command)
|
|||
if (!expr_start++)
|
||||
die("missing '(' in %s", cmd_name);
|
||||
|
||||
while (my_isspace(charset_info, *expr_start))
|
||||
expr_start++;
|
||||
|
||||
/* Check for !<expr> */
|
||||
if (*expr_start == '!')
|
||||
{
|
||||
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 ')' */
|
||||
expr_end= strrchr(expr_start, ')');
|
||||
|
@ -5599,14 +5650,107 @@ void do_block(enum block_cmd cmd, struct st_command* command)
|
|||
die("Missing '{' after %s. Found \"%s\"", cmd_name, p);
|
||||
|
||||
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++;
|
||||
|
||||
/* 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;
|
||||
} 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 */
|
||||
cur_block++;
|
||||
cur_block->cmd= cmd;
|
||||
if (v.int_val)
|
||||
if (v.is_int)
|
||||
{
|
||||
cur_block->ok= TRUE;
|
||||
cur_block->ok= (v.int_val != 0);
|
||||
} else
|
||||
/* Any non-empty string which does not begin with 0 is also TRUE */
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
@ -101,8 +101,10 @@ IF(NOT COMPILATION_COMMENT)
|
|||
ENDIF()
|
||||
|
||||
IF(WIN32)
|
||||
# Sign executables with authenticode certificate
|
||||
SET(SIGNCODE 1 CACHE BOOL "")
|
||||
IF(NOT CMAKE_USING_VC_FREE_TOOLS)
|
||||
# Sign executables with authenticode certificate
|
||||
SET(SIGNCODE 1 CACHE BOOL "")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(UNIX)
|
||||
|
@ -120,7 +122,13 @@ IF(UNIX)
|
|||
CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H)
|
||||
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")
|
||||
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
|
||||
")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
@ -219,22 +227,4 @@ IF(UNIX)
|
|||
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()
|
||||
|
|
|
@ -53,23 +53,27 @@
|
|||
SET(abi_check_out ${BINARY_DIR}/abi_check.out)
|
||||
|
||||
FOREACH(file ${ABI_HEADERS})
|
||||
SET(tmpfile ${file}.pp.tmp)
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${COMPILER}
|
||||
-E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include
|
||||
-I${BINARY_DIR}/include -I${SOURCE_DIR}/include/mysql -I${SOURCE_DIR}/sql
|
||||
${file}
|
||||
ERROR_QUIET OUTPUT_FILE ${tmpfile})
|
||||
EXECUTE_PROCESS(
|
||||
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})
|
||||
GET_FILENAME_COMPONENT(header_basename ${file} NAME)
|
||||
SET(tmpfile ${BINARY_DIR}/${header_basename}.pp.tmp)
|
||||
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${COMPILER}
|
||||
-E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include
|
||||
-I${BINARY_DIR}/include -I${SOURCE_DIR}/include/mysql -I${SOURCE_DIR}/sql
|
||||
${file}
|
||||
ERROR_QUIET OUTPUT_FILE ${tmpfile})
|
||||
EXECUTE_PROCESS(
|
||||
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)
|
||||
MESSAGE(FATAL_ERROR "sed returned error ${result}")
|
||||
ENDIF()
|
||||
FILE(REMOVE ${tmpfile})
|
||||
EXECUTE_PROCESS(COMMAND diff -w ${file}.pp ${abi_check_out} RESULT_VARIABLE
|
||||
result)
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND diff -w ${file}.pp ${abi_check_out} RESULT_VARIABLE result)
|
||||
IF(NOT ${result} EQUAL 0)
|
||||
MESSAGE(FATAL_ERROR
|
||||
"ABI check found difference between ${file}.pp and ${abi_check_out}")
|
||||
|
|
|
@ -153,13 +153,23 @@ ENDFUNCTION()
|
|||
# to mysqld.
|
||||
MACRO (DTRACE_INSTRUMENT_STATIC_LIBS target libs)
|
||||
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})
|
||||
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}})
|
||||
ENDFOREACH()
|
||||
|
||||
SET (obj ${CMAKE_CURRENT_BINARY_DIR}/${target}_dtrace_all.o)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${obj}
|
||||
DEPENDS ${libs}
|
||||
DEPENDS ${static_libs}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DDTRACE=${DTRACE}
|
||||
-DOUTFILE=${obj}
|
||||
|
|
|
@ -14,19 +14,12 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Make source distribution
|
||||
# If bzr is present, run bzr export, add output of BUILD/autorun.sh
|
||||
# if autotools are present, also pack bison output into it.
|
||||
# If bzr is present, run bzr export.
|
||||
# Otherwise, just run cpack with source configuration.
|
||||
|
||||
SET(CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@")
|
||||
SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
|
||||
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_COMMAND "@CMAKE_COMMAND@")
|
||||
SET(BZR_EXECUTABLE "@BZR_EXECUTABLE@")
|
||||
|
@ -101,28 +94,6 @@ IF(NOT BZR_EXECUTABLE)
|
|||
)
|
||||
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
|
||||
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.h
|
||||
${PACKAGE_DIR}/sql/sql_yacc.h COPYONLY)
|
||||
|
@ -138,7 +109,6 @@ ENDIF()
|
|||
# In case we used CPack, it could have copied some
|
||||
# extra files that are not usable on different machines.
|
||||
FILE(REMOVE ${PACKAGE_DIR}/CMakeCache.txt)
|
||||
FILE(REMOVE_RECURSE ${PACKAGE_DIR}/autom4te.cache)
|
||||
|
||||
# When packing source, prefer gnu tar to "cmake -P tar"
|
||||
# cmake does not preserve timestamps.gnuwin32 tar is broken, cygwin is ok
|
||||
|
|
|
@ -13,17 +13,29 @@
|
|||
# along with this program; if not, write to the Free Software
|
||||
# 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)
|
||||
IF(NOT ${var})
|
||||
IF (EXISTS ${CMAKE_SOURCE_DIR}/configure.in)
|
||||
FILE (STRINGS ${CMAKE_SOURCE_DIR}/configure.in str REGEX "^[ ]*${keyword}=")
|
||||
IF(str)
|
||||
STRING(REPLACE "${keyword}=" "" str ${str})
|
||||
STRING(REGEX REPLACE "[ ].*" "" str ${str})
|
||||
SET(${var} ${str} CACHE INTERNAL "Config variable")
|
||||
ENDIF()
|
||||
FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION str REGEX "^[ ]*${keyword}=")
|
||||
IF(str)
|
||||
STRING(REPLACE "${keyword}=" "" str ${str})
|
||||
STRING(REGEX REPLACE "[ ].*" "" str "${str}")
|
||||
SET(${var} ${str})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
@ -32,60 +44,32 @@ ENDMACRO()
|
|||
# Read mysql version for configure script
|
||||
|
||||
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(EXISTS ${CMAKE_SOURCE_DIR}/configure.in)
|
||||
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}")
|
||||
IF(NOT VERSION_STRING)
|
||||
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" VERSION_STRING "${str}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
IF(NOT MAJOR_VERSION OR NOT MINOR_VERSION OR NOT PATCH_VERSION)
|
||||
MESSAGE(FATAL_ERROR "VERSION file cannot be parsed.")
|
||||
ENDIF()
|
||||
|
||||
|
||||
IF(NOT VERSION_STRING)
|
||||
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(VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}${EXTRA_VERSION}")
|
||||
MESSAGE("-- MySQL ${VERSION}")
|
||||
SET(MYSQL_BASE_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}" CACHE INTERNAL "MySQL Base version")
|
||||
SET(MYSQL_NO_DASH_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH}")
|
||||
MATH(EXPR MYSQL_VERSION_ID "10000*${MAJOR_VERSION} + 100*${MINOR_VERSION} + ${PATCH}")
|
||||
SET(MYSQL_NO_DASH_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}")
|
||||
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)
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR ${MAJOR_VERSION})
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR ${MINOR_VERSION})
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH ${PATCH})
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH ${PATCH_VERSION})
|
||||
ENDMACRO()
|
||||
|
||||
# Get mysql version and other interesting variables
|
||||
GET_MYSQL_VERSION()
|
||||
|
||||
MYSQL_GET_CONFIG_VALUE("PROTOCOL_VERSION" PROTOCOL_VERSION)
|
||||
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()
|
||||
SET(MYSQL_TCP_PORT_DEFAULT "3306")
|
||||
|
||||
IF(NOT MYSQL_TCP_PORT)
|
||||
SET(MYSQL_TCP_PORT ${MYSQL_TCP_PORT_DEFAULT})
|
||||
SET(MYSQL_TCP_PORT_DEFAULT "0")
|
||||
|
|
|
@ -91,7 +91,6 @@ IF(MSVC)
|
|||
STRING(REGEX REPLACE "/INCREMENTAL:([^ ]+)" "" CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO}")
|
||||
ENDFOREACH()
|
||||
|
||||
ADD_DEFINITIONS(-DPTHREAD_STACK_MIN=1048576)
|
||||
# Mark 32 bit executables large address aware so they can
|
||||
# use > 2GB address space
|
||||
IF(CMAKE_SIZEOF_VOID_P MATCHES 4)
|
||||
|
@ -105,14 +104,9 @@ IF(MSVC)
|
|||
ENDIF()
|
||||
|
||||
#TODO: update the code and remove the disabled warnings
|
||||
ADD_DEFINITIONS(/wd4800 /wd4805)
|
||||
IF (MSVC_VERSION GREATER 1310)
|
||||
ADD_DEFINITIONS(/wd4996)
|
||||
ENDIF()
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /we4099")
|
||||
|
||||
# Make class/struct definition mismatch an error (overseen too often,
|
||||
# adds tons of new warnings)
|
||||
ADD_DEFINITIONS(/we4099)
|
||||
|
||||
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
|
||||
# _WIN64 is defined by the compiler itself.
|
||||
|
|
|
@ -57,6 +57,7 @@ SET(HAVE_FCNTL_H 1 CACHE INTERNAL "")
|
|||
SET(HAVE_FCNTL_NONBLOCK CACHE INTERNAL "")
|
||||
SET(HAVE_FCONVERT CACHE INTERNAL "")
|
||||
SET(HAVE_FDATASYNC CACHE INTERNAL "")
|
||||
SET(HAVE_DECL_FDATASYNC CACHE INTERNAL "")
|
||||
SET(HAVE_FENV_H CACHE INTERNAL "")
|
||||
SET(HAVE_FESETROUND CACHE INTERNAL "")
|
||||
SET(HAVE_FGETLN CACHE INTERNAL "")
|
||||
|
|
|
@ -123,7 +123,7 @@ MACRO(MYSQL_ADD_PLUGIN)
|
|||
|
||||
# Update mysqld dependencies
|
||||
SET (MYSQLD_STATIC_PLUGIN_LIBS ${MYSQLD_STATIC_PLUGIN_LIBS}
|
||||
${target} CACHE INTERNAL "" FORCE)
|
||||
${target} ${ARG_LINK_LIBRARIES} CACHE INTERNAL "" FORCE)
|
||||
|
||||
IF(ARG_MANDATORY)
|
||||
SET(${with_var} ON CACHE INTERNAL "Link ${plugin} statically to the server"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <windows.h>
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH@,0
|
||||
PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH@,0
|
||||
FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,0
|
||||
PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS__WINDOWS32
|
||||
|
@ -12,8 +12,8 @@ BEGIN
|
|||
BEGIN
|
||||
BLOCK "040904E4"
|
||||
BEGIN
|
||||
VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@.0\0"
|
||||
VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@.0\0"
|
||||
VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.0\0"
|
||||
VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
# Copyright (C) 2004 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
|
||||
|
||||
SUBDIRS= @readline_basedir@
|
||||
DIST_SUBDIRS= libedit readline
|
|
@ -26,6 +26,21 @@ int main()
|
|||
tgoto(0,0,0);
|
||||
return 0;
|
||||
}" HAVE_DECL_TGOTO)
|
||||
IF(NOT HAVE_DECL_TGOTO)
|
||||
# On Solaris 11, term.h is broken, curses.h is also required.
|
||||
CHECK_CXX_SOURCE_COMPILES("
|
||||
#include <curses.h>
|
||||
#include <term.h>
|
||||
int main()
|
||||
{
|
||||
tgoto(0,0,0);
|
||||
return 0;
|
||||
}" HAVE_DECL_TGOTO2)
|
||||
IF(HAVE_DECL_TGOTO2)
|
||||
SET(HAVE_DECL_TGOTO 1 CACHE INTERNAL "" FORCE)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
|
||||
|
|
|
@ -1,92 +0,0 @@
|
|||
## Process this file with automake to create Makefile.in
|
||||
|
||||
ASRC = $(srcdir)/vi.c $(srcdir)/emacs.c $(srcdir)/common.c
|
||||
AHDR = vi.h emacs.h common.h
|
||||
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
|
||||
|
||||
noinst_LIBRARIES = libedit.a
|
||||
|
||||
libedit_a_SOURCES = chared.c el.c history.c map.c prompt.c readline.c \
|
||||
search.c tokenizer.c vi.c common.c emacs.c \
|
||||
hist.c key.c parse.c read.c refresh.c sig.c term.c \
|
||||
tty.c help.c fcns.c filecomplete.c \
|
||||
np/unvis.c np/strlcpy.c np/vis.c np/strlcat.c \
|
||||
np/fgetln.c
|
||||
|
||||
libedit_a_LIBADD = @LIBEDIT_LOBJECTS@
|
||||
libedit_a_DEPENDENCIES = @LIBEDIT_LOBJECTS@
|
||||
|
||||
pkginclude_HEADERS = readline/readline.h
|
||||
|
||||
noinst_HEADERS = chared.h el.h el_term.h histedit.h key.h parse.h refresh.h sig.h \
|
||||
sys.h config.h hist.h map.h prompt.h read.h \
|
||||
search.h tty.h filecomplete.h np/vis.h
|
||||
|
||||
EXTRA_DIST = makelist.sh CMakeLists.txt
|
||||
|
||||
CLEANFILES = makelist common.h emacs.h vi.h fcns.h help.h fcns.c help.c
|
||||
|
||||
SUFFIXES = .sh
|
||||
|
||||
.sh:
|
||||
@RM@ -f $@ $@-t
|
||||
@SED@ \
|
||||
-e 's!@''AWK''@!@AWK@!' \
|
||||
$< > $@-t
|
||||
@MV@ $@-t $@
|
||||
|
||||
vi.h: $(srcdir)/vi.c makelist
|
||||
sh ./makelist -h $(srcdir)/vi.c > $@.tmp && \
|
||||
mv $@.tmp $@
|
||||
|
||||
emacs.h: $(srcdir)/emacs.c makelist
|
||||
sh ./makelist -h $(srcdir)/emacs.c > $@.tmp && \
|
||||
mv $@.tmp $@
|
||||
|
||||
common.h: $(srcdir)/common.c makelist
|
||||
sh ./makelist -h $(srcdir)/common.c > $@.tmp && \
|
||||
mv $@.tmp $@
|
||||
|
||||
help.c: ${ASRC} makelist
|
||||
sh ./makelist -bc ${ASRC} > $@.tmp && \
|
||||
mv $@.tmp $@
|
||||
|
||||
help.h: ${ASRC} makelist
|
||||
sh ./makelist -bh ${ASRC} > $@.tmp && \
|
||||
mv $@.tmp $@
|
||||
|
||||
fcns.h: ${AHDR} makelist
|
||||
sh ./makelist -fh ${AHDR} > $@.tmp && \
|
||||
mv $@.tmp $@
|
||||
|
||||
fcns.c: ${AHDR} fcns.h makelist
|
||||
sh ./makelist -fc ${AHDR} > $@.tmp && \
|
||||
mv $@.tmp $@
|
||||
|
||||
#%.o: vi.h emacs.h common.h help.h fcns.h
|
||||
#objects := $(patsubst %.c,%.o,$(wildcard *.c))
|
||||
#$(objects): vi.h emacs.h
|
||||
|
||||
chared.o: vi.h emacs.h common.h help.h fcns.h
|
||||
el.o: vi.h emacs.h common.h help.h fcns.h
|
||||
history.o: vi.h emacs.h common.h help.h fcns.h
|
||||
map.o: vi.h emacs.h common.h help.h fcns.h
|
||||
prompt.o: vi.h emacs.h common.h help.h fcns.h
|
||||
readline.o: vi.h emacs.h common.h help.h fcns.h
|
||||
search.o: vi.h emacs.h common.h help.h fcns.h
|
||||
tokenizer.o: vi.h emacs.h common.h help.h fcns.h
|
||||
vi.o: vi.h emacs.h common.h help.h fcns.h
|
||||
common.o: vi.h emacs.h common.h help.h fcns.h
|
||||
emacs.o: vi.h emacs.h common.h help.h fcns.h
|
||||
hist.o: vi.h emacs.h common.h help.h fcns.h
|
||||
key.o: vi.h emacs.h common.h help.h fcns.h
|
||||
parse.o: vi.h emacs.h common.h help.h fcns.h
|
||||
read.o: vi.h emacs.h common.h help.h fcns.h
|
||||
refresh.o: vi.h emacs.h common.h help.h fcns.h
|
||||
sig.o: vi.h emacs.h common.h help.h fcns.h
|
||||
term.o: vi.h emacs.h common.h help.h fcns.h
|
||||
tty.o: vi.h emacs.h common.h help.h fcns.h
|
||||
help.o: vi.h emacs.h common.h help.h fcns.h
|
||||
fcns.o: vi.h emacs.h common.h help.h fcns.h
|
||||
filecomplete.o: vi.h emacs.h common.h help.h fcns.h
|
|
@ -1,34 +0,0 @@
|
|||
## Process this file with automake to create Makefile.in
|
||||
# Makefile for the GNU readline library.
|
||||
# Copyright (C) 1994,1996,1997 Free Software Foundation, Inc.
|
||||
|
||||
# Last -I$(top_srcdir) needed for RedHat!
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)
|
||||
|
||||
noinst_LIBRARIES = libreadline.a
|
||||
|
||||
libreadline_a_SOURCES = readline.c funmap.c keymaps.c \
|
||||
vi_mode.c parens.c rltty.c \
|
||||
complete.c bind.c isearch.c \
|
||||
display.c signals.c \
|
||||
util.c kill.c \
|
||||
undo.c macro.c input.c \
|
||||
callback.c terminal.c xmalloc.c \
|
||||
history.c histsearch.c histexpand.c \
|
||||
histfile.c nls.c search.c \
|
||||
shell.c tilde.c misc.c text.c mbutil.c \
|
||||
compat.c savestring.c
|
||||
|
||||
noinst_HEADERS = readline.h chardefs.h keymaps.h \
|
||||
history.h tilde.h rlmbutil.h rltypedefs.h rlprivate.h \
|
||||
rlshell.h xmalloc.h \
|
||||
\
|
||||
config_readline.h rldefs.h histlib.h rlwinsize.h \
|
||||
posixstat.h posixdir.h posixjmp.h \
|
||||
tilde.h rlconf.h rltty.h ansi_stdlib.h \
|
||||
tcap.h rlstdc.h
|
||||
|
||||
EXTRA_DIST= emacs_keymap.c vi_keymap.c CMakeLists.txt
|
||||
|
||||
DEFS = -DMYSQL_CLIENT_NO_THREADS -DHAVE_CONFIG_H -DNO_KILL_INTR -D_GNU_SOURCE=1
|
|
@ -1,68 +0,0 @@
|
|||
AC_DEFUN([MYSQL_FUNC_ALLOCA],
|
||||
[
|
||||
# Since we have heard that alloca fails on IRIX never define it on a
|
||||
# SGI machine
|
||||
if test ! "$host_vendor" = "sgi"
|
||||
then
|
||||
AC_REQUIRE_CPP()dnl Set CPP; we run AC_EGREP_CPP conditionally.
|
||||
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
|
||||
# for constant arguments. Useless!
|
||||
AC_CACHE_CHECK([for working alloca.h], ac_cv_header_alloca_h,
|
||||
[AC_TRY_LINK([#include <alloca.h>], [char *p = alloca(2 * sizeof(int));],
|
||||
ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)])
|
||||
if test "$ac_cv_header_alloca_h" = "yes"
|
||||
then
|
||||
AC_DEFINE(HAVE_ALLOCA, 1)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works,
|
||||
[AC_TRY_LINK([
|
||||
#ifdef __GNUC__
|
||||
# define alloca __builtin_alloca
|
||||
#else
|
||||
# if HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
# else
|
||||
# ifdef _AIX
|
||||
#pragma alloca
|
||||
# else
|
||||
# ifndef alloca /* predefined by HP cc +Olibcalls */
|
||||
char *alloca ();
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
], [char *p = (char *) alloca(1);],
|
||||
ac_cv_func_alloca_works=yes, ac_cv_func_alloca_works=no)])
|
||||
if test "$ac_cv_func_alloca_works" = "yes"; then
|
||||
AC_DEFINE([HAVE_ALLOCA], [1], [If we have a working alloca() implementation])
|
||||
fi
|
||||
|
||||
if test "$ac_cv_func_alloca_works" = "no"; then
|
||||
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
|
||||
# that cause trouble. Some versions do not even contain alloca or
|
||||
# contain a buggy version. If you still want to use their alloca,
|
||||
# use ar to extract alloca.o from them instead of compiling alloca.c.
|
||||
ALLOCA=alloca.o
|
||||
AC_DEFINE(C_ALLOCA, 1)
|
||||
|
||||
AC_CACHE_CHECK(whether alloca needs Cray hooks, ac_cv_os_cray,
|
||||
[AC_EGREP_CPP(webecray,
|
||||
[#if defined(CRAY) && ! defined(CRAY2)
|
||||
webecray
|
||||
#else
|
||||
wenotbecray
|
||||
#endif
|
||||
], ac_cv_os_cray=yes, ac_cv_os_cray=no)])
|
||||
if test "$ac_cv_os_cray" = "yes"; then
|
||||
for ac_func in _getb67 GETB67 getb67; do
|
||||
AC_CHECK_FUNC($ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func)
|
||||
break])
|
||||
done
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(ALLOCA)dnl
|
||||
else
|
||||
AC_MSG_RESULT("Skipped alloca tests")
|
||||
fi
|
||||
])
|
|
@ -1,501 +0,0 @@
|
|||
dnl In order to add new charset, you must add charset name to
|
||||
dnl this CHARSETS_AVAILABLE list and sql/share/charsets/Index.xml.
|
||||
dnl If the character set uses strcoll or other special handling,
|
||||
dnl you must also create strings/ctype-$charset_name.c
|
||||
|
||||
AC_DIVERT_PUSH(0)
|
||||
|
||||
define(CHARSETS_AVAILABLE0,binary)
|
||||
define(CHARSETS_AVAILABLE1,armscii8 ascii big5 cp1250 cp1251 cp1256 cp1257)
|
||||
define(CHARSETS_AVAILABLE2,cp850 cp852 cp866 cp932 dec8 eucjpms euckr gb2312 gbk geostd8)
|
||||
define(CHARSETS_AVAILABLE3,greek hebrew hp8 keybcs2 koi8r koi8u)
|
||||
define(CHARSETS_AVAILABLE4,latin1 latin2 latin5 latin7 macce macroman)
|
||||
define(CHARSETS_AVAILABLE5,sjis swe7 tis620 ucs2 ujis utf8mb4 utf8 utf16 utf32)
|
||||
|
||||
DEFAULT_CHARSET=latin1
|
||||
CHARSETS_AVAILABLE="CHARSETS_AVAILABLE0 CHARSETS_AVAILABLE1 CHARSETS_AVAILABLE2 CHARSETS_AVAILABLE3 CHARSETS_AVAILABLE4 CHARSETS_AVAILABLE5"
|
||||
CHARSETS_COMPLEX="big5 cp1250 cp932 eucjpms euckr gb2312 gbk latin1 latin2 sjis tis620 ucs2 ujis utf8mb4 utf8 utf16 utf32"
|
||||
|
||||
AC_DIVERT_POP
|
||||
|
||||
AC_ARG_WITH(charset,
|
||||
[ --with-charset=CHARSET
|
||||
Default character set, use one of:
|
||||
CHARSETS_AVAILABLE0
|
||||
CHARSETS_AVAILABLE1
|
||||
CHARSETS_AVAILABLE2
|
||||
CHARSETS_AVAILABLE3
|
||||
CHARSETS_AVAILABLE4
|
||||
CHARSETS_AVAILABLE5],
|
||||
[default_charset="$withval"],
|
||||
[default_charset="$DEFAULT_CHARSET"])
|
||||
|
||||
AC_ARG_WITH(collation,
|
||||
[ --with-collation=COLLATION
|
||||
Default collation],
|
||||
[default_collation="$withval"],
|
||||
[default_collation="default"])
|
||||
|
||||
|
||||
AC_ARG_WITH(extra-charsets,
|
||||
[ --with-extra-charsets=CHARSET[,CHARSET,...]
|
||||
Use charsets in addition to default (none, complex,
|
||||
all, or a list selected from the above sets)],
|
||||
[extra_charsets="$withval"],
|
||||
[extra_charsets="none"])
|
||||
|
||||
|
||||
AC_MSG_CHECKING("character sets")
|
||||
|
||||
CHARSETS="$default_charset latin1 utf8mb4 utf8"
|
||||
|
||||
if test "$extra_charsets" = no; then
|
||||
CHARSETS="$CHARSETS"
|
||||
elif test "$extra_charsets" = none; then
|
||||
CHARSETS="$CHARSETS"
|
||||
elif test "$extra_charsets" = complex; then
|
||||
CHARSETS="$CHARSETS $CHARSETS_COMPLEX"
|
||||
AC_DEFINE([DEFINE_ALL_CHARACTER_SETS],1,[all charsets are available])
|
||||
elif test "$extra_charsets" = all; then
|
||||
CHARSETS="$CHARSETS $CHARSETS_AVAILABLE"
|
||||
AC_DEFINE([DEFINE_ALL_CHARACTER_SETS],1,[all charsets are available])
|
||||
else
|
||||
EXTRA_CHARSETS=`echo $extra_charsets | sed -e 's/,/ /g'`
|
||||
CHARSETS="$CHARSETS $EXTRA_CHARSETS"
|
||||
fi
|
||||
|
||||
for cs in $CHARSETS
|
||||
do
|
||||
case $cs in
|
||||
armscii8)
|
||||
AC_DEFINE(HAVE_CHARSET_armscii8, 1,
|
||||
[Define to enable charset armscii8])
|
||||
;;
|
||||
ascii)
|
||||
AC_DEFINE(HAVE_CHARSET_ascii, 1,
|
||||
[Define to enable ascii character set])
|
||||
;;
|
||||
big5)
|
||||
AC_DEFINE(HAVE_CHARSET_big5, 1, [Define to enable charset big5])
|
||||
AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
|
||||
AC_DEFINE(USE_MB_IDENT, [1], [ ])
|
||||
;;
|
||||
binary)
|
||||
;;
|
||||
cp1250)
|
||||
AC_DEFINE(HAVE_CHARSET_cp1250, 1, [Define to enable cp1250])
|
||||
;;
|
||||
cp1251)
|
||||
AC_DEFINE(HAVE_CHARSET_cp1251, 1, [Define to enable charset cp1251])
|
||||
;;
|
||||
cp1256)
|
||||
AC_DEFINE(HAVE_CHARSET_cp1256, 1, [Define to enable charset cp1256])
|
||||
;;
|
||||
cp1257)
|
||||
AC_DEFINE(HAVE_CHARSET_cp1257, 1, [Define to enable charset cp1257])
|
||||
;;
|
||||
cp850)
|
||||
AC_DEFINE(HAVE_CHARSET_cp850, 1, [Define to enable charset cp850])
|
||||
;;
|
||||
cp852)
|
||||
AC_DEFINE(HAVE_CHARSET_cp852, 1, [Define to enable charset cp852])
|
||||
;;
|
||||
cp866)
|
||||
AC_DEFINE(HAVE_CHARSET_cp866, 1, [Define to enable charset cp866])
|
||||
;;
|
||||
cp932)
|
||||
AC_DEFINE(HAVE_CHARSET_cp932, 1, [Define to enable charset cp932])
|
||||
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
|
||||
AC_DEFINE(USE_MB_IDENT, 1)
|
||||
;;
|
||||
dec8)
|
||||
AC_DEFINE(HAVE_CHARSET_dec8, 1, [Define to enable charset dec8])
|
||||
;;
|
||||
eucjpms)
|
||||
AC_DEFINE(HAVE_CHARSET_eucjpms, 1, [Define to enable charset eucjpms])
|
||||
AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
|
||||
AC_DEFINE(USE_MB_IDENT, 1)
|
||||
;;
|
||||
euckr)
|
||||
AC_DEFINE(HAVE_CHARSET_euckr, 1, [Define to enable charset euckr])
|
||||
AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
|
||||
AC_DEFINE(USE_MB_IDENT, 1)
|
||||
;;
|
||||
gb2312)
|
||||
AC_DEFINE(HAVE_CHARSET_gb2312, 1, [Define to enable charset gb2312])
|
||||
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
|
||||
AC_DEFINE(USE_MB_IDENT, 1)
|
||||
;;
|
||||
gbk)
|
||||
AC_DEFINE(HAVE_CHARSET_gbk, 1, [Define to enable charset gbk])
|
||||
AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
|
||||
AC_DEFINE(USE_MB_IDENT, 1)
|
||||
;;
|
||||
geostd8)
|
||||
AC_DEFINE(HAVE_CHARSET_geostd8, 1, [Define to enable charset geostd8])
|
||||
;;
|
||||
greek)
|
||||
AC_DEFINE(HAVE_CHARSET_greek, 1, [Define to enable charset greek])
|
||||
;;
|
||||
hebrew)
|
||||
AC_DEFINE(HAVE_CHARSET_hebrew, 1, [Define to enable charset hebrew])
|
||||
;;
|
||||
hp8)
|
||||
AC_DEFINE(HAVE_CHARSET_hp8, 1, [Define to enable charset hp8])
|
||||
;;
|
||||
keybcs2)
|
||||
AC_DEFINE(HAVE_CHARSET_keybcs2, 1, [Define to enable charset keybcs2])
|
||||
;;
|
||||
koi8r)
|
||||
AC_DEFINE(HAVE_CHARSET_koi8r, 1, [Define to enable charset koi8r])
|
||||
;;
|
||||
koi8u)
|
||||
AC_DEFINE(HAVE_CHARSET_koi8u, 1, [Define to enable charset koi8u])
|
||||
;;
|
||||
latin1)
|
||||
AC_DEFINE(HAVE_CHARSET_latin1, 1, [Define to enable charset latin1])
|
||||
;;
|
||||
latin2)
|
||||
AC_DEFINE(HAVE_CHARSET_latin2, 1, [Define to enable charset latin2])
|
||||
;;
|
||||
latin5)
|
||||
AC_DEFINE(HAVE_CHARSET_latin5, 1, [Define to enable charset latin5])
|
||||
;;
|
||||
latin7)
|
||||
AC_DEFINE(HAVE_CHARSET_latin7, 1, [Define to enable charset latin7])
|
||||
;;
|
||||
macce)
|
||||
AC_DEFINE(HAVE_CHARSET_macce, 1, [Define to enable charset macce])
|
||||
;;
|
||||
macroman)
|
||||
AC_DEFINE(HAVE_CHARSET_macroman, 1,
|
||||
[Define to enable charset macroman])
|
||||
;;
|
||||
sjis)
|
||||
AC_DEFINE(HAVE_CHARSET_sjis, 1, [Define to enable charset sjis])
|
||||
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
|
||||
AC_DEFINE(USE_MB_IDENT, 1)
|
||||
;;
|
||||
swe7)
|
||||
AC_DEFINE(HAVE_CHARSET_swe7, 1, [Define to enable charset swe7])
|
||||
;;
|
||||
tis620)
|
||||
AC_DEFINE(HAVE_CHARSET_tis620, 1, [Define to enable charset tis620])
|
||||
;;
|
||||
ucs2)
|
||||
AC_DEFINE(HAVE_CHARSET_ucs2, 1, [Define to enable charset ucs2])
|
||||
AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
|
||||
AC_DEFINE(USE_MB_IDENT, 1)
|
||||
;;
|
||||
ujis)
|
||||
AC_DEFINE(HAVE_CHARSET_ujis, 1, [Define to enable charset ujis])
|
||||
AC_DEFINE([USE_MB], [1], [Use multi-byte character routines])
|
||||
AC_DEFINE(USE_MB_IDENT, 1)
|
||||
;;
|
||||
utf8mb4)
|
||||
AC_DEFINE(HAVE_CHARSET_utf8mb4, 1, [Define to enable utf8mb4])
|
||||
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
|
||||
AC_DEFINE(USE_MB_IDENT, 1)
|
||||
;;
|
||||
utf8)
|
||||
AC_DEFINE(HAVE_CHARSET_utf8, 1, [Define to enable utf8])
|
||||
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
|
||||
AC_DEFINE(USE_MB_IDENT, 1)
|
||||
;;
|
||||
utf16)
|
||||
AC_DEFINE(HAVE_CHARSET_utf16, 1, [Define to enable utf16])
|
||||
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
|
||||
AC_DEFINE(USE_MB_IDENT, 1)
|
||||
;;
|
||||
utf32)
|
||||
AC_DEFINE(HAVE_CHARSET_utf32, 1, [Define to enable utf32])
|
||||
AC_DEFINE([USE_MB], 1, [Use multi-byte character routines])
|
||||
AC_DEFINE(USE_MB_IDENT, 1)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Charset '$cs' not available. (Available are: $CHARSETS_AVAILABLE).
|
||||
See the Installation chapter in the Reference Manual.])
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
default_charset_collations=""
|
||||
|
||||
case $default_charset in
|
||||
armscii8)
|
||||
default_charset_default_collation="armscii8_general_ci"
|
||||
default_charset_collations="armscii8_general_ci armscii8_bin"
|
||||
;;
|
||||
ascii)
|
||||
default_charset_default_collation="ascii_general_ci"
|
||||
default_charset_collations="ascii_general_ci ascii_bin"
|
||||
;;
|
||||
big5)
|
||||
default_charset_default_collation="big5_chinese_ci"
|
||||
default_charset_collations="big5_chinese_ci big5_bin"
|
||||
;;
|
||||
binary)
|
||||
default_charset_default_collation="binary"
|
||||
default_charset_collations="binary"
|
||||
;;
|
||||
cp1250)
|
||||
default_charset_default_collation="cp1250_general_ci"
|
||||
default_charset_collations="cp1250_general_ci cp1250_czech_cs cp1250_bin"
|
||||
;;
|
||||
cp1251)
|
||||
default_charset_default_collation="cp1251_general_ci"
|
||||
default_charset_collations="cp1251_general_ci cp1251_general_cs cp1251_bin cp1251_bulgarian_ci cp1251_ukrainian_ci"
|
||||
;;
|
||||
cp1256)
|
||||
default_charset_default_collation="cp1256_general_ci"
|
||||
default_charset_collations="cp1256_general_ci cp1256_bin"
|
||||
;;
|
||||
cp1257)
|
||||
default_charset_default_collation="cp1257_general_ci"
|
||||
default_charset_collations="cp1257_general_ci cp1257_lithuanian_ci cp1257_bin"
|
||||
;;
|
||||
cp850)
|
||||
default_charset_default_collation="cp850_general_ci"
|
||||
default_charset_collations="cp850_general_ci cp850_bin"
|
||||
;;
|
||||
cp852)
|
||||
default_charset_default_collation="cp852_general_ci"
|
||||
default_charset_collations="cp852_general_ci cp852_bin"
|
||||
;;
|
||||
cp866)
|
||||
default_charset_default_collation="cp866_general_ci"
|
||||
default_charset_collations="cp866_general_ci cp866_bin"
|
||||
;;
|
||||
cp932)
|
||||
default_charset_default_collation="cp932_japanese_ci"
|
||||
default_charset_collations="cp932_japanese_ci cp932_bin"
|
||||
;;
|
||||
dec8)
|
||||
default_charset_default_collation="dec8_swedish_ci"
|
||||
default_charset_collations="dec8_swedish_ci dec8_bin"
|
||||
;;
|
||||
eucjpms)
|
||||
default_charset_default_collation="eucjpms_japanese_ci"
|
||||
default_charset_collations="eucjpms_japanese_ci ujis_bin"
|
||||
;;
|
||||
euckr)
|
||||
default_charset_default_collation="euckr_korean_ci"
|
||||
default_charset_collations="euckr_korean_ci euckr_bin"
|
||||
;;
|
||||
gb2312)
|
||||
default_charset_default_collation="gb2312_chinese_ci"
|
||||
default_charset_collations="gb2312_chinese_ci gb2312_bin"
|
||||
;;
|
||||
gbk)
|
||||
default_charset_default_collation="gbk_chinese_ci"
|
||||
default_charset_collations="gbk_chinese_ci gbk_bin"
|
||||
;;
|
||||
geostd8)
|
||||
default_charset_default_collation="geostd8_general_ci"
|
||||
default_charset_collations="geostd8_general_ci geostd8_bin"
|
||||
;;
|
||||
greek)
|
||||
default_charset_default_collation="greek_general_ci"
|
||||
default_charset_collations="greek_general_ci greek_bin"
|
||||
;;
|
||||
hebrew)
|
||||
default_charset_default_collation="hebrew_general_ci"
|
||||
default_charset_collations="hebrew_general_ci hebrew_bin"
|
||||
;;
|
||||
hp8)
|
||||
default_charset_default_collation="hp8_english_ci"
|
||||
default_charset_collations="hp8_english_ci hp8_bin"
|
||||
;;
|
||||
keybcs2)
|
||||
default_charset_default_collation="keybcs2_general_ci"
|
||||
default_charset_collations="keybcs2_general_ci keybcs2_bin"
|
||||
;;
|
||||
koi8r)
|
||||
default_charset_default_collation="koi8r_general_ci"
|
||||
default_charset_collations="koi8r_general_ci koi8r_bin"
|
||||
;;
|
||||
koi8u)
|
||||
default_charset_default_collation="koi8u_general_ci"
|
||||
default_charset_collations="koi8u_general_ci koi8u_bin"
|
||||
;;
|
||||
latin1)
|
||||
default_charset_default_collation="latin1_swedish_ci"
|
||||
default_charset_collations="latin1_general_ci latin1_general_cs latin1_bin latin1_german1_ci latin1_german2_ci latin1_danish_ci latin1_spanish_ci latin1_swedish_ci"
|
||||
;;
|
||||
latin2)
|
||||
default_charset_default_collation="latin2_general_ci"
|
||||
default_charset_collations="latin2_general_ci latin2_bin latin2_czech_cs latin2_hungarian_ci latin2_croatian_ci"
|
||||
;;
|
||||
latin5)
|
||||
default_charset_default_collation="latin5_turkish_ci"
|
||||
default_charset_collations="latin5_turkish_ci latin5_bin"
|
||||
;;
|
||||
latin7)
|
||||
default_charset_default_collation="latin7_general_ci"
|
||||
default_charset_collations="latin7_general_ci latin7_general_cs latin7_bin latin7_estonian_cs"
|
||||
;;
|
||||
macce)
|
||||
default_charset_default_collation="macce_general_ci"
|
||||
default_charset_collations="macce_general_ci macce_bin"
|
||||
;;
|
||||
macroman)
|
||||
default_charset_default_collation="macroman_general_ci"
|
||||
default_charset_collations="macroman_general_ci macroman_bin"
|
||||
;;
|
||||
sjis)
|
||||
default_charset_default_collation="sjis_japanese_ci"
|
||||
default_charset_collations="sjis_japanese_ci sjis_bin"
|
||||
;;
|
||||
swe7)
|
||||
default_charset_default_collation="swe7_swedish_ci"
|
||||
default_charset_collations="swe7_swedish_ci swe7_bin"
|
||||
;;
|
||||
tis620)
|
||||
default_charset_default_collation="tis620_thai_ci"
|
||||
default_charset_collations="tis620_thai_ci tis620_bin"
|
||||
;;
|
||||
ucs2)
|
||||
default_charset_default_collation="ucs2_general_ci"
|
||||
define(UCSC1, ucs2_general_ci ucs2_bin)
|
||||
define(UCSC2, ucs2_czech_ci ucs2_danish_ci)
|
||||
define(UCSC3, ucs2_esperanto_ci ucs2_estonian_ci ucs2_hungarian_ci)
|
||||
define(UCSC4, ucs2_icelandic_ci ucs2_latvian_ci ucs2_lithuanian_ci)
|
||||
define(UCSC5, ucs2_persian_ci ucs2_polish_ci ucs2_romanian_ci)
|
||||
define(UCSC6, ucs2_slovak_ci ucs2_slovenian_ci)
|
||||
define(UCSC7, ucs2_spanish2_ci ucs2_spanish_ci)
|
||||
define(UCSC8, ucs2_swedish_ci ucs2_turkish_ci)
|
||||
define(UCSC9, ucs2_unicode_ci)
|
||||
UCSC="UCSC1 UCSC2 UCSC3 UCSC4 UCSC5 UCSC6 UCSC7 UCSC8 UCSC9"
|
||||
default_charset_collations="$UCSC"
|
||||
;;
|
||||
ujis)
|
||||
default_charset_default_collation="ujis_japanese_ci"
|
||||
default_charset_collations="ujis_japanese_ci ujis_bin"
|
||||
;;
|
||||
utf8)
|
||||
default_charset_default_collation="utf8_general_ci"
|
||||
if test "$default_collation" = "utf8_general_cs"; then
|
||||
# For those who explicitly desire "utf8_general_cs", support it,
|
||||
# and then also set the CPP switch enabling that code.
|
||||
UTFC="utf8_general_cs"
|
||||
AC_DEFINE([HAVE_UTF8_GENERAL_CS], [1], [certain Japanese customer])
|
||||
else
|
||||
define(UTFC1, utf8_general_ci utf8_bin)
|
||||
define(UTFC2, utf8_czech_ci utf8_danish_ci)
|
||||
define(UTFC3, utf8_esperanto_ci utf8_estonian_ci utf8_hungarian_ci)
|
||||
define(UTFC4, utf8_icelandic_ci utf8_latvian_ci utf8_lithuanian_ci)
|
||||
define(UTFC5, utf8_persian_ci utf8_polish_ci utf8_romanian_ci)
|
||||
define(UTFC6, utf8_slovak_ci utf8_slovenian_ci)
|
||||
define(UTFC7, utf8_spanish2_ci utf8_spanish_ci)
|
||||
define(UTFC8, utf8_swedish_ci utf8_turkish_ci)
|
||||
define(UTFC9, utf8_unicode_ci)
|
||||
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
|
||||
fi
|
||||
default_charset_collations="$UTFC"
|
||||
;;
|
||||
utf8mb4)
|
||||
default_charset_default_collation="utf8mb4_general_ci"
|
||||
define(UTFC1, utf8mb4_general_ci utf8mb4_bin)
|
||||
define(UTFC2, utf8mb4_czech_ci utf8mb4_danish_ci)
|
||||
define(UTFC3, utf8mb4_esperanto_ci utf8mb4_estonian_ci utf8mb4_hungarian_ci)
|
||||
define(UTFC4, utf8mb4_icelandic_ci utf8mb4_latvian_ci utf8mb4_lithuanian_ci)
|
||||
define(UTFC5, utf8mb4_persian_ci utf8mb4_polish_ci utf8mb4_romanian_ci)
|
||||
define(UTFC6, utf8mb4_sinhala_ci utf8mb4_slovak_ci utf8mb4_slovenian_ci)
|
||||
define(UTFC7, utf8mb4_spanish2_ci utf8mb4_spanish_ci)
|
||||
define(UTFC8, utf8mb4_swedish_ci utf8mb4_turkish_ci)
|
||||
define(UTFC9, utf8mb4_unicode_ci)
|
||||
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
|
||||
default_charset_collations="$UTFC"
|
||||
;;
|
||||
utf16)
|
||||
default_charset_default_collation="utf16_general_ci"
|
||||
define(UTFC1, utf16_general_ci utf16_bin)
|
||||
define(UTFC2, utf16_czech_ci utf16_danish_ci)
|
||||
define(UTFC3, utf16_esperanto_ci utf16_estonian_ci utf16_hungarian_ci)
|
||||
define(UTFC4, utf16_icelandic_ci utf16_latvian_ci utf16_lithuanian_ci)
|
||||
define(UTFC5, utf16_persian_ci utf16_polish_ci utf16_romanian_ci)
|
||||
define(UTFC6, utf16_sinhala_ci utf16_slovak_ci utf16_slovenian_ci)
|
||||
define(UTFC7, utf16_spanish2_ci utf16_spanish_ci)
|
||||
define(UTFC8, utf16_swedish_ci utf16_turkish_ci)
|
||||
define(UTFC9, utf16_unicode_ci)
|
||||
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
|
||||
default_charset_collations="$UTFC"
|
||||
;;
|
||||
utf32)
|
||||
default_charset_default_collation="utf32_general_ci"
|
||||
define(UTFC1, utf32_general_ci utf32_bin)
|
||||
define(UTFC2, utf32_czech_ci utf32_danish_ci)
|
||||
define(UTFC3, utf32_esperanto_ci utf32_estonian_ci utf32_hungarian_ci)
|
||||
define(UTFC4, utf32_icelandic_ci utf32_latvian_ci utf32_lithuanian_ci)
|
||||
define(UTFC5, utf32_persian_ci utf32_polish_ci utf32_romanian_ci)
|
||||
define(UTFC6, utf32_sinhala_ci utf32_slovak_ci utf32_slovenian_ci)
|
||||
define(UTFC7, utf32_spanish2_ci utf32_spanish_ci)
|
||||
define(UTFC8, utf32_swedish_ci utf32_turkish_ci)
|
||||
define(UTFC9, utf32_unicode_ci)
|
||||
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
|
||||
default_charset_collations="$UTFC"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Charset $cs not available. (Available are: $CHARSETS_AVAILABLE).
|
||||
See the Installation chapter in the Reference Manual.])
|
||||
esac
|
||||
|
||||
if test "$default_collation" = default; then
|
||||
default_collation=$default_charset_default_collation
|
||||
fi
|
||||
|
||||
valid_default_collation=no
|
||||
for cl in $default_charset_collations
|
||||
do
|
||||
if test x"$cl" = x"$default_collation"
|
||||
then
|
||||
valid_default_collation=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test x$valid_default_collation = xyes
|
||||
then
|
||||
AC_MSG_RESULT([default: $default_charset, collation: $default_collation; compiled in: $CHARSETS])
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
Collation $default_collation is not valid for character set $default_charset.
|
||||
Valid collations are: $default_charset_collations.
|
||||
See the Installation chapter in the Reference Manual.
|
||||
])
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_CHARSET_NAME], ["$default_charset"],
|
||||
[Define the default charset name])
|
||||
AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_COLLATION_NAME], ["$default_collation"],
|
||||
[Define the default charset name])
|
||||
|
||||
# Shall we build the UCA-based Unicode collations
|
||||
AC_ARG_WITH(uca,
|
||||
[ --without-uca Skip building of the national Unicode collations.],
|
||||
[with_uca=$withval],
|
||||
[with_uca=yes]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING([whether to compile national Unicode collations])
|
||||
|
||||
if test "$with_uca" = "yes"
|
||||
then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_UCA_COLLATIONS], [1], [national Unicode collations])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
|
||||
# Shall we build experimental collations
|
||||
AC_ARG_WITH(experimental-collations,
|
||||
[],
|
||||
[with_exp_coll=$withval],
|
||||
[with_exp_coll=no]
|
||||
)
|
||||
|
||||
if test "$with_exp_coll" = "yes"
|
||||
then
|
||||
AC_DEFINE([HAVE_UTF8_GENERAL_CS], [1], [certain Japanese customer])
|
||||
fi
|
|
@ -1,47 +0,0 @@
|
|||
AC_DEFUN([MYSQL_CHECK_CPU],
|
||||
[AC_CACHE_CHECK([if compiler supports optimizations for current cpu],
|
||||
mysql_cv_cpu,[
|
||||
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
if test -r /proc/cpuinfo ; then
|
||||
cpuinfo="cat /proc/cpuinfo"
|
||||
cpu_family=`$cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
|
||||
cpu_vendor=`$cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
|
||||
fi
|
||||
if test "$cpu_vendor" = "AuthenticAMD"; then
|
||||
if test $cpu_family -ge 6; then
|
||||
cpu_set="athlon pentiumpro k5 pentium i486 i386";
|
||||
elif test $cpu_family -eq 5; then
|
||||
cpu_set="k5 pentium i486 i386";
|
||||
elif test $cpu_family -eq 4; then
|
||||
cpu_set="i486 i386"
|
||||
else
|
||||
cpu_set="i386"
|
||||
fi
|
||||
elif test "$cpu_vendor" = "GenuineIntel"; then
|
||||
if test $cpu_family -ge 6; then
|
||||
cpu_set="pentiumpro pentium i486 i386";
|
||||
elif test $cpu_family -eq 5; then
|
||||
cpu_set="pentium i486 i386";
|
||||
elif test $cpu_family -eq 4; then
|
||||
cpu_set="i486 i386"
|
||||
else
|
||||
cpu_set="i386"
|
||||
fi
|
||||
fi
|
||||
|
||||
for ac_arg in $cpu_set;
|
||||
do
|
||||
CFLAGS="$ac_save_CFLAGS -mcpu=$ac_arg -march=$ac_arg -DCPU=$ac_arg"
|
||||
AC_TRY_COMPILE([],[int i],mysql_cv_cpu=$ac_arg; break;, mysql_cv_cpu="unknown")
|
||||
done
|
||||
|
||||
if test "$mysql_cv_cpu" = "unknown"
|
||||
then
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
AC_MSG_RESULT(none)
|
||||
else
|
||||
AC_MSG_RESULT($mysql_cv_cpu)
|
||||
fi
|
||||
])])
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
# option, cache_name, variable,
|
||||
# code to execute if yes, code to exectute if fail
|
||||
AC_DEFUN([AC_SYS_COMPILER_FLAG],
|
||||
[
|
||||
AC_MSG_CHECKING($1)
|
||||
OLD_CFLAGS="[$]CFLAGS"
|
||||
AC_CACHE_VAL(mysql_cv_option_$2,
|
||||
[
|
||||
CFLAGS="[$]OLD_CFLAGS $1"
|
||||
AC_TRY_LINK([int main(){exit(0);}],mysql_cv_option_$2=yes,mysql_cv_option_$2=no,mysql_cv_option_$2=no)
|
||||
])
|
||||
|
||||
CFLAGS="[$]OLD_CFLAGS"
|
||||
|
||||
if test x"[$]mysql_cv_option_$2" = "xyes" ; then
|
||||
$3="[$]$3 $1"
|
||||
AC_MSG_RESULT(yes)
|
||||
$5
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
$4
|
||||
fi
|
||||
])
|
||||
|
||||
# arch, option, cache_name, variable
|
||||
AC_DEFUN([AC_SYS_CPU_COMPILER_FLAG],
|
||||
[
|
||||
if test "`uname -m 2>/dev/null`" = "$1" ; then
|
||||
AC_SYS_COMPILER_FLAG($2,$3,$4)
|
||||
fi
|
||||
])
|
||||
|
||||
# os, option, cache_name, variable
|
||||
AC_DEFUN([AC_SYS_OS_COMPILER_FLAG],
|
||||
[
|
||||
if test "x$mysql_cv_sys_os" = "x$1" ; then
|
||||
AC_SYS_COMPILER_FLAG($2,$3,$4)
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_CHECK_NOEXECSTACK],
|
||||
[
|
||||
AC_CACHE_CHECK(whether --noexecstack is desirable for .S files,
|
||||
mysql_cv_as_noexecstack, [dnl
|
||||
cat > conftest.c <<EOF
|
||||
void foo (void) { }
|
||||
EOF
|
||||
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS
|
||||
-S -o conftest.s conftest.c 1>&AS_MESSAGE_LOG_FD]) \
|
||||
&& grep .note.GNU-stack conftest.s >/dev/null \
|
||||
&& AC_TRY_COMMAND([${CC-cc} $CCASFLAGS $CPPFLAGS -Wa,--noexecstack
|
||||
-c -o conftest.o conftest.s 1>&AS_MESSAGE_LOG_FD])
|
||||
then
|
||||
mysql_cv_as_noexecstack=yes
|
||||
else
|
||||
mysql_cv_as_noexecstack=no
|
||||
fi
|
||||
rm -f conftest*])
|
||||
if test $mysql_cv_as_noexecstack = yes; then
|
||||
CCASFLAGS="$CCASFLAGS -Wa,--noexecstack"
|
||||
fi
|
||||
])
|
|
@ -1,38 +0,0 @@
|
|||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: DTRACE_TEST
|
||||
dnl ---------------------------------------------------------------------------
|
||||
AC_ARG_ENABLE(dtrace,
|
||||
AC_HELP_STRING([--enable-dtrace],[Build with support for the DTRACE.]),
|
||||
[
|
||||
ENABLE_DTRACE="$enable_dtrace"
|
||||
],
|
||||
[
|
||||
ENABLE_DTRACE="yes"
|
||||
]
|
||||
)
|
||||
DTRACEFLAGS=""
|
||||
HAVE_DTRACE=""
|
||||
HAVE_DTRACE_DASH_G=""
|
||||
if test "$ENABLE_DTRACE" = "yes"; then
|
||||
AC_PATH_PROGS(DTRACE, dtrace, [not found], [$PATH:/usr/sbin])
|
||||
if test "$DTRACE" = "not found"; then
|
||||
ENABLE_DTRACE="no"
|
||||
else
|
||||
AC_DEFINE([HAVE_DTRACE], [1], [Defined to 1 if DTrace support is enabled])
|
||||
case "$target_os" in
|
||||
*solaris*)
|
||||
HAVE_DTRACE_DASH_G="yes"
|
||||
;;
|
||||
*)
|
||||
HAVE_DTRACE_DASH_G="no"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(DTRACEFLAGS)
|
||||
AC_SUBST(HAVE_DTRACE)
|
||||
AM_CONDITIONAL([HAVE_DTRACE], [ test "$ENABLE_DTRACE" = "yes" ])
|
||||
AM_CONDITIONAL([HAVE_DTRACE_DASH_G], [ test "$HAVE_DTRACE_DASH_G" = "yes" ])
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl End Macro: DTRACE_TEST
|
||||
dnl ---------------------------------------------------------------------------
|
|
@ -1,142 +0,0 @@
|
|||
|
||||
dnl By default, many hosts won't let programs access large files;
|
||||
dnl one must use special compiler options to get large-file access to work.
|
||||
dnl For more details about this brain damage please see:
|
||||
dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
|
||||
|
||||
dnl Written by Paul Eggert <eggert@twinsun.com>.
|
||||
|
||||
dnl Internal subroutine of AC_SYS_LARGEFILE.
|
||||
dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
|
||||
AC_DEFUN([AC_SYS_LARGEFILE_FLAGS],
|
||||
[AC_CACHE_CHECK([for $1 value to request large file support],
|
||||
ac_cv_sys_largefile_$1,
|
||||
[if ($GETCONF LFS_$1) >conftest.1 2>conftest.2 && test ! -s conftest.2
|
||||
then
|
||||
ac_cv_sys_largefile_$1=`cat conftest.1`
|
||||
else
|
||||
ac_cv_sys_largefile_$1=no
|
||||
ifelse($1, CFLAGS,
|
||||
[case "$host_os" in
|
||||
# HP-UX 10.20 requires -D__STDC_EXT__ with gcc 2.95.1.
|
||||
changequote(, )dnl
|
||||
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
|
||||
changequote([, ])dnl
|
||||
if test "$GCC" = yes; then
|
||||
case `$CC --version 2>/dev/null` in
|
||||
2.95.*) ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__ ;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
# IRIX 6.2 and later require cc -n32.
|
||||
changequote(, )dnl
|
||||
irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
|
||||
changequote([, ])dnl
|
||||
if test "$GCC" != yes; then
|
||||
ac_cv_sys_largefile_CFLAGS=-n32
|
||||
fi
|
||||
esac
|
||||
if test "$ac_cv_sys_largefile_CFLAGS" != no; then
|
||||
ac_save_CC="$CC"
|
||||
CC="$CC $ac_cv_sys_largefile_CFLAGS"
|
||||
AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
|
||||
CC="$ac_save_CC"
|
||||
fi])
|
||||
fi
|
||||
rm -f conftest*])])
|
||||
|
||||
dnl Internal subroutine of AC_SYS_LARGEFILE.
|
||||
dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
|
||||
AC_DEFUN([AC_SYS_LARGEFILE_SPACE_APPEND],
|
||||
[case $2 in
|
||||
no) ;;
|
||||
?*)
|
||||
case "[$]$1" in
|
||||
'') $1=$2 ;;
|
||||
*) $1=[$]$1' '$2 ;;
|
||||
esac ;;
|
||||
esac])
|
||||
|
||||
dnl Internal subroutine of AC_SYS_LARGEFILE.
|
||||
dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT)
|
||||
AC_DEFUN([AC_SYS_LARGEFILE_MACRO_VALUE],
|
||||
[AC_CACHE_CHECK([for $1], $2,
|
||||
[$2=no
|
||||
changequote(, )dnl
|
||||
for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
|
||||
case "$ac_flag" in
|
||||
-D$1)
|
||||
$2=1 ;;
|
||||
-D$1=*)
|
||||
$2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
|
||||
esac
|
||||
done
|
||||
$4
|
||||
changequote([, ])dnl
|
||||
])
|
||||
if test "[$]$2" != no; then
|
||||
AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
|
||||
fi])
|
||||
|
||||
AC_DEFUN([MYSQL_SYS_LARGEFILE],
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_ARG_ENABLE(largefile,
|
||||
[ --disable-largefile Omit support for large files])
|
||||
if test "$enable_largefile" != no; then
|
||||
AC_CHECK_TOOL(GETCONF, getconf)
|
||||
AC_SYS_LARGEFILE_FLAGS(CFLAGS)
|
||||
AC_SYS_LARGEFILE_FLAGS(LDFLAGS)
|
||||
AC_SYS_LARGEFILE_FLAGS(LIBS)
|
||||
|
||||
for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
|
||||
case "$ac_flag" in
|
||||
no) ;;
|
||||
-D_FILE_OFFSET_BITS=*) ;;
|
||||
-D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
|
||||
-D_LARGE_FILES | -D_LARGE_FILES=*) ;;
|
||||
-D?* | -I?*)
|
||||
AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
|
||||
*)
|
||||
AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
|
||||
esac
|
||||
done
|
||||
AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS")
|
||||
AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
|
||||
|
||||
AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
|
||||
ac_cv_sys_file_offset_bits,
|
||||
[Number of bits in a file offset, on hosts where this is settable.],
|
||||
[case "$host_os" in
|
||||
# HP-UX 10.20 and later
|
||||
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
|
||||
ac_cv_sys_file_offset_bits=64 ;;
|
||||
# We can't declare _FILE_OFFSET_BITS here as this will cause
|
||||
# compile errors as AC_PROG_CC adds include files in confdefs.h
|
||||
# We solve this (until autoconf is fixed) by instead declaring it
|
||||
# as define instead
|
||||
solaris2.[8,9])
|
||||
CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64"
|
||||
CXXFLAGS="$CXXFLAGS -D_FILE_OFFSET_BITS=64"
|
||||
ac_cv_sys_file_offset_bits=no ;;
|
||||
esac])
|
||||
AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
|
||||
ac_cv_sys_largefile_source,
|
||||
[makes fseeko etc. visible, on some hosts.],
|
||||
[case "$host_os" in
|
||||
# HP-UX 10.20 and later
|
||||
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
|
||||
ac_cv_sys_largefile_source=1 ;;
|
||||
esac])
|
||||
|
||||
AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
|
||||
ac_cv_sys_large_files,
|
||||
[Large files support on AIX-style hosts.],
|
||||
[case "$host_os" in
|
||||
# Large file support on AIX is available starting from version 4.2
|
||||
# Tested only on 5.2 and up
|
||||
aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
|
||||
ac_cv_sys_large_files=1 ;;
|
||||
esac])
|
||||
fi
|
||||
])
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
#
|
||||
# Control aspects of the development environment which are
|
||||
# specific to MySQL maintainers and developers.
|
||||
#
|
||||
AC_DEFUN([MY_MAINTAINER_MODE], [
|
||||
AC_MSG_CHECKING([whether to enable the maintainer-specific development environment])
|
||||
AC_ARG_ENABLE([mysql-maintainer-mode],
|
||||
[AS_HELP_STRING([--enable-mysql-maintainer-mode],
|
||||
[Enable a MySQL maintainer-specific development environment])],
|
||||
[USE_MYSQL_MAINTAINER_MODE=$enableval],
|
||||
[AS_IF([test "$with_debug" != "no"],
|
||||
[USE_MYSQL_MAINTAINER_MODE=yes], [USE_MYSQL_MAINTAINER_MODE=no])])
|
||||
AC_MSG_RESULT([$USE_MYSQL_MAINTAINER_MODE])
|
||||
])
|
||||
|
||||
# Set warning options required under maintainer mode.
|
||||
AC_DEFUN([MY_MAINTAINER_MODE_WARNINGS], [
|
||||
# Setup GCC warning options.
|
||||
AS_IF([test "$GCC" = "yes"], [
|
||||
C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror"
|
||||
CXX_WARNINGS="${C_WARNINGS} -Wno-unused-parameter"
|
||||
C_WARNINGS="${C_WARNINGS} -Wdeclaration-after-statement"
|
||||
])
|
||||
|
||||
# Test whether the warning options work.
|
||||
# Test C options
|
||||
AS_IF([test -n "$C_WARNINGS"], [
|
||||
save_CFLAGS="$CFLAGS"
|
||||
AC_MSG_CHECKING([whether to use C warning options ${C_WARNINGS}])
|
||||
AC_LANG_PUSH(C)
|
||||
CFLAGS="$CFLAGS ${C_WARNINGS}"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [myac_c_warning_flags=yes],
|
||||
[myac_c_warning_flags=no])
|
||||
AC_LANG_POP()
|
||||
AC_MSG_RESULT([$myac_c_warning_flags])
|
||||
CFLAGS="$save_CFLAGS"
|
||||
])
|
||||
|
||||
# Test C++ options
|
||||
AS_IF([test -n "$CXX_WARNINGS"], [
|
||||
save_CXXFLAGS="$CXXFLAGS"
|
||||
AC_MSG_CHECKING([whether to use C++ warning options ${CXX_WARNINGS}])
|
||||
AC_LANG_PUSH(C++)
|
||||
CXXFLAGS="$CXXFLAGS ${CXX_WARNINGS}"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [myac_cxx_warning_flags=yes],
|
||||
[myac_cxx_warning_flags=no])
|
||||
AC_LANG_POP()
|
||||
AC_MSG_RESULT([$myac_cxx_warning_flags])
|
||||
CXXFLAGS="$save_CXXFLAGS"
|
||||
])
|
||||
|
||||
# Set compile flag variables.
|
||||
AS_IF([test "$myac_c_warning_flags" = "yes"], [
|
||||
AM_CFLAGS="${AM_CFLAGS} ${C_WARNINGS}"
|
||||
AC_SUBST([AM_CFLAGS])])
|
||||
AS_IF([test "$myac_cxx_warning_flags" = "yes"], [
|
||||
AM_CXXFLAGS="${AM_CXXFLAGS} ${CXX_WARNINGS}"
|
||||
AC_SUBST([AM_CXXFLAGS])])
|
||||
])
|
||||
|
||||
|
||||
# Set compiler flags required under maintainer mode.
|
||||
AC_DEFUN([MY_MAINTAINER_MODE_SETUP], [
|
||||
AS_IF([test "$USE_MYSQL_MAINTAINER_MODE" = "yes"],
|
||||
[MY_MAINTAINER_MODE_WARNINGS])
|
||||
])
|
|
@ -1,688 +0,0 @@
|
|||
# Local macros for automake & autoconf
|
||||
|
||||
#---START: Used in for client configure
|
||||
AC_DEFUN([MYSQL_TYPE_ACCEPT],
|
||||
[ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
AC_CACHE_CHECK([base type of last arg to accept], mysql_cv_btype_last_arg_accept,
|
||||
AC_LANG_PUSH(C++)
|
||||
if test "$ac_cv_prog_gxx" = "yes"
|
||||
then
|
||||
# Add -Werror, remove -fbranch-probabilities (Bug #268)
|
||||
CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-Wcheck//'`
|
||||
fi
|
||||
mysql_cv_btype_last_arg_accept=none
|
||||
[AC_TRY_COMPILE([#if defined(inline)
|
||||
#undef inline
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
],
|
||||
[int a = accept(1, (struct sockaddr *) 0, (socklen_t *) 0); return (a != 0);],
|
||||
mysql_cv_btype_last_arg_accept=socklen_t)]
|
||||
if test "$mysql_cv_btype_last_arg_accept" = "none"; then
|
||||
[AC_TRY_COMPILE([#if defined(inline)
|
||||
#undef inline
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
],
|
||||
[int a = accept(1, (struct sockaddr *) 0, (size_t *) 0); return (a != 0);],
|
||||
mysql_cv_btype_last_arg_accept=size_t)]
|
||||
fi
|
||||
if test "$mysql_cv_btype_last_arg_accept" = "none"; then
|
||||
mysql_cv_btype_last_arg_accept=int
|
||||
fi)
|
||||
AC_LANG_POP(C++)
|
||||
AC_DEFINE_UNQUOTED([SOCKET_SIZE_TYPE], [$mysql_cv_btype_last_arg_accept],
|
||||
[The base type of the last arg to accept])
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||
])
|
||||
#---END:
|
||||
|
||||
dnl Find type of qsort
|
||||
AC_DEFUN([MYSQL_TYPE_QSORT],
|
||||
[AC_CACHE_CHECK([return type of qsort], mysql_cv_type_qsort,
|
||||
[AC_TRY_COMPILE([#include <stdlib.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
void qsort(void *base, size_t nel, size_t width,
|
||||
int (*compar) (const void *, const void *));
|
||||
],
|
||||
[int i;], mysql_cv_type_qsort=void, mysql_cv_type_qsort=int)])
|
||||
AC_DEFINE_UNQUOTED([RETQSORTTYPE], [$mysql_cv_type_qsort],
|
||||
[The return type of qsort (int or void).])
|
||||
if test "$mysql_cv_type_qsort" = "void"
|
||||
then
|
||||
AC_DEFINE_UNQUOTED([QSORT_TYPE_IS_VOID], [1], [qsort returns void])
|
||||
fi
|
||||
])
|
||||
|
||||
#---START: Figure out whether to use 'struct rlimit' or 'struct rlimit64'
|
||||
AC_DEFUN([MYSQL_TYPE_STRUCT_RLIMIT],
|
||||
[ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
AC_CACHE_CHECK([struct type to use with setrlimit], mysql_cv_btype_struct_rlimit,
|
||||
AC_LANG_PUSH(C++)
|
||||
if test "$ac_cv_prog_gxx" = "yes"
|
||||
then
|
||||
# Add -Werror, remove -fbranch-probabilities (Bug #268)
|
||||
CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-Wcheck//'`
|
||||
fi
|
||||
mysql_cv_btype_struct_rlimit=none
|
||||
[AC_TRY_COMPILE([#if defined(inline)
|
||||
#undef inline
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
#include <sys/resource.h>
|
||||
],
|
||||
[struct rlimit64 rl; setrlimit(RLIMIT_CORE, &rl);],
|
||||
mysql_cv_btype_struct_rlimit="struct rlimit64")]
|
||||
if test "$mysql_cv_btype_struct_rlimit" = "none"; then
|
||||
mysql_cv_btype_struct_rlimit="struct rlimit"
|
||||
fi)
|
||||
AC_LANG_POP(C++)
|
||||
AC_DEFINE_UNQUOTED([STRUCT_RLIMIT], [$mysql_cv_btype_struct_rlimit],
|
||||
[The struct rlimit type to use with setrlimit])
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||
])
|
||||
#---END:
|
||||
|
||||
AC_DEFUN([MYSQL_TIMESPEC_TS],
|
||||
[AC_CACHE_CHECK([if struct timespec has a ts_sec member], mysql_cv_timespec_ts,
|
||||
[AC_TRY_COMPILE([#include <pthread.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
],
|
||||
[struct timespec abstime;
|
||||
|
||||
abstime.ts_sec = time(NULL)+1;
|
||||
abstime.ts_nsec = 0;
|
||||
], mysql_cv_timespec_ts=yes, mysql_cv_timespec_ts=no)])
|
||||
if test "$mysql_cv_timespec_ts" = "yes"
|
||||
then
|
||||
AC_DEFINE([HAVE_TIMESPEC_TS_SEC], [1],
|
||||
[Timespec has a ts_sec instead of tv_sev])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([MYSQL_TZNAME],
|
||||
[AC_CACHE_CHECK([if we have tzname variable], mysql_cv_tzname,
|
||||
[AC_TRY_COMPILE([#include <time.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
],
|
||||
[ tzset();
|
||||
return tzname[0] != 0;
|
||||
], mysql_cv_tzname=yes, mysql_cv_tzname=no)])
|
||||
if test "$mysql_cv_tzname" = "yes"
|
||||
then
|
||||
AC_DEFINE([HAVE_TZNAME], [1], [Have the tzname variable])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([MYSQL_PTHREAD_YIELD],
|
||||
[AC_CACHE_CHECK([if pthread_yield takes zero arguments], ac_cv_pthread_yield_zero_arg,
|
||||
[AC_TRY_LINK([#define _GNU_SOURCE
|
||||
#include <pthread.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
],
|
||||
[
|
||||
pthread_yield();
|
||||
], ac_cv_pthread_yield_zero_arg=yes, ac_cv_pthread_yield_zero_arg=yeso)])
|
||||
if test "$ac_cv_pthread_yield_zero_arg" = "yes"
|
||||
then
|
||||
AC_DEFINE([HAVE_PTHREAD_YIELD_ZERO_ARG], [1],
|
||||
[pthread_yield that doesn't take any arguments])
|
||||
fi
|
||||
]
|
||||
[AC_CACHE_CHECK([if pthread_yield takes 1 argument], ac_cv_pthread_yield_one_arg,
|
||||
[AC_TRY_LINK([#define _GNU_SOURCE
|
||||
#include <pthread.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
],
|
||||
[
|
||||
pthread_yield(0);
|
||||
], ac_cv_pthread_yield_one_arg=yes, ac_cv_pthread_yield_one_arg=no)])
|
||||
if test "$ac_cv_pthread_yield_one_arg" = "yes"
|
||||
then
|
||||
AC_DEFINE([HAVE_PTHREAD_YIELD_ONE_ARG], [1],
|
||||
[pthread_yield function with one argument])
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
|
||||
#---END:
|
||||
|
||||
# From fileutils-3.14/aclocal.m4
|
||||
|
||||
# @defmac AC_PROG_CC_STDC
|
||||
# @maindex PROG_CC_STDC
|
||||
# @ovindex CC
|
||||
# If the C compiler in not in ANSI C mode by default, try to add an option
|
||||
# to output variable @code{CC} to make it so. This macro tries various
|
||||
# options that select ANSI C on some system or another. It considers the
|
||||
# compiler to be in ANSI C mode if it defines @code{__STDC__} to 1 and
|
||||
# handles function prototypes correctly.
|
||||
#
|
||||
# Patched by monty to only check if __STDC__ is defined. With the original
|
||||
# check it's impossible to get things to work with the Sunpro compiler from
|
||||
# Workshop 4.2
|
||||
#
|
||||
# If you use this macro, you should check after calling it whether the C
|
||||
# compiler has been set to accept ANSI C; if not, the shell variable
|
||||
# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
|
||||
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
|
||||
# program @code{ansi2knr}, which comes with Ghostscript.
|
||||
# @end defmac
|
||||
|
||||
AC_DEFUN([AM_PROG_CC_STDC],
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
|
||||
AC_CACHE_VAL(am_cv_prog_cc_stdc,
|
||||
[am_cv_prog_cc_stdc=no
|
||||
ac_save_CC="$CC"
|
||||
# Don't try gcc -ansi; that turns off useful extensions and
|
||||
# breaks some systems' header files.
|
||||
# AIX -qlanglvl=ansi
|
||||
# Ultrix and OSF/1 -std1
|
||||
# HP-UX -Aa -D_HPUX_SOURCE
|
||||
# SVR4 -Xc -D__EXTENSIONS__
|
||||
# removed "-Xc -D__EXTENSIONS__" beacause sun c++ does not like it.
|
||||
for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE"
|
||||
do
|
||||
CC="$ac_save_CC $ac_arg"
|
||||
AC_TRY_COMPILE(
|
||||
[#if !defined(__STDC__)
|
||||
choke me
|
||||
#endif
|
||||
/* DYNIX/ptx V4.1.3 can't compile sys/stat.h with -Xc -D__EXTENSIONS__. */
|
||||
#ifdef _SEQUENT_
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
], [
|
||||
int test (int i, double x);
|
||||
struct s1 {int (*f) (int a);};
|
||||
struct s2 {int (*f) (double a);};],
|
||||
[am_cv_prog_cc_stdc="$ac_arg"; break])
|
||||
done
|
||||
CC="$ac_save_CC"
|
||||
])
|
||||
AC_MSG_RESULT($am_cv_prog_cc_stdc)
|
||||
case "x$am_cv_prog_cc_stdc" in
|
||||
x|xno) ;;
|
||||
*) CC="$CC $am_cv_prog_cc_stdc" ;;
|
||||
esac
|
||||
])
|
||||
|
||||
# Orginal from bash-2.0 aclocal.m4, Changed to use termcap last by monty.
|
||||
|
||||
AC_DEFUN([MYSQL_CHECK_LIB_TERMCAP],
|
||||
[
|
||||
AC_CACHE_VAL(mysql_cv_termcap_lib,
|
||||
[AC_CHECK_LIB(ncursesw, tgetent, mysql_cv_termcap_lib=libncursesw,
|
||||
[AC_CHECK_LIB(ncurses, tgetent, mysql_cv_termcap_lib=libncurses,
|
||||
[AC_CHECK_LIB(curses, tgetent, mysql_cv_termcap_lib=libcurses,
|
||||
[AC_CHECK_LIB(termcap, tgetent, mysql_cv_termcap_lib=libtermcap,
|
||||
[AC_CHECK_LIB(tinfo, tgetent, mysql_cv_termcap_lib=libtinfo,
|
||||
mysql_cv_termcap_lib=NOT_FOUND)])])])])])
|
||||
AC_MSG_CHECKING(for termcap functions library)
|
||||
if test "$mysql_cv_termcap_lib" = "NOT_FOUND"; then
|
||||
AC_MSG_ERROR([No curses/termcap library found])
|
||||
elif test "$mysql_cv_termcap_lib" = "libtermcap"; then
|
||||
TERMCAP_LIB=-ltermcap
|
||||
elif test "$mysql_cv_termcap_lib" = "libncursesw"; then
|
||||
TERMCAP_LIB=-lncursesw
|
||||
elif test "$mysql_cv_termcap_lib" = "libncurses"; then
|
||||
TERMCAP_LIB=-lncurses
|
||||
elif test "$mysql_cv_termcap_lib" = "libtinfo"; then
|
||||
TERMCAP_LIB=-ltinfo
|
||||
else
|
||||
TERMCAP_LIB=-lcurses
|
||||
fi
|
||||
AC_MSG_RESULT($TERMCAP_LIB)
|
||||
])
|
||||
|
||||
dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7)
|
||||
AC_DEFUN([MYSQL_SIGNAL_CHECK],
|
||||
[AC_REQUIRE([AC_TYPE_SIGNAL])
|
||||
AC_MSG_CHECKING(for type of signal functions)
|
||||
AC_CACHE_VAL(mysql_cv_signal_vintage,
|
||||
[
|
||||
AC_TRY_LINK([#include <signal.h>],[
|
||||
sigset_t ss;
|
||||
struct sigaction sa;
|
||||
sigemptyset(&ss); sigsuspend(&ss);
|
||||
sigaction(SIGINT, &sa, (struct sigaction *) 0);
|
||||
sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
|
||||
], mysql_cv_signal_vintage=posix,
|
||||
[
|
||||
AC_TRY_LINK([#include <signal.h>], [
|
||||
int mask = sigmask(SIGINT);
|
||||
sigsetmask(mask); sigblock(mask); sigpause(mask);
|
||||
], mysql_cv_signal_vintage=4.2bsd,
|
||||
[
|
||||
AC_TRY_LINK([
|
||||
#include <signal.h>
|
||||
RETSIGTYPE foo() { }], [
|
||||
int mask = sigmask(SIGINT);
|
||||
sigset(SIGINT, foo); sigrelse(SIGINT);
|
||||
sighold(SIGINT); sigpause(SIGINT);
|
||||
], mysql_cv_signal_vintage=svr3, mysql_cv_signal_vintage=v7
|
||||
)]
|
||||
)]
|
||||
)
|
||||
])
|
||||
AC_MSG_RESULT($mysql_cv_signal_vintage)
|
||||
if test "$mysql_cv_signal_vintage" = posix; then
|
||||
AC_DEFINE(HAVE_POSIX_SIGNALS, [1],
|
||||
[Signal handling is POSIX (sigset/sighold, etc)])
|
||||
elif test "$mysql_cv_signal_vintage" = "4.2bsd"; then
|
||||
AC_DEFINE([HAVE_BSD_SIGNALS], [1], [BSD style signals])
|
||||
elif test "$mysql_cv_signal_vintage" = svr3; then
|
||||
AC_DEFINE(HAVE_USG_SIGHOLD, [1], [sighold() is present and usable])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([MYSQL_CHECK_GETPW_FUNCS],
|
||||
[AC_MSG_CHECKING(whether programs are able to redeclare getpw functions)
|
||||
AC_CACHE_VAL(mysql_cv_can_redecl_getpw,
|
||||
[AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <pwd.h>
|
||||
extern struct passwd *getpwent();], [struct passwd *z; z = getpwent();],
|
||||
mysql_cv_can_redecl_getpw=yes,mysql_cv_can_redecl_getpw=no)])
|
||||
AC_MSG_RESULT($mysql_cv_can_redecl_getpw)
|
||||
if test "$mysql_cv_can_redecl_getpw" = "no"; then
|
||||
AC_DEFINE(HAVE_GETPW_DECLS, [1], [getpwent() declaration present])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([MYSQL_HAVE_TIOCGWINSZ],
|
||||
[AC_MSG_CHECKING(for TIOCGWINSZ in sys/ioctl.h)
|
||||
AC_CACHE_VAL(mysql_cv_tiocgwinsz_in_ioctl,
|
||||
[AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/ioctl.h>], [int x = TIOCGWINSZ;],
|
||||
mysql_cv_tiocgwinsz_in_ioctl=yes,mysql_cv_tiocgwinsz_in_ioctl=no)])
|
||||
AC_MSG_RESULT($mysql_cv_tiocgwinsz_in_ioctl)
|
||||
if test "$mysql_cv_tiocgwinsz_in_ioctl" = "yes"; then
|
||||
AC_DEFINE([GWINSZ_IN_SYS_IOCTL], [1],
|
||||
[READLINE: your system defines TIOCGWINSZ in sys/ioctl.h.])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([MYSQL_HAVE_FIONREAD],
|
||||
[AC_MSG_CHECKING(for FIONREAD in sys/ioctl.h)
|
||||
AC_CACHE_VAL(mysql_cv_fionread_in_ioctl,
|
||||
[AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/ioctl.h>], [int x = FIONREAD;],
|
||||
mysql_cv_fionread_in_ioctl=yes,mysql_cv_fionread_in_ioctl=no)])
|
||||
AC_MSG_RESULT($mysql_cv_fionread_in_ioctl)
|
||||
if test "$mysql_cv_fionread_in_ioctl" = "yes"; then
|
||||
AC_DEFINE([FIONREAD_IN_SYS_IOCTL], [1], [Do we have FIONREAD])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([MYSQL_HAVE_TIOCSTAT],
|
||||
[AC_MSG_CHECKING(for TIOCSTAT in sys/ioctl.h)
|
||||
AC_CACHE_VAL(mysql_cv_tiocstat_in_ioctl,
|
||||
[AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/ioctl.h>], [int x = TIOCSTAT;],
|
||||
mysql_cv_tiocstat_in_ioctl=yes,mysql_cv_tiocstat_in_ioctl=no)])
|
||||
AC_MSG_RESULT($mysql_cv_tiocstat_in_ioctl)
|
||||
if test "$mysql_cv_tiocstat_in_ioctl" = "yes"; then
|
||||
AC_DEFINE(TIOCSTAT_IN_SYS_IOCTL, [1],
|
||||
[declaration of TIOCSTAT in sys/ioctl.h])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([MYSQL_STRUCT_DIRENT_D_INO],
|
||||
[AC_REQUIRE([AC_HEADER_DIRENT])
|
||||
AC_MSG_CHECKING(if struct dirent has a d_ino member)
|
||||
AC_CACHE_VAL(mysql_cv_dirent_has_dino,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif /* HAVE_UNISTD_H */
|
||||
#if defined(HAVE_DIRENT_H)
|
||||
# include <dirent.h>
|
||||
#else
|
||||
# define dirent direct
|
||||
# ifdef HAVE_SYS_NDIR_H
|
||||
# include <sys/ndir.h>
|
||||
# endif /* SYSNDIR */
|
||||
# ifdef HAVE_SYS_DIR_H
|
||||
# include <sys/dir.h>
|
||||
# endif /* SYSDIR */
|
||||
# ifdef HAVE_NDIR_H
|
||||
# include <ndir.h>
|
||||
# endif
|
||||
#endif /* HAVE_DIRENT_H */
|
||||
],[
|
||||
struct dirent d; int z; z = d.d_ino;
|
||||
], mysql_cv_dirent_has_dino=yes, mysql_cv_dirent_has_dino=no)])
|
||||
AC_MSG_RESULT($mysql_cv_dirent_has_dino)
|
||||
if test "$mysql_cv_dirent_has_dino" = "yes"; then
|
||||
AC_DEFINE(STRUCT_DIRENT_HAS_D_INO, [1],
|
||||
[d_ino member present in struct dirent])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([MYSQL_STRUCT_DIRENT_D_NAMLEN],
|
||||
[AC_REQUIRE([AC_HEADER_DIRENT])
|
||||
AC_MSG_CHECKING(if struct dirent has a d_namlen member)
|
||||
AC_CACHE_VAL(mysql_cv_dirent_has_dnamlen,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif /* HAVE_UNISTD_H */
|
||||
#if defined(HAVE_DIRENT_H)
|
||||
# include <dirent.h>
|
||||
#else
|
||||
# define dirent direct
|
||||
# ifdef HAVE_SYS_NDIR_H
|
||||
# include <sys/ndir.h>
|
||||
# endif /* SYSNDIR */
|
||||
# ifdef HAVE_SYS_DIR_H
|
||||
# include <sys/dir.h>
|
||||
# endif /* SYSDIR */
|
||||
# ifdef HAVE_NDIR_H
|
||||
# include <ndir.h>
|
||||
# endif
|
||||
#endif /* HAVE_DIRENT_H */
|
||||
],[
|
||||
struct dirent d; int z; z = (int)d.d_namlen;
|
||||
], mysql_cv_dirent_has_dnamlen=yes, mysql_cv_dirent_has_dnamlen=no)])
|
||||
AC_MSG_RESULT($mysql_cv_dirent_has_dnamlen)
|
||||
if test "$mysql_cv_dirent_has_dnamlen" = "yes"; then
|
||||
AC_DEFINE(STRUCT_DIRENT_HAS_D_NAMLEN, [1],
|
||||
[d_namlen member present in struct dirent])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([MYSQL_TYPE_SIGHANDLER],
|
||||
[AC_MSG_CHECKING([whether signal handlers are of type void])
|
||||
AC_CACHE_VAL(mysql_cv_void_sighandler,
|
||||
[AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
#ifdef signal
|
||||
#undef signal
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
void (*signal ()) ();],
|
||||
[int i;], mysql_cv_void_sighandler=yes, mysql_cv_void_sighandler=no)])dnl
|
||||
AC_MSG_RESULT($mysql_cv_void_sighandler)
|
||||
if test "$mysql_cv_void_sighandler" = "yes"; then
|
||||
AC_DEFINE(VOID_SIGHANDLER, [1], [sighandler type is void (*signal ()) ();])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([MYSQL_CXX_BOOL],
|
||||
[
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_MSG_CHECKING(if ${CXX} supports bool types)
|
||||
AC_CACHE_VAL(mysql_cv_have_bool,
|
||||
[
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_TRY_COMPILE(,[bool b = true;],
|
||||
mysql_cv_have_bool=yes,
|
||||
mysql_cv_have_bool=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
AC_MSG_RESULT($mysql_cv_have_bool)
|
||||
if test "$mysql_cv_have_bool" = yes; then
|
||||
AC_DEFINE([HAVE_BOOL], [1], [bool is not defined by all C++ compilators])
|
||||
fi
|
||||
])dnl
|
||||
|
||||
AC_DEFUN([MYSQL_STACK_DIRECTION],
|
||||
[AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
|
||||
[AC_TRY_RUN([#include <stdlib.h>
|
||||
/* Prevent compiler optimization by HP's compiler, see bug#42213 */
|
||||
#if defined(__HP_cc) || defined (__HP_aCC) || defined (__hpux)
|
||||
#pragma noinline
|
||||
#endif
|
||||
int find_stack_direction ()
|
||||
{
|
||||
static char *addr = 0;
|
||||
auto char dummy;
|
||||
if (addr == 0)
|
||||
{
|
||||
addr = &dummy;
|
||||
return find_stack_direction ();
|
||||
}
|
||||
else
|
||||
return (&dummy > addr) ? 1 : -1;
|
||||
}
|
||||
int main ()
|
||||
{
|
||||
exit (find_stack_direction() < 0);
|
||||
}], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1,
|
||||
ac_cv_c_stack_direction=)])
|
||||
AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
|
||||
])dnl
|
||||
|
||||
AC_DEFUN([MYSQL_CHECK_LONGLONG_TO_FLOAT],
|
||||
[
|
||||
AC_MSG_CHECKING(if conversion of longlong to float works)
|
||||
AC_CACHE_VAL(ac_cv_conv_longlong_to_float,
|
||||
[AC_TRY_RUN([#include <stdio.h>
|
||||
typedef long long longlong;
|
||||
int main()
|
||||
{
|
||||
longlong ll=1;
|
||||
float f;
|
||||
FILE *file=fopen("conftestval", "w");
|
||||
f = (float) ll;
|
||||
fprintf(file,"%g\n",f);
|
||||
fclose(file);
|
||||
return (0);
|
||||
}], ac_cv_conv_longlong_to_float=`cat conftestval`,
|
||||
ac_cv_conv_longlong_to_float=0,
|
||||
ac_cv_conv_longlong_to_float="yes")])dnl # Cross compiling, assume can convert
|
||||
if test "$ac_cv_conv_longlong_to_float" = "1" -o "$ac_cv_conv_longlong_to_float" = "yes"
|
||||
then
|
||||
ac_cv_conv_longlong_to_float=yes
|
||||
else
|
||||
ac_cv_conv_longlong_to_float=no
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv_conv_longlong_to_float)
|
||||
])
|
||||
|
||||
AC_DEFUN([MYSQL_CHECK_VIO], [
|
||||
dnl
|
||||
dnl we always use vio: no need for special defines
|
||||
dnl
|
||||
AC_DEFINE([HAVE_VIO_READ_BUFF], [1],
|
||||
[Define to enable buffered read. This works only if syscalls
|
||||
read/recv return as soon as there is some data in the kernel
|
||||
buffer, no matter how big the given buffer is.])
|
||||
])
|
||||
|
||||
# Local version of _AC_PROG_CXX_EXIT_DECLARATION that does not
|
||||
# include #stdlib.h as default as this breaks things on Solaris
|
||||
# (Conflicts with pthreads and big file handling)
|
||||
|
||||
m4_define([_AC_PROG_CXX_EXIT_DECLARATION],
|
||||
[for ac_declaration in \
|
||||
''\
|
||||
'extern "C" void std::exit (int) throw (); using std::exit;' \
|
||||
'extern "C" void std::exit (int); using std::exit;' \
|
||||
'extern "C" void exit (int) throw ();' \
|
||||
'extern "C" void exit (int);' \
|
||||
'void exit (int);' \
|
||||
'#include <stdlib.h>'
|
||||
do
|
||||
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$ac_declaration
|
||||
@%:@include <stdlib.h>],
|
||||
[exit (42);])],
|
||||
[],
|
||||
[continue])
|
||||
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$ac_declaration],
|
||||
[exit (42);])],
|
||||
[break])
|
||||
done
|
||||
rm -f conftest*
|
||||
if test -n "$ac_declaration"; then
|
||||
echo '#ifdef __cplusplus' >>confdefs.h
|
||||
echo $ac_declaration >>confdefs.h
|
||||
echo '#endif' >>confdefs.h
|
||||
fi
|
||||
])# _AC_PROG_CXX_EXIT_DECLARATION
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_CHECK_BIG_TABLES
|
||||
dnl Sets BIG_TABLES if --with-big-tables is used
|
||||
dnl ---------------------------------------------------------------------------
|
||||
AC_DEFUN([MYSQL_CHECK_BIG_TABLES], [
|
||||
AC_ARG_WITH([big-tables],
|
||||
AS_HELP_STRING([--with-big-tables],
|
||||
[Support tables with more than 4 G rows even on 32 bit platforms]),
|
||||
[bigtables="$withval"],
|
||||
[bigtables=no])
|
||||
AC_MSG_CHECKING([for big tables support])
|
||||
|
||||
case "$bigtables" in
|
||||
yes )
|
||||
AC_DEFINE([BIG_TABLES], [1], [Support big tables])
|
||||
AC_MSG_RESULT([yes])
|
||||
;;
|
||||
* )
|
||||
AC_MSG_RESULT([no])
|
||||
;;
|
||||
esac
|
||||
|
||||
])
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl END OF MYSQL_CHECK_BIG_TABLES SECTION
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_CHECK_MAX_INDEXES
|
||||
dnl Sets MAX_INDEXES
|
||||
dnl ---------------------------------------------------------------------------
|
||||
AC_DEFUN([MYSQL_CHECK_MAX_INDEXES], [
|
||||
AC_ARG_WITH([max-indexes],
|
||||
AS_HELP_STRING([--with-max-indexes=N],
|
||||
[Sets the maximum number of indexes per table, default 64]),
|
||||
[max_indexes="$withval"],
|
||||
[max_indexes=64])
|
||||
AC_MSG_CHECKING([max indexes per table])
|
||||
AC_DEFINE_UNQUOTED([MAX_INDEXES], [$max_indexes],
|
||||
[Maximum number of indexes per table])
|
||||
AC_MSG_RESULT([$max_indexes])
|
||||
])
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl END OF MYSQL_CHECK_MAX_INDEXES SECTION
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
dnl MYSQL_NEEDS_MYSYS_NEW
|
||||
AC_DEFUN([MYSQL_NEEDS_MYSYS_NEW],
|
||||
[AC_CACHE_CHECK([needs mysys_new helpers], mysql_cv_use_mysys_new,
|
||||
[
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_TRY_LINK([], [
|
||||
class A { public: int b; }; A *a=new A; a->b=10; delete a;
|
||||
], mysql_cv_use_mysys_new=no, mysql_cv_use_mysys_new=yes)
|
||||
AC_LANG_POP(C++)
|
||||
])
|
||||
if test "$mysql_cv_use_mysys_new" = "yes"
|
||||
then
|
||||
AC_DEFINE([USE_MYSYS_NEW], [1], [Needs to use mysys_new helpers])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([MYSQL_CHECK_CXX_VERSION], [
|
||||
CXX_VERSION=`$CXX --version | sed 1q`
|
||||
if test $? -ne "0" -o -z "$CXX_VERSION"
|
||||
then
|
||||
CXX_VERSION=`$CXX -V 2>&1|sed 1q` # trying harder for Sun and SGI
|
||||
fi
|
||||
if test $? -ne "0" -o -z "$CXX_VERSION"
|
||||
then
|
||||
CXX_VERSION=`$CXX -v 2>&1|sed 1q` # even harder for Alpha
|
||||
fi
|
||||
if test $? -ne "0" -o -z "$CXX_VERSION"
|
||||
then
|
||||
CXX_VERSION=""
|
||||
fi
|
||||
if test "$CXX_VERSION"
|
||||
then
|
||||
AC_MSG_CHECKING("C++ compiler version")
|
||||
AC_MSG_RESULT("$CXX $CXX_VERSION")
|
||||
fi
|
||||
AC_SUBST(CXX_VERSION)
|
||||
])
|
||||
|
||||
AC_DEFUN([MYSQL_PROG_AR], [
|
||||
case $CXX_VERSION in
|
||||
MIPSpro*)
|
||||
AR=$CXX
|
||||
ARFLAGS="-ar -o"
|
||||
;;
|
||||
*Forte*)
|
||||
AR=$CXX
|
||||
ARFLAGS="-xar -o"
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_PROG([AR], [ar], [ar])
|
||||
if test -z "$AR" || test "$AR" = "false"
|
||||
then
|
||||
AC_MSG_ERROR([You need ar to build the library])
|
||||
fi
|
||||
if test -z "$ARFLAGS"
|
||||
then
|
||||
ARFLAGS="cru"
|
||||
fi
|
||||
esac
|
||||
AC_SUBST(AR)
|
||||
AC_SUBST(ARFLAGS)
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Macro to check time_t range: according to C standard
|
||||
dnl array index must be greater than 0 => if time_t is signed,
|
||||
dnl the code in the macros below won't compile.
|
||||
dnl
|
||||
|
||||
AC_DEFUN([MYSQL_CHECK_TIME_T],[
|
||||
AC_MSG_CHECKING(if time_t is unsigned)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[[
|
||||
#include <time.h>
|
||||
]],
|
||||
[[
|
||||
int array[(((time_t)-1) > 0) ? 1 : -1];
|
||||
]] )
|
||||
], [
|
||||
AC_DEFINE([TIME_T_UNSIGNED], 1, [Define to 1 if time_t is unsigned])
|
||||
AC_MSG_RESULT(yes)
|
||||
],
|
||||
[AC_MSG_RESULT(no)]
|
||||
)
|
||||
])
|
||||
|
|
@ -1,862 +0,0 @@
|
|||
dnl ===========================================================================
|
||||
dnl Support for mysql server plugins
|
||||
dnl ===========================================================================
|
||||
dnl
|
||||
dnl WorkLog#3201
|
||||
dnl
|
||||
dnl Framework for pluggable static and dynamic plugins for mysql
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_PLUGIN
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_PLUGIN([name],[Plugin name],
|
||||
dnl [Plugin description],
|
||||
dnl [group,group...])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl First declaration for a plugin (mandatory).
|
||||
dnl Adds plugin as member to configuration groups (if specified)
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([MYSQL_PLUGIN],[
|
||||
_MYSQL_PLUGIN(
|
||||
[$1],
|
||||
[__MYSQL_PLUGIN_]AS_TR_CPP([$1])[__],
|
||||
m4_default([$2], [$1 plugin]),
|
||||
m4_default([$3], [plugin for $1]),
|
||||
m4_default([$4], []),
|
||||
)
|
||||
])
|
||||
|
||||
AC_DEFUN([_MYSQL_PLUGIN],[
|
||||
m4_ifdef([$2], [
|
||||
AC_FATAL([Duplicate MYSQL_PLUGIN declaration for $3])
|
||||
],[
|
||||
m4_define([$2], [$1])
|
||||
_MYSQL_PLUGAPPEND([__mysql_plugin_list__],[$1])
|
||||
m4_define([MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]), [$3])
|
||||
m4_define([MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]), [$4])
|
||||
_MYSQL_PLUGAPPEND_META([$1], $5)
|
||||
ifelse(m4_bregexp(__mysql_include__,[/plug\.in$]),-1,[],[
|
||||
MYSQL_PLUGIN_DIRECTORY([$1],
|
||||
m4_bregexp(__mysql_include__,[^\(.*\)/plug\.in$],[\1]))
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_STORAGE_ENGINE
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_STORAGE_ENGINE([name],[legacy-option],[Storage engine name],
|
||||
dnl [Storage engine description],[group,group...])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Short cut for storage engine declarations
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([MYSQL_STORAGE_ENGINE],[
|
||||
MYSQL_PLUGIN([$1], [$3], [$4], [[$5]])
|
||||
MYSQL_PLUGIN_DEFINE([$1], [WITH_]AS_TR_CPP([$1])[_STORAGE_ENGINE])
|
||||
ifelse([$2],[no],[],[
|
||||
_MYSQL_LEGACY_STORAGE_ENGINE(
|
||||
m4_bpatsubst([$1], -, _),
|
||||
m4_bpatsubst(m4_default([$2], [$1-storage-engine]), -, _))
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([_MYSQL_LEGACY_STORAGE_ENGINE],[
|
||||
if test "[${with_]$2[+set}]" = set; then
|
||||
[with_plugin_]$1="[$with_]$2"
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_PLUGIN_DEFINE
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_PLUGIN_DEFINE([name],[MYSQL_CPP_DEFINE])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl When a plugin is to be statically linked, define the C macro
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([MYSQL_PLUGIN_DEFINE],[
|
||||
MYSQL_REQUIRE_PLUGIN([$1])
|
||||
m4_define([MYSQL_PLUGIN_DEFINE_]AS_TR_CPP([$1]), [$2])
|
||||
])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_PLUGIN_DIRECTORY
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_PLUGIN_DIRECTORY([name],[plugin/dir])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Adds a directory to the build process
|
||||
dnl if it contains 'configure' it will be picked up automatically
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([MYSQL_PLUGIN_DIRECTORY],[
|
||||
MYSQL_REQUIRE_PLUGIN([$1])
|
||||
m4_define([MYSQL_PLUGIN_DIRECTORY_]AS_TR_CPP([$1]), [$2])
|
||||
])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_PLUGIN_STATIC
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_PLUGIN_STATIC([name],[libmyplugin.a])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Declare the name for the static library
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([MYSQL_PLUGIN_STATIC],[
|
||||
MYSQL_REQUIRE_PLUGIN([$1])
|
||||
m4_define([MYSQL_PLUGIN_STATIC_]AS_TR_CPP([$1]), [$2])
|
||||
])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_PLUGIN_DYNAMIC
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_PLUGIN_DYNAMIC([name],[myplugin.la])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Declare the name for the shared library
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([MYSQL_PLUGIN_DYNAMIC],[
|
||||
MYSQL_REQUIRE_PLUGIN([$1])
|
||||
m4_define([MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]), [$2])
|
||||
])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_PLUGIN_MANDATORY
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_PLUGIN_MANDATORY([name])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Marks the specified plugin as a mandatory plugin
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([MYSQL_PLUGIN_MANDATORY],[
|
||||
MYSQL_REQUIRE_PLUGIN([$1])
|
||||
_MYSQL_PLUGIN_MANDATORY([$1],
|
||||
[MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1])
|
||||
)
|
||||
])
|
||||
|
||||
AC_DEFUN([_MYSQL_PLUGIN_MANDATORY],[
|
||||
m4_define([$2], [yes])
|
||||
m4_ifdef([$3], [
|
||||
AC_FATAL([mandatory plugin $1 has been disabled])
|
||||
m4_undefine([$2])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_PLUGIN_DISABLED
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_PLUGIN_DISABLED([name])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Marks the specified plugin as a disabled plugin
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([MYSQL_PLUGIN_DISABLED],[
|
||||
MYSQL_REQUIRE_PLUGIN([$1])
|
||||
_MYSQL_PLUGIN_DISABLED([$1],
|
||||
[MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1])
|
||||
)
|
||||
])
|
||||
|
||||
AC_DEFUN([_MYSQL_PLUGIN_DISABLED],[
|
||||
m4_define([$2], [yes])
|
||||
m4_ifdef([$3], [
|
||||
AC_FATAL([attempt to disable mandatory plugin $1])
|
||||
m4_undefine([$2])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_PLUGIN_DEPENDS
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_PLUGIN_DEPENDS([name],[prereq,prereq...])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Enables other plugins neccessary for the named plugin
|
||||
dnl Dependency checking is not recursive so if any
|
||||
dnl required plugin requires further plugins, list them
|
||||
dnl here too!
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([MYSQL_PLUGIN_DEPENDS],[
|
||||
MYSQL_REQUIRE_PLUGIN([$1])
|
||||
ifelse($#, 2, [
|
||||
_MYSQL_PLUGIN_DEPEND([$1], $2)
|
||||
], [
|
||||
AC_FATAL([bad number of arguments])
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([_MYSQL_PLUGIN_DEPEND],[
|
||||
ifelse($#, 1, [], [$#:$2], [2:], [], [
|
||||
MYSQL_REQUIRE_PLUGIN([$2])
|
||||
_MYSQL_PLUGAPPEND([__mysql_plugdepends_$1__],[$2])
|
||||
_MYSQL_PLUGIN_DEPEND([$1], m4_shift(m4_shift($@)))
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_PLUGIN_ACTIONS
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_PLUGIN_ACTIONS([name],[PLUGIN_CONFIGURE_STUFF])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Declares additional autoconf actions required to configure the plugin
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([MYSQL_PLUGIN_ACTIONS],[
|
||||
MYSQL_REQUIRE_PLUGIN([$1])
|
||||
m4_ifdef([$2],[
|
||||
m4_define([MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]),m4_defn([$2]))
|
||||
],[
|
||||
m4_define([MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]), [$2])
|
||||
])
|
||||
])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS([name],[file name])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Some modules in plugins keep dependance on structures
|
||||
dnl declared in sql/ (THD class usually)
|
||||
dnl That has to be fixed in the future, but until then
|
||||
dnl we have to recompile these modules when we want to
|
||||
dnl to compile server parts with the different #defines
|
||||
dnl Normally it happens when we compile the embedded server
|
||||
dnl Thus one should mark such files in his handler using this macro
|
||||
dnl (currently only one such a file per plugin is supported)
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS],[
|
||||
MYSQL_REQUIRE_PLUGIN([$1])
|
||||
m4_define([MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS_]AS_TR_CPP([$1]), [$2])
|
||||
])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_CONFIGURE_PLUGINS
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_PLUGIN_DEPENDS([name,name...])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Used last, emits all required shell code to configure the plugins
|
||||
dnl Argument is a list of default plugins or meta-plugin
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([MYSQL_CONFIGURE_PLUGINS],[
|
||||
m4_ifdef([__mysql_plugin_configured__],[
|
||||
AC_FATAL([cannot use [MYSQL_CONFIGURE_PLUGINS] multiple times])
|
||||
],[
|
||||
m4_define([__mysql_plugin_configured__],[done])
|
||||
_MYSQL_INCLUDE_LIST(
|
||||
m4_bpatsubst(m4_esyscmd([ls plugin/*/plug.in storage/*/plug.in 2>/dev/null]),
|
||||
[[
|
||||
]],[,]))
|
||||
m4_ifdef([__mysql_plugin_list__],[
|
||||
_MYSQL_CHECK_PLUGIN_ARGS([$1])
|
||||
_MYSQL_CONFIGURE_PLUGINS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
|
||||
_MYSQL_EMIT_PLUGIN_ACTIONS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
|
||||
AC_SUBST([mysql_se_dirs])
|
||||
AC_SUBST([mysql_se_distdirs])
|
||||
AC_SUBST([mysql_pg_dirs])
|
||||
AC_SUBST([mysql_pg_distdirs])
|
||||
AC_SUBST([mysql_se_unittest_dirs])
|
||||
AC_SUBST([mysql_pg_unittest_dirs])
|
||||
AC_SUBST([condition_dependent_plugin_modules])
|
||||
AC_SUBST([condition_dependent_plugin_objects])
|
||||
AC_SUBST([condition_dependent_plugin_links])
|
||||
AC_SUBST([condition_dependent_plugin_includes])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([_MYSQL_CONFIGURE_PLUGINS],[
|
||||
ifelse($#, 0, [], $#, 1, [
|
||||
_MYSQL_EMIT_CHECK_PLUGIN([$1])
|
||||
],[
|
||||
_MYSQL_EMIT_CHECK_PLUGIN([$1])
|
||||
_MYSQL_CONFIGURE_PLUGINS(m4_shift($@))
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([_MYSQL_EMIT_CHECK_PLUGIN],[
|
||||
__MYSQL_EMIT_CHECK_PLUGIN(
|
||||
[$1],
|
||||
m4_bpatsubst([$1], -, _),
|
||||
[MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_DEFINE_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_DIRECTORY_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_STATIC_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1])
|
||||
)
|
||||
])
|
||||
|
||||
AC_DEFUN([__MYSQL_EMIT_CHECK_PLUGIN],[
|
||||
m4_ifdef([$5],[
|
||||
AH_TEMPLATE($5, [Include ]$4[ into mysqld])
|
||||
])
|
||||
AC_MSG_CHECKING([whether to use ]$3)
|
||||
mysql_use_plugin_dir=""
|
||||
m4_ifdef([$10],[
|
||||
if test "X[$mysql_plugin_]$2" = Xyes -a \
|
||||
"X[$with_plugin_]$2" != Xno -o \
|
||||
"X[$with_plugin_]$2" = Xyes; then
|
||||
AC_MSG_RESULT([error])
|
||||
AC_MSG_ERROR([disabled])
|
||||
fi
|
||||
AC_MSG_RESULT([no])
|
||||
],[
|
||||
|
||||
# Plugin is not disabled, determine if it should be built,
|
||||
# or only distributed
|
||||
|
||||
m4_ifdef([$6], [
|
||||
if test ! -d "$srcdir/$6"; then
|
||||
# Plugin directory was removed after autoconf was run; treat
|
||||
# this as a disabled plugin
|
||||
if test "X[$with_plugin_]$2" = Xyes; then
|
||||
AC_MSG_RESULT([error])
|
||||
AC_MSG_ERROR([disabled])
|
||||
fi
|
||||
|
||||
# The result message will be printed below
|
||||
[with_plugin_]$2=no
|
||||
fi
|
||||
])
|
||||
|
||||
m4_ifdef([$9],[
|
||||
if test "X[$with_plugin_]$2" = Xno; then
|
||||
AC_MSG_RESULT([error])
|
||||
AC_MSG_ERROR([cannot disable mandatory plugin])
|
||||
fi
|
||||
[mysql_plugin_]$2=yes
|
||||
],[
|
||||
case "$with_mysqld_ldflags " in
|
||||
*"-all-static "*)
|
||||
# No need to build shared plugins when mysqld is linked with
|
||||
# -all-static as it won't be able to load them.
|
||||
if test "X[$mysql_plugin_]$2" != Xyes -a \
|
||||
"X[$with_plugin_]$2" != Xyes; then
|
||||
[with_plugin_]$2=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
|
||||
if test "X[$with_plugin_]$2" = Xno; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
m4_ifdef([$8],m4_ifdef([$7],[],[[with_plugin_]$2='']))
|
||||
if test "X[$mysql_plugin_]$2" != Xyes -a \
|
||||
"X[$with_plugin_]$2" != Xyes; then
|
||||
m4_ifdef([$8],[
|
||||
m4_ifdef([$6],[
|
||||
if test -d "$srcdir/$6" ; then
|
||||
mysql_use_plugin_dir="$6"
|
||||
])
|
||||
AC_SUBST([plugin_]$2[_shared_target], "$8")
|
||||
AC_SUBST([plugin_]$2[_static_target], [""])
|
||||
[with_plugin_]$2=yes
|
||||
AC_MSG_RESULT([plugin])
|
||||
m4_ifdef([$6],[
|
||||
else
|
||||
[mysql_plugin_]$2=no
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
])
|
||||
],[
|
||||
[with_plugin_]$2=no
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
else
|
||||
m4_ifdef([$7],[
|
||||
ifelse(m4_bregexp($7, [^lib[^.]+\.a$]), -2, [
|
||||
dnl change above "-2" to "0" to enable this section
|
||||
dnl Although this is "pretty", it breaks libmysqld build
|
||||
m4_ifdef([$6],[
|
||||
mysql_use_plugin_dir="$6"
|
||||
mysql_plugin_libs="$mysql_plugin_libs -L[\$(top_builddir)]/$6"
|
||||
])
|
||||
mysql_plugin_libs="$mysql_plugin_libs dnl
|
||||
[-l]m4_bregexp($7, [^lib\([^.]+\)], [\1])"
|
||||
], m4_bregexp($7, [^\\\$]), 0, [
|
||||
m4_ifdef([$6],[
|
||||
mysql_use_plugin_dir="$6"
|
||||
])
|
||||
mysql_plugin_libs="$mysql_plugin_libs $7"
|
||||
], [
|
||||
m4_ifdef([$6],[
|
||||
mysql_use_plugin_dir="$6"
|
||||
mysql_plugin_libs="$mysql_plugin_libs \$(top_builddir)/$6/$7"
|
||||
],[
|
||||
mysql_plugin_libs="$mysql_plugin_libs $7"
|
||||
])
|
||||
])
|
||||
m4_ifdef([$5],[
|
||||
AC_DEFINE($5)
|
||||
])
|
||||
AC_SUBST([plugin_]$2[_static_target], "$7")
|
||||
AC_SUBST([plugin_]$2[_shared_target], [""])
|
||||
],[
|
||||
m4_ifdef([$6],[
|
||||
AC_MSG_RESULT([error])
|
||||
AC_MSG_ERROR([Plugin $1 does not support static linking])
|
||||
],[
|
||||
m4_ifdef([$5],[
|
||||
AC_DEFINE($5)
|
||||
AC_SUBST([plugin_]$2[_static_target], ["yes"])
|
||||
AC_SUBST([plugin_]$2[_shared_target], [""])
|
||||
])
|
||||
])
|
||||
])
|
||||
m4_ifdef([$9],[
|
||||
mysql_mandatory_plugins="$mysql_mandatory_plugins [builtin_]$2[_plugin],"
|
||||
],[
|
||||
mysql_optional_plugins="$mysql_optional_plugins [builtin_]$2[_plugin],"
|
||||
])
|
||||
[with_plugin_]$2=yes
|
||||
AC_MSG_RESULT([yes])
|
||||
m4_ifdef([$11],[
|
||||
condition_dependent_plugin_modules="$condition_dependent_plugin_modules m4_bregexp($11, [[^/]+$], [\&])"
|
||||
condition_dependent_plugin_objects="$condition_dependent_plugin_objects m4_bregexp($11, [[^/]+\.], [\&o])"
|
||||
condition_dependent_plugin_links="$condition_dependent_plugin_links $6/$11"
|
||||
condition_dependent_plugin_includes="$condition_dependent_plugin_includes -I[\$(top_srcdir)]/$6/m4_bregexp($11, [^.+[/$]], [\&])"
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
m4_ifdef([$6], [
|
||||
if test -d "$srcdir/$6"; then
|
||||
# Even if we don't build a plugin, we bundle its source into the dist
|
||||
# file. So its Makefile (and Makefiles for any subdirs) must be
|
||||
# generated for 'make dist' to work.
|
||||
m4_syscmd([test -f "]$6[/configure"])
|
||||
ifelse(m4_sysval, 0,
|
||||
[AC_CONFIG_SUBDIRS($6)],
|
||||
[
|
||||
# autoconf doesn't provide an automatic way to configure DIST_SUBDIRS of
|
||||
# a subdir; for our purposes, it's enough to just check for existing
|
||||
# Makefile.am files and add them in here
|
||||
dnl
|
||||
dnl Warning, don't try to quote the m4_esyscmd() macro, it doesn't
|
||||
dnl work. Quoting here is tricky.
|
||||
dnl
|
||||
dnl The $FIND or $SED variable can be set by the user when calling autoconf itself
|
||||
dnl to if they need to pass a specific path. This is *NOT* used when calling
|
||||
dnl running configure!
|
||||
dnl
|
||||
AC_CONFIG_FILES(m4_esyscmd([${FIND-find} "]$6[" -name Makefile.am -print | ${SED-sed} 's,\.am$,,']))
|
||||
]
|
||||
)
|
||||
|
||||
ifelse(
|
||||
m4_substr($6, 0, 8), [storage/], [
|
||||
mysql_se_distdirs="$mysql_se_distdirs m4_substr($6, 8)"
|
||||
if test -n "$mysql_use_plugin_dir" ; then
|
||||
mysql_se_dirs="$mysql_se_dirs m4_substr($6, 8)"
|
||||
mysql_se_unittest_dirs="$mysql_se_unittest_dirs ../$6"
|
||||
fi],
|
||||
|
||||
m4_substr($6, 0, 7), [plugin/], [
|
||||
mysql_pg_distdirs="$mysql_pg_distdirs m4_substr($6, 7)"
|
||||
if test -n "$mysql_use_plugin_dir" ; then
|
||||
mysql_pg_dirs="$mysql_pg_dirs m4_substr($6, 7)"
|
||||
mysql_pg_unittest_dirs="$mysql_pg_unittest_dirs ../$6"
|
||||
fi],
|
||||
[AC_FATAL([don't know how to handle plugin dir ]$6)])
|
||||
fi
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([_MYSQL_EMIT_PLUGIN_ACTIONS],[
|
||||
ifelse($#, 0, [], $#, 1, [
|
||||
_MYSQL_EMIT_PLUGIN_ACTION([$1])
|
||||
],[
|
||||
_MYSQL_EMIT_PLUGIN_ACTION([$1])
|
||||
_MYSQL_EMIT_PLUGIN_ACTIONS(m4_shift($@))
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([_MYSQL_EMIT_PLUGIN_ACTION],[
|
||||
__MYSQL_EMIT_PLUGIN_ACTION(
|
||||
[$1],
|
||||
m4_bpatsubst([$1], -, _),
|
||||
[MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1])
|
||||
)
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([__MYSQL_EMIT_PLUGIN_ACTION],[
|
||||
m4_ifdef([$3], [], [
|
||||
if test "X[$with_plugin_]$2" = Xyes; then
|
||||
if test "X[$plugin_]$2[_static_target]" = X -a \
|
||||
"X[$plugin_]$2[_shared_target]" = X; then
|
||||
AC_MSG_ERROR([that's strange, $1 failed sanity check])
|
||||
fi
|
||||
$4
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
|
||||
dnl ===========================================================================
|
||||
dnl Private helper macros
|
||||
dnl ===========================================================================
|
||||
|
||||
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_REQUIRE_PLUGIN([name])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Checks that the specified plugin does exist
|
||||
|
||||
AC_DEFUN([MYSQL_REQUIRE_PLUGIN],[
|
||||
_MYSQL_REQUIRE_PLUGIN([$1], [__MYSQL_PLUGIN_]AS_TR_CPP([$1])[__])
|
||||
])
|
||||
|
||||
define([_MYSQL_REQUIRE_PLUGIN],[
|
||||
ifdef([$2],[
|
||||
ifelse($2, [$1], [], [
|
||||
AC_FATAL([Misspelt MYSQL_PLUGIN declaration for $1])
|
||||
])
|
||||
],[
|
||||
AC_FATAL([Missing MYSQL_PLUGIN declaration for $1])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
dnl SYNOPSIS
|
||||
dnl _MYSQL_EMIT_METAPLUGINS([name,name...])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Emits shell code for metaplugins
|
||||
|
||||
AC_DEFUN([_MYSQL_EMIT_METAPLUGINS], [ifelse($#, 0, [], $#, 1,
|
||||
[_MYSQL_EMIT_METAPLUGIN([$1], [__mysql_]m4_bpatsubst($1, -, _)[_plugins__])
|
||||
],
|
||||
[_MYSQL_EMIT_METAPLUGIN([$1], [__mysql_]m4_bpatsubst($1, -, _)[_plugins__])
|
||||
_MYSQL_EMIT_METAPLUGINS(m4_shift($@))])
|
||||
])
|
||||
|
||||
AC_DEFUN([_MYSQL_EMIT_METAPLUGIN], [
|
||||
[$1] )
|
||||
m4_ifdef([$2], [
|
||||
mysql_plugins='m4_bpatsubst($2, :, [ ])'
|
||||
],[
|
||||
mysql_plugins=''
|
||||
])
|
||||
;;
|
||||
])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
dnl SYNOPSIS
|
||||
dnl _MYSQL_PLUGAPPEND([name],[to-append])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Helper macro for appending to colon-delimited lists
|
||||
dnl Optinal 3rd argument is for actions only required when defining
|
||||
dnl macro named for the first time.
|
||||
|
||||
AC_DEFUN([_MYSQL_PLUGAPPEND],[
|
||||
m4_ifdef([$1],[
|
||||
m4_define([__plugin_append_tmp__], m4_defn([$1]))
|
||||
m4_undefine([$1])
|
||||
m4_define([$1], __plugin_append_tmp__[:$2])
|
||||
m4_undefine([__plugin_append_tmp__])
|
||||
],[
|
||||
m4_define([$1], [$2])
|
||||
$3
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl SYNOPSIS
|
||||
dnl _MYSQL_PLUGAPPEND_META([name],[meta,meta...])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Helper macro for adding plugins to meta plugins
|
||||
|
||||
AC_DEFUN([_MYSQL_PLUGAPPEND_META],[
|
||||
ifelse($#, 1, [], [$#:$2], [2:], [], [$2], [all], [
|
||||
AC_FATAL([protected plugin group: all])
|
||||
], [$2], [none], [
|
||||
AC_FATAL([protected plugin group: none])
|
||||
],[
|
||||
_MYSQL_PLUGAPPEND([__mysql_$1_configs__],[$2])
|
||||
_MYSQL_PLUGAPPEND([__mysql_]m4_bpatsubst($2, -, _)[_plugins__],[$1], [
|
||||
_MYSQL_PLUGAPPEND([__mysql_metaplugin_list__],[$2])
|
||||
])
|
||||
_MYSQL_PLUGAPPEND_META([$1], m4_shift(m4_shift($@)))
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_LIST_PLUGINS
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Emits formatted list of declared plugins
|
||||
|
||||
AC_DEFUN([MYSQL_LIST_PLUGINS],[dnl
|
||||
m4_ifdef([__mysql_plugin_list__],[dnl
|
||||
_MYSQL_LIST_PLUGINS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))dnl
|
||||
])dnl
|
||||
])
|
||||
|
||||
AC_DEFUN([_MYSQL_LIST_PLUGINS],[dnl
|
||||
ifelse($#, 0, [], $#, 1, [dnl
|
||||
MYSQL_SHOW_PLUGIN([$1])dnl
|
||||
],[dnl
|
||||
MYSQL_SHOW_PLUGIN([$1])dnl
|
||||
_MYSQL_LIST_PLUGINS(m4_shift($@))dnl
|
||||
])dnl
|
||||
])
|
||||
|
||||
AC_DEFUN([MYSQL_SHOW_PLUGIN],[
|
||||
_MYSQL_SHOW_PLUGIN(
|
||||
[$1],
|
||||
[$1-plugin],
|
||||
[MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_DESC_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_DEFINE_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_DIRECTORY_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_STATIC_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_MANDATORY_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]),
|
||||
__mysql_[$1]_configs__,
|
||||
)
|
||||
])
|
||||
|
||||
AC_DEFUN([_MYSQL_SHOW_PLUGIN],[dnl
|
||||
=== $3 ===
|
||||
Plugin Name: [$1]
|
||||
Description: $4
|
||||
Supports build: _PLUGIN_BUILD_TYPE([$7],[$8])[]dnl
|
||||
m4_ifdef([$12],[
|
||||
Configurations: m4_bpatsubst($12, :, [, ])])[]dnl
|
||||
m4_ifdef([$10],[
|
||||
Status: disabled])[]dnl
|
||||
m4_ifdef([$9],[
|
||||
Status: mandatory])[]dnl
|
||||
])
|
||||
|
||||
AC_DEFUN([_PLUGIN_BUILD_TYPE],
|
||||
[m4_ifdef([$1],[static ]m4_ifdef([$2],[and dnl
|
||||
]))[]m4_ifdef([$2],[dynamic],[m4_ifdef([$1],[],[static])])])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
AC_DEFUN([_MYSQL_EMIT_PLUGINS],[
|
||||
ifelse($#, 0, [], [$#:$1], [1:], [], [
|
||||
m4_ifdef([MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]), [], [
|
||||
m4_define([MYSQL_PLUGIN_ACTIONS_]AS_TR_CPP([$1]),[ ])
|
||||
])
|
||||
[$1] )
|
||||
m4_ifdef([MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),[
|
||||
AC_MSG_ERROR([plugin $1 is disabled])
|
||||
],[
|
||||
_MYSQL_EMIT_PLUGIN_ENABLE([$1], m4_bpatsubst([$1], -, _),
|
||||
[MYSQL_PLUGIN_NAME_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_STATIC_]AS_TR_CPP([$1]),
|
||||
[MYSQL_PLUGIN_DYNAMIC_]AS_TR_CPP([$1]))
|
||||
])
|
||||
;;
|
||||
_MYSQL_EMIT_PLUGINS(m4_shift($@))
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([_MYSQL_EMIT_PLUGIN_ENABLE],[
|
||||
m4_ifdef([$5],m4_ifdef([$4],[
|
||||
[mysql_plugin_]$2=yes
|
||||
],[
|
||||
AC_MSG_WARN([$3 can only be built as a plugin])
|
||||
]),[
|
||||
[mysql_plugin_]$2=yes
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([_MYSQL_EMIT_PLUGIN_DEPENDS], [
|
||||
ifelse($#, 0, [], [$#:$1], [1:], [], [
|
||||
_MYSQL_EMIT_CHECK_DEPENDS(m4_bpatsubst([$1], -, _),
|
||||
[__mysql_plugdepends_$1__])
|
||||
_MYSQL_EMIT_PLUGIN_DEPENDS(m4_shift($@))
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([_MYSQL_EMIT_CHECK_DEPENDS], [
|
||||
m4_ifdef([$2], [
|
||||
if test "X[$mysql_plugin_]$1" = Xyes -a \
|
||||
"X[$with_plugin_]$1" != Xno -o \
|
||||
"X[$with_plugin_]$1" = Xyes; then
|
||||
_MYSQL_EMIT_PLUGIN_DEPENDENCIES(m4_bpatsubst($2, :, [,]))
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([_MYSQL_EMIT_PLUGIN_DEPENDENCIES], [
|
||||
ifelse([$1], [], [], [
|
||||
m4_ifdef([MYSQL_PLUGIN_DISABLED_]AS_TR_CPP([$1]),[
|
||||
AC_MSG_ERROR([depends upon disabled plugin $1])
|
||||
],[
|
||||
[mysql_plugin_]m4_bpatsubst([$1], -, _)=yes
|
||||
if test "X[$with_plugin_]m4_bpatsubst([$1], -, _)" = Xno; then
|
||||
AC_MSG_ERROR([depends upon disabled plugin $1])
|
||||
fi
|
||||
])
|
||||
_MYSQL_EMIT_PLUGIN_DEPENDENCIES(m4_shift($@))
|
||||
])
|
||||
])
|
||||
|
||||
dnl SYNOPSIS
|
||||
dnl _MYSQL_CHECK_PLUGIN_ARGS([plugin],[plugin]...)
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Emits shell script for checking configure arguments
|
||||
dnl Arguments to this macro is default value for selected plugins
|
||||
|
||||
AC_DEFUN([_MYSQL_CHECK_PLUGIN_ARGS],[
|
||||
__MYSQL_CHECK_PLUGIN_ARGS(m4_default([$1], [default]))
|
||||
])
|
||||
|
||||
AC_DEFUN([__MYSQL_CHECK_PLUGIN_ARGS],[
|
||||
AC_ARG_WITH([plugins],
|
||||
AS_HELP_STRING([--with-plugins=PLUGIN[[[[[,PLUGIN..]]]]]],
|
||||
[Plugins to include in mysqld. (default is: $1) Must be a
|
||||
configuration name or a comma separated list of plugins.])
|
||||
AS_HELP_STRING([],
|
||||
[Available configurations are:] dnl
|
||||
m4_bpatsubst([none:]m4_ifdef([__mysql_metaplugin_list__],
|
||||
__mysql_metaplugin_list__:)[all], :, [ ])[.])
|
||||
AS_HELP_STRING([],
|
||||
[Available plugins are:] dnl
|
||||
m4_bpatsubst(__mysql_plugin_list__, :, [ ])[.])
|
||||
AS_HELP_STRING([--without-plugin-PLUGIN],
|
||||
[Disable the named plugin from being built. Otherwise, for
|
||||
plugins which are not selected for inclusion in mysqld will be
|
||||
built dynamically (if supported)])
|
||||
AS_HELP_STRING([--with-plugin-PLUGIN],
|
||||
[Forces the named plugin to be linked into mysqld statically.]),
|
||||
[mysql_plugins="`echo $withval | tr ',.:;*[]' ' '`"],
|
||||
[mysql_plugins=['$1']])
|
||||
|
||||
m4_divert_once([HELP_VAR_END],[
|
||||
Description of plugins:
|
||||
MYSQL_LIST_PLUGINS])
|
||||
|
||||
case "$mysql_plugins" in
|
||||
all )
|
||||
mysql_plugins='m4_bpatsubst(__mysql_plugin_list__, :, [ ])'
|
||||
;;
|
||||
none )
|
||||
mysql_plugins=''
|
||||
;;
|
||||
m4_ifdef([__mysql_metaplugin_list__],[
|
||||
_MYSQL_EMIT_METAPLUGINS(m4_bpatsubst(__mysql_metaplugin_list__, :, [,]))
|
||||
])
|
||||
esac
|
||||
|
||||
for plugin in $mysql_plugins; do
|
||||
case "$plugin" in
|
||||
all | none )
|
||||
AC_MSG_ERROR([bad plugin name: $plugin])
|
||||
;;
|
||||
_MYSQL_EMIT_PLUGINS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
|
||||
* )
|
||||
AC_MSG_ERROR([unknown plugin: $plugin])
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
_MYSQL_EMIT_PLUGIN_DEPENDS(m4_bpatsubst(__mysql_plugin_list__, :, [,]))
|
||||
])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: _MYSQL_INCLUDE_LIST
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl _MYSQL_INCLUDE_LIST([filename,filename...])
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl includes all files from the list
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
AC_DEFUN([_MYSQL_INCLUDE_LIST],[
|
||||
ifelse([$1], [], [], [
|
||||
m4_define([__mysql_include__],[$1])
|
||||
dnl We have to use builtin(), because sinclude would generate an error
|
||||
dnl "file $1 does not exists" in aclocal-1.8 - which is a bug, clearly
|
||||
dnl violating m4 specs, and which is fixed in aclocal-1.9
|
||||
builtin([include],$1)
|
||||
m4_undefine([__mysql_include__])
|
||||
_MYSQL_INCLUDE_LIST(m4_shift($@))
|
||||
])
|
||||
])
|
||||
|
||||
dnl ===========================================================================
|
|
@ -1,143 +0,0 @@
|
|||
AC_DEFUN([MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY], [
|
||||
AC_CACHE_CHECK([HIST_ENTRY is declared in readline/readline.h], mysql_cv_hist_entry_declared,
|
||||
AC_TRY_COMPILE(
|
||||
[
|
||||
#include "stdio.h"
|
||||
#include "readline/readline.h"
|
||||
],
|
||||
[
|
||||
HIST_ENTRY entry;
|
||||
],
|
||||
[
|
||||
mysql_cv_hist_entry_declared=yes
|
||||
AC_DEFINE_UNQUOTED(HAVE_HIST_ENTRY, [1],
|
||||
[HIST_ENTRY is defined in the outer libeditreadline])
|
||||
],
|
||||
[mysql_cv_libedit_interface=no]
|
||||
)
|
||||
)
|
||||
])
|
||||
|
||||
AC_DEFUN([MYSQL_CHECK_LIBEDIT_INTERFACE], [
|
||||
AC_CACHE_CHECK([libedit variant of rl_completion_entry_function], mysql_cv_libedit_interface,
|
||||
AC_TRY_COMPILE(
|
||||
[
|
||||
#include "stdio.h"
|
||||
#include "readline/readline.h"
|
||||
],
|
||||
[
|
||||
char res= *(*rl_completion_entry_function)(0,0);
|
||||
completion_matches(0,0);
|
||||
],
|
||||
[
|
||||
mysql_cv_libedit_interface=yes
|
||||
AC_DEFINE_UNQUOTED([USE_LIBEDIT_INTERFACE], [1],
|
||||
[used libedit interface (can we dereference result of rl_completion_entry_function)])
|
||||
],
|
||||
[mysql_cv_libedit_interface=no]
|
||||
)
|
||||
)
|
||||
])
|
||||
|
||||
AC_DEFUN([MYSQL_CHECK_NEW_RL_INTERFACE], [
|
||||
AC_CACHE_CHECK([defined rl_compentry_func_t and rl_completion_func_t], mysql_cv_new_rl_interface,
|
||||
AC_TRY_COMPILE(
|
||||
[
|
||||
#include "stdio.h"
|
||||
#include "readline/readline.h"
|
||||
],
|
||||
[
|
||||
rl_completion_func_t *func1= (rl_completion_func_t*)0;
|
||||
rl_compentry_func_t *func2= (rl_compentry_func_t*)0;
|
||||
],
|
||||
[
|
||||
mysql_cv_new_rl_interface=yes
|
||||
AC_DEFINE_UNQUOTED([USE_NEW_READLINE_INTERFACE], [1],
|
||||
[used new readline interface (are rl_completion_func_t and rl_compentry_func_t defined)])
|
||||
],
|
||||
[mysql_cv_new_rl_interface=no]
|
||||
)
|
||||
)
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl check for availability of multibyte characters and functions
|
||||
dnl (Based on BASH_CHECK_MULTIBYTE in aclocal.m4 of readline-5.0)
|
||||
dnl
|
||||
AC_DEFUN([MYSQL_CHECK_MULTIBYTE],
|
||||
[
|
||||
AC_CHECK_HEADERS(wctype.h)
|
||||
AC_CHECK_HEADERS(wchar.h)
|
||||
AC_CHECK_HEADERS(langinfo.h)
|
||||
|
||||
AC_CHECK_FUNC(mbrlen, AC_DEFINE(HAVE_MBRLEN,[],[Define if you have mbrlen]))
|
||||
AC_CHECK_FUNC(mbscmp, AC_DEFINE(HAVE_MBSCMP,[],[Define if you have mbscmp]))
|
||||
AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS,[],[Define if you have mbsrtowcs]))
|
||||
|
||||
AC_CHECK_FUNC(wcrtomb, AC_DEFINE(HAVE_WCRTOMB,[],[Define if you have wcrtomb]))
|
||||
AC_CHECK_FUNC(mbrtowc, AC_DEFINE(HAVE_MBRTOWC,[],[Define if you have mbrtowc]))
|
||||
AC_CHECK_FUNC(wcscoll, AC_DEFINE(HAVE_WCSCOLL,[],[Define if you have wcscoll]))
|
||||
AC_CHECK_FUNC(wcsdup, AC_DEFINE(HAVE_WCSDUP,[],[Define if you have wcsdup]))
|
||||
AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH,[],[Define if you have wcwidth]))
|
||||
AC_CHECK_FUNC(wctype, AC_DEFINE(HAVE_WCTYPE,[],[Define if you have wctype]))
|
||||
|
||||
AC_CACHE_CHECK([for mbstate_t], mysql_cv_have_mbstate_t,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <wchar.h>], [
|
||||
mbstate_t ps;
|
||||
mbstate_t *psp;
|
||||
psp = (mbstate_t *)0;
|
||||
], mysql_cv_have_mbstate_t=yes, mysql_cv_have_mbstate_t=no)])
|
||||
if test $mysql_cv_have_mbstate_t = yes; then
|
||||
AC_DEFINE([HAVE_MBSTATE_T],[],[Define if mysql_cv_have_mbstate_t=yes])
|
||||
fi
|
||||
|
||||
AC_CHECK_FUNCS(iswlower iswupper towlower towupper iswctype)
|
||||
|
||||
AC_CACHE_CHECK([for nl_langinfo and CODESET], mysql_cv_langinfo_codeset,
|
||||
[AC_TRY_LINK(
|
||||
[#include <langinfo.h>],
|
||||
[char* cs = nl_langinfo(CODESET);],
|
||||
mysql_cv_langinfo_codeset=yes, mysql_cv_langinfo_codeset=no)])
|
||||
if test $mysql_cv_langinfo_codeset = yes; then
|
||||
AC_DEFINE([HAVE_LANGINFO_CODESET],[],[Define if mysql_cv_langinfo_codeset=yes])
|
||||
fi
|
||||
|
||||
dnl check for wchar_t in <wchar.h>
|
||||
AC_CACHE_CHECK([for wchar_t in wchar.h], bash_cv_type_wchar_t,
|
||||
[AC_TRY_COMPILE(
|
||||
[#include <wchar.h>
|
||||
],
|
||||
[
|
||||
wchar_t foo;
|
||||
foo = 0;
|
||||
], bash_cv_type_wchar_t=yes, bash_cv_type_wchar_t=no)])
|
||||
if test $bash_cv_type_wchar_t = yes; then
|
||||
AC_DEFINE(HAVE_WCHAR_T, 1, [systems should define this type here])
|
||||
fi
|
||||
|
||||
dnl check for wctype_t in <wctype.h>
|
||||
AC_CACHE_CHECK([for wctype_t in wctype.h], bash_cv_type_wctype_t,
|
||||
[AC_TRY_COMPILE(
|
||||
[#include <wctype.h>],
|
||||
[
|
||||
wctype_t foo;
|
||||
foo = 0;
|
||||
], bash_cv_type_wctype_t=yes, bash_cv_type_wctype_t=no)])
|
||||
if test $bash_cv_type_wctype_t = yes; then
|
||||
AC_DEFINE(HAVE_WCTYPE_T, 1, [systems should define this type here])
|
||||
fi
|
||||
|
||||
dnl check for wint_t in <wctype.h>
|
||||
AC_CACHE_CHECK([for wint_t in wctype.h], bash_cv_type_wint_t,
|
||||
[AC_TRY_COMPILE(
|
||||
[#include <wctype.h>],
|
||||
[
|
||||
wint_t foo;
|
||||
foo = 0;
|
||||
], bash_cv_type_wint_t=yes, bash_cv_type_wint_t=no)])
|
||||
if test $bash_cv_type_wint_t = yes; then
|
||||
AC_DEFINE(HAVE_WINT_T, 1, [systems should define this type here])
|
||||
fi
|
||||
|
||||
])
|
|
@ -1,219 +0,0 @@
|
|||
dnl ===========================================================================
|
||||
dnl Support for SSL
|
||||
dnl ===========================================================================
|
||||
dnl
|
||||
dnl
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_USE_BUNDLED_YASSL
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_USE_BUNDLED_YASSL()
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Add defines so yassl is built and linked with
|
||||
dnl ---------------------------------------------------------------------------
|
||||
AC_DEFUN([MYSQL_USE_BUNDLED_YASSL], [
|
||||
|
||||
with_bundled_yassl="yes"
|
||||
|
||||
yassl_dir="yassl"
|
||||
AC_SUBST([yassl_dir])
|
||||
|
||||
yassl_libs="\$(top_builddir)/extra/yassl/src/libyassl.la \
|
||||
\$(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la"
|
||||
AC_SUBST(yassl_libs)
|
||||
|
||||
AC_DEFINE([HAVE_OPENSSL], [1], [Defined by configure. Using yaSSL for SSL.])
|
||||
AC_DEFINE([HAVE_YASSL], [1], [Defined by configure. Using yaSSL for SSL.])
|
||||
|
||||
# System specific checks
|
||||
yassl_integer_extra_cxxflags=""
|
||||
case $host_cpu--$CXX_VERSION in
|
||||
sparc*--*Sun*C++*5.6*)
|
||||
# Disable inlining when compiling taocrypt/src/
|
||||
yassl_taocrypt_extra_cxxflags="+d"
|
||||
AC_MSG_NOTICE([disabling inlining for yassl/taocrypt/src/])
|
||||
;;
|
||||
esac
|
||||
AC_SUBST([yassl_taocrypt_extra_cxxflags])
|
||||
|
||||
# Thread safe check
|
||||
yassl_thread_cxxflags=""
|
||||
yassl_thread_safe=""
|
||||
if test "$with_server" != "no" -o "$THREAD_SAFE_CLIENT" != "no"; then
|
||||
yassl_thread_cxxflags="-DYASSL_THREAD_SAFE"
|
||||
yassl_thread_safe="(thread-safe)"
|
||||
fi
|
||||
AC_SUBST([yassl_thread_cxxflags])
|
||||
|
||||
# Link extra/yassl/include/openssl subdir to include/
|
||||
yassl_h_ln_cmd="\$(LN) -s \$(top_srcdir)/extra/yassl/include/openssl openssl"
|
||||
AC_SUBST(yassl_h_ln_cmd)
|
||||
|
||||
AC_MSG_RESULT([using bundled yaSSL $yassl_thread_safe])
|
||||
])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_CHECK_SSL_DIR
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_CHECK_SSL_DIR(includes, libs)
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Auxiliary macro to check for ssl at given path
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_DEFUN([MYSQL_CHECK_SSL_DIR], [
|
||||
ssl_incs="$1"
|
||||
ssl_libs="$2"
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
save_LIBS="$LIBS"
|
||||
CPPFLAGS="$ssl_incs $CPPFLAGS"
|
||||
LIBS="$LIBS $ssl_libs"
|
||||
AC_TRY_LINK([#include <openssl/ssl.h>],
|
||||
[return SSL_library_init();],
|
||||
[mysql_ssl_found="yes"],
|
||||
[mysql_ssl_found="no"])
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
LIBS="$save_LIBS"
|
||||
])
|
||||
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_FIND_OPENSSL
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_FIND_OPENSSL(location)
|
||||
dnl
|
||||
dnl DESCRIPTION
|
||||
dnl Search the location for OpenSSL support
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
AC_DEFUN([MYSQL_FIND_OPENSSL], [
|
||||
location="$1"
|
||||
|
||||
#
|
||||
# Set include paths
|
||||
#
|
||||
openssl_include="$location/include"
|
||||
openssl_includes=""
|
||||
|
||||
# Don't set ssl_includes to /usr/include as this gives us a lot of
|
||||
# compiler warnings when using gcc 3.x
|
||||
if test "$openssl_include" != "/usr/include"
|
||||
then
|
||||
openssl_includes="-I$openssl_include"
|
||||
fi
|
||||
|
||||
#
|
||||
# Try to link with openSSL libs in <location>
|
||||
#
|
||||
openssl_libs="-L$location/lib/ -lssl -lcrypto"
|
||||
MYSQL_CHECK_SSL_DIR([$openssl_includes], [$openssl_libs])
|
||||
|
||||
if test "$mysql_ssl_found" == "no"
|
||||
then
|
||||
#
|
||||
# BUG 764: Compile failure with OpenSSL on Red Hat Linux (krb5.h missing)
|
||||
# Try to link with include paths to kerberos set
|
||||
#
|
||||
openssl_includes="$openssl_includes -I/usr/kerberos/include"
|
||||
MYSQL_CHECK_SSL_DIR([$openssl_includes], [$openssl_libs])
|
||||
fi
|
||||
|
||||
if test "$mysql_ssl_found" == "no"
|
||||
then
|
||||
AC_MSG_ERROR([Could not link with SSL libs at $location])
|
||||
fi
|
||||
|
||||
# openssl-devel-0.9.6 requires dlopen() and we can't link staticly
|
||||
# on many platforms (We should actually test this here, but it's quite
|
||||
# hard to do as we are doing libtool for linking.)
|
||||
case "$CLIENT_EXTRA_LDFLAGS $MYSQLD_EXTRA_LDFLAGS" in
|
||||
*-all-static*)
|
||||
AC_MSG_ERROR([You can't use the --all-static link option when using openssl.])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(openssl_includes)
|
||||
AC_SUBST(openssl_libs)
|
||||
|
||||
NON_THREADED_CLIENT_LIBS="$NON_THREADED_CLIENT_LIBS $openssl_libs"
|
||||
|
||||
AC_DEFINE([HAVE_OPENSSL], [1], [OpenSSL])
|
||||
AC_MSG_RESULT([using openSSL from $location])
|
||||
])
|
||||
|
||||
|
||||
|
||||
dnl ------------------------------------------------------------------------
|
||||
dnl Macro: MYSQL_CHECK_SSL
|
||||
dnl
|
||||
dnl SYNOPSIS
|
||||
dnl MYSQL_CHECK_SSL
|
||||
dnl
|
||||
dnl Provides the following configure options:
|
||||
dnl --with-ssl=DIR
|
||||
dnl Possible DIR values are:
|
||||
dnl - no - the macro will disable use of ssl
|
||||
dnl - bundled, empty or not specified - means use ssl lib
|
||||
dnl bundled along with MySQL sources
|
||||
dnl - ssl location prefix - given location prefix, the macro expects
|
||||
dnl to find the header files in $prefix/include/, and libraries in
|
||||
dnl $prefix/lib. If headers or libraries weren't found at $prefix, the
|
||||
dnl macro bails out with error.
|
||||
dnl
|
||||
dnl ------------------------------------------------------------------------
|
||||
AC_DEFUN([MYSQL_CHECK_SSL], [
|
||||
|
||||
AC_CONFIG_FILES(extra/yassl/Makefile dnl
|
||||
extra/yassl/taocrypt/Makefile dnl
|
||||
extra/yassl/taocrypt/benchmark/Makefile dnl
|
||||
extra/yassl/taocrypt/src/Makefile dnl
|
||||
extra/yassl/taocrypt/test/Makefile dnl
|
||||
extra/yassl/src/Makefile dnl
|
||||
extra/yassl/testsuite/Makefile)
|
||||
|
||||
AC_MSG_CHECKING(for SSL)
|
||||
AC_ARG_WITH([ssl],
|
||||
[ --with-ssl[=DIR] Include SSL support],
|
||||
[mysql_ssl_dir="$withval"],
|
||||
[mysql_ssl_dir=no])
|
||||
|
||||
if test "$with_yassl"
|
||||
then
|
||||
AC_MSG_ERROR([The flag --with-yassl is deprecated, use --with-ssl])
|
||||
fi
|
||||
|
||||
if test "$with_openssl"
|
||||
then
|
||||
AC_MSG_ERROR([The flag --with-openssl is deprecated, use --with-ssl])
|
||||
fi
|
||||
|
||||
case "$mysql_ssl_dir" in
|
||||
"no")
|
||||
#
|
||||
# Don't include SSL support
|
||||
#
|
||||
AC_MSG_RESULT([disabled])
|
||||
;;
|
||||
|
||||
"bundled"|"yes")
|
||||
#
|
||||
# Use the bundled SSL implementation (yaSSL)
|
||||
#
|
||||
MYSQL_USE_BUNDLED_YASSL
|
||||
;;
|
||||
|
||||
*)
|
||||
#
|
||||
# A location where to search for OpenSSL was specified
|
||||
#
|
||||
MYSQL_FIND_OPENSSL([$mysql_ssl_dir])
|
||||
;;
|
||||
esac
|
||||
AM_CONDITIONAL([HAVE_YASSL], [ test "$with_bundled_yassl" = "yes" ])
|
||||
])
|
|
@ -1,132 +0,0 @@
|
|||
dnl Define zlib paths to point at bundled zlib
|
||||
|
||||
AC_DEFUN([MYSQL_USE_BUNDLED_ZLIB], [
|
||||
ZLIB_INCLUDES="-I\$(top_srcdir)/zlib"
|
||||
ZLIB_LIBS="\$(top_builddir)/zlib/libzlt.la"
|
||||
dnl Omit -L$pkglibdir as it's always in the list of mysql_config deps.
|
||||
ZLIB_DEPS="-lz"
|
||||
zlib_dir="zlib"
|
||||
AC_SUBST([zlib_dir])
|
||||
mysql_cv_compress="yes"
|
||||
])
|
||||
|
||||
dnl Auxiliary macro to check for zlib at given path.
|
||||
dnl We are strict with the server, as "archive" engine
|
||||
dnl needs zlibCompileFlags(), but for client only we
|
||||
dnl are less strict, and take the zlib we find.
|
||||
|
||||
AC_DEFUN([MYSQL_CHECK_ZLIB_DIR], [
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
save_LIBS="$LIBS"
|
||||
CPPFLAGS="$ZLIB_INCLUDES $CPPFLAGS"
|
||||
LIBS="$LIBS $ZLIB_LIBS"
|
||||
if test X"$with_server" = Xno
|
||||
then
|
||||
zlibsym=zlibVersion
|
||||
else
|
||||
zlibsym=zlibCompileFlags
|
||||
fi
|
||||
AC_CACHE_VAL([mysql_cv_compress],
|
||||
[AC_TRY_LINK([#include <zlib.h>],
|
||||
[return $zlibsym();],
|
||||
[mysql_cv_compress="yes"
|
||||
AC_MSG_RESULT([ok])],
|
||||
[mysql_cv_compress="no"])
|
||||
])
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
LIBS="$save_LIBS"
|
||||
])
|
||||
|
||||
dnl MYSQL_CHECK_ZLIB_WITH_COMPRESS
|
||||
dnl ------------------------------------------------------------------------
|
||||
dnl @synopsis MYSQL_CHECK_ZLIB_WITH_COMPRESS
|
||||
dnl
|
||||
dnl Provides the following configure options:
|
||||
dnl --with-zlib-dir=DIR
|
||||
dnl Possible DIR values are:
|
||||
dnl - "no" - the macro will disable use of compression functions
|
||||
dnl - "bundled" - means use zlib bundled along with MySQL sources
|
||||
dnl - empty, or not specified - the macro will try default system
|
||||
dnl library (if present), and in case of error will fall back to
|
||||
dnl bundled zlib
|
||||
dnl - zlib location prefix - given location prefix, the macro expects
|
||||
dnl to find the library headers in $prefix/include, and binaries in
|
||||
dnl $prefix/lib. If zlib headers or binaries weren't found at $prefix, the
|
||||
dnl macro bails out with error.
|
||||
dnl
|
||||
dnl If the library was found, this function #defines HAVE_COMPRESS
|
||||
dnl and configure variables ZLIB_INCLUDES (i.e. -I/path/to/zlib/include),
|
||||
dnl ZLIB_LIBS (i. e. -L/path/to/zlib/lib -lz) and ZLIB_DEPS which is
|
||||
dnl used in mysql_config and is always the same as ZLIB_LIBS except to
|
||||
dnl when we use the bundled zlib. In the latter case ZLIB_LIBS points to the
|
||||
dnl build dir ($top_builddir/zlib), while mysql_config must point to the
|
||||
dnl installation dir ($pkglibdir), so ZLIB_DEPS is set to point to
|
||||
dnl $pkglibdir.
|
||||
|
||||
AC_DEFUN([MYSQL_CHECK_ZLIB_WITH_COMPRESS], [
|
||||
|
||||
AC_CONFIG_FILES(zlib/Makefile)
|
||||
|
||||
AC_MSG_CHECKING([for zlib compression library])
|
||||
case $SYSTEM_TYPE in
|
||||
*netware* | *modesto*)
|
||||
AC_MSG_RESULT(ok)
|
||||
AC_DEFINE([HAVE_COMPRESS], [1], [Define to enable compression support])
|
||||
;;
|
||||
*)
|
||||
AC_ARG_WITH([zlib-dir],
|
||||
AC_HELP_STRING([--with-zlib-dir=no|bundled|DIR],
|
||||
[Provide MySQL with a custom location of
|
||||
compression library. Given DIR, zlib binary is
|
||||
assumed to be in $DIR/lib and header files
|
||||
in $DIR/include.]),
|
||||
[mysql_zlib_dir=${withval}],
|
||||
[mysql_zlib_dir=""])
|
||||
case "$mysql_zlib_dir" in
|
||||
"no")
|
||||
mysql_cv_compress="no"
|
||||
AC_MSG_RESULT([disabled])
|
||||
;;
|
||||
"bundled")
|
||||
MYSQL_USE_BUNDLED_ZLIB
|
||||
AC_MSG_RESULT([using bundled zlib])
|
||||
;;
|
||||
"")
|
||||
ZLIB_INCLUDES=""
|
||||
ZLIB_LIBS="-lz"
|
||||
MYSQL_CHECK_ZLIB_DIR
|
||||
if test "$mysql_cv_compress" = "no"; then
|
||||
MYSQL_USE_BUNDLED_ZLIB
|
||||
AC_MSG_RESULT([system-wide zlib not found, using one bundled with MySQL])
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
# Test for libz using all known library file endings
|
||||
if test \( -f "$mysql_zlib_dir/lib/libz.a" -o \
|
||||
-f "$mysql_zlib_dir/lib/libz.so" -o \
|
||||
-f "$mysql_zlib_dir/lib/libz.sl" -o \
|
||||
-f "$mysql_zlib_dir/lib/libz.dylib" \) \
|
||||
-a -f "$mysql_zlib_dir/include/zlib.h"; then
|
||||
ZLIB_INCLUDES="-I$mysql_zlib_dir/include"
|
||||
ZLIB_LIBS="-L$mysql_zlib_dir/lib -lz"
|
||||
MYSQL_CHECK_ZLIB_DIR
|
||||
fi
|
||||
if test "x$mysql_cv_compress" != "xyes"; then
|
||||
AC_MSG_ERROR([headers or binaries were not found in $mysql_zlib_dir/{include,lib}])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "$mysql_cv_compress" = "yes"; then
|
||||
if test "x$ZLIB_DEPS" = "x"; then
|
||||
ZLIB_DEPS="$ZLIB_LIBS"
|
||||
fi
|
||||
AC_SUBST([ZLIB_LIBS])
|
||||
AC_SUBST([ZLIB_DEPS])
|
||||
AC_SUBST([ZLIB_INCLUDES])
|
||||
AC_DEFINE([HAVE_COMPRESS], [1], [Define to enable compression support])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
dnl ------------------------------------------------------------------------
|
3013
configure.in
3013
configure.in
File diff suppressed because it is too large
Load diff
|
@ -1,68 +0,0 @@
|
|||
# Copyright (C) 2000, 2002, 2004-2006 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
|
||||
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
|
||||
LDADD = libdbug.a ../mysys/libmysys.a ../strings/libmystrings.a
|
||||
pkglib_LIBRARIES = libdbug.a
|
||||
noinst_HEADERS = dbug_long.h
|
||||
libdbug_a_SOURCES = dbug.c
|
||||
EXTRA_DIST = CMakeLists.txt example1.c example2.c example3.c \
|
||||
user.r monty.doc dbug_add_tags.pl \
|
||||
my_main.c main.c factorial.c dbug_analyze.c \
|
||||
CMakeLists.txt tests.c tests-t.pl
|
||||
NROFF_INC = example1.r example2.r example3.r main.r \
|
||||
factorial.r output1.r output2.r output3.r \
|
||||
output4.r output5.r
|
||||
CLEANFILES = $(NROFF_INC) user.t user.ps tests-t
|
||||
|
||||
|
||||
# Must be linked with libs that are not compiled yet
|
||||
noinst_PROGRAMS = factorial dbug_analyze tests
|
||||
factorial_SOURCES = my_main.c factorial.c
|
||||
tests_SOURCES = tests.c
|
||||
dbug_analyze_SOURCES = dbug_analyze.c
|
||||
|
||||
all: user.t user.ps tests-t
|
||||
|
||||
user.t: user.r $(NROFF_INC)
|
||||
-nroff -mm user.r > $@
|
||||
|
||||
user.ps: user.r $(NROFF_INC)
|
||||
-groff -mm user.r > $@
|
||||
|
||||
output1.r: factorial
|
||||
./factorial 1 2 3 4 5 | cat > $@
|
||||
|
||||
output2.r: factorial
|
||||
./factorial -\#t:o 2 3 | cat >$@
|
||||
|
||||
output3.r: factorial
|
||||
./factorial -\#d:t:o 3 | cat >$@
|
||||
|
||||
output4.r: factorial
|
||||
./factorial -\#d,result:o 4 | cat >$@
|
||||
|
||||
output5.r: factorial
|
||||
./factorial -\#d:f,factorial:F:L:o 3 | cat >$@
|
||||
.c.r:
|
||||
@RM@ -f $@
|
||||
@SED@ -e 's!\\!\\\\!g' $< > $@
|
||||
|
||||
# a hack to have executable in builddir, not in srcdir
|
||||
tests-t: tests-t.pl
|
||||
cp -f $(srcdir)/tests-t.pl ./tests-t
|
||||
|
|
@ -1,57 +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
|
||||
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/sql
|
||||
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \
|
||||
../dbug/libdbug.a ../strings/libmystrings.a \
|
||||
$(ZLIB_LIBS)
|
||||
BUILT_SOURCES= $(top_builddir)/include/mysqld_error.h \
|
||||
$(top_builddir)/include/sql_state.h \
|
||||
$(top_builddir)/include/mysqld_ername.h
|
||||
pkginclude_HEADERS= $(BUILT_SOURCES)
|
||||
DISTCLEANFILES = $(BUILT_SOURCES)
|
||||
SUBDIRS = @yassl_dir@
|
||||
DIST_SUBDIRS = yassl
|
||||
|
||||
# This will build mysqld_error.h, mysqld_ername.h and sql_state.h
|
||||
# NOTE Built files should depend on their sources to avoid
|
||||
# the built files being rebuilt in source dist
|
||||
$(top_builddir)/include/mysqld_error.h: comp_err.c \
|
||||
$(top_srcdir)/sql/share/errmsg-utf8.txt
|
||||
$(MAKE) $(AM_MAKEFLAGS) comp_err$(EXEEXT)
|
||||
$(top_builddir)/extra/comp_err$(EXEEXT) \
|
||||
--charset=$(top_srcdir)/sql/share/charsets \
|
||||
--out-dir=$(top_builddir)/sql/share/ \
|
||||
--header_file=$(top_builddir)/include/mysqld_error.h \
|
||||
--name_file=$(top_builddir)/include/mysqld_ername.h \
|
||||
--state_file=$(top_builddir)/include/sql_state.h \
|
||||
--in_file=$(top_srcdir)/sql/share/errmsg-utf8.txt
|
||||
$(top_builddir)/include/mysqld_ername.h: $(top_builddir)/include/mysqld_error.h
|
||||
$(top_builddir)/include/sql_state.h: $(top_builddir)/include/mysqld_error.h
|
||||
|
||||
bin_PROGRAMS = replace perror resolveip my_print_defaults \
|
||||
resolve_stack_dump mysql_waitpid
|
||||
# "innochecksum" should be switched
|
||||
if BUILD_INNODB_TOOLS
|
||||
bin_PROGRAMS += innochecksum
|
||||
endif
|
||||
|
||||
noinst_PROGRAMS = charset2html
|
||||
EXTRA_PROGRAMS = comp_err
|
||||
EXTRA_DIST = CMakeLists.txt
|
||||
|
||||
perror.o: perror.c
|
||||
$(COMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
|
|
@ -1,2 +0,0 @@
|
|||
SUBDIRS = taocrypt src testsuite
|
||||
EXTRA_DIST = CMakeLists.txt
|
|
@ -1,8 +0,0 @@
|
|||
INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../taocrypt/include -I$(srcdir)/../taocrypt/mySTL
|
||||
|
||||
noinst_LTLIBRARIES = libyassl.la
|
||||
libyassl_la_SOURCES = buffer.cpp cert_wrapper.cpp crypto_wrapper.cpp \
|
||||
handshake.cpp lock.cpp log.cpp socket_wrapper.cpp ssl.cpp \
|
||||
template_instnt.cpp timer.cpp yassl_imp.cpp yassl_error.cpp yassl_int.cpp
|
||||
EXTRA_DIST = $(wildcard ../include/*.hpp) $(wildcard ../include/openssl/*.h)
|
||||
AM_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX @yassl_thread_cxxflags@
|
|
@ -1,2 +0,0 @@
|
|||
SUBDIRS = src test benchmark
|
||||
EXTRA_DIST = CMakeLists.txt $(wildcard mySTL/*.hpp)
|
|
@ -1,6 +0,0 @@
|
|||
INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL
|
||||
noinst_PROGRAMS = benchmark
|
||||
benchmark_SOURCES = benchmark.cpp
|
||||
benchmark_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
||||
benchmark_CXXFLAGS = -DYASSL_PURE_C @yassl_thread_cxxflags@
|
||||
EXTRA_DIST = benchmark.dsp rsa1024.der dh1024.der dsa1024.der make.bat
|
|
@ -1,14 +0,0 @@
|
|||
INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL
|
||||
|
||||
noinst_LTLIBRARIES = libtaocrypt.la
|
||||
|
||||
libtaocrypt_la_SOURCES = aes.cpp aestables.cpp algebra.cpp arc4.cpp \
|
||||
asn.cpp bftables.cpp blowfish.cpp coding.cpp des.cpp dh.cpp \
|
||||
dsa.cpp file.cpp hash.cpp integer.cpp md2.cpp md4.cpp md5.cpp misc.cpp \
|
||||
random.cpp ripemd.cpp rsa.cpp sha.cpp template_instnt.cpp \
|
||||
tftables.cpp twofish.cpp
|
||||
|
||||
libtaocrypt_la_CXXFLAGS = @yassl_taocrypt_extra_cxxflags@ -DYASSL_PURE_C \
|
||||
@yassl_thread_cxxflags@
|
||||
|
||||
EXTRA_DIST = $(wildcard ../include/*.hpp)
|
|
@ -1,6 +0,0 @@
|
|||
INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL
|
||||
noinst_PROGRAMS = test
|
||||
test_SOURCES = test.cpp
|
||||
test_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
||||
test_CXXFLAGS = -DYASSL_PURE_C @yassl_thread_cxxflags@
|
||||
EXTRA_DIST = make.bat
|
|
@ -1,10 +0,0 @@
|
|||
INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../taocrypt/include -I$(srcdir)/../taocrypt/mySTL
|
||||
noinst_PROGRAMS = testsuite
|
||||
testsuite_SOURCES = testsuite.cpp ../taocrypt/test/test.cpp \
|
||||
../examples/client/client.cpp ../examples/server/server.cpp \
|
||||
../examples/echoclient/echoclient.cpp \
|
||||
../examples/echoserver/echoserver.cpp
|
||||
testsuite_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX -DNO_MAIN_DRIVER @yassl_thread_cxxflags@
|
||||
testsuite_LDADD = $(top_builddir)/extra/yassl/src/libyassl.la \
|
||||
$(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
||||
EXTRA_DIST = testsuite.dsp test.hpp input quit make.bat
|
|
@ -1,107 +0,0 @@
|
|||
# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# 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
|
||||
|
||||
pkgpsiincludedir = $(pkgincludedir)/psi
|
||||
|
||||
BUILT_SOURCES = $(HEADERS_GEN_MAKE) link_sources probes_mysql_nodtrace.h
|
||||
HEADERS_GEN_CONFIGURE = mysql_version.h
|
||||
HEADERS_GEN_MAKE = my_config.h
|
||||
HEADERS_ABI = mysql.h mysql_com.h mysql_time.h \
|
||||
my_list.h my_alloc.h typelib.h mysql/plugin.h \
|
||||
mysql/plugin_audit.h mysql/plugin_ftparser.h
|
||||
pkginclude_HEADERS = $(HEADERS_ABI) my_dbug.h m_string.h my_sys.h \
|
||||
my_xml.h mysql_embed.h mysql/plugin_auth.h \
|
||||
mysql/client_plugin.h mysql/plugin_auth_common.h \
|
||||
mysql/services.h \
|
||||
mysql/service_my_snprintf.h mysql/service_thd_alloc.h \
|
||||
mysql/service_thread_scheduler.h \
|
||||
mysql/service_thd_wait.h \
|
||||
my_pthread.h my_no_pthread.h \
|
||||
decimal.h errmsg.h my_global.h my_net.h \
|
||||
my_getopt.h sslopt-longopts.h my_dir.h \
|
||||
sslopt-vars.h sslopt-case.h sql_common.h keycache.h \
|
||||
m_ctype.h my_attribute.h my_compiler.h \
|
||||
$(HEADERS_GEN_CONFIGURE) $(HEADERS_GEN_MAKE) \
|
||||
probes_mysql.h probes_mysql_nodtrace.h
|
||||
|
||||
noinst_HEADERS = lf.h my_bit.h \
|
||||
heap.h my_bitmap.h my_uctype.h password.h \
|
||||
myisam.h myisampack.h myisammrg.h ft_global.h\
|
||||
mysys_err.h my_base.h \
|
||||
my_nosys.h my_alarm.h queues.h rijndael.h sha1.h sha2.h \
|
||||
my_aes.h my_tree.h hash.h thr_alarm.h \
|
||||
thr_lock.h t_ctype.h violite.h my_md5.h base64.h \
|
||||
my_handler.h my_time.h service_versions.h \
|
||||
my_rdtsc.h mysql/psi/psi_abi_v1.h mysql/psi/psi_abi_v2.h \
|
||||
my_user.h my_atomic.h atomic/nolock.h \
|
||||
atomic/rwlock.h atomic/x86-gcc.h atomic/generic-msvc.h \
|
||||
atomic/gcc_builtins.h my_libwrap.h my_stacktrace.h \
|
||||
atomic/solaris.h mysql/innodb_priv.h
|
||||
|
||||
pkgpsiinclude_HEADERS = mysql/psi/psi.h mysql/psi/mysql_thread.h \
|
||||
mysql/psi/mysql_file.h
|
||||
|
||||
EXTRA_DIST = mysql.h.pp mysql/plugin.h.pp probes_mysql.d.base \
|
||||
CMakeLists.txt \
|
||||
mysql/psi/psi_abi_v1.h.pp \
|
||||
mysql/psi/psi_abi_v2.h.pp \
|
||||
mysql/plugin_auth.h.pp mysql/client_plugin.h.pp
|
||||
|
||||
# Remove built files and the symlinked directories
|
||||
CLEANFILES = $(BUILT_SOURCES) readline openssl probes_mysql.d probes_mysql_nodtrace.h
|
||||
|
||||
|
||||
# Some include files that may be moved and patched by configure
|
||||
DISTCLEANFILES = sched.h $(CLEANFILES) $(HEADERS_GEN_CONFIGURE)
|
||||
|
||||
link_sources:
|
||||
-$(RM) -f readline openssl
|
||||
@readline_h_ln_cmd@
|
||||
@yassl_h_ln_cmd@
|
||||
echo timestamp > link_sources
|
||||
|
||||
# We want both "my_config.h" and "config.h" that are identical, as
|
||||
# MySQL sources assumes the name "my_config.h", and 3rd party sources
|
||||
# assumes the name "config.h".
|
||||
my_config.h: config.h
|
||||
$(CP) config.h my_config.h
|
||||
|
||||
# These files should not be included in distributions since they are
|
||||
# generated by configure from the .h.in files
|
||||
dist-hook:
|
||||
$(RM) -f $(distdir)/mysql_version.h $(distdir)/my_config.h
|
||||
|
||||
probes_mysql.d:
|
||||
if ! test -f probes_mysql.d ; then \
|
||||
$(CP) -f $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d; \
|
||||
fi
|
||||
|
||||
DTRACEPROVIDER = probes_mysql.d
|
||||
if HAVE_DTRACE
|
||||
BUILT_SOURCES += probes_mysql_dtrace.h
|
||||
CLEANFILES += $(DTRACEPROVIDER)
|
||||
|
||||
# Fake for creating the probes file. If we are building a separate directory
|
||||
# then we copy the probes from the source location and use that
|
||||
# If we are building in the same directory as the source, we do not copy
|
||||
|
||||
probes_mysql_dtrace.h: $(DTRACEPROVIDER)
|
||||
$(DTRACE) $(DTRACEFLAGS) -h -s $(DTRACEPROVIDER) -o $@
|
||||
endif
|
||||
|
||||
probes_mysql_nodtrace.h: $(DTRACEPROVIDER)
|
||||
@PERL@ $(top_srcdir)/scripts/dheadgen.pl -f $(DTRACEPROVIDER) > $@
|
|
@ -356,6 +356,32 @@ extern CHARSET_INFO my_charset_utf8mb4_unicode_ci;
|
|||
#define MY_UTF8MB4 "utf8mb4"
|
||||
|
||||
|
||||
/* Helper functions to handle contraction */
|
||||
static inline my_bool
|
||||
my_cs_have_contractions(CHARSET_INFO *cs)
|
||||
{
|
||||
return cs->contractions != NULL;
|
||||
}
|
||||
|
||||
static inline my_bool
|
||||
my_cs_can_be_contraction_head(CHARSET_INFO *cs, my_wc_t wc)
|
||||
{
|
||||
return ((const char *)cs->contractions)[0x40*0x40 + (wc & 0xFF)];
|
||||
}
|
||||
|
||||
static inline my_bool
|
||||
my_cs_can_be_contraction_tail(CHARSET_INFO *cs, my_wc_t wc)
|
||||
{
|
||||
return ((const char *)cs->contractions)[0x40*0x40 + (wc & 0xFF)];
|
||||
}
|
||||
|
||||
static inline uint16*
|
||||
my_cs_contraction2_weight(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2)
|
||||
{
|
||||
return &cs->contractions[(wc1 - 0x40) * 0x40 + wc2 - 0x40];
|
||||
}
|
||||
|
||||
|
||||
/* declarations for simple charsets */
|
||||
extern size_t my_strnxfrm_simple(CHARSET_INFO *, uchar *, size_t,
|
||||
const uchar *, size_t);
|
||||
|
@ -430,6 +456,7 @@ ulonglong my_strntoull10rnd_ucs2(CHARSET_INFO *cs,
|
|||
|
||||
void my_fill_8bit(CHARSET_INFO *cs, char* to, size_t l, int fill);
|
||||
|
||||
/* For 8-bit character set */
|
||||
my_bool my_like_range_simple(CHARSET_INFO *cs,
|
||||
const char *ptr, size_t ptr_length,
|
||||
pbool escape, pbool w_one, pbool w_many,
|
||||
|
@ -437,6 +464,7 @@ my_bool my_like_range_simple(CHARSET_INFO *cs,
|
|||
char *min_str, char *max_str,
|
||||
size_t *min_length, size_t *max_length);
|
||||
|
||||
/* For ASCII-based multi-byte character sets with mbminlen=1 */
|
||||
my_bool my_like_range_mb(CHARSET_INFO *cs,
|
||||
const char *ptr, size_t ptr_length,
|
||||
pbool escape, pbool w_one, pbool w_many,
|
||||
|
@ -444,26 +472,13 @@ my_bool my_like_range_mb(CHARSET_INFO *cs,
|
|||
char *min_str, char *max_str,
|
||||
size_t *min_length, size_t *max_length);
|
||||
|
||||
my_bool my_like_range_ucs2(CHARSET_INFO *cs,
|
||||
const char *ptr, size_t ptr_length,
|
||||
pbool escape, pbool w_one, pbool w_many,
|
||||
size_t res_length,
|
||||
char *min_str, char *max_str,
|
||||
size_t *min_length, size_t *max_length);
|
||||
|
||||
my_bool my_like_range_utf16(CHARSET_INFO *cs,
|
||||
const char *ptr, size_t ptr_length,
|
||||
pbool escape, pbool w_one, pbool w_many,
|
||||
size_t res_length,
|
||||
char *min_str, char *max_str,
|
||||
size_t *min_length, size_t *max_length);
|
||||
|
||||
my_bool my_like_range_utf32(CHARSET_INFO *cs,
|
||||
const char *ptr, size_t ptr_length,
|
||||
pbool escape, pbool w_one, pbool w_many,
|
||||
size_t res_length,
|
||||
char *min_str, char *max_str,
|
||||
size_t *min_length, size_t *max_length);
|
||||
/* For other character sets, with arbitrary mbminlen and mbmaxlen numbers */
|
||||
my_bool my_like_range_generic(CHARSET_INFO *cs,
|
||||
const char *ptr, size_t ptr_length,
|
||||
pbool escape, pbool w_one, pbool w_many,
|
||||
size_t res_length,
|
||||
char *min_str, char *max_str,
|
||||
size_t *min_length, size_t *max_length);
|
||||
|
||||
int my_wildcmp_8bit(CHARSET_INFO *,
|
||||
const char *str,const char *str_end,
|
||||
|
|
|
@ -52,8 +52,6 @@
|
|||
# define memmove(d, s, n) bmove ((d), (s), (n))
|
||||
#elif defined(HAVE_MEMMOVE)
|
||||
# define bmove(d, s, n) memmove((d), (s), (n))
|
||||
#else
|
||||
# define memmove(d, s, n) bmove((d), (s), (n)) /* our bmove */
|
||||
#endif
|
||||
|
||||
/* Unixware 7 */
|
||||
|
@ -76,7 +74,7 @@ extern "C" {
|
|||
extern void *(*my_str_malloc)(size_t);
|
||||
extern void (*my_str_free)(void *);
|
||||
|
||||
#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4)
|
||||
#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER)
|
||||
#define strmov(A,B) __builtin_stpcpy((A),(B))
|
||||
#elif defined(HAVE_STPCPY)
|
||||
#define strmov(A,B) stpcpy((A),(B))
|
||||
|
@ -96,14 +94,6 @@ extern char _dig_vec_lower[];
|
|||
|
||||
/* Prototypes for string functions */
|
||||
|
||||
#if !defined(bfill) && !defined(HAVE_BFILL)
|
||||
extern void bfill(uchar *dst,size_t len,pchar fill);
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_BMOVE) && !defined(bmove)
|
||||
extern void bmove(uuchar *dst, const uchar *src,size_t len);
|
||||
#endif
|
||||
|
||||
extern void bmove_upp(uchar *dst,const uchar *src,size_t len);
|
||||
extern void bchange(uchar *dst,size_t old_len,const uchar *src,
|
||||
size_t new_len,size_t tot_len);
|
||||
|
@ -128,11 +118,6 @@ extern char *strxnmov(char *dst, size_t len, const char *src, ...);
|
|||
extern size_t strnlen(const char *s, size_t n);
|
||||
#endif
|
||||
|
||||
#if !defined(__cplusplus)
|
||||
#ifndef HAVE_STRSTR
|
||||
extern char *strstr(const char *, const char *);
|
||||
#endif
|
||||
#endif
|
||||
extern int is_prefix(const char *, const char *);
|
||||
|
||||
/* Conversion routines */
|
||||
|
|
|
@ -17,11 +17,10 @@
|
|||
This file defines the client API to MySQL and also the ABI of the
|
||||
dynamically linked libmysqlclient.
|
||||
|
||||
The ABI should never be changed in a released product of MySQL
|
||||
The ABI should never be changed in a released product of MySQL,
|
||||
thus you need to take great care when changing the file. In case
|
||||
the file is changed so the ABI is broken, you must also
|
||||
update the SHAREDLIB_MAJOR_VERSION in configure.in .
|
||||
|
||||
the file is changed so the ABI is broken, you must also update
|
||||
the SHARED_LIB_MAJOR_VERSION in cmake/mysql_version.cmake
|
||||
*/
|
||||
|
||||
#ifndef _mysql_h
|
||||
|
|
|
@ -1,115 +0,0 @@
|
|||
# Copyright (C) 2000-2004 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of version 2 GNU General Public License as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# There are special exceptions to the terms and conditions of the GPL as it
|
||||
# is applied to this software. View the full text of the exception in file
|
||||
# EXCEPTIONS-CLIENT in the directory of this software distribution.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# This file is public domain and comes with NO WARRANTY of any kind
|
||||
|
||||
target = libmysqlclient.la
|
||||
target_defs = -DMYSQL_CLIENT_NO_THREADS -DDISABLE_MYSQL_THREAD_H \
|
||||
@LIB_EXTRA_CCFLAGS@
|
||||
|
||||
LIBS = @CLIENT_LIBS@
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
|
||||
$(openssl_includes) @ZLIB_INCLUDES@
|
||||
|
||||
include $(srcdir)/Makefile.shared
|
||||
|
||||
libmysqlclient_la_SOURCES = $(target_sources)
|
||||
libmysqlclient_la_LIBADD = $(target_libadd) $(yassl_las)
|
||||
libmysqlclient_la_LDFLAGS = $(target_ldflags)
|
||||
EXTRA_DIST = Makefile.shared libmysql.def CMakeLists.txt
|
||||
noinst_HEADERS = client_settings.h
|
||||
|
||||
link_sources:
|
||||
set -x; \
|
||||
ss=`echo $(mystringsobjects) | sed "s;\.lo;.c;g"`; \
|
||||
ds=`echo $(dbugobjects) | sed "s;\.lo;.c;g"`; \
|
||||
ms=`echo $(mysysobjects) | sed "s;\.lo;.c;g"`; \
|
||||
vs=`echo $(vio_objects) | sed "s;\.lo;.c;g"`; \
|
||||
scs=`echo $(sql_cmn_objects) | sed "s;\.lo;.c;g"`; \
|
||||
for f in $$ss; do \
|
||||
rm -f $$f; \
|
||||
@LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \
|
||||
done; \
|
||||
for f in $$vs $(vioheaders); do \
|
||||
rm -f $$f; \
|
||||
@LN_CP_F@ $(top_srcdir)/vio/$$f $$f; \
|
||||
done; \
|
||||
for f in $$scs; do \
|
||||
rm -f $$f; \
|
||||
@LN_CP_F@ $(top_srcdir)/sql-common/$$f $$f; \
|
||||
done; \
|
||||
for f in $(mystringsextra); do \
|
||||
rm -f $$f; \
|
||||
@LN_CP_F@ $(top_srcdir)/strings/$$f $$f; \
|
||||
done; \
|
||||
for f in $$ds; do \
|
||||
rm -f $$f; \
|
||||
@LN_CP_F@ $(top_srcdir)/dbug/$$f $$f; \
|
||||
done; \
|
||||
for f in $$ms $(mysysheaders); do \
|
||||
rm -f $$f; \
|
||||
@LN_CP_F@ $(top_srcdir)/mysys/$$f $$f; \
|
||||
done; \
|
||||
rm -f net.c; \
|
||||
@LN_CP_F@ $(top_srcdir)/sql/net_serv.cc net.c ; \
|
||||
rm -f password.c; \
|
||||
@LN_CP_F@ $(top_srcdir)/sql/password.c password.c
|
||||
echo timestamp > link_sources
|
||||
|
||||
# This part requires GNUmake
|
||||
#
|
||||
# This makes a distribution file with only the files needed to compile
|
||||
# a minimal MySQL client library
|
||||
#
|
||||
# For a really minimal distribution (without debugging code) we could
|
||||
# keep only the stubs for debug.c
|
||||
#
|
||||
# A list of needed headers collected from the deps information 000213
|
||||
nh = my_global.h dbug.h errmsg.h \
|
||||
m_ctype.h m_string.h password.h \
|
||||
my_alarm.h my_config.h my_dir.h my_list.h my_net.h my_sys.h \
|
||||
mysql.h mysql_com.h mysql_version.h mysqld_error.h \
|
||||
mysys_err.h my_pthread.h thr_alarm.h violite.h hash.h \
|
||||
sql_common.h ../libmysql/client_settings.h
|
||||
# Get a list of the needed objects
|
||||
lobjs = $(mysysobjects1) $(dbugobjects) $(mystringsobjects) $(sqlobjects)
|
||||
|
||||
do-lib-dist:
|
||||
dir=libmysql-$(MYSQL_NO_DASH_VERSION); \
|
||||
srcs1=`echo $(lobjs) | sed "s;\.lo;.c;g"`; \
|
||||
srcs2=$(target_sources); \
|
||||
srcs="$$srcs1 $$srcs2"; \
|
||||
objs1=`echo $(lobjs) | sed "s;\.lo;.o;g"`; \
|
||||
objs2=`echo $(target_sources) | sed "s;\.c;.o;g"`; \
|
||||
objs="$$objs1 $$objs2"; \
|
||||
rm -rf $$dir; \
|
||||
mkdir $$dir; \
|
||||
$(INSTALL_DATA) $$srcs $(mysysheaders) $$dir; \
|
||||
for i in $(nh); do $(INSTALL_DATA) ../include/$$i $$dir; done; \
|
||||
echo "# A very minimal Makefile to compile" > $$dir/Makefile; \
|
||||
echo "# the minimized libmysql library" >> $$dir/Makefile; \
|
||||
echo "# This file is autogenerated from Makefile.am" >> $$dir/Makefile; \
|
||||
echo 'CFLAGS= -I. -DMYSQL_CLIENT_NO_THREADS' >>$$dir/Makefile; \
|
||||
echo "obj=$$objs" >>$$dir/Makefile; \
|
||||
echo 'all: libmysql.a' >>$$dir/Makefile; \
|
||||
echo 'libmysql.a: $$(obj)' >>$$dir/Makefile; \
|
||||
echo ' $$(AR) r $$@ $$?' >>$$dir/Makefile; \
|
||||
gtar cvzf $$dir.tar.gz $$dir; \
|
||||
cd $$dir; gmake
|
|
@ -1,119 +0,0 @@
|
|||
# Copyright (C) 2000-2004 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of version 2 GNU General Public License as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# There are special exceptions to the terms and conditions of the GPL as it
|
||||
# is applied to this software. View the full text of the exception in file
|
||||
# EXCEPTIONS-CLIENT in the directory of this software distribution.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# This file is public domain and comes with NO WARRANTY of any kind
|
||||
|
||||
MYSQLDATAdir = $(localstatedir)
|
||||
MYSQLSHAREdir = $(pkgdatadir)
|
||||
MYSQLBASEdir= $(prefix)
|
||||
pkgplugindir = $(pkglibdir)/plugin
|
||||
## We'll use CLIENT_EXTRA_LDFLAGS for threaded and non-threaded
|
||||
## until someone complains that they need separate options.
|
||||
LDADD = @CLIENT_EXTRA_LDFLAGS@ $(target)
|
||||
pkglib_LTLIBRARIES = $(target)
|
||||
|
||||
noinst_PROGRAMS = conf_to_src
|
||||
|
||||
|
||||
target_sources = libmysql.c password.c \
|
||||
get_password.c errmsg.c
|
||||
|
||||
mystringsobjects = strmov.lo strxmov.lo strxnmov.lo strnmov.lo \
|
||||
strmake.lo strend.lo \
|
||||
strnlen.lo strfill.lo is_prefix.lo \
|
||||
int2str.lo str2int.lo strcont.lo \
|
||||
strcend.lo ctype-latin1.lo \
|
||||
bchange.lo bmove.lo bmove_upp.lo longlong2str.lo \
|
||||
strtoull.lo strtoll.lo llstr.lo my_vsnprintf.lo \
|
||||
ctype.lo ctype-simple.lo ctype-bin.lo ctype-mb.lo \
|
||||
ctype-big5.lo ctype-czech.lo ctype-cp932.lo ctype-eucjpms.lo ctype-euc_kr.lo \
|
||||
ctype-win1250ch.lo ctype-utf8.lo ctype-extra.lo \
|
||||
ctype-ucs2.lo ctype-gb2312.lo ctype-gbk.lo \
|
||||
ctype-sjis.lo ctype-tis620.lo ctype-ujis.lo \
|
||||
ctype-uca.lo xml.lo my_strtoll10.lo str_alloc.lo dtoa.lo
|
||||
|
||||
mystringsextra= strto.c
|
||||
dbugobjects = dbug.lo
|
||||
mysysheaders = mysys_priv.h my_static.h
|
||||
vioheaders = vio_priv.h
|
||||
mysysobjects1 = my_init.lo my_static.lo my_malloc.lo \
|
||||
my_create.lo my_delete.lo mf_tempfile.lo my_open.lo \
|
||||
my_file.lo my_read.lo my_write.lo errors.lo \
|
||||
my_error.lo my_getwd.lo my_div.lo \
|
||||
mf_pack.lo my_mess.lo mf_dirname.lo mf_fn_ext.lo\
|
||||
mf_wcomp.lo typelib.lo my_alloc.lo \
|
||||
mf_format.lo mf_path.lo mf_unixpath.lo my_fopen.lo \
|
||||
my_symlink.lo my_fstream.lo mf_arr_appstr.lo \
|
||||
mf_loadpath.lo my_pthread.lo my_thr_init.lo \
|
||||
thr_mutex.lo mulalloc.lo string.lo default.lo \
|
||||
my_compress.lo array.lo my_once.lo list.lo \
|
||||
charset.lo charset-def.lo hash.lo mf_iocache.lo \
|
||||
mf_iocache2.lo my_seek.lo my_sleep.lo \
|
||||
my_pread.lo mf_cache.lo md5.lo sha1.lo \
|
||||
my_getopt.lo my_gethostbyname.lo my_port.lo \
|
||||
my_rename.lo my_chsize.lo my_sync.lo \
|
||||
my_getsystime.lo my_symlink2.lo mf_same.lo
|
||||
sqlobjects = net.lo
|
||||
sql_cmn_objects = pack.lo client.lo my_time.lo client_plugin.lo
|
||||
|
||||
# Not needed in the minimum library
|
||||
mysysobjects2 = my_lib.lo mf_qsort.lo
|
||||
mysysobjects = $(mysysobjects1) $(mysysobjects2)
|
||||
target_libadd = $(mysysobjects) $(mystringsobjects) $(dbugobjects) \
|
||||
$(sql_cmn_objects) $(vio_objects) $(sqlobjects)
|
||||
target_ldflags = -version-info @SHARED_LIB_VERSION@ @LD_VERSION_SCRIPT@ @LIBDL@
|
||||
vio_objects= vio.lo viosocket.lo viossl.lo viosslfactories.lo
|
||||
|
||||
BUILT_SOURCES = link_sources
|
||||
|
||||
CLEANFILES = $(target_libadd) $(SHLIBOBJS) \
|
||||
$(target) $(BUILT_SOURCES)
|
||||
DEFS = -DDEFAULT_CHARSET_HOME='"$(MYSQLBASEdir)"' \
|
||||
-DMYSQL_DATADIR='"$(MYSQLDATAdir)"' \
|
||||
-DDEFAULT_HOME_ENV=MYSQL_HOME \
|
||||
-DPLUGINDIR='"$(pkgplugindir)"' \
|
||||
-DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX \
|
||||
-DDEFAULT_SYSCONFDIR='"$(sysconfdir)"' \
|
||||
-DSHAREDIR='"$(MYSQLSHAREdir)"' -DDISABLE_DTRACE \
|
||||
$(target_defs)
|
||||
|
||||
if HAVE_YASSL
|
||||
yassl_las = $(top_builddir)/extra/yassl/src/libyassl.la \
|
||||
$(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
||||
endif
|
||||
|
||||
# The automatic dependencies miss this
|
||||
#bmove_upp.lo: $(LTCHARSET_OBJS)
|
||||
|
||||
clean-local:
|
||||
rm -f `echo $(mystringsobjects) | sed "s;\.lo;.c;g"` \
|
||||
`echo $(dbugobjects) | sed "s;\.lo;.c;g"` \
|
||||
`echo $(mysysobjects) | sed "s;\.lo;.c;g"` \
|
||||
`echo $(vio_objects) | sed "s;\.lo;.c;g"` \
|
||||
`echo $(sql_cmn_objects) | sed "s;\.lo;.c;g"` \
|
||||
$(CHARSET_SRCS) $(CHARSET_OBJS) \
|
||||
$(mystringsextra) $(mysysheaders) $(vioheaders) \
|
||||
net.c
|
||||
|
||||
conf_to_src_SOURCES = conf_to_src.c
|
||||
conf_to_src_LDADD=
|
||||
#force static linking of conf_to_src - essential when linking against
|
||||
#custom installation of libc
|
||||
conf_to_src_LDFLAGS=@NOINST_LDFLAGS@
|
|
@ -1,91 +0,0 @@
|
|||
# Local macros for automake & autoconf
|
||||
|
||||
AC_DEFUN(MYSQL_TYPE_ACCEPT,
|
||||
[ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
AC_CACHE_CHECK([base type of last arg to accept], mysql_cv_btype_last_arg_accept,
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
if test "$ac_cv_prog_gxx" = "yes"
|
||||
then
|
||||
CXXFLAGS="$CXXFLAGS -Werror"
|
||||
fi
|
||||
mysql_cv_btype_last_arg_accept=none
|
||||
[AC_TRY_COMPILE([#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
],
|
||||
[int a = accept(1, (struct sockaddr *) 0, (socklen_t *) 0);],
|
||||
mysql_cv_btype_last_arg_accept=socklen_t)]
|
||||
if test $mysql_cv_btype_last_arg_accept = none; then
|
||||
[AC_TRY_COMPILE([#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
],
|
||||
[int a = accept(1, (struct sockaddr *) 0, (size_t *) 0);],
|
||||
mysql_cv_btype_last_arg_accept=size_t)]
|
||||
fi
|
||||
if test $mysql_cv_btype_last_arg_accept = none; then
|
||||
mysql_cv_btype_last_arg_accept=int
|
||||
fi)
|
||||
AC_LANG_RESTORE
|
||||
AC_DEFINE_UNQUOTED(SOCKET_SIZE_TYPE, $mysql_cv_btype_last_arg_accept)
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||
])
|
||||
|
||||
|
||||
#---START: Used in for client configure
|
||||
AC_DEFUN(MYSQL_CHECK_ULONG,
|
||||
[AC_MSG_CHECKING(for type ulong)
|
||||
AC_CACHE_VAL(ac_cv_ulong,
|
||||
[AC_TRY_RUN([#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
main()
|
||||
{
|
||||
ulong foo;
|
||||
foo++;
|
||||
exit(0);
|
||||
}], ac_cv_ulong=yes, ac_cv_ulong=no, ac_cv_ulong=no)])
|
||||
AC_MSG_RESULT($ac_cv_ulong)
|
||||
if test "$ac_cv_ulong" = "yes"
|
||||
then
|
||||
AC_DEFINE(HAVE_ULONG)
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(MYSQL_CHECK_UCHAR,
|
||||
[AC_MSG_CHECKING(for type uchar)
|
||||
AC_CACHE_VAL(ac_cv_uchar,
|
||||
[AC_TRY_RUN([#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
main()
|
||||
{
|
||||
uchar foo;
|
||||
foo++;
|
||||
exit(0);
|
||||
}], ac_cv_uchar=yes, ac_cv_uchar=no, ac_cv_uchar=no)])
|
||||
AC_MSG_RESULT($ac_cv_uchar)
|
||||
if test "$ac_cv_uchar" = "yes"
|
||||
then
|
||||
AC_DEFINE(HAVE_UCHAR)
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(MYSQL_CHECK_UINT,
|
||||
[AC_MSG_CHECKING(for type uint)
|
||||
AC_CACHE_VAL(ac_cv_uint,
|
||||
[AC_TRY_RUN([#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
main()
|
||||
{
|
||||
uint foo;
|
||||
foo++;
|
||||
exit(0);
|
||||
}], ac_cv_uint=yes, ac_cv_uint=no, ac_cv_uint=no)])
|
||||
AC_MSG_RESULT($ac_cv_uint)
|
||||
if test "$ac_cv_uint" = "yes"
|
||||
then
|
||||
AC_DEFINE(HAVE_UINT)
|
||||
fi
|
||||
])
|
||||
|
||||
#---END:
|
|
@ -5,8 +5,7 @@
|
|||
the Free Software Foundation.
|
||||
|
||||
There are special exceptions to the terms and conditions of the GPL as it
|
||||
is applied to this software. View the full text of the exception in file
|
||||
EXCEPTIONS-CLIENT in the directory of this software distribution.
|
||||
is applied to this software.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
the Free Software Foundation.
|
||||
|
||||
There are special exceptions to the terms and conditions of the GPL as it
|
||||
is applied to this software. View the full text of the exception in file
|
||||
EXCEPTIONS-CLIENT in the directory of this software distribution.
|
||||
is applied to this software.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
the Free Software Foundation.
|
||||
|
||||
There are special exceptions to the terms and conditions of the GPL as it
|
||||
is applied to this software. View the full text of the exception in file
|
||||
EXCEPTIONS-CLIENT in the directory of this software distribution.
|
||||
is applied to this software.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
the Free Software Foundation.
|
||||
|
||||
There are special exceptions to the terms and conditions of the GPL as it
|
||||
is applied to this software. View the full text of the exception in file
|
||||
EXCEPTIONS-CLIENT in the directory of this software distribution.
|
||||
is applied to this software.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
# Copyright (C) 2000-2004 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of version 2 GNU General Public License as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# There are special exceptions to the terms and conditions of the GPL as it
|
||||
# is applied to this software. View the full text of the exception in file
|
||||
# EXCEPTIONS-CLIENT in the directory of this software distribution.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# This file is public domain and comes with NO WARRANTY of any kind
|
||||
|
||||
target = libmysqlclient_r.la
|
||||
target_defs = -DDISABLE_MYSQL_PRLOCK_H -DMYSQL_CLIENT @LIB_EXTRA_CCFLAGS@
|
||||
|
||||
LIBS = @LIBS@ @ZLIB_LIBS@ @openssl_libs@
|
||||
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
|
||||
$(openssl_includes) @ZLIB_INCLUDES@
|
||||
## automake barfs if you don't use $(srcdir) or $(top_srcdir) in include
|
||||
include $(top_srcdir)/libmysql/Makefile.shared
|
||||
|
||||
nodist_libmysqlclient_r_la_SOURCES = $(target_sources)
|
||||
libmysqlclient_r_la_LIBADD = $(target_libadd) $(yassl_las)
|
||||
libmysqlclient_r_la_LDFLAGS = $(target_ldflags)
|
||||
|
||||
link_sources:
|
||||
set -x; \
|
||||
for d in $(top_srcdir)/libmysql $(top_builddir)/libmysql; do \
|
||||
for f in `cd $$d && echo *.[ch]`; do \
|
||||
rm -f $$f; \
|
||||
@LN_CP_F@ $$d/$$f $$f; \
|
||||
done; \
|
||||
done
|
||||
echo timestamp > link_sources
|
|
@ -26,7 +26,6 @@ ${CMAKE_SOURCE_DIR}/regex
|
|||
${ZLIB_INCLUDE_DIR}
|
||||
${SSL_INCLUDE_DIRS}
|
||||
${SSL_INTERNAL_INCLUDE_DIRS}
|
||||
${NDB_CLUSTER_INCLUDES}
|
||||
${CMAKE_SOURCE_DIR}/sql/backup
|
||||
)
|
||||
|
||||
|
@ -110,7 +109,7 @@ SET(LIBS
|
|||
dbug strings regex mysys vio
|
||||
${ZLIB_LIBRARY} ${SSL_LIBRARIES}
|
||||
${LIBWRAP} ${LIBCRYPT} ${LIBDL}
|
||||
${MYSQLD_STATIC_PLUGIN_LIBS} ${NDB_CLIENT_LIBS}
|
||||
${MYSQLD_STATIC_PLUGIN_LIBS}
|
||||
sql_embedded
|
||||
)
|
||||
|
||||
|
|
|
@ -1,229 +0,0 @@
|
|||
# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
MYSQLDATAdir = $(localstatedir)
|
||||
MYSQLSHAREdir = $(pkgdatadir)
|
||||
MYSQLBASEdir= $(prefix)
|
||||
MYSQLLIBdir= $(libdir)
|
||||
pkgplugindir = $(pkglibdir)/plugin
|
||||
|
||||
EXTRA_DIST = libmysqld.def CMakeLists.txt
|
||||
DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \
|
||||
-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
|
||||
-DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
|
||||
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
|
||||
-DPLUGINDIR="\"$(pkgplugindir)\"" \
|
||||
-DDISABLE_DTRACE \
|
||||
@DEFS@
|
||||
INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include \
|
||||
-I$(top_builddir)/sql -I$(top_srcdir)/sql \
|
||||
-I$(top_srcdir)/sql/examples \
|
||||
-I$(top_srcdir)/regex \
|
||||
$(openssl_includes) @ZLIB_INCLUDES@ \
|
||||
@condition_dependent_plugin_includes@
|
||||
|
||||
noinst_LIBRARIES = libmysqld_int.a
|
||||
pkglib_LIBRARIES = libmysqld.a
|
||||
SUBDIRS = . examples
|
||||
libmysqld_sources= libmysqld.c lib_sql.cc emb_qcache.cc
|
||||
libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \
|
||||
my_time.c client_plugin.c
|
||||
|
||||
noinst_HEADERS = embedded_priv.h emb_qcache.h
|
||||
|
||||
sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
|
||||
ha_ndbcluster.cc ha_ndbcluster_cond.cc \
|
||||
ha_ndbcluster_binlog.cc ha_partition.cc \
|
||||
handler.cc sql_handler.cc \
|
||||
hostname.cc init.cc password.c \
|
||||
item.cc item_buff.cc item_cmpfunc.cc item_create.cc \
|
||||
item_func.cc item_strfunc.cc item_sum.cc item_timefunc.cc \
|
||||
item_geofunc.cc item_subselect.cc item_row.cc\
|
||||
item_xmlfunc.cc \
|
||||
sha2.cc des_key_file.cc \
|
||||
key.cc lock.cc log.cc sql_state.c \
|
||||
log_event.cc rpl_record.cc rpl_utility.cc \
|
||||
log_event_old.cc rpl_record_old.cc \
|
||||
protocol.cc net_serv.cc opt_range.cc \
|
||||
opt_sum.cc procedure.cc records.cc sql_acl.cc \
|
||||
sql_load.cc discover.cc sql_locale.cc \
|
||||
sql_profile.cc sql_admin.cc sql_truncate.cc datadict.cc \
|
||||
sql_reload.cc \
|
||||
sql_analyse.cc sql_base.cc sql_cache.cc sql_class.cc \
|
||||
sql_crypt.cc sql_db.cc sql_delete.cc sql_error.cc sql_insert.cc \
|
||||
sql_lex.cc sql_list.cc sql_manager.cc \
|
||||
scheduler.cc sql_connect.cc sql_parse.cc \
|
||||
sql_prepare.cc sql_derived.cc sql_rename.cc \
|
||||
sql_select.cc sql_do.cc sql_show.cc set_var.cc sys_vars.cc \
|
||||
sql_string.cc sql_table.cc sql_test.cc sql_udf.cc \
|
||||
sql_update.cc sql_yacc.cc table.cc thr_malloc.cc sql_time.cc \
|
||||
unireg.cc uniques.cc sql_union.cc hash_filo.cc \
|
||||
spatial.cc gstream.cc sql_help.cc tztime.cc sql_cursor.cc \
|
||||
sp_head.cc sp_pcontext.cc sp.cc sp_cache.cc sp_rcontext.cc \
|
||||
parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \
|
||||
rpl_filter.cc sql_partition.cc sql_builtin.cc sql_plugin.cc \
|
||||
debug_sync.cc sql_tablespace.cc transaction.cc \
|
||||
rpl_injector.cc my_user.c partition_info.cc sql_alter.cc \
|
||||
sql_servers.cc event_parse_data.cc sql_signal.cc \
|
||||
rpl_handler.cc mdl.cc keycaches.cc sql_audit.cc \
|
||||
sql_partition_admin.cc
|
||||
|
||||
libmysqld_int_a_SOURCES= $(libmysqld_sources)
|
||||
nodist_libmysqld_int_a_SOURCES= $(libmysqlsources) $(sqlsources)
|
||||
libmysqld_a_SOURCES=
|
||||
|
||||
sqlstoragesources = $(EXTRA_libmysqld_a_SOURCES)
|
||||
storagesources = @condition_dependent_plugin_modules@
|
||||
storageobjects = @condition_dependent_plugin_objects@
|
||||
storagesourceslinks = @condition_dependent_plugin_links@
|
||||
|
||||
# automake misses these
|
||||
sql_yacc.cc sql_yacc.h: $(top_srcdir)/sql/sql_yacc.yy
|
||||
|
||||
# The following libraries should be included in libmysqld.a
|
||||
INC_LIB= $(top_builddir)/regex/libregex.a \
|
||||
$(top_builddir)/mysys/libmysys.a \
|
||||
$(top_builddir)/strings/libmystrings.a \
|
||||
$(top_builddir)/dbug/libdbug.a \
|
||||
$(top_builddir)/vio/libvio.a \
|
||||
@NDB_SCI_LIBS@ \
|
||||
@mysql_plugin_libs@ \
|
||||
$(yassl_inc_libs)
|
||||
|
||||
if HAVE_YASSL
|
||||
yassl_inc_libs= $(top_builddir)/extra/yassl/src/.libs/libyassl.a \
|
||||
$(top_builddir)/extra/yassl/taocrypt/src/.libs/libtaocrypt.a
|
||||
endif
|
||||
|
||||
# Storage engine specific compilation options
|
||||
ha_ndbcluster.o:ha_ndbcluster.cc
|
||||
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
|
||||
|
||||
ha_ndbcluster_cond.o:ha_ndbcluster_cond.cc
|
||||
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
|
||||
|
||||
ha_ndbcluster_binlog.o: ha_ndbcluster_binlog.cc
|
||||
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
|
||||
|
||||
# Until we can remove dependency on ha_ndbcluster.h
|
||||
handler.o: handler.cc
|
||||
$(CXXCOMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
|
||||
|
||||
# We need rules to compile these as no good way
|
||||
# found to append fileslists that collected by configure
|
||||
# to the sources list
|
||||
|
||||
ha_federated.o:ha_federated.cc
|
||||
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
|
||||
|
||||
ha_heap.o:ha_heap.cc
|
||||
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
|
||||
|
||||
ha_innodb.o:ha_innodb.cc
|
||||
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
|
||||
|
||||
ha_myisam.o:ha_myisam.cc
|
||||
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
|
||||
|
||||
ha_myisammrg.o:ha_myisammrg.cc
|
||||
$(CXXCOMPILE) $(LM_CFLAGS) -c $<
|
||||
|
||||
#
|
||||
# To make it easy for the end user to use the embedded library we
|
||||
# generate a total libmysqld.a from all library files,
|
||||
|
||||
# note - InnoDB libraries have circular dependencies, so in INC_LIB
|
||||
# few libraries are present two times. Metrowerks linker doesn't like
|
||||
# it at all. Traditional ar has no problems with it, but still there's no
|
||||
# need to add the same file twice to the library, so 'sort -u' save us
|
||||
# some time and spares unnecessary work.
|
||||
|
||||
libmysqld.a: libmysqld_int.a $(INC_LIB) $(libmysqld_a_DEPENDENCIES) $(storageobjects)
|
||||
if DARWIN_MWCC
|
||||
mwld -lib -o $@ libmysqld_int.a `echo $(INC_LIB) | sort -u` $(storageobjects)
|
||||
else
|
||||
-rm -f libmysqld.a
|
||||
current_dir=`pwd`; \
|
||||
rm -rf tmp; mkdir tmp; \
|
||||
(for arc in $(INC_LIB) ./libmysqld_int.a; do \
|
||||
arpath=`echo $$arc|sed 's|[^/]*$$||'|sed 's|\.libs/$$||'`; \
|
||||
artmp=`echo $$arc|sed 's|^.*/|tmp/lib-|'`; \
|
||||
for F in `$(AR) t $$arc | grep -v SYMDEF`; do \
|
||||
if test -e "$$arpath/$$F" ; then echo "$$arpath/$$F"; else \
|
||||
mkdir $$artmp; cd $$artmp > /dev/null; \
|
||||
$(AR) x ../../$$arc; \
|
||||
cd $$current_dir > /dev/null; \
|
||||
ls $$artmp/* | grep -v SYMDEF; \
|
||||
continue 2; fi; done; \
|
||||
done; echo $(libmysqld_a_DEPENDENCIES) ) | sort -u | xargs $(AR) cq libmysqld.a; \
|
||||
$(AR) r libmysqld.a $(storageobjects); \
|
||||
$(RANLIB) libmysqld.a ; \
|
||||
rm -rf tmp
|
||||
endif
|
||||
|
||||
## XXX: any time the client interface changes, we'll need to bump
|
||||
## the version info for libmysqld; however, it's possible for the
|
||||
## libmysqld interface to change without affecting the standard
|
||||
## libmysqlclient interface. Should we make a separate version
|
||||
## string for the two?
|
||||
#libmysqld_la_LDFLAGS = -version-info @SHARED_LIB_VERSION@
|
||||
#CLEANFILES = $(libmysqld_la_LIBADD) libmysqld.la
|
||||
|
||||
BUILT_SOURCES = link_sources
|
||||
|
||||
CLEANFILES = $(BUILT_SOURCES)
|
||||
|
||||
link_sources:
|
||||
for f in $(sqlsources); do \
|
||||
rm -f $$f; \
|
||||
if test -e $(top_srcdir)/sql/$$f ; \
|
||||
then \
|
||||
@LN_CP_F@ $(top_srcdir)/sql/$$f $$f; \
|
||||
else \
|
||||
@LN_CP_F@ $(top_builddir)/sql/$$f $$f; \
|
||||
fi ; \
|
||||
done; \
|
||||
for f in $(libmysqlsources); do \
|
||||
rm -f $$f; \
|
||||
if test -e $(top_srcdir)/libmysql/$$f ; \
|
||||
then \
|
||||
@LN_CP_F@ $(top_srcdir)/libmysql/$$f $$f; \
|
||||
else \
|
||||
@LN_CP_F@ $(top_builddir)/libmysql/$$f $$f; \
|
||||
fi ; \
|
||||
done; \
|
||||
if test -n "$(sqlstoragesources)" ; \
|
||||
then \
|
||||
for f in "$(sqlstoragesources)"; do \
|
||||
rm -f "$$f"; \
|
||||
@LN_CP_F@ `find $(srcdir)/../sql -name "$$f"` "$$f"; \
|
||||
done; \
|
||||
fi; \
|
||||
if test -n "$(storagesources)" ; \
|
||||
then \
|
||||
rm -f $(storagesources); \
|
||||
for f in $(storagesourceslinks); do \
|
||||
@LN_CP_F@ $(top_srcdir)/$$f . ; \
|
||||
done; \
|
||||
fi; \
|
||||
rm -f client_settings.h; \
|
||||
@LN_CP_F@ $(top_srcdir)/libmysql/client_settings.h \
|
||||
client_settings.h; \
|
||||
echo timestamp > link_sources
|
||||
|
||||
|
||||
clean-local:
|
||||
rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlstoragesources) $(storagesources) | sed "s;\.lo;.c;g"`; \
|
||||
rm -f client_settings.h
|
|
@ -1,53 +0,0 @@
|
|||
# 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
|
||||
|
||||
noinst_PROGRAMS = mysql
|
||||
bin_PROGRAMS = mysqltest_embedded mysql_client_test_embedded
|
||||
client_sources = $(nodist_mysqltest_embedded_SOURCES) $(nodist_mysql_SOURCES)
|
||||
tests_sources = $(nodist_mysql_client_test_embedded_SOURCES)
|
||||
BUILT_SOURCES = link_sources
|
||||
CLEANFILES = $(client_sources) $(tests_sources) $(BUILT_SOURCES)
|
||||
EXTRA_DIST = CMakeLists.txt
|
||||
|
||||
link_sources:
|
||||
for f in $(client_sources); do \
|
||||
rm -f $$f; \
|
||||
@LN_CP_F@ $(top_srcdir)/client/$$f $$f; \
|
||||
done; \
|
||||
for f in $(tests_sources); do \
|
||||
rm -f $$f; \
|
||||
@LN_CP_F@ $(top_srcdir)/tests/$$f $$f; \
|
||||
done
|
||||
echo timestamp > link_sources
|
||||
|
||||
DEFS = -DEMBEDDED_LIBRARY @DEFS@
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I$(srcdir) \
|
||||
-I$(top_srcdir) -I$(top_srcdir)/client -I$(top_srcdir)/regex \
|
||||
$(openssl_includes)
|
||||
LIBS = @LIBS@ @WRAPLIBS@ @CLIENT_LIBS@ $(yassl_libs)
|
||||
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysqld.a @LIBDL@ $(CXXLDFLAGS) \
|
||||
@NDB_SCI_LIBS@
|
||||
|
||||
mysqltest_embedded_LINK = $(CXXLINK)
|
||||
nodist_mysqltest_embedded_SOURCES = mysqltest.cc
|
||||
mysqltest_embedded_LDADD = $(LDADD) $(top_builddir)/regex/libregex.a \
|
||||
@MYSQLD_EXTRA_LDFLAGS@
|
||||
|
||||
nodist_mysql_SOURCES = mysql.cc readline.cc completion_hash.cc \
|
||||
my_readline.h sql_string.h completion_hash.h
|
||||
mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD)
|
||||
|
||||
mysql_client_test_embedded_LINK = $(CXXLINK)
|
||||
nodist_mysql_client_test_embedded_SOURCES = mysql_client_test.c
|
|
@ -1,21 +0,0 @@
|
|||
# Copyright 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
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/include
|
||||
pkglib_LIBRARIES = libmysqlservices.a
|
||||
libmysqlservices_a_SOURCES = my_snprintf_service.c thd_alloc_service.c \
|
||||
thd_wait_service.c \
|
||||
my_thread_scheduler_service.c
|
||||
EXTRA_DIST = CMakeLists.txt
|
|
@ -1,26 +0,0 @@
|
|||
# Copyright (C) 2000-2001, 2003-2006 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
|
||||
|
||||
man1_MANS = @man1_files@
|
||||
man8_MANS = @man8_files@
|
||||
EXTRA_DIST = $(man1_MANS) $(man8_MANS) CMakeLists.txt
|
||||
|
||||
# "make_win_*" are not needed in Unix binary packages,
|
||||
install-data-hook:
|
||||
rm -f $(DESTDIR)$(mandir)/man1/make_win_*
|
|
@ -1,150 +0,0 @@
|
|||
# Copyright (C) 2000-2006 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
#
|
||||
# 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
|
||||
|
||||
testroot = $(prefix)
|
||||
testdir = $(testroot)/mysql-test
|
||||
|
||||
test_SCRIPTS = mtr \
|
||||
mysql-test-run \
|
||||
mysql-test-run.pl \
|
||||
mysql-stress-test.pl
|
||||
|
||||
nobase_test_DATA = \
|
||||
valgrind.supp \
|
||||
lib/v1/mysql-test-run.pl \
|
||||
lib/v1/mtr_cases.pl \
|
||||
lib/v1/mtr_io.pl \
|
||||
lib/v1/mtr_report.pl \
|
||||
lib/v1/My/Config.pm \
|
||||
lib/v1/mtr_gcov.pl \
|
||||
lib/v1/mtr_match.pl \
|
||||
lib/v1/mtr_stress.pl \
|
||||
lib/v1/ndb_config_1_node.ini \
|
||||
lib/v1/ndb_config_2_node.ini \
|
||||
lib/v1/mtr_gprof.pl \
|
||||
lib/v1/mtr_misc.pl \
|
||||
lib/v1/mtr_timer.pl \
|
||||
lib/v1/mtr_im.pl \
|
||||
lib/v1/mtr_process.pl \
|
||||
lib/v1/mtr_unique.pl \
|
||||
lib/mtr_cases.pm \
|
||||
lib/mtr_gcov.pl \
|
||||
lib/mtr_gprof.pl \
|
||||
lib/mtr_io.pl \
|
||||
lib/mtr_match.pm \
|
||||
lib/mtr_misc.pl \
|
||||
lib/mtr_process.pl \
|
||||
lib/mtr_report.pm \
|
||||
lib/mtr_stress.pl \
|
||||
lib/mtr_unique.pm \
|
||||
lib/My/ConfigFactory.pm \
|
||||
lib/My/Config.pm \
|
||||
lib/My/Find.pm \
|
||||
lib/My/Handles.pm \
|
||||
lib/My/Options.pm \
|
||||
lib/My/Test.pm \
|
||||
lib/My/Platform.pm \
|
||||
lib/My/SafeProcess.pm \
|
||||
lib/My/File/Path.pm \
|
||||
lib/My/SysInfo.pm \
|
||||
lib/My/CoreDump.pm \
|
||||
lib/My/SafeProcess/Base.pm \
|
||||
lib/My/SafeProcess/safe_process.pl
|
||||
|
||||
SUBDIRS = lib/My/SafeProcess
|
||||
|
||||
EXTRA_DIST = README \
|
||||
$(test_SCRIPTS) \
|
||||
$(nobase_test_DATA) \
|
||||
CMakeLists.txt \
|
||||
mtr.out-of-source
|
||||
|
||||
|
||||
# List of directories containing test + result files and the
|
||||
# related test data files that should be copied
|
||||
# If you want to add a new suite, please check DEFAULT_SUITES in
|
||||
# mysql-test-run.pl.
|
||||
TEST_DIRS = t r include std_data std_data/parts collections \
|
||||
std_data/ndb_backup50 std_data/ndb_backup51 \
|
||||
std_data/ndb_backup51_data_be std_data/ndb_backup51_data_le \
|
||||
std_data/funcs_1 \
|
||||
extra/binlog_tests/ extra/rpl_tests \
|
||||
suite/binlog suite/binlog/t suite/binlog/r suite/binlog/std_data \
|
||||
suite/bugs suite/bugs/data suite/bugs/t suite/bugs/r \
|
||||
suite/federated \
|
||||
suite/funcs_1 suite/funcs_1/bitdata \
|
||||
suite/funcs_1/include suite/funcs_1/lib suite/funcs_1/r \
|
||||
suite/funcs_1/t suite/funcs_1/views suite/funcs_1/cursors \
|
||||
suite/funcs_1/datadict suite/funcs_1/storedproc suite/funcs_1/triggers \
|
||||
suite/funcs_2 suite/funcs_2/charset suite/funcs_2/data \
|
||||
suite/funcs_2/include suite/funcs_2/lib suite/funcs_2/r \
|
||||
suite/funcs_2/t \
|
||||
suite/jp suite/jp/t suite/jp/r suite/jp/std_data suite/jp/include \
|
||||
suite/manual/t suite/manual/r \
|
||||
suite/ndb_team suite/ndb_team/t suite/ndb_team/r \
|
||||
suite/rpl suite/rpl/include suite/rpl/r \
|
||||
suite/rpl/t \
|
||||
suite/stress/include suite/stress/t suite/stress/r \
|
||||
suite/ndb suite/ndb/t suite/ndb/r \
|
||||
suite/rpl_ndb suite/rpl_ndb/t suite/rpl_ndb/r \
|
||||
suite/parts suite/parts/t suite/parts/r suite/parts/inc \
|
||||
suite/innodb suite/innodb/t suite/innodb/r suite/innodb/include \
|
||||
suite/engines suite/engines/funcs suite/engines/iuds suite/engines/rr_trx \
|
||||
suite/engines/funcs/r suite/engines/funcs/t suite/engines/iuds/r \
|
||||
suite/engines/iuds/t suite/engines/rr_trx/include suite/engines/rr_trx/r \
|
||||
suite/engines/rr_trx/t \
|
||||
suite/sys_vars suite/sys_vars/t suite/sys_vars/inc suite/sys_vars/r \
|
||||
suite/perfschema suite/perfschema/t suite/perfschema/r \
|
||||
suite/perfschema/include
|
||||
|
||||
# Used by dist-hook and install-data-local to copy all
|
||||
# test files into either dist or install directory
|
||||
install_test_files:
|
||||
@if test -z "$(INSTALL_TO_DIR)"; then \
|
||||
echo "Set INSTALL_TO_DIR!" && exit 1; \
|
||||
fi
|
||||
@for dir in $(TEST_DIRS); do \
|
||||
from_dir="$(srcdir)/$$dir"; \
|
||||
to_dir="$(INSTALL_TO_DIR)/$$dir"; \
|
||||
$(mkinstalldirs) "$$to_dir"; \
|
||||
for f in `(cd $$from_dir && ls)`; do \
|
||||
if test -f "$$from_dir/$$f"; then \
|
||||
$(INSTALL_DATA) "$$from_dir/$$f" "$$to_dir/$$f" ; \
|
||||
fi; \
|
||||
done \
|
||||
done
|
||||
|
||||
dist-hook:
|
||||
$(MAKE) INSTALL_TO_DIR="$(distdir)" install_test_files
|
||||
|
||||
install-data-local:
|
||||
$(MAKE) INSTALL_TO_DIR="$(DESTDIR)$(testdir)" install_test_files
|
||||
|
||||
uninstall-local:
|
||||
@RM@ -f -r $(DESTDIR)$(testdir)
|
||||
|
||||
# mtr - a shortcut for executing mysql-test-run.pl
|
||||
mtr:
|
||||
$(RM) -f mtr
|
||||
$(LN_S) mysql-test-run.pl mtr
|
||||
|
||||
# mysql-test-run - a shortcut for executing mysql-test-run.pl
|
||||
mysql-test-run:
|
||||
$(RM) -f mysql-test-run
|
||||
$(LN_S) mysql-test-run.pl mysql-test-run
|
|
@ -304,5 +304,58 @@ BINLOG '
|
|||
SHOW BINLOG EVENTS;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo
|
||||
--echo # BUG#54903 BINLOG statement toggles session variables
|
||||
--echo # ----------------------------------------------------------------------
|
||||
--echo # This test verify that BINLOG statement doesn't change current session's
|
||||
--echo # variables foreign_key_checks and unique_checks.
|
||||
--echo
|
||||
CREATE TABLE t1 (c1 INT KEY);
|
||||
|
||||
SET @@SESSION.foreign_key_checks= ON;
|
||||
SET @@SESSION.unique_checks= ON;
|
||||
|
||||
--echo # INSERT INTO t1 VALUES (1)
|
||||
--echo # foreign_key_checks=0 and unique_checks=0
|
||||
BINLOG '
|
||||
dfLtTBMBAAAAKQAAANcAAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||
dfLtTBcBAAAAIgAAAPkAAAAAABcAAAAAAAcAAf/+AQAAAA==
|
||||
';
|
||||
|
||||
SELECT * FROM t1;
|
||||
--echo # Their values should be ON
|
||||
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||
|
||||
--echo
|
||||
SET @@SESSION.foreign_key_checks= OFF;
|
||||
SET @@SESSION.unique_checks= OFF;
|
||||
|
||||
--echo # INSERT INTO t1 VALUES(2)
|
||||
--echo # foreign_key_checks=1 and unique_checks=1
|
||||
BINLOG '
|
||||
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
|
||||
';
|
||||
|
||||
SELECT * FROM t1;
|
||||
--echo # Their values should be OFF
|
||||
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||
|
||||
--echo # INSERT INTO t1 VALUES(2)
|
||||
--echo # foreign_key_checks=1 and unique_checks=1
|
||||
--echo # It should not change current session's variables, even error happens
|
||||
--error 1062
|
||||
BINLOG '
|
||||
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
|
||||
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
|
||||
';
|
||||
|
||||
SELECT * FROM t1;
|
||||
--echo # Their values should be OFF
|
||||
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
disconnect fresh;
|
||||
|
||||
|
|
|
@ -34,11 +34,11 @@ create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
|
|||
let $table=t1;
|
||||
let $count=0;
|
||||
|
||||
insert delayed into t1 values (207);
|
||||
insert /* before delayed */ delayed /* after delayed */ into t1 values (207);
|
||||
inc $count;
|
||||
--source include/wait_until_rows_count.inc
|
||||
|
||||
insert delayed into t1 values (null);
|
||||
insert /*! delayed */ into t1 values (null);
|
||||
inc $count;
|
||||
--source include/wait_until_rows_count.inc
|
||||
|
||||
|
|
|
@ -12,13 +12,13 @@ eval CREATE TABLE t1 (a INT) ENGINE=$engine;
|
|||
eval CREATE TABLE t2 (a INT) ENGINE=$engine;
|
||||
INSERT INTO t2 VALUES (1),(2),(3);
|
||||
let $binlog_start = query_get_value("SHOW MASTER STATUS", Position, 1);
|
||||
if (`select length('$before_truncate') > 0`) {
|
||||
if ($before_truncate) {
|
||||
eval $before_truncate;
|
||||
}
|
||||
--echo **** Truncate of empty table shall be logged
|
||||
TRUNCATE TABLE t1;
|
||||
|
||||
if (`select length('$before_truncate') > 0`) {
|
||||
if ($before_truncate) {
|
||||
eval $before_truncate;
|
||||
}
|
||||
TRUNCATE TABLE t2;
|
||||
|
@ -35,7 +35,7 @@ eval CREATE TABLE t2 (a INT) ENGINE=$engine;
|
|||
INSERT INTO t1 VALUES (1),(2);
|
||||
|
||||
let $binlog_start = query_get_value("SHOW MASTER STATUS", Position, 1);
|
||||
if (`select length('$before_truncate') > 0`) {
|
||||
if ($before_truncate) {
|
||||
eval $before_truncate;
|
||||
}
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ insert into t1 values(2);
|
|||
rollback;
|
||||
|
||||
let $master_log_pos_2= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
if (`SELECT $master_log_pos_2 <> $master_log_pos_1`)
|
||||
if ($master_log_pos_2 != $master_log_pos_1)
|
||||
{
|
||||
echo $master_log_pos_1 $master_log_pos_2;
|
||||
die Rollbacked transaction has been binlogged;
|
||||
|
|
|
@ -319,7 +319,7 @@ if (`select @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`)
|
|||
{
|
||||
--let $binlog_rollback= query_get_value(SHOW BINLOG EVENTS, Pos, 7)
|
||||
--let $binlog_query= query_get_value(SHOW BINLOG EVENTS, Info, 7)
|
||||
if (`SELECT 'ROLLBACK' != '$binlog_query'`) {
|
||||
if ($binlog_query != ROLLBACK) {
|
||||
--echo Wrong query from SHOW BINLOG EVENTS. Expected ROLLBACK, got '$binlog_query'
|
||||
--source include/show_rpl_debug_info.inc
|
||||
--die Wrong value for slave parameter
|
||||
|
|
|
@ -167,7 +167,9 @@
|
|||
--let $CRC_create=
|
||||
|
||||
######## func_retval ########
|
||||
if (`SELECT $CRC_ARG_type = 0 AND '$CRC_ARG_value' != ''`) {
|
||||
# if inside if in lieu of AND operand
|
||||
if ($CRC_ARG_type == 0) {
|
||||
if ($CRC_ARG_value) {
|
||||
# It will be safe to call this function and discard the return
|
||||
# value, but it will be unsafe to use return value (e.g., in
|
||||
# INSERT...SELECT).
|
||||
|
@ -180,10 +182,11 @@ if (`SELECT $CRC_ARG_type = 0 AND '$CRC_ARG_value' != ''`) {
|
|||
--let $CRC_RET_drop= DROP FUNCTION $CRC_name
|
||||
--let $CRC_RET_is_toplevel= 0
|
||||
--let $CRC_RET_desc= function $CRC_name returning value from $CRC_ARG_desc
|
||||
}
|
||||
}
|
||||
|
||||
######## func_sidef ########
|
||||
if (`SELECT $CRC_ARG_type = 1`) {
|
||||
if ($CRC_ARG_type == 1) {
|
||||
# It will be unsafe to call func even if you discard return value.
|
||||
--let $CRC_name= func_sidef_$CRC_ARG_level
|
||||
--let $CRC_create= CREATE FUNCTION $CRC_name() RETURNS VARCHAR(100) BEGIN INSERT INTO ta$CRC_ARG_level VALUES (47); $CRC_ARG_stmt_sidef; RETURN 0; END
|
||||
|
@ -197,7 +200,7 @@ if (`SELECT $CRC_ARG_type = 1`) {
|
|||
}
|
||||
|
||||
######## proc ########
|
||||
if (`SELECT $CRC_ARG_type = 2`) {
|
||||
if ($CRC_ARG_type == 2) {
|
||||
# It will be unsafe to call this procedure.
|
||||
--let $CRC_name= proc_$CRC_ARG_level
|
||||
--let $CRC_create= CREATE PROCEDURE $CRC_name() BEGIN $CRC_ARG_stmt_sidef; INSERT INTO ta$CRC_ARG_level VALUES (47); END
|
||||
|
@ -211,7 +214,7 @@ if (`SELECT $CRC_ARG_type = 2`) {
|
|||
}
|
||||
|
||||
######## trig ########
|
||||
if (`SELECT $CRC_ARG_type = 3`) {
|
||||
if ($CRC_ARG_type == 3) {
|
||||
# It will be unsafe to invoke this trigger.
|
||||
--let $CRC_name= trig_$CRC_ARG_level
|
||||
--let $CRC_create= CREATE TRIGGER $CRC_name BEFORE INSERT ON trigger_table_$CRC_ARG_level FOR EACH ROW BEGIN INSERT INTO ta$CRC_ARG_level VALUES (47); $CRC_ARG_stmt_sidef; END
|
||||
|
@ -225,7 +228,8 @@ if (`SELECT $CRC_ARG_type = 3`) {
|
|||
}
|
||||
|
||||
######## view_retval ########
|
||||
if (`SELECT $CRC_ARG_type = 4 AND '$CRC_ARG_sel_retval' != ''`) {
|
||||
if ($CRC_ARG_type == 4) {
|
||||
if ($CRC_ARG_sel_retval) {
|
||||
# It will be safe to select from this view if you discard the result
|
||||
# set, but unsafe to use result set (e.g., in INSERT..SELECT).
|
||||
--let $CRC_name= view_retval_$CRC_ARG_level
|
||||
|
@ -237,10 +241,12 @@ if (`SELECT $CRC_ARG_type = 4 AND '$CRC_ARG_sel_retval' != ''`) {
|
|||
--let $CRC_RET_drop= DROP VIEW $CRC_name
|
||||
--let $CRC_RET_is_toplevel= 0
|
||||
--let $CRC_RET_desc= view $CRC_name returning value from $CRC_ARG_desc
|
||||
}
|
||||
}
|
||||
|
||||
######## view_sidef ########
|
||||
if (`SELECT $CRC_ARG_type = 5 AND '$CRC_ARG_sel_sidef' != ''`) {
|
||||
if ($CRC_ARG_type == 5) {
|
||||
if ($CRC_ARG_sel_sidef) {
|
||||
# It will be unsafe to select from this view, even if you discard
|
||||
# the return value.
|
||||
--let $CRC_name= view_sidef_$CRC_ARG_level
|
||||
|
@ -252,10 +258,11 @@ if (`SELECT $CRC_ARG_type = 5 AND '$CRC_ARG_sel_sidef' != ''`) {
|
|||
--let $CRC_RET_drop= DROP VIEW $CRC_name
|
||||
--let $CRC_RET_is_toplevel= 0
|
||||
--let $CRC_RET_desc= view $CRC_name invoking $CRC_ARG_desc
|
||||
}
|
||||
}
|
||||
|
||||
######## prep ########
|
||||
if (`SELECT $CRC_ARG_type = 6`) {
|
||||
if ($CRC_ARG_type == 6) {
|
||||
# It will be unsafe to execute this prepared statement
|
||||
--let $CRC_name= prep_$CRC_ARG_level
|
||||
--let $CRC_create= PREPARE $CRC_name FROM "$CRC_ARG_stmt_sidef"
|
||||
|
@ -269,7 +276,7 @@ if (`SELECT $CRC_ARG_type = 6`) {
|
|||
}
|
||||
|
||||
######## no recursive construct: just return the given statement ########
|
||||
if (`SELECT $CRC_ARG_type = 7`) {
|
||||
if ($CRC_ARG_type == 7) {
|
||||
# CRC_ARG_type=7 is a special case. We just set $CRC_RET_x =
|
||||
# $CRC_ARG_x. This way, the $CRC_ARG_stmt gets executed directly
|
||||
# (below). In binlog_unsafe.test, it is used to invoke the unsafe
|
||||
|
@ -295,7 +302,7 @@ if ($CRC_RET_stmt_sidef) {
|
|||
--echo * binlog_format = STATEMENT: expect $CRC_ARG_expected_number_of_warnings warnings.
|
||||
--eval $CRC_RET_stmt_sidef
|
||||
--let $n_warnings= `SHOW COUNT(*) WARNINGS`
|
||||
if (`SELECT '$n_warnings' != '$CRC_ARG_expected_number_of_warnings'`) {
|
||||
if ($n_warnings != $CRC_ARG_expected_number_of_warnings) {
|
||||
--echo ******** Failure! Expected $CRC_ARG_expected_number_of_warnings warnings, got $n_warnings warnings. ********
|
||||
SHOW WARNINGS;
|
||||
SHOW BINLOG EVENTS;
|
||||
|
@ -312,14 +319,14 @@ if ($CRC_RET_stmt_sidef) {
|
|||
RESET MASTER;
|
||||
--eval $CRC_RET_stmt_sidef
|
||||
--let $n_warnings= `SHOW COUNT(*) WARNINGS`
|
||||
if (`SELECT '$n_warnings' != '0'`) {
|
||||
if ($n_warnings) {
|
||||
--echo ******** Failure! Expected 0 warnings, got $n_warnings warnings. ********
|
||||
SHOW WARNINGS;
|
||||
SHOW BINLOG EVENTS;
|
||||
--die Wrong number of warnings.
|
||||
}
|
||||
--let $binlog_event= query_get_value(SHOW BINLOG EVENTS, Event_type, 2)
|
||||
if (`SELECT '$binlog_event' != 'No such row'`) {
|
||||
if ($binlog_event != No such row) {
|
||||
--enable_query_log
|
||||
--echo ******** Failure! Something was written to the binlog despite SQL_LOG_BIN=0 ********
|
||||
SHOW BINLOG EVENTS;
|
||||
|
@ -332,7 +339,7 @@ if ($CRC_RET_stmt_sidef) {
|
|||
RESET MASTER;
|
||||
--eval $CRC_RET_stmt_sidef
|
||||
--let $n_warnings= `SHOW COUNT(*) WARNINGS`
|
||||
if (`SELECT '$n_warnings' != '0'`) {
|
||||
if ($n_warnings) {
|
||||
--echo ******** Failure! Expected 0 warnings, got $n_warnings warnings. ********
|
||||
SHOW WARNINGS;
|
||||
SHOW BINLOG EVENTS;
|
||||
|
@ -375,7 +382,7 @@ if ($CRC_RET_sel_retval) {
|
|||
# fail. When the bug is fixed, we should execute the following.
|
||||
|
||||
#--let $n_warnings= `SHOW COUNT(*) WARNINGS`
|
||||
#if (`SELECT '$n_warnings' != '0'`) {
|
||||
#if ($n_warnings) {
|
||||
# --enable_query_log
|
||||
# --echo Failure! Expected 0 warnings, got $n_warnings warnings.
|
||||
# SHOW WARNINGS;
|
||||
|
|
|
@ -35,7 +35,7 @@ if (`SELECT HEX(@commands) = HEX('configure')`)
|
|||
# when a command ends.
|
||||
#
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
while ($n)
|
||||
{
|
||||
--eval DROP TEMPORARY TABLE IF EXISTS nt_tmp_$n
|
||||
--eval CREATE TEMPORARY TABLE nt_tmp_$n ( id INT ) ENGINE = MyIsam
|
||||
|
@ -62,7 +62,7 @@ if (`SELECT HEX(@commands) = HEX('configure')`)
|
|||
# when a command ends.
|
||||
#
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
while ($n)
|
||||
{
|
||||
--eval DROP TEMPORARY TABLE IF EXISTS tt_tmp_$n
|
||||
--eval CREATE TEMPORARY TABLE tt_tmp_$n ( id INT ) ENGINE = Innodb
|
||||
|
@ -89,7 +89,7 @@ if (`SELECT HEX(@commands) = HEX('configure')`)
|
|||
# when a command ends.
|
||||
#
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
while ($n)
|
||||
{
|
||||
--eval DROP TABLE IF EXISTS nt_$n
|
||||
--eval CREATE TABLE nt_$n ( id INT ) ENGINE = MyIsam
|
||||
|
@ -116,7 +116,7 @@ if (`SELECT HEX(@commands) = HEX('configure')`)
|
|||
# when a command ends.
|
||||
#
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
while ($n)
|
||||
{
|
||||
--eval DROP TABLE IF EXISTS tt_$n
|
||||
--eval CREATE TABLE tt_$n ( id INT ) ENGINE = Innodb
|
||||
|
@ -163,14 +163,14 @@ if (`SELECT HEX(@commands) = HEX('clean')`)
|
|||
DROP TABLE IF EXISTS nt_xx_1;
|
||||
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
while ($n)
|
||||
{
|
||||
--eval DROP TABLE IF EXISTS nt_$n
|
||||
--dec $n
|
||||
}
|
||||
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
while ($n)
|
||||
{
|
||||
--eval DROP TABLE IF EXISTS tt_$n
|
||||
--dec $n
|
||||
|
@ -634,11 +634,11 @@ while (`SELECT HEX(@commands) != HEX('')`)
|
|||
{
|
||||
--let $dropped_temp= $table
|
||||
}
|
||||
if (`SELECT $n = 1`)
|
||||
if ($n == 1)
|
||||
{
|
||||
--let $table_1= $table
|
||||
}
|
||||
if (`SELECT $n = 2`)
|
||||
if ($n == 2)
|
||||
{
|
||||
--let $table_2= $table
|
||||
}
|
||||
|
@ -886,7 +886,7 @@ while (`SELECT HEX(@commands) != HEX('')`)
|
|||
--let $available_n_temp=
|
||||
--let $dropped_n_temp=
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
while ($n)
|
||||
{
|
||||
--eval DROP TEMPORARY TABLE IF EXISTS nt_tmp_$n
|
||||
--eval CREATE TEMPORARY TABLE nt_tmp_$n ( id INT ) ENGINE = MyIsam
|
||||
|
@ -905,7 +905,7 @@ while (`SELECT HEX(@commands) != HEX('')`)
|
|||
--let $available_t_temp=
|
||||
--let $dropped_t_temp=
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
while ($n)
|
||||
{
|
||||
--eval DROP TEMPORARY TABLE IF EXISTS tt_tmp_$n
|
||||
--eval CREATE TEMPORARY TABLE tt_tmp_$n ( id INT ) ENGINE = Innodb
|
||||
|
@ -924,7 +924,7 @@ while (`SELECT HEX(@commands) != HEX('')`)
|
|||
--let $available_t=
|
||||
--let $dropped_t=
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
while ($n)
|
||||
{
|
||||
--eval DROP TABLE IF EXISTS tt_$n
|
||||
--eval CREATE TABLE tt_$n ( id INT ) ENGINE = Innodb
|
||||
|
@ -943,7 +943,7 @@ while (`SELECT HEX(@commands) != HEX('')`)
|
|||
--let $available_n=
|
||||
--let $dropped_n=
|
||||
--let $n= $tot_table
|
||||
while (`SELECT $n != 0`)
|
||||
while ($n)
|
||||
{
|
||||
--eval DROP TABLE IF EXISTS nt_$n
|
||||
--eval CREATE TABLE nt_$n ( id INT ) ENGINE = MyIsam
|
||||
|
|
|
@ -406,7 +406,7 @@ sync_slave_with_master;
|
|||
# Error reaction is up to sql_mode of the slave sql (bug#38173)
|
||||
#--echo *** Create t9 on slave ***
|
||||
# Please, check BUG#47741 to see why you are not testing NDB.
|
||||
if (`SELECT $engine_type != 'NDB'`)
|
||||
if ($engine_type != NDB)
|
||||
{
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
|
|
|
@ -53,9 +53,7 @@ source include/wait_for_slave_to_start.inc;
|
|||
connection master;
|
||||
# Write file to make mysql-test-run.pl expect the "crash", but don't start
|
||||
# it until it's told to
|
||||
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
wait
|
||||
EOF
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
# Send shutdown to the connected server and give
|
||||
# it 10 seconds to die before zapping it
|
||||
|
@ -85,9 +83,7 @@ source include/wait_for_slave_io_error.inc;
|
|||
eval set @@global.debug = "-d,$dbug_sync_point";
|
||||
|
||||
# Write file to make mysql-test-run.pl start up the server again
|
||||
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
restart
|
||||
EOF
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
connection master;
|
||||
# Turn on reconnect
|
||||
|
|
|
@ -33,11 +33,11 @@ INSERT INTO tt_2(ddl_case) VALUES(0);
|
|||
--echo #########################################################################
|
||||
SET AUTOCOMMIT= 0;
|
||||
let $ddl_cases= 41;
|
||||
while (`SELECT $ddl_cases >= 1`)
|
||||
while ($ddl_cases >= 1)
|
||||
{
|
||||
--echo -b-b-b-b-b-b-b-b-b-b-b- >> << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
let $in_temporary= "no";
|
||||
let $ok= "yes";
|
||||
let $in_temporary= no;
|
||||
let $ok= yes;
|
||||
#
|
||||
# In SBR and MIXED modes, the commit event is usually the third event in the
|
||||
# binary log:
|
||||
|
@ -76,7 +76,7 @@ while (`SELECT $ddl_cases >= 1`)
|
|||
# 6: ROW EVENT
|
||||
# 7: COMMIT
|
||||
#
|
||||
if (`select '$engine' = 'NDB'`)
|
||||
if ($engine == NDB)
|
||||
{
|
||||
let $commit_event_row_number= 7;
|
||||
}
|
||||
|
@ -84,18 +84,18 @@ while (`SELECT $ddl_cases >= 1`)
|
|||
let $first_binlog_position= query_get_value("SHOW MASTER STATUS", Position, 1);
|
||||
--enable_query_log
|
||||
eval INSERT INTO tt_1(ddl_case) VALUES ($ddl_cases);
|
||||
if (`SELECT $ddl_cases = 41`)
|
||||
if ($ddl_cases == 41)
|
||||
{
|
||||
let $cmd= LOAD INDEX INTO CACHE nt_1 IGNORE LEAVES;
|
||||
if (`SELECT '$engine' = 'NDB'`)
|
||||
if ($engine == NDB)
|
||||
{
|
||||
# This seems to be related to epochs.
|
||||
# We need to check this against an updated version or avoid it.
|
||||
let $ok= "no";
|
||||
let $ok= no;
|
||||
let $commit_event_row_number= 6;
|
||||
}
|
||||
}
|
||||
if (`SELECT $ddl_cases = 40`)
|
||||
if ($ddl_cases == 40)
|
||||
{
|
||||
let $cmd= LOAD INDEX INTO CACHE tt_1, tt_2 IGNORE LEAVES;
|
||||
#
|
||||
|
@ -109,16 +109,16 @@ while (`SELECT $ddl_cases >= 1`)
|
|||
# 5: ROW EVENT
|
||||
# 6: COMMIT
|
||||
#
|
||||
if (`SELECT '$engine' = 'NDB'`)
|
||||
if ($engine == NDB)
|
||||
{
|
||||
let $commit_event_row_number= 6;
|
||||
}
|
||||
}
|
||||
if (`SELECT $ddl_cases = 39`)
|
||||
if ($ddl_cases == 39)
|
||||
{
|
||||
let $cmd= ANALYZE TABLE nt_1;
|
||||
}
|
||||
if (`SELECT $ddl_cases = 38`)
|
||||
if ($ddl_cases == 38)
|
||||
{
|
||||
let $cmd= CHECK TABLE nt_1;
|
||||
#
|
||||
|
@ -132,20 +132,20 @@ while (`SELECT $ddl_cases >= 1`)
|
|||
# 5: ROW EVENT
|
||||
# 6: COMMIT
|
||||
#
|
||||
if (`SELECT '$engine' = 'NDB'`)
|
||||
if ($engine == NDB)
|
||||
{
|
||||
let $commit_event_row_number= 6;
|
||||
}
|
||||
}
|
||||
if (`SELECT $ddl_cases = 37`)
|
||||
if ($ddl_cases == 37)
|
||||
{
|
||||
let $cmd= OPTIMIZE TABLE nt_1;
|
||||
}
|
||||
if (`SELECT $ddl_cases = 36`)
|
||||
if ($ddl_cases == 36)
|
||||
{
|
||||
let $cmd= REPAIR TABLE nt_1;
|
||||
}
|
||||
if (`SELECT $ddl_cases = 35`)
|
||||
if ($ddl_cases == 35)
|
||||
{
|
||||
let $cmd= LOCK TABLES tt_1 WRITE;
|
||||
#
|
||||
|
@ -159,12 +159,12 @@ while (`SELECT $ddl_cases >= 1`)
|
|||
# 5: ROW EVENT
|
||||
# 6: COMMIT
|
||||
#
|
||||
if (`SELECT '$engine' = 'NDB'`)
|
||||
if ($engine == NDB)
|
||||
{
|
||||
let $commit_event_row_number= 6;
|
||||
}
|
||||
}
|
||||
if (`SELECT $ddl_cases = 34`)
|
||||
if ($ddl_cases == 34)
|
||||
{
|
||||
let $cmd= UNLOCK TABLES;
|
||||
#
|
||||
|
@ -178,20 +178,20 @@ while (`SELECT $ddl_cases >= 1`)
|
|||
# 5: ROW EVENT
|
||||
# 6: COMMIT
|
||||
#
|
||||
if (`SELECT '$engine' = 'NDB'`)
|
||||
if ($engine == NDB)
|
||||
{
|
||||
let $commit_event_row_number= 6;
|
||||
}
|
||||
}
|
||||
if (`SELECT $ddl_cases = 33`)
|
||||
if ($ddl_cases == 33)
|
||||
{
|
||||
let $cmd= CREATE USER 'user'@'localhost';
|
||||
}
|
||||
if (`SELECT $ddl_cases = 32`)
|
||||
if ($ddl_cases == 32)
|
||||
{
|
||||
let $cmd= GRANT ALL ON *.* TO 'user'@'localhost';
|
||||
}
|
||||
if (`SELECT $ddl_cases = 31`)
|
||||
if ($ddl_cases == 31)
|
||||
{
|
||||
let $cmd= SET PASSWORD FOR 'user'@'localhost' = PASSWORD('newpass');
|
||||
#
|
||||
|
@ -231,35 +231,35 @@ while (`SELECT $ddl_cases >= 1`)
|
|||
let $commit_event_row_number= 7;
|
||||
}
|
||||
}
|
||||
if (`SELECT $ddl_cases = 30`)
|
||||
if ($ddl_cases == 30)
|
||||
{
|
||||
let $cmd= REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user'@'localhost';
|
||||
}
|
||||
if (`SELECT $ddl_cases = 29`)
|
||||
if ($ddl_cases == 29)
|
||||
{
|
||||
let $cmd= RENAME USER 'user'@'localhost' TO 'user_new'@'localhost';
|
||||
}
|
||||
if (`SELECT $ddl_cases = 28`)
|
||||
if ($ddl_cases == 28)
|
||||
{
|
||||
let $cmd= DROP USER 'user_new'@'localhost';
|
||||
}
|
||||
if (`SELECT $ddl_cases = 27`)
|
||||
if ($ddl_cases == 27)
|
||||
{
|
||||
let $cmd= CREATE EVENT evt ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO SELECT * FROM tt_1;
|
||||
}
|
||||
if (`SELECT $ddl_cases = 26`)
|
||||
if ($ddl_cases == 26)
|
||||
{
|
||||
let $cmd= ALTER EVENT evt COMMENT 'evt';
|
||||
}
|
||||
if (`SELECT $ddl_cases = 25`)
|
||||
if ($ddl_cases == 25)
|
||||
{
|
||||
let $cmd= DROP EVENT evt;
|
||||
}
|
||||
if (`SELECT $ddl_cases = 24`)
|
||||
if ($ddl_cases == 24)
|
||||
{
|
||||
let $cmd= CREATE TRIGGER tr AFTER INSERT ON tt_1 FOR EACH ROW UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case;
|
||||
}
|
||||
if (`SELECT $ddl_cases = 23`)
|
||||
if ($ddl_cases == 23)
|
||||
{
|
||||
let $cmd= DROP TRIGGER tr;
|
||||
#
|
||||
|
@ -277,43 +277,43 @@ while (`SELECT $ddl_cases >= 1`)
|
|||
let $commit_event_row_number= 5;
|
||||
}
|
||||
}
|
||||
if (`SELECT $ddl_cases = 22`)
|
||||
if ($ddl_cases == 22)
|
||||
{
|
||||
let $cmd= CREATE FUNCTION fc () RETURNS VARCHAR(64) RETURN "fc";
|
||||
}
|
||||
if (`SELECT $ddl_cases = 21`)
|
||||
if ($ddl_cases == 21)
|
||||
{
|
||||
let $cmd= ALTER FUNCTION fc COMMENT 'fc';
|
||||
}
|
||||
if (`SELECT $ddl_cases = 20`)
|
||||
if ($ddl_cases == 20)
|
||||
{
|
||||
let $cmd= DROP FUNCTION fc;
|
||||
}
|
||||
if (`SELECT $ddl_cases = 19`)
|
||||
if ($ddl_cases == 19)
|
||||
{
|
||||
let $cmd= CREATE PROCEDURE pc () UPDATE tt_2 SET ddl_case = ddl_case WHERE ddl_case= NEW.ddl_case;
|
||||
}
|
||||
if (`SELECT $ddl_cases = 18`)
|
||||
if ($ddl_cases == 18)
|
||||
{
|
||||
let $cmd= ALTER PROCEDURE pc COMMENT 'pc';
|
||||
}
|
||||
if (`SELECT $ddl_cases = 17`)
|
||||
if ($ddl_cases == 17)
|
||||
{
|
||||
let $cmd= DROP PROCEDURE pc;
|
||||
}
|
||||
if (`SELECT $ddl_cases = 16`)
|
||||
if ($ddl_cases == 16)
|
||||
{
|
||||
let $cmd= CREATE VIEW v AS SELECT * FROM tt_1;
|
||||
}
|
||||
if (`SELECT $ddl_cases = 15`)
|
||||
if ($ddl_cases == 15)
|
||||
{
|
||||
let $cmd= ALTER VIEW v AS SELECT * FROM tt_1;
|
||||
}
|
||||
if (`SELECT $ddl_cases = 14`)
|
||||
if ($ddl_cases == 14)
|
||||
{
|
||||
let $cmd= DROP VIEW v;
|
||||
}
|
||||
if (`SELECT $ddl_cases = 13`)
|
||||
if ($ddl_cases == 13)
|
||||
{
|
||||
let $cmd= CREATE INDEX ix ON tt_1(ddl_case);
|
||||
#
|
||||
|
@ -328,12 +328,12 @@ while (`SELECT $ddl_cases >= 1`)
|
|||
# 6: COMMIT
|
||||
# 7: DDL EVENT which triggered the previous commmit.
|
||||
#
|
||||
if (`SELECT '$engine' = 'NDB'`)
|
||||
if ($engine == NDB)
|
||||
{
|
||||
let $commit_event_row_number= 6;
|
||||
}
|
||||
}
|
||||
if (`SELECT $ddl_cases = 12`)
|
||||
if ($ddl_cases == 12)
|
||||
{
|
||||
let $cmd= DROP INDEX ix ON tt_1;
|
||||
#
|
||||
|
@ -348,15 +348,15 @@ while (`SELECT $ddl_cases >= 1`)
|
|||
# 6: COMMIT
|
||||
# 7: DDL EVENT which triggered the previous commmit.
|
||||
#
|
||||
if (`SELECT '$engine' = 'NDB'`)
|
||||
if ($engine == NDB)
|
||||
{
|
||||
let $commit_event_row_number= 6;
|
||||
}
|
||||
}
|
||||
if (`SELECT $ddl_cases = 11`)
|
||||
if ($ddl_cases == 11)
|
||||
{
|
||||
let $cmd= CREATE TEMPORARY TABLE tt_xx (a int);
|
||||
let $in_temporary= "yes";
|
||||
let $in_temporary= yes;
|
||||
# In SBR and MIXED modes, the DDL statement is written to the binary log but
|
||||
# does not commit the current transaction.
|
||||
#
|
||||
|
@ -411,7 +411,7 @@ while (`SELECT $ddl_cases >= 1`)
|
|||
let $commit_event_row_number= 9;
|
||||
}
|
||||
}
|
||||
if (`SELECT $ddl_cases = 10`)
|
||||
if ($ddl_cases == 10)
|
||||
{
|
||||
let $cmd= ALTER TABLE tt_xx ADD COLUMN (b int);
|
||||
#
|
||||
|
@ -438,12 +438,12 @@ while (`SELECT $ddl_cases >= 1`)
|
|||
# 5: ROW EVENT
|
||||
# 6: COMMIT
|
||||
#
|
||||
if (`SELECT '$engine' = 'NDB'`)
|
||||
if ($engine == NDB)
|
||||
{
|
||||
let $commit_event_row_number= 6;
|
||||
}
|
||||
}
|
||||
if (`SELECT $ddl_cases = 9`)
|
||||
if ($ddl_cases == 9)
|
||||
{
|
||||
let $cmd= ALTER TABLE tt_xx RENAME new_tt_xx;
|
||||
#
|
||||
|
@ -470,15 +470,15 @@ while (`SELECT $ddl_cases >= 1`)
|
|||
# 5: ROW EVENT
|
||||
# 6: COMMIT
|
||||
#
|
||||
if (`SELECT '$engine' = 'NDB'`)
|
||||
if ($engine == NDB)
|
||||
{
|
||||
let $commit_event_row_number= 6;
|
||||
}
|
||||
}
|
||||
if (`SELECT $ddl_cases = 8`)
|
||||
if ($ddl_cases == 8)
|
||||
{
|
||||
let $cmd= DROP TEMPORARY TABLE IF EXISTS new_tt_xx;
|
||||
let $in_temporary= "yes";
|
||||
let $in_temporary= yes;
|
||||
#
|
||||
# In SBR and MIXED modes, the DDL statement is written to the binary log
|
||||
# but does not commit the current transaction:
|
||||
|
@ -528,7 +528,7 @@ while (`SELECT $ddl_cases >= 1`)
|
|||
# 8: ROW EVENT
|
||||
# 9: COMMIT
|
||||
#
|
||||
if (`SELECT '$engine' = 'NDB'`)
|
||||
if ($engine == NDB)
|
||||
{
|
||||
let $commit_event_row_number= 9;
|
||||
}
|
||||
|
@ -551,27 +551,27 @@ while (`SELECT $ddl_cases >= 1`)
|
|||
let $commit_event_row_number= 9;
|
||||
}
|
||||
}
|
||||
if (`SELECT $ddl_cases = 7`)
|
||||
if ($ddl_cases == 7)
|
||||
{
|
||||
let $cmd= CREATE TABLE tt_xx (a int);
|
||||
}
|
||||
if (`SELECT $ddl_cases = 6`)
|
||||
if ($ddl_cases == 6)
|
||||
{
|
||||
let $cmd= ALTER TABLE tt_xx ADD COLUMN (b int);
|
||||
}
|
||||
if (`SELECT $ddl_cases = 5`)
|
||||
if ($ddl_cases == 5)
|
||||
{
|
||||
let $cmd= RENAME TABLE tt_xx TO new_tt_xx;
|
||||
}
|
||||
if (`SELECT $ddl_cases = 4`)
|
||||
if ($ddl_cases == 4)
|
||||
{
|
||||
let $cmd= TRUNCATE TABLE new_tt_xx;
|
||||
}
|
||||
if (`SELECT $ddl_cases = 3`)
|
||||
if ($ddl_cases == 3)
|
||||
{
|
||||
let $cmd= DROP TABLE IF EXISTS tt_xx, new_tt_xx;
|
||||
}
|
||||
if (`SELECT $ddl_cases = 2`)
|
||||
if ($ddl_cases == 2)
|
||||
{
|
||||
let $cmd= CREATE DATABASE db;
|
||||
#
|
||||
|
@ -586,12 +586,12 @@ while (`SELECT $ddl_cases >= 1`)
|
|||
# 6: COMMIT
|
||||
# 7: DDL EVENT which triggered the previous commmit.
|
||||
#
|
||||
if (`SELECT '$engine' = 'NDB'`)
|
||||
if ($engine == NDB)
|
||||
{
|
||||
let $commit_event_row_number= 6;
|
||||
}
|
||||
}
|
||||
if (`SELECT $ddl_cases = 1`)
|
||||
if ($ddl_cases == 1)
|
||||
{
|
||||
let $cmd= DROP DATABASE IF EXISTS db;
|
||||
#
|
||||
|
@ -606,7 +606,7 @@ while (`SELECT $ddl_cases >= 1`)
|
|||
# 6: COMMIT
|
||||
# 7: DDL EVENT which triggered the previous commmit.
|
||||
#
|
||||
if (`SELECT '$engine' = 'NDB'`)
|
||||
if ($engine == NDB)
|
||||
{
|
||||
let $commit_event_row_number= 6;
|
||||
}
|
||||
|
@ -618,14 +618,14 @@ while (`SELECT $ddl_cases >= 1`)
|
|||
# commit. The flag in_temporary is used to avoid aborting the test in such
|
||||
# cases. Thus we force the commit.
|
||||
#
|
||||
if (`SELECT $in_temporary = "yes"`)
|
||||
if ($in_temporary == yes)
|
||||
{
|
||||
--eval COMMIT
|
||||
}
|
||||
let $event_commit= query_get_value("SHOW BINLOG EVENTS FROM $first_binlog_position", Info, $commit_event_row_number);
|
||||
if (`SELECT SUBSTRING("$event_commit",1,6) != "COMMIT"`)
|
||||
{
|
||||
if (`SELECT $ok = "yes"`)
|
||||
if ($ok == yes)
|
||||
{
|
||||
--echo it *does not* commit the current transaction.
|
||||
--echo $cmd
|
||||
|
|
|
@ -121,7 +121,7 @@ if (`SELECT @@global.binlog_format = 'STATEMENT'`)
|
|||
|
||||
# The second INSERT DELAYED statement is the 5 item if two INSERT DELAYED are
|
||||
# handled separately
|
||||
if (`SELECT '$stmt' = 'COMMIT'`)
|
||||
if ($stmt == COMMIT)
|
||||
{
|
||||
--let $stmt= query_get_value(SHOW BINLOG EVENTS IN '$binlog_file' FROM $_start, Info, 5)
|
||||
}
|
||||
|
|
|
@ -85,4 +85,5 @@ INSERT INTO t1 VALUES (1),(1);
|
|||
sync_slave_with_master;
|
||||
connection master;
|
||||
drop table t1;
|
||||
sync_slave_with_master;
|
||||
# End of 4.1 tests
|
||||
|
|
|
@ -177,7 +177,7 @@ sync_slave_with_master;
|
|||
#--source include/wait_for_slave_to_start.inc
|
||||
#
|
||||
#let $y=0;
|
||||
#while (`select $y < 6`)
|
||||
#while ($y < 6)
|
||||
#{
|
||||
# connection master;
|
||||
#
|
||||
|
@ -202,21 +202,21 @@ sync_slave_with_master;
|
|||
# `c` INT DEFAULT 500,
|
||||
# PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1;
|
||||
#
|
||||
# if (`select $y=0`)
|
||||
# if ($y==0)
|
||||
# {
|
||||
# --echo ************* EXECUTION WITH INSERTS *************
|
||||
# connection master;
|
||||
# INSERT INTO t1(a) VALUES (1);
|
||||
# }
|
||||
#
|
||||
# if (`select $y=1`)
|
||||
# if ($y==1)
|
||||
# {
|
||||
# --echo ************* EXECUTION WITH INSERTS *************
|
||||
# connection master;
|
||||
# INSERT INTO t1(a, b) VALUES (1, NULL);
|
||||
# }
|
||||
#
|
||||
# if (`select $y=2`)
|
||||
# if ($y==2)
|
||||
# {
|
||||
# --echo ************* EXECUTION WITH UPDATES *************
|
||||
# connection master;
|
||||
|
@ -225,14 +225,14 @@ sync_slave_with_master;
|
|||
# UPDATE t3 SET b = NULL where a= 1;
|
||||
# }
|
||||
#
|
||||
# if (`select $y=3`)
|
||||
# if ($y==3)
|
||||
# {
|
||||
# --echo ************* EXECUTION WITH INSERTS/REPLACES *************
|
||||
# connection master;
|
||||
# REPLACE INTO t3(a, b) VALUES (1, null);
|
||||
# }
|
||||
#
|
||||
# if (`select $y=4`)
|
||||
# if ($y==4)
|
||||
# {
|
||||
# --echo ************* EXECUTION WITH UPDATES/REPLACES *************
|
||||
# connection master;
|
||||
|
@ -240,7 +240,7 @@ sync_slave_with_master;
|
|||
# REPLACE INTO t3(a, b) VALUES (1, null);
|
||||
# }
|
||||
#
|
||||
# if (`select $y=5`)
|
||||
# if ($y==5)
|
||||
# {
|
||||
# --echo ************* EXECUTION WITH MULTI-ROW INSERTS *************
|
||||
# connection master;
|
||||
|
|
|
@ -8,10 +8,18 @@
|
|||
|
||||
--echo Checking that both slave threads are running.
|
||||
|
||||
--let $running= 1
|
||||
--let $slave_sql_running = query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1)
|
||||
--let $slave_io_running = query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1)
|
||||
|
||||
if (`SELECT '$slave_sql_running' != 'Yes' OR '$slave_io_running' != 'Yes'`) {
|
||||
if ($slave_sql_running != Yes) {
|
||||
--let $running= 0
|
||||
}
|
||||
if ($slave_io_running != Yes) {
|
||||
--let $running= 0
|
||||
}
|
||||
|
||||
if (!$running) {
|
||||
--echo Slave not running: Slave_SQL_Running = $slave_sql_running Slave_IO_Running = $slave_io_running
|
||||
--source include/show_rpl_debug_info.inc
|
||||
--die Expected slave to be running, but it was not running.
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# --source include/check_slave_param.inc
|
||||
|
||||
--let $_param_value= query_get_value(SHOW SLAVE STATUS, $slave_param, 1)
|
||||
if (`SELECT '$_param_value' != '$slave_param_value'`) {
|
||||
if ($_param_value != $slave_param_value) {
|
||||
--echo Wrong value for $slave_param. Expected '$slave_param_value', got '$_param_value'
|
||||
--source include/show_rpl_debug_info.inc
|
||||
--die Wrong value for slave parameter
|
||||
|
|
46
mysql-test/include/ctype_8bit.inc
Normal file
46
mysql-test/include/ctype_8bit.inc
Normal file
|
@ -0,0 +1,46 @@
|
|||
#
|
||||
# Test Unicode conversion, upper, lower
|
||||
#
|
||||
SELECT @@collation_connection;
|
||||
CREATE TABLE t1 AS SELECT ' ' AS a LIMIT 0;
|
||||
INSERT INTO t1 VALUES (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07);
|
||||
INSERT INTO t1 VALUES (0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F);
|
||||
INSERT INTO t1 VALUES (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17);
|
||||
INSERT INTO t1 VALUES (0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F);
|
||||
INSERT INTO t1 VALUES (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27);
|
||||
INSERT INTO t1 VALUES (0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F);
|
||||
INSERT INTO t1 VALUES (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37);
|
||||
INSERT INTO t1 VALUES (0x38),(0x39),(0x3A),(0x3B),(0x3C),(0x3D),(0x3E),(0x3F);
|
||||
INSERT INTO t1 VALUES (0x40),(0x41),(0x42),(0x43),(0x44),(0x45),(0x46),(0x47);
|
||||
INSERT INTO t1 VALUES (0x48),(0x49),(0x4A),(0x4B),(0x4C),(0x4D),(0x4E),(0x4F);
|
||||
INSERT INTO t1 VALUES (0x50),(0x51),(0x52),(0x53),(0x54),(0x55),(0x56),(0x57);
|
||||
INSERT INTO t1 VALUES (0x58),(0x59),(0x5A),(0x5B),(0x5C),(0x5D),(0x5E),(0x5F);
|
||||
INSERT INTO t1 VALUES (0x60),(0x61),(0x62),(0x63),(0x64),(0x65),(0x66),(0x67);
|
||||
INSERT INTO t1 VALUES (0x68),(0x69),(0x6A),(0x6B),(0x6C),(0x6D),(0x6E),(0x6F);
|
||||
INSERT INTO t1 VALUES (0x70),(0x71),(0x72),(0x73),(0x74),(0x75),(0x76),(0x77);
|
||||
INSERT INTO t1 VALUES (0x78),(0x79),(0x7A),(0x7B),(0x7C),(0x7D),(0x7E),(0x7F);
|
||||
INSERT INTO t1 VALUES (0x80),(0x81),(0x82),(0x83),(0x84),(0x85),(0x86),(0x87);
|
||||
INSERT INTO t1 VALUES (0x88),(0x89),(0x8A),(0x8B),(0x8C),(0x8D),(0x8E),(0x8F);
|
||||
INSERT INTO t1 VALUES (0x90),(0x91),(0x92),(0x93),(0x94),(0x95),(0x96),(0x97);
|
||||
INSERT INTO t1 VALUES (0x98),(0x99),(0x9A),(0x9B),(0x9C),(0x9D),(0x9E),(0x9F);
|
||||
INSERT INTO t1 VALUES (0xA0),(0xA1),(0xA2),(0xA3),(0xA4),(0xA5),(0xA6),(0xA7);
|
||||
INSERT INTO t1 VALUES (0xA8),(0xA9),(0xAA),(0xAB),(0xAC),(0xAD),(0xAE),(0xAF);
|
||||
INSERT INTO t1 VALUES (0xB0),(0xB1),(0xB2),(0xB3),(0xB4),(0xB5),(0xB6),(0xB7);
|
||||
INSERT INTO t1 VALUES (0xB8),(0xB9),(0xBA),(0xBB),(0xBC),(0xBD),(0xBE),(0xBF);
|
||||
INSERT INTO t1 VALUES (0xC0),(0xC1),(0xC2),(0xC3),(0xC4),(0xC5),(0xC6),(0xC7);
|
||||
INSERT INTO t1 VALUES (0xC8),(0xC9),(0xCA),(0xCB),(0xCC),(0xCD),(0xCE),(0xCF);
|
||||
INSERT INTO t1 VALUES (0xD0),(0xD1),(0xD2),(0xD3),(0xD4),(0xD5),(0xD6),(0xD7);
|
||||
INSERT INTO t1 VALUES (0xD8),(0xD9),(0xDA),(0xDB),(0xDC),(0xDD),(0xDE),(0xDF);
|
||||
INSERT INTO t1 VALUES (0xE0),(0xE1),(0xE2),(0xE3),(0xE4),(0xE5),(0xE6),(0xE7);
|
||||
INSERT INTO t1 VALUES (0xE8),(0xE9),(0xEA),(0xEB),(0xEC),(0xED),(0xEE),(0xEF);
|
||||
INSERT INTO t1 VALUES (0xF0),(0xF1),(0xF2),(0xF3),(0xF4),(0xF5),(0xF6),(0xF7);
|
||||
INSERT INTO t1 VALUES (0xF8),(0xF9),(0xFA),(0xFB),(0xFC),(0xFD),(0xFE),(0xFF);
|
||||
SELECT
|
||||
HEX(a) AS chr,
|
||||
HEX(LOWER(a)) AS upper,
|
||||
HEX(LOWER(a)) AS lower,
|
||||
HEX(@utf8:=CONVERT(a USING utf8)) AS utf8,
|
||||
HEX(@roundtrip:=CAST(@utf8 AS CHAR)) AS roundtrip,
|
||||
if(a=BINARY @roundtrip,'','Round trip unsafe') AS issafe
|
||||
FROM t1 ORDER BY chr;
|
||||
DROP TABLE t1;
|
12
mysql-test/include/ctype_czech.inc
Normal file
12
mysql-test/include/ctype_czech.inc
Normal file
|
@ -0,0 +1,12 @@
|
|||
SELECT @@collation_connection;
|
||||
--echo #
|
||||
--echo # Bug#57737 Character sets: search fails with like, contraction, index
|
||||
--echo #
|
||||
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
|
||||
INSERT INTO t1 VALUES ('c'),('ce'),('cé'),('ch');
|
||||
SELECT * FROM t1 WHERE s1 LIKE 'c%';
|
||||
ALTER TABLE t1 ADD KEY s1 (s1);
|
||||
SELECT * FROM t1 WHERE s1 LIKE 'c%';
|
||||
ALTER TABLE t1 DROP KEY s1, ADD KEY(s1(1));
|
||||
SELECT * FROM t1 WHERE s1 LIKE 'ch';
|
||||
DROP TABLE t1;
|
11
mysql-test/include/ctype_like_ignorable.inc
Normal file
11
mysql-test/include/ctype_like_ignorable.inc
Normal file
|
@ -0,0 +1,11 @@
|
|||
SELECT @@collation_connection;
|
||||
--echo #
|
||||
--echo # Bug#57737 Character sets: search fails with like, contraction, index
|
||||
--echo # Part#2 - ignorable characters
|
||||
--echo #
|
||||
CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS s1 LIMIT 0;
|
||||
INSERT INTO t1 VALUES ('a\0\0\0\0\0\t'),('a'),('b'),('c'),('d'),('e');
|
||||
SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
|
||||
ALTER TABLE t1 ADD KEY s1 (s1);
|
||||
SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%';
|
||||
DROP TABLE t1;
|
|
@ -1722,6 +1722,21 @@ DROP TABLE t1;
|
|||
--echo #
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#58190 BETWEEN no longer uses indexes for date or datetime fields
|
||||
--echo #
|
||||
SELECT @@collation_connection;
|
||||
CREATE TABLE t1 (
|
||||
id INT(11) DEFAULT NULL,
|
||||
date_column DATE DEFAULT NULL,
|
||||
KEY(date_column));
|
||||
INSERT INTO t1 VALUES (1,'2010-09-01'),(2,'2010-10-01');
|
||||
EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
|
||||
ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL;
|
||||
EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#52159 returning time type from function and empty left join causes debug assertion
|
||||
--echo #
|
||||
|
|
|
@ -69,7 +69,7 @@ while ($_diff_i) {
|
|||
# and connect the appropriate server.
|
||||
let $_pos= `SELECT LOCATE(':', '$_diff_table')`;
|
||||
let $_diff_conn=`SELECT SUBSTR('$_diff_table', 1, $_pos-1)`;
|
||||
if (`SELECT 'XX$_diff_conn' <> 'XX'`) {
|
||||
if ($_diff_conn) {
|
||||
let $_diff_table=`SELECT SUBSTR('$_diff_table', $_pos+1)`;
|
||||
connection $_diff_conn;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
|
|||
#
|
||||
# Check if the variable EXAMPLE_PLUGIN is set
|
||||
#
|
||||
if (`SELECT LENGTH('$EXAMPLE_PLUGIN') = 0`) {
|
||||
if (!$EXAMPLE_PLUGIN) {
|
||||
--skip Example plugin requires the environment variable \$EXAMPLE_PLUGIN to be set (normally done by mtr)
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
|
|||
#
|
||||
# Check if the variable SEMISYNC_MASTER_PLUGIN is set
|
||||
#
|
||||
if (`select LENGTH('$SEMISYNC_MASTER_PLUGIN') = 0`)
|
||||
if (!$SEMISYNC_MASTER_PLUGIN)
|
||||
{
|
||||
skip Need semisync plugins;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
|
|||
#
|
||||
# Check if the variable SIMPLE_PARSER is set
|
||||
#
|
||||
if (`SELECT LENGTH('$SIMPLE_PARSER') = 0`) {
|
||||
if (!$SIMPLE_PARSER) {
|
||||
--skip simple parser requires the environment variable \$SIMPLE_PARSER to be set (normally done by mtr)
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ if (`SELECT @@have_dynamic_loading != 'YES'`) {
|
|||
#
|
||||
# Check if the variable UDF_EXAMPLE_LIB is set
|
||||
#
|
||||
if (`SELECT LENGTH('$UDF_EXAMPLE_LIB') = 0`) {
|
||||
if (!$UDF_EXAMPLE_LIB) {
|
||||
--skip UDF requires the environment variable \$UDF_EXAMPLE_LIB to be set (normally done by mtr)
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ select LENGTH("$MYSQL_UPGRADE")>0 as have_mysql_upgrade;
|
|||
# Therefore, truncate the log table in advance and issue a statement
|
||||
# that should be logged.
|
||||
#
|
||||
if (`SELECT $VALGRIND_TEST`)
|
||||
if ($VALGRIND_TEST)
|
||||
{
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
# Therefore we require that the option "--big-test" is also set.
|
||||
#
|
||||
|
||||
if (`SELECT $VALGRIND_TEST <> 0 AND '$BIG_TEST' = ''`)
|
||||
{
|
||||
--skip Need "--big-test" when running with Valgrind
|
||||
if ($VALGRIND_TEST) {
|
||||
if (!$BIG_TEST)
|
||||
{
|
||||
--skip Need "--big-test" when running with Valgrind
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
if (`SELECT '$MTR_PARALLEL' > 1`) {
|
||||
if ($MTR_PARALLEL > 1) {
|
||||
--skip test requires --parallel=1
|
||||
}
|
||||
|
|
|
@ -1,18 +1,14 @@
|
|||
|
||||
# Write file to make mysql-test-run.pl expect the "crash", but don't start
|
||||
# it until it's told to
|
||||
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
wait
|
||||
EOF
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
# Send shutdown to the connected server and give
|
||||
# it 10 seconds to die before zapping it
|
||||
shutdown_server 10;
|
||||
|
||||
# Write file to make mysql-test-run.pl start up the server again
|
||||
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
restart
|
||||
EOF
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
|
||||
# Turn on reconnect
|
||||
--enable_reconnect
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
# --source include/rpl_diff_tables.inc
|
||||
# #############################################################################
|
||||
|
||||
if (`SELECT "XX$diff_table" = "XX"`)
|
||||
if (!$diff_table)
|
||||
{
|
||||
--die diff_table is null.
|
||||
}
|
||||
|
||||
--let $_servers= master, slave
|
||||
if (`SELECT "XX$diff_server_list" <> "XX"`)
|
||||
if ($diff_server_list)
|
||||
{
|
||||
--let $_servers= $diff_server_list
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ if (`SELECT "XX$diff_server_list" <> "XX"`)
|
|||
--let $_master= `SELECT SUBSTRING_INDEX('$_servers', ',', 1)`
|
||||
--let $_servers= `SELECT LTRIM(SUBSTRING('$_servers', LENGTH('$_master') + 2))`
|
||||
connection $_master;
|
||||
while (`SELECT "XX$_servers" <> "XX"`)
|
||||
while ($_servers)
|
||||
{
|
||||
--let $_slave= `SELECT SUBSTRING_INDEX('$_servers', ',', 1)`
|
||||
--let $_servers= `SELECT LTRIM(SUBSTRING('$_servers', LENGTH('$_slave') + 2))`
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue