diff --git a/BUILD/FINISH.sh b/BUILD/FINISH.sh index b7f7a1db77e..e0d505a948f 100644 --- a/BUILD/FINISH.sh +++ b/BUILD/FINISH.sh @@ -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` diff --git a/BUILD/Makefile.am b/BUILD/Makefile.am deleted file mode 100644 index 56c86e7a80c..00000000000 --- a/BUILD/Makefile.am +++ /dev/null @@ -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 diff --git a/BUILD/autorun.sh b/BUILD/autorun.sh index f4508ab12b6..e4ca52f00fe 100755 --- a/BUILD/autorun.sh +++ b/BUILD/autorun.sh @@ -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 diff --git a/BUILD/cmake_configure.sh b/BUILD/cmake_configure.sh index 80423205274..f5efc13e011 100644 --- a/BUILD/cmake_configure.sh +++ b/BUILD/cmake_configure.sh @@ -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 diff --git a/BUILD/compile-amd64-valgrind-max b/BUILD/compile-amd64-valgrind-max index fb8dce38df3..d9072ef56dd 100755 --- a/BUILD/compile-amd64-valgrind-max +++ b/BUILD/compile-amd64-valgrind-max @@ -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 diff --git a/BUILD/compile-pentium-valgrind-max b/BUILD/compile-pentium-valgrind-max index 8ef47bfbc17..9b58c4321c9 100755 --- a/BUILD/compile-pentium-valgrind-max +++ b/BUILD/compile-pentium-valgrind-max @@ -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 diff --git a/BUILD/compile-pentium-valgrind-max-no-ndb b/BUILD/compile-pentium-valgrind-max-no-ndb index f480f83ebf7..b78303fb136 100755 --- a/BUILD/compile-pentium-valgrind-max-no-ndb +++ b/BUILD/compile-pentium-valgrind-max-no-ndb @@ -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 diff --git a/BUILD/compile-pentium64-valgrind-max b/BUILD/compile-pentium64-valgrind-max index eb3d20c874d..ebc7fc68b88 100755 --- a/BUILD/compile-pentium64-valgrind-max +++ b/BUILD/compile-pentium64-valgrind-max @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c7e89974c1..07809a8e29b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/Docs/Makefile.am b/Docs/Makefile.am deleted file mode 100644 index 48030153a4e..00000000000 --- a/Docs/Makefile.am +++ /dev/null @@ -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 diff --git a/EXCEPTIONS-CLIENT b/EXCEPTIONS-CLIENT deleted file mode 100644 index c570ff7ba24..00000000000 --- a/EXCEPTIONS-CLIENT +++ /dev/null @@ -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 diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index c47d8e780cf..00000000000 --- a/Makefile.am +++ /dev/null @@ -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 diff --git a/README b/README index 42d80612174..a73ec2b7437 100644 --- a/README +++ b/README @@ -1,2210 +1,2302 @@ -This is a release of MySQL, a dual-license SQL DBMS. -MySQL is brought to you by the MySQL team at Oracle Corporation. - -************************************************************ -LICENSE -************************************************************ -License information and use restrictions of this software can -be found in these files: -- For GPL (free) distributions, see the COPYING file and - the EXCEPTIONS-CLIENT file. -- For commercial distributions, see the LICENSE.mysql file. - -GPLv2 Disclaimer -For the avoidance of doubt, except that if any license choice -other than GPL or LGPL is available it will apply instead, Oracle -elects to use only the General Public License version 2 (GPLv2) -at this time for any software where a choice of GPL license versions -is made available with the language indicating that GPLv2 or any -later version may be used, or where a choice of which version of -the GPL is applied is otherwise unspecified. - -************************************************************ -FURTHER INFORMATION -************************************************************ -For further information about MySQL or additional documentation, see: -- The latest information about MySQL: http://dev.mysql.com/ -- The current MySQL documentation: http://dev.mysql.com/doc/ - -Some manual sections of special interest: -- If you are migrating from an older version of MySQL, please read -the "Upgrading from..." section first! -- To see what MySQL can do, take a look at the features section. -- For installation instructions, see the Installing and Upgrading -chapter. -- For the new features/bugfix history, see the Change History appendix. -- For the currently known bugs/misfeatures (known errors) see the -Problems and Common Errors appendix. -- For a list of developers and other contributors, see the Credits -appendix. - -A local copy of the MySQL Reference Manual can be found in the Docs -directory in GNU Info format. You can also browse the manual online or -download it in any of several formats at the URL given earlier in this -file. - -************************************************************ -IMPORTANT: - -Bug or error reports should be sent to http://bugs.mysql.com. -************************************************************ - - -************************************************************ -THIRD-PARTY SOFTWARE -************************************************************ - -%%The following software may be included in this product: -FindGTest.cmake (part of CMake 2.8.0) - -Use of any of this software is governed by the terms of the license below: - -# Copyright 2009 Kitware, Inc. -# Copyright 2009 Philip Lowman -# Copyright 2009 Daniel Blezek -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#=========================================================================== -== -# (To distributed this file outside of CMake, substitute the full -# License text for the above reference.) -# -# Thanks to Daniel Blezek for the GTEST_ADD_TESTS code - - -Text of Copyright.txt mentioned above: - -CMake - Cross Platform Makefile Generator -Copyright 2000-2009 Kitware, Inc., Insight Software Consortium -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -* Neither the names of Kitware, Inc., the Insight Software Consortium, - nor the names of their contributors may be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -*************************************************************************** - -%%The following software may be included in this product: -Cmake - -Use of any of this software is governed by the terms of the license below: - -CMake is distributed under BSD License - - Copyright (c) 2008, Kitware, Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - * Neither the name of Kitware, Inc. nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY Kitware, Inc. "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT -SHALL Kitware Inc. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT -OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY -OF SUCH DAMAGE. - -Additional License(s) - -cmake-2.4.8/Utilities/cmtar/compat/gethostname.c: - gethostname.c: minimal substitute for missing gethostname() function - created 2000-Mar-02 jmk - requires SVR4 uname() and -lc - - by Jim Knoble - Copyright ? 2000 Jim Knoble - - Permission to use, copy, modify, distribute, and sell this software - and its documentation for any purpose is hereby granted without fee, - provided that the above copyright notice appear in all copies and - that both that copyright notice and this permission notice appear in - supporting documentation. - - This software is provided "as is", without warranty of any kind, - express or implied, including but not limited to the warranties of - merchantability, fitness for a particular purpose and - noninfringement. In no event shall the author(s) be liable for any - claim, damages or other liability, whether in an action of contract, - tort or otherwise, arising from, out of or in connection with the - software or the use or other dealings in the software. - ----------------------------------- - -* Originally written by Steven M. Bellovin while -* at the University of North Carolina at Chapel Hill. Later tweaked by -* a couple of people on Usenet. Completely overhauled by Rich $alz -* and Jim Berets in August, 1990. -* -* This code is in the public domain and has no copyright. - -------------------------------- - - THIS CODE IS SPECIFICALLY EXEMPTED FROM THE NCURSES PACKAGE COPYRIGHT. - You may freely copy it for use as a template for your own field types. - If you develop a field type that might be of general use, please send - it back to the ncurses maintainers for inclusion in the next version. - -************************************************************************** - - * - Author : Per Foreby, perf@efd.lth.se - * - Author : Juergen Pfeifer, juergen.pfeifer@gmx.net - * - - * -************************************************************************** - ----------------------------------------- - - Copyright (c) 2002 Insight Consortium. All rights reserved. - See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for -details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - --------------------------------------------- - - Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free -Software Foundati -on, 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; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - - As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. - ---------------------------------------------------- - -cmake-2.4.8/Utilities/cmzlib/zlib.h: - zlib.h -- interface of the 'zlib' general purpose compression library - version 1.1.4, March 11th, 2002 - - Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must -not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source -distribution. - - Jean-loup Gailly Mark Adler - ----------------------------------------------- - - This source code was modified by Martin Hedenfalk - for - use in Curl. His latest changes were done 2000-09-18. - - It has since been patched away like a madman by Daniel Stenberg - to make it better applied to curl conditions, and to -make - it not use globals, pollute name space and more. This source code -awaits a - rewrite to work around the paragraph 2 in the BSD licenses as explained - below. - - Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Hgskolan - It has since been patched and modified a lot by Daniel Stenberg - to make it better applied to curl conditions, and to -make - it not use globals, pollute name space and more. This source code -awaits a - rewrite to work around the paragraph 2 in the BSD licenses as explained - below. - - Copyright (c) 1998, 1999 Kungliga Tekniska Hgskolan - (Royal Institute of Technology, Stockholm, Sweden). - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. Neither the name of the Institute nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE -LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - ---------------------------------------------- - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND - CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. - --------------------------------------------------- - -cmake-2.4.8/Utilities/cmcurl/inet_pton.c, -cmake-2.4.8/Source/CTest/Curl/inet_pto -n.c: - This is from the BIND 4.9.4 release, modified to compile by itself - - Copyright (c) 1996 by Internet Software Consortium. - - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM -DISCLAIMS - ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED -WARRANTIES - OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -OF THIS - SOFTWARE. - -------------------------------------------------------- - -* Copyright (C) 2001 by Eric Kidd. All rights reserved. -* Copyright (C) 2001 by Luke Howard. All rights reserved. -* Copyright (C) 2002 Ximian, Inc. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* 1. Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* 2. Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* 3. The name of the author may not be used to endorse or promote products -* derived from this software without specific prior written -permission. -* -* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -** SUCH DAMAGE. - ---------------------------------------------------- - - Copyright (c) 1994 - The Regents of the University of California. All rights reserved. - - This code is derived from software contributed to Berkeley by - Chuck Karish of Mindcraft, Inc. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - Copyright (c) 1985, 1986 The Regents of the University of California. - All rights reserved. - - This code is derived from software contributed to Berkeley by - James A. Woods, derived from original work by Spencer Thomas - and Joseph Orost. - ------------------------------------------------- - - Copyright (c) 1989, 1993, 1994 - The Regents of the University of California. All rights reserved. - - This code is derived from software contributed to Berkeley by - Guido van Rossum. - - Copyright (c) 1990 The Regents of the University of California. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the University of - California, Berkeley and its contributors. - 4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - ------------------------------------------------------- - - Project ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ - \___|\___/|_| \_\_____| - - Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. - - Copyright (C) 2004, Daniel Stenberg, , et al. - - This software is licensed as described in the file COPYING, which - you should have received as part of this distribution. The terms - are also available at http://curl.haxx.se/docs/copyright.html. - - You may opt to use, copy, modify, merge, publish, distribute and/or sell - copies of the Software, and permit persons to whom the Software is - furnished to do so, under the terms of the COPYING file. - - This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - KIND, either express or implied. - ------------------------------------------------------------- - -*************************************************************************** - Copyright (c) 1998 Free Software Foundation, Inc. - * - Copyright (c) 1998,2000 Free Software Foundation, Inc. - * - - * - Permission is hereby granted, free of charge, to any person obtaining -a * - copy of this software and associated documentation files (the - * - "Software"), to deal in the Software without restriction, including - * - without limitation the rights to use, copy, modify, merge, publish, - * - distribute, distribute with modifications, sublicense, and/or sell - * - copies of the Software, and to permit persons to whom the Software is - * - furnished to do so, subject to the following conditions: - * - - * - The above copyright notice and this permission notice shall be -included * - in all copies or substantial portions of the Software. - * - - * - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS * - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. * - IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, * - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - * - THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - - * - - * - Except as contained in this notice, the name(s) of the above -copyright * - holders shall not be used in advertising or otherwise to promote the - * - sale, use or other dealings in this Software without prior written - * - authorization. - * - *************************************************************************** - ------------------------------------------------------- - - Copyright (c) 1997 Todd C. Miller - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; - OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - -*************************************************************************** - -%%The following software may be included in this product: -Fred Fish's Dbug Library - -Use of any of this software is governed by the terms of the license below: - -* - * N O T I C E * - * * - * Copyright Abandoned, 1987, Fred Fish * - * * - * * - * This previously copyrighted work has been placed into the public * - * domain by the author and may be freely used for any purpose, * - * private or commercial. * - * * - * Because of the number of inquiries I was receiving about the use * - * of this product in commercially developed works I have decided to * - * simply make it public domain to further its unrestricted use. I * - * specifically would be most happy to see this material become a * - * part of the standard Unix distributions by AT&T and the Berkeley * - * Computer Science Research Group, and a standard part of the GNU * - * system from the Free Software Foundation. * - * * - * I would appreciate it, as a courtesy, if this notice is left in * - * all copies and derivative works. Thank you. * - * * - * The author makes no warranty of any kind with respect to this * - * product and explicitly disclaims any implied warranties of mer- * - * chantability or fitness for any particular purpose. * - * - -*************************************************************************** - -%%The following software may be included in this product: -dbug_analyze.c (part of Fred Fish's Dbug Library) - -Use of any of this software is governed by the terms of the license below: - -* * -* Copyright Abandoned, 1987, Fred Fish * -* * -* * -* This previously copyrighted work has been placed into the public * -* domain by the author and may be freely used for any purpose, * -* private or commercial. * -* * -* Because of the number of inquiries I was receiving about the use * -* of this product in commercially developed works I have decided to * -* simply make it public domain to further its unrestricted use. I * -* specifically would be most happy to see this material become a * -* part of the standard Unix distributions by AT&T and the Berkeley * -* Computer Science Research Group, and a standard part of the GNU * -* system from the Free Software Foundation. * -* * -* I would appreciate it, as a courtesy, if this notice is left in * -* all copies and derivative works. Thank you. * -* * -* The author makes no warranty of any kind with respect to this * -* product and explicitly disclaims any implied warranties of mer- * -* chantability or fitness for any particular purpose. - -*************************************************************************** - -%%The following software may be included in this product: -GNU Libtool, only ltmain.sh, libtool, auto-gen fil - -Use of any of this software is governed by the terms of the license below: - -ltmain.sh inclusion: -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun configure. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007 Free Software Foundation, Inc. -# Originally by Gordon Matzigkeit , 1996 -# -# 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; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -libtool inclusion: -# libtoolT - Provide generalized library-building support services. -# Generated automatically by (GNU mysql 5.1.30) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -# 2006, 2007 Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# 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; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -Auto-generated files: -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building -# support services. -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -# 2004, 2005, 2006, 2007 Free Software Foundation, Inc. -# -# This file is part of GNU Libtool: -# Originally by Gordon Matzigkeit , 1996 -# -# 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; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -Additional License(s) - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -*************************************************************************** - -%%The following software may be included in this product: -innochecksum.c - -Use of any of this software is governed by the terms of the license below: - -GNU GENERAL PUBLIC LICENSE - -Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc. -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - -Preamble - -The licenses for most software are designed to take away your freedom to share -and change it. By contrast, the GNU General Public License is intended to -guarantee your freedom to share and change free software--to make sure the -software is free for all its users. This General Public License applies to most -of the Free Software Foundation's software and to any other program whose -authors commit to using it. (Some other Free Software Foundation software is -covered by the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - -When we speak of free software, we are referring to freedom, not price. Our -General Public Licenses are designed to make sure that you have the freedom to -distribute copies of free software (and charge for this service if you wish), -that you receive source code or can get it if you want it, that you can change -the software or use pieces of it in new free programs; and that you know you can -do these things. - -To protect your rights, we need to make restrictions that forbid anyone to deny -you these rights or to ask you to surrender the rights. These restrictions -translate to certain responsibilities for you if you distribute copies of the -software, or if you modify it. - -For example, if you distribute copies of such a program, whether gratis or for a -fee, you must give the recipients all the rights that you have. You must make -sure that they, too, receive or can get the source code. And you must show them -these terms so they know their rights. - -We protect your rights with two steps: (1) copyright the software, and (2) offer -you this license which gives you legal permission to copy, distribute and/or -modify the software. - -Also, for each author's protection and ours, we want to make certain that -everyone understands that there is no warranty for this free software. If the -software is modified by someone else and passed on, we want its recipients to -know that what they have is not the original, so that any problems introduced by -others will not reflect on the original authors' reputations. - -Finally, any free program is threatened constantly by software patents. We wish -to avoid the danger that redistributors of a free program will individually -obtain patent licenses, in effect making the program proprietary. To prevent -this, we have made it clear that any patent must be licensed for everyone's free -use or not licensed at all. - -The precise terms and conditions for copying, distribution and modification follow. -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains a notice -placed by the copyright holder saying it may be distributed under the terms of -this General Public License. The "Program", below, refers to any such program or -work, and a "work based on the Program" means either the Program or any -derivative work under copyright law: that is to say, a work containing the -Program or a portion of it, either verbatim or with modifications and/or -translated into another language. (Hereinafter, translation is included without -limitation in the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not covered by -this License; they are outside its scope. The act of running the Program is not -restricted, and the output from the Program is covered only if its contents -constitute a work based on the Program (independent of having been made by -running the Program). Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's source code as -you receive it, in any medium, provided that you conspicuously and appropriately -publish on each copy an appropriate copyright notice and disclaimer of warranty; -keep intact all the notices that refer to this License and to the absence of any -warranty; and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and you may at -your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion of it, thus -forming a work based on the Program, and copy and distribute such modifications -or work under the terms of Section 1 above, provided that you also meet all of -these conditions: - - a) You must cause the modified files to carry prominent notices stating that -you changed the files and the date of any change. - b) You must cause any work that you distribute or publish, that in whole or -in part contains or is derived from the Program or any part thereof, to be -licensed as a whole at no charge to all third parties under the terms of this -License. - c) If the modified program normally reads commands interactively when run, -you must cause it, when started running for such interactive use in the most -ordinary way, to print or display an announcement including an appropriate -copyright notice and a notice that there is no warranty (or else, saying that -you provide a warranty) and that users may redistribute the program under these -conditions, and telling the user how to view a copy of this License. (Exception: -if the Program itself is interactive but does not normally print such an -announcement, your work based on the Program is not required to print an -announcement.) - -These requirements apply to the modified work as a whole. If identifiable -sections of that work are not derived from the Program, and can be reasonably -considered independent and separate works in themselves, then this License, and -its terms, do not apply to those sections when you distribute them as separate -works. But when you distribute the same sections as part of a whole which is a -work based on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the entire whole, -and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest your -rights to work written entirely by you; rather, the intent is to exercise the -right to control the distribution of derivative or collective works based on the -Program. - -In addition, mere aggregation of another work not based on the Program with the -Program (or with a work based on the Program) on a volume of a storage or -distribution medium does not bring the other work under the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, under Section -2) in object code or executable form under the terms of Sections 1 and 2 above -provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable source -code, which must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange; or, - b) Accompany it with a written offer, valid for at least three years, to -give any third party, for a charge no more than your cost of physically -performing source distribution, a complete machine-readable copy of the -corresponding source code, to be distributed under the terms of Sections 1 and 2 -above on a medium customarily used for software interchange; or, - c) Accompany it with the information you received as to the offer to -distribute corresponding source code. (This alternative is allowed only for -noncommercial distribution and only if you received the program in object code -or executable form with such an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for making -modifications to it. For an executable work, complete source code means all the -source code for all modules it contains, plus any associated interface -definition files, plus the scripts used to control compilation and installation -of the executable. However, as a special exception, the source code distributed -need not include anything that is normally distributed (in either source or -binary form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component itself -accompanies the executable. - -If distribution of executable or object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the source code -from the same place counts as distribution of the source code, even though third -parties are not compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program except as -expressly provided under this License. Any attempt otherwise to copy, modify, -sublicense or distribute the Program is void, and will automatically terminate -your rights under this License. However, parties who have received copies, or -rights, from you under this License will not have their licenses terminated so -long as such parties remain in full compliance. - -5. You are not required to accept this License, since you have not signed it. -However, nothing else grants you permission to modify or distribute the Program -or its derivative works. These actions are prohibited by law if you do not -accept this License. Therefore, by modifying or distributing the Program (or any -work based on the Program), you indicate your acceptance of this License to do -so, and all its terms and conditions for copying, distributing or modifying the -Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the Program), -the recipient automatically receives a license from the original licensor to -copy, distribute or modify the Program subject to these terms and conditions. -You may not impose any further restrictions on the recipients' exercise of the -rights granted herein. You are not responsible for enforcing compliance by third -parties to this License. - -7. If, as a consequence of a court judgment or allegation of patent infringement -or for any other reason (not limited to patent issues), conditions are imposed -on you (whether by court order, agreement or otherwise) that contradict the -conditions of this License, they do not excuse you from the conditions of this -License. If you cannot distribute so as to satisfy simultaneously your -obligations under this License and any other pertinent obligations, then as a -consequence you may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by all those -who receive copies directly or indirectly through you, then the only way you -could satisfy both it and this License would be to refrain entirely from -distribution of the Program. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply and the -section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any patents or -other property right claims or to contest validity of any such claims; this -section has the sole purpose of protecting the integrity of the free software -distribution system, which is implemented by public license practices. Many -people have made generous contributions to the wide range of software -distributed through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing to -distribute software through any other system and a licensee cannot impose that -choice. - -This section is intended to make thoroughly clear what is believed to be a -consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in certain -countries either by patents or by copyrighted interfaces, the original copyright -holder who places the Program under this License may add an explicit -geographical distribution limitation excluding those countries, so that -distribution is permitted only in or among countries not thus excluded. In such -case, this License incorporates the limitation as if written in the body of this -License. - -9. The Free Software Foundation may publish revised and/or new versions of the -General Public License from time to time. Such new versions will be similar in -spirit to the present version, but may differ in detail to address new problems -or concerns. - -Each version is given a distinguishing version number. If the Program specifies -a version number of this License which applies to it and "any later version", -you have the option of following the terms and conditions either of that version -or of any later version published by the Free Software Foundation. If the -Program does not specify a version number of this License, you may choose any -version ever published by the Free Software Foundation. - -10. If you wish to incorporate parts of the Program into other free programs -whose distribution conditions are different, write to the author to ask for -permission. For software which is copyrighted by the Free Software Foundation, -write to the Free Software Foundation; we sometimes make exceptions for this. -Our decision will be guided by the two goals of preserving the free status of -all derivatives of our free software and of promoting the sharing and reuse of -software generally. - -NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE -PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED -IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS -IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT -NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL -ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE -PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, -SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY -TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF -THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER -PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -END OF TERMS AND CONDITIONS -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest possible use -to the public, the best way to achieve this is to make it free software which -everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest to attach -them to the start of each source file to most effectively convey the exclusion -of warranty; and each file should have at least the "copyright" line and a -pointer to where the full notice is found. - -one line to give the program's name and an idea of what it does. -Copyright (C) yyyy name of author - -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; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this when it -starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details -type `show w'. This is free software, and you are welcome -to redistribute it under certain conditions; type `show c' -for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may be -called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your school, -if any, to sign a "copyright disclaimer" for the program, if necessary. Here is -a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright -interest in the program `Gnomovision' -(which makes passes at compilers) written -by James Hacker. - -signature of Ty Coon, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may consider -it more useful to permit linking proprietary applications with the library. If -this is what you want to do, use the GNU Lesser General Public License instead -of this License. - -Additional Documentation License(s) - -innochecksum.c is documented in the MySQL Reference -Manual at http://dev.mysql.com/doc/refman/5.1/en/innochecksum.html -The Reference Manual is not licensed under the GPL; rather, it -is offered under normal copyright, but with permission to -copy/redistribute electronically. - -*************************************************************************** - -%%The following software may be included in this product: -lib_sql.cc - -Use of any of this software is governed by the terms of the license below: - -/* - * Copyright (c) 2000 - * SWsoft company - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - - This code was modified by the MySQL team -*/ - -*************************************************************************** - -%%The following software may be included in this product: -libevent - -Use of any of this software is governed by the terms of the license below: - -/* - * Copyright (c) 2000-2004 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -Additional License(s) - -http://creativecommons.org/licenses/publicdomain - -*************************************************************************** - -%%The following software may be included in this product: -Async DNS Library - -Use of any of this software is governed by the terms of the license below: - -/* Async DNS Library - * Adam Langley - * http://www.imperialviolet.org/eventdns.html - * Public Domain code - * - * This software is Public Domain. To view a copy of the public domain dedication, - * visit http://creativecommons.org/licenses/publicdomain/ or send a letter to - * Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. - * - * I ask and expect, but do not require, that all derivative works contain an - * attribution similar to: - * Parts developed by Adam Langley - * - * You may wish to replace the word "Parts" with something else depending on - * the amount of original code. - * - * (Derivative works does not include programs which link against, run or include - * the source verbatim in their source distributions) - * - * Version: 0.1b - */ - -*************************************************************************** - -%%The following software may be included in this product: -log.c - -Use of any of this software is governed by the terms of the license below: - -/* $OpenBSD: err.c,v 1.2 2002/06/25 15:50:15 mickey Exp $ */ - -/* - * log.c - * - * Based on err.c, which was adapted from OpenBSD libc *err* *warn* code. - * - * Copyright (c) 2005 Nick Mathewson - * - * Copyright (c) 2000 Dug Song - * - * Copyright (c) 1993 - * The Regents of the University of California. All rights -reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -*************************************************************************** - -%%The following software may be included in this product: -min_heap.h - -Use of any of this software is governed by the terms of the license below: - -/* - * Copyright (c) 2006 Maxim Yegorushkin - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -*************************************************************************** - -%%The following software may be included in this product: -win32.c - -Use of any of this software is governed by the terms of the license below: - -/* - * Copyright 2000-2002 Niels Provos - * Copyright 2003 Michael A. Davis - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -*************************************************************************** - -%%The following software may be included in this product: -regex++ - -Use of any of this software is governed by the terms of the license below: - -Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved. -This software is not subject to any license of the American Telephone -and Telegraph Company or of the Regents of the University of California. - -Permission is granted to anyone to use this software for any purpose on -any computer system, and to alter it and redistribute it, subject -to the following restrictions: - -1. The author is not responsible for the consequences of use of this - software, no matter how awful, even if they arise from flaws in it. - -2. The origin of this software must not be misrepresented, either by - explicit claim or by omission. Since few users ever read sources, - credits must appear in the documentation. - -3. Altered versions must be plainly marked as such, and must not be - misrepresented as being the original software. Since few users - ever read sources, credits must appear in the documentation. - -4. This notice may not be removed or altered. - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -/*- - * Copyright (c) 1994 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)COPYRIGHT 8.1 (Berkeley) 3/16/94 - */ - -*************************************************************************** - -%%The following software may be included in this product: -Richard A. O'Keefe strings package - -Use of any of this software is governed by the terms of the license below: - -These files are in the public domain. This includes getopt.c, which -is the work of Henry Spencer, University of Toronto Zoology, who says of -it "None of this software is derived from Bell software. I had no access -to the source for Bell's versions at the time I wrote it. This software -is hereby explicitly placed in the public domain. It may be used for -any purpose on any machine by anyone." I would greatly prefer it if *my* -material received no military use. - -*************************************************************************** - -%%The following software may be included in this product: -t_ctype.h - -Use of any of this software is governed by the terms of the license below: - -http://bioinfo.mbb.yale.edu/genome/yeast/cluster/database/mysql/include/t_ctype.h - -/* - Copyright (C) 1998, 1999 by Pruet Boonma, all rights reserved. - Copyright (C) 1998 by Theppitak Karoonboonyanan, all rights reserved. - Permission to use, copy, modify, distribute and sell this software - and its documentation for any purpose is hereby granted without fee, - provided that the above copyright notice appear in all copies. - Smaphan Raruenrom and Pruet Boonma makes no representations about - the suitability of this software for any purpose. It is provided - "as is" without express or implied warranty. -*/ - -*************************************************************************** - -%%The following software may be included in this product: -SHA-1 in C - -Use of any of this software is governed by the terms of the license below: - - SHA-1 in C - By Steve Reid - 100% Public Domain - -Additional License(s) - -100% Public Domain - -*************************************************************************** - -%%The following software may be included in this product: -TCMalloc (part of google-perftools) - -Use of any of this software is governed by the terms of the license below: - -# Copyright (c) 1998-2006, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Additional License(s) - -*** File src/tests/ptmalloc/thread-m.h contains this GPLv2 (or later) -text: - -/* Basic platform-independent macro definitions for mutexes and - thread-specific data. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Wolfram Gloger , 1996. - - The GNU C 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; either version 2 of the - License, or (at your option) any later version. - - The GNU C 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 the GNU C Library; see the file COPYING.LIB. If -not, - write to the Free Software Foundation, Inc., 59 Temple Place - -Suite 330, - Boston, MA 02111-1307, USA. */ - - - -*** File src/tests/ptmalloc/malloc-machine.h contains this BSD like text: - -/* Basic platform-independent macro definitions for mutexes, - thread-specific data and parameters for malloc. - Posix threads (pthreads) version. - Copyright (C) 2004 Wolfram Gloger . - -Permission to use, copy, modify, distribute, and sell this software -and its documentation for any purpose is hereby granted without fee, -provided that (i) the above copyright notices and this permission -notice appear in all copies of the software and related documentation, -and (ii) the name of Wolfram Gloger may not be used in any advertising -or publicity relating to the software. - -THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, -EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY -WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - -IN NO EVENT SHALL WOLFRAM GLOGER BE LIABLE FOR ANY SPECIAL, -INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY -DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY -OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -*/ - -*************************************************************************** - -%%The following software may be included in this product: -The tz database - -Use of any of this software is governed by the terms of the license below: - -Sources for Time Zone and Daylight Saving Time Data -@(#)tz-link.htm 7.54 - -Please send corrections to this web page to the time zone mailing list. -The tz database - -The public-domain time zone database contains code and data that represent the -history of local time for many representative locations around the globe. It is -updated periodically to reflect changes made by political bodies to time zone -boundaries, UTC offsets, and daylight-saving rules. This database (often called -tz or zoneinfo) is used by several implementations, including the GNU C Library -used in GNU/Linux, FreeBSD, NetBSD, OpenBSD, Cygwin, DJGPP, HP-UX, IRIX, Mac OS -X, OpenVMS, Solaris, Tru64, and UnixWare. - -Each location in the database represents a national region where all clocks -keeping local time have agreed since 1970. Locations are identified by continent -or ocean and then by the name of the location, which is typically the largest -city within the region. For example, America/New_York represents most of the US -eastern time zone; America/Phoenix represents most of Arizona, which uses -mountain time without daylight saving time (DST); America/Detroit represents -most of Michigan, which uses eastern time but with different DST rules in 1975; -and other entries represent smaller regions like Starke County, Indiana, which -switched from central to eastern time in 1991 and switched back in 2006. To use -the database on an extended POSIX implementation set the TZ environment variable -to the location's full name, e.g., TZ="America/New_York". - -In the tz database's FTP distribution the code is in the file tzcodeC.tar.gz, -where C is the code's version; similarly, the data are in tzdataD.tar.gz, where -D is the data's version. The following shell commands download these files to a -GNU/Linux or similar host; see the downloaded README file for what to do next. - -wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz' -gzip -dc tzcode*.tar.gz | tar -xf - -gzip -dc tzdata*.tar.gz | tar -xf - - -The code lets you compile the tz source files into machine-readable binary -files, one for each location. It also lets you read a tz binary file and -interpret time stamps for that location. - -The data are by no means authoritative. If you find errors, please send changes -to the time zone mailing list. You can also subscribe to the mailing list, -retrieve the archive of old messages (in gzip compressed format), or retrieve -archived older versions of code and data; there is also a smaller HTTP mirror. - -*************************************************************************** - -%%The following software may be included in this product: -UnicodeData.txt - -Use of any of this software is governed by the terms of the license below: - -Unicode Terms of Use - - For the general privacy policy governing access to this site, see the -Unicode Privacy Policy. For trademark usage, see the Unicode Consortium� -Trademarks and Logo Policy. - Notice to End User: Terms of Use - Carefully read the following legal agreement ("Agreement"). Use or copying -of the software and/or codes provided with this agreement (The "Software") -constitutes your acceptance of these terms - - 1. Unicode Copyright. - 1. Copyright � 1991-2008 Unicode, Inc. All rights reserved. - 2. Certain documents and files on this website contain a legend -indicating that "Modification is permitted." Any person is hereby authorized, -without fee, to modify such documents and files to create derivative works -conforming to the Unicode� Standard, subject to Terms and Conditions herein. - 3. Any person is hereby authorized, without fee, to view, use, -reproduce, and distribute all documents and files solely for informational -purposes in the creation of products supporting the Unicode Standard, subject to -the Terms and Conditions herein. - 4. Further specifications of rights and restrictions pertaining to -the use of the particular set of data files known as the "Unicode Character -Database" can be found in Exhibit 1. - 5. Each version of the Unicode Standard has further specifications -of rights and restrictions of use. For the book editions, these are found on the -back of the title page. For the online edition, certain files (such as the PDF -files for book chapters and code charts) carry specific restrictions. All other -files are covered under these general Terms of Use. To request a permission to -reproduce any part of the Unicode Standard, please contact the Unicode Consortium. - 6. No license is granted to "mirror" the Unicode website where a -fee is charged for access to the "mirror" site. - 7. Modification is not permitted with respect to this document. All -copies of this document must be verbatim. - 2. Restricted Rights Legend. Any technical data or software which is -licensed to the United States of America, its agencies and/or instrumentalities -under this Agreement is commercial technical data or commercial computer -software developed exclusively at private expense as defined in FAR 2.101, or -DFARS 252.227-7014 (June 1995), as applicable. For technical data, use, -duplication, or disclosure by the Government is subject to restrictions as set -forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995) and -this Agreement. For Software, in accordance with FAR 12-212 or DFARS 227-7202, -as applicable, use, duplication or disclosure by the Government is subject to -the restrictions set forth in this Agreement. - 3. Warranties and Disclaimers. - 1. This publication and/or website may include technical or -typographical errors or other inaccuracies . Changes are periodically added to -the information herein; these changes will be incorporated in new editions of -the publication and/or website. Unicode may make improvements and/or changes in -the product(s) and/or program(s) described in this publication and/or website at -any time. - 2. If this file has been purchased on magnetic or optical media -from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange -of the defective media within ninety (90) days of original purchase. - 3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR -SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, -IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE -AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN THIS -PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR LINKED -TO THIS PUBLICATION OR THE UNICODE WEBSITE. - 4. Waiver of Damages. In no event shall Unicode or its licensors be -liable for any special, incidental, indirect or consequential damages of any -kind, or any damages whatsoever, whether or not Unicode was advised of the -possibility of the damage, including, without limitation, those resulting from -the following: loss of use, data or profits, in connection with the use, -modification or distribution of this information or its derivatives. - 5. Trademarks. - 1. Unicode and the Unicode logo are registered trademarks of -Unicode, Inc. - 2. This site contains product names and corporate names of other -companies. All product names and company names and logos mentioned herein are -the trademarks or registered trademarks of their respective owners. Other -products and corporate names mentioned herein which are trademarks of a third -party are used only for explanation and for the owners' benefit and with no -intent to infringe. - 3. Use of third party products or information referred to herein is -at the user�s risk. - 6. Miscellaneous. - 1. Jurisdiction and Venue. This server is operated from a location -in the State of California, United States of America. Unicode makes no -representation that the materials are appropriate for use in other locations. If -you access this server from other locations, you are responsible for compliance -with local laws. This Agreement, all use of this site and any claims and damages -resulting from use of this site are governed solely by the laws of the State of -California without regard to any principles which would apply the laws of a -different jurisdiction. The user agrees that any disputes regarding this site -shall be resolved solely in the courts located in Santa Clara County, -California. The user agrees said courts have personal jurisdiction and agree to -waive any right to transfer the dispute to any other forum. - 2. Modification by Unicode Unicode shall have the right to modify -this Agreement at any time by posting it to this site. The user may not assign -any part of this Agreement without Unicode�s prior written consent. - 3. Taxes. The user agrees to pay any taxes arising from access to -this website or use of the information herein, except for those based on -Unicode�s net income. - 4. Severability. If any provision of this Agreement is declared -invalid or unenforceable, the remaining provisions of this Agreement shall -remain in effect. - 5. Entire Agreement. This Agreement constitutes the entire -agreement between the parties. - -EXHIBIT 1 -UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE - - Unicode Data Files include all data files under the directories -http://www.unicode.org/Public/, http://www.unicode.org/reports/, and -http://www.unicode.org/cldr/data/ . Unicode Software includes any source code -published in the Unicode Standard or under the directories -http://www.unicode.org/Public/, http://www.unicode.org/reports/, and -http://www.unicode.org/cldr/data/. - - NOTICE TO USER: Carefully read the following legal agreement. BY -DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES -("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND -AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU -DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES -OR SOFTWARE. - - COPYRIGHT AND PERMISSION NOTICE - - Copyright � 1991-2008 Unicode, Inc. All rights reserved. Distributed under -the Terms of Use in http://www.unicode.org/copyright.html. - - Permission is hereby granted, free of charge, to any person obtaining a copy -of the Unicode data files and any associated documentation (the "Data Files") or -Unicode software and any associated documentation (the "Software") to deal in -the Data Files or Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, and/or sell copies of -the Data Files or Software, and to permit persons to whom the Data Files or -Software are furnished to do so, provided that (a) the above copyright notice(s) -and this permission notice appear with all copies of the Data Files or Software, -(b) both the above copyright notice(s) and this permission notice appear in -associated documentation, and (c) there is clear notice in each modified Data -File or in the Software as well as in the documentation associated with the Data -File(s) or Software that the data or software has been modified. - - THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD -PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS -NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL -DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. - - Except as contained in this notice, the name of a copyright holder shall not -be used in advertising or otherwise to promote the sale, use or other dealings -in these Data Files or Software without prior written authorization of the -copyright holder. - - Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be -registered in some jurisdictions. All other trademarks and registered trademarks -mentioned herein are the property of their respective owners. - -*************************************************************************** - -%%The following software may be included in this product: -zlib - -Use of any of this software is governed by the terms of the license below: - -/* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.3, July 18th, 2005 - - Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly jloup@gzip.org - Mark Adler madler@alumni.caltech.edu - -*/ - -*************************************************************************** - -%%The following software may be included in this product: -dtoa.c - -Use of any of this software is governed by the terms of the license below: - -/**************************************************************** - - This file incorporates work covered by the following copyright and - permission notice: - - The author of this software is David M. Gay. - - Copyright (c) 1991, 2000, 2001 by Lucent Technologies. - - Permission to use, copy, modify, and distribute this software for any - purpose without fee is hereby granted, provided that this entire - notice is included in all copies of any software which is or includes a copy - or modification of this software and in all copies of the supporting - documentation for such software. - - THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED - WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY - REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY - OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. - - ***************************************************************/ - -*************************************************************************** - -%%The following software may be included in this product: -getarg.{c,h} - -Use of any of this software is governed by the terms of the license below: - -/* Copyright (C) 2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - * Copyright (c) 1997, 1999 Kungliga Tekniska H366gskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -*************************************************************************** - -%%The following software may be included in this product: -MD5 message-digest algorithm (md5_hash.cpp) - -Use of any of this software is governed by the terms of the license below: - -/* - * This code implements the MD5 message-digest algorithm. - * The algorithm is due to Ron Rivest. This code was - * written by Colin Plumb in 1993, no copyright is claimed. - * This code is in the public domain; do with it what you wish. - * - * Equivalent code is available from RSA Data Security, Inc. - * This code has been tested against that, and is equivalent, - * except that you don't need to include two pages of legalese - * with every copy. - * - * The code has been modified by Mikael Ronstroem to handle - * calculating a hash value of a key that is always a multiple - * of 4 bytes long. Word 0 of the calculated 4-word hash value - * is returned as the hash value. - */ - -*************************************************************************** - -%%The following software may be included in this product: -nt_servc.{cc,h} - -Use of any of this software is governed by the terms of the license below: - -/** - @file - - @brief - Windows NT Service class library. - - Copyright Abandoned 1998 Irena Pancirov - Irnet Snc - This file is public domain and comes with NO WARRANTY of any kind -*/ - -*************************************************************************** - -%%The following software may be included in this product: -GNU Readline - -Use of any of this software is governed by the terms of the license below: - -GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. - -*************************************************************************** +MySQL Server + +This is a release of MySQL, a dual-license SQL database server. +For the avoidance of doubt, this particular copy of the software +is released under the version 2 of the GNU General Public License. +MySQL is brought to you by the MySQL team at Oracle. + +Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + +License information can be found in the COPYING file. + +This distribution may include materials developed by third +parties. For license and attribution notices for these +materials, please refer to the documentation that accompanies +this distribution (see the Licenses for Third-Party Components +appendix). A copy of the license/notices is also reproduced +below. + +GPLv2 Disclaimer +For the avoidance of doubt, except that if any license choice +other than GPL or LGPL is available it will apply instead, +Oracle elects to use only the General Public License version 2 +(GPLv2) at this time for any software where a choice of GPL +license versions is made available with the language indicating +that GPLv2 or any later version may be used, or where a choice +of which version of the GPL is applied is otherwise unspecified. + +For further information about MySQL or additional documentation, +see: +- The latest information about MySQL: http://www.mysql.com +- The current MySQL documentation: http://dev.mysql.com/doc + +Some Reference Manual sections of special interest: +- If you are migrating from an older version of MySQL, please + read the "Upgrading from..." section. +- To see what MySQL can do, take a look at the features section. +- For installation instructions, see the Installing and Upgrading + chapter. +- For the new features/bugfix history, see the MySQL Change History + appendix. +- For currently known bugs, see the Errors and Common Problems + appendix. + +You can browse the MySQL Reference Manual online or download it +in any of several formats at the URL given earlier in this file. +Source distributions include a local copy of the manual in the +Docs directory. + +******************************************************************** + +Third-Party Component Notices + +********************************************************************* + +%%The following software may be included in this product: +FindGTest.cmake (part of CMake 2.8.0) + +Use of any of this software is governed by the terms of the license below: + +# Copyright 2009 Kitware, Inc. +# Copyright 2009 Philip Lowman +# Copyright 2009 Daniel Blezek +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#=========================================================================== +== +# (To distributed this file outside of CMake, substitute the full +# License text for the above reference.) +# +# Thanks to Daniel Blezek for the GTEST_ADD_TESTS code + + +Text of Copyright.txt mentioned above: + +CMake - Cross Platform Makefile Generator +Copyright 2000-2009 Kitware, Inc., Insight Software Consortium +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +* Neither the names of Kitware, Inc., the Insight Software Consortium, + nor the names of their contributors may be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*************************************************************************** + +%%The following software may be included in this product: +Cmake + +Use of any of this software is governed by the terms of the license below: + +CMake is distributed under BSD License + + Copyright (c) 2008, Kitware, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + * Neither the name of Kitware, Inc. nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY Kitware, Inc. "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL Kitware Inc. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY +OF SUCH DAMAGE. + +Additional License(s) + +cmake-2.4.8/Utilities/cmtar/compat/gethostname.c: + gethostname.c: minimal substitute for missing gethostname() function + created 2000-Mar-02 jmk + requires SVR4 uname() and -lc + + by Jim Knoble + Copyright ? 2000 Jim Knoble + + Permission to use, copy, modify, distribute, and sell this software + and its documentation for any purpose is hereby granted without fee, + provided that the above copyright notice appear in all copies and + that both that copyright notice and this permission notice appear in + supporting documentation. + + This software is provided "as is", without warranty of any kind, + express or implied, including but not limited to the warranties of + merchantability, fitness for a particular purpose and + noninfringement. In no event shall the author(s) be liable for any + claim, damages or other liability, whether in an action of contract, + tort or otherwise, arising from, out of or in connection with the + software or the use or other dealings in the software. + +---------------------------------- + +* Originally written by Steven M. Bellovin while +* at the University of North Carolina at Chapel Hill. Later tweaked by +* a couple of people on Usenet. Completely overhauled by Rich $alz +* and Jim Berets in August, 1990. +* +* This code is in the public domain and has no copyright. + +------------------------------- + + THIS CODE IS SPECIFICALLY EXEMPTED FROM THE NCURSES PACKAGE COPYRIGHT. + You may freely copy it for use as a template for your own field types. + If you develop a field type that might be of general use, please send + it back to the ncurses maintainers for inclusion in the next version. + +************************************************************************** + + * + Author : Per Foreby, perf@efd.lth.se + * + Author : Juergen Pfeifer, juergen.pfeifer@gmx.net + * + + * +************************************************************************** + +---------------------------------------- + + Copyright (c) 2002 Insight Consortium. All rights reserved. + See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for +details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +-------------------------------------------- + + Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free +Software Foundati +on, 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; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + + As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. + +--------------------------------------------------- + +cmake-2.4.8/Utilities/cmzlib/zlib.h: + zlib.h -- interface of the 'zlib' general purpose compression library + version 1.1.4, March 11th, 2002 + + Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must +not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source +distribution. + + Jean-loup Gailly Mark Adler + +---------------------------------------------- + + This source code was modified by Martin Hedenfalk + for + use in Curl. His latest changes were done 2000-09-18. + + It has since been patched away like a madman by Daniel Stenberg + to make it better applied to curl conditions, and to +make + it not use globals, pollute name space and more. This source code +awaits a + rewrite to work around the paragraph 2 in the BSD licenses as explained + below. + + Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Hgskolan + It has since been patched and modified a lot by Daniel Stenberg + to make it better applied to curl conditions, and to +make + it not use globals, pollute name space and more. This source code +awaits a + rewrite to work around the paragraph 2 in the BSD licenses as explained + below. + + Copyright (c) 1998, 1999 Kungliga Tekniska Hgskolan + (Royal Institute of Technology, Stockholm, Sweden). + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. Neither the name of the Institute nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE +LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + +--------------------------------------------- + + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND + CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. + +-------------------------------------------------- + +cmake-2.4.8/Utilities/cmcurl/inet_pton.c, +cmake-2.4.8/Source/CTest/Curl/inet_pto +n.c: + This is from the BIND 4.9.4 release, modified to compile by itself + + Copyright (c) 1996 by Internet Software Consortium. + + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM +DISCLAIMS + ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES + OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +OF THIS + SOFTWARE. + +------------------------------------------------------- + +* Copyright (C) 2001 by Eric Kidd. All rights reserved. +* Copyright (C) 2001 by Luke Howard. All rights reserved. +* Copyright (C) 2002 Ximian, Inc. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* 1. Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* 2. Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* 3. The name of the author may not be used to endorse or promote products +* derived from this software without specific prior written +permission. +* +* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT +* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY +* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +** SUCH DAMAGE. + +--------------------------------------------------- + + Copyright (c) 1994 + The Regents of the University of California. All rights reserved. + + This code is derived from software contributed to Berkeley by + Chuck Karish of Mindcraft, Inc. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + Copyright (c) 1985, 1986 The Regents of the University of California. + All rights reserved. + + This code is derived from software contributed to Berkeley by + James A. Woods, derived from original work by Spencer Thomas + and Joseph Orost. + +------------------------------------------------ + + Copyright (c) 1989, 1993, 1994 + The Regents of the University of California. All rights reserved. + + This code is derived from software contributed to Berkeley by + Guido van Rossum. + + Copyright (c) 1990 The Regents of the University of California. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software developed by the University of + California, Berkeley and its contributors. + 4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +------------------------------------------------------ + + Project ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + + Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. + + Copyright (C) 2004, Daniel Stenberg, , et al. + + This software is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at http://curl.haxx.se/docs/copyright.html. + + You may opt to use, copy, modify, merge, publish, distribute and/or sell + copies of the Software, and permit persons to whom the Software is + furnished to do so, under the terms of the COPYING file. + + This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + KIND, either express or implied. + +------------------------------------------------------------ + +*************************************************************************** + Copyright (c) 1998 Free Software Foundation, Inc. + * + Copyright (c) 1998,2000 Free Software Foundation, Inc. + * + + * + Permission is hereby granted, free of charge, to any person obtaining +a * + copy of this software and associated documentation files (the + * + "Software"), to deal in the Software without restriction, including + * + without limitation the rights to use, copy, modify, merge, publish, + * + distribute, distribute with modifications, sublicense, and/or sell + * + copies of the Software, and to permit persons to whom the Software is + * + furnished to do so, subject to the following conditions: + * + + * + The above copyright notice and this permission notice shall be +included * + in all copies or substantial portions of the Software. + * + + * + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS * + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. * + IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, * + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * + THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + + * + + * + Except as contained in this notice, the name(s) of the above +copyright * + holders shall not be used in advertising or otherwise to promote the + * + sale, use or other dealings in this Software without prior written + * + authorization. + * + *************************************************************************** + +------------------------------------------------------ + + Copyright (c) 1997 Todd C. Miller + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +*************************************************************************** + +%%The following software may be included in this product: +Fred Fish's Dbug Library + +Use of any of this software is governed by the terms of the license below: + +* + * N O T I C E * + * * + * Copyright Abandoned, 1987, Fred Fish * + * * + * * + * This previously copyrighted work has been placed into the public * + * domain by the author and may be freely used for any purpose, * + * private or commercial. * + * * + * Because of the number of inquiries I was receiving about the use * + * of this product in commercially developed works I have decided to * + * simply make it public domain to further its unrestricted use. I * + * specifically would be most happy to see this material become a * + * part of the standard Unix distributions by AT&T and the Berkeley * + * Computer Science Research Group, and a standard part of the GNU * + * system from the Free Software Foundation. * + * * + * I would appreciate it, as a courtesy, if this notice is left in * + * all copies and derivative works. Thank you. * + * * + * The author makes no warranty of any kind with respect to this * + * product and explicitly disclaims any implied warranties of mer- * + * chantability or fitness for any particular purpose. * + * + +*************************************************************************** + +%%The following software may be included in this product: +dbug_analyze.c (part of Fred Fish's Dbug Library) + +Use of any of this software is governed by the terms of the license below: + +* * +* Copyright Abandoned, 1987, Fred Fish * +* * +* * +* This previously copyrighted work has been placed into the public * +* domain by the author and may be freely used for any purpose, * +* private or commercial. * +* * +* Because of the number of inquiries I was receiving about the use * +* of this product in commercially developed works I have decided to * +* simply make it public domain to further its unrestricted use. I * +* specifically would be most happy to see this material become a * +* part of the standard Unix distributions by AT&T and the Berkeley * +* Computer Science Research Group, and a standard part of the GNU * +* system from the Free Software Foundation. * +* * +* I would appreciate it, as a courtesy, if this notice is left in * +* all copies and derivative works. Thank you. * +* * +* The author makes no warranty of any kind with respect to this * +* product and explicitly disclaims any implied warranties of mer- * +* chantability or fitness for any particular purpose. + +*************************************************************************** + +%%The following software may be included in this product: +GNU Libtool, only ltmain.sh, libtool, auto-gen fil + +Use of any of this software is governed by the terms of the license below: + +ltmain.sh inclusion: +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun configure. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007 Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# 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; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +libtool inclusion: +# libtoolT - Provide generalized library-building support services. +# Generated automatically by (GNU mysql 5.1.30) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +# 2006, 2007 Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# 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; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +Auto-generated files: +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building +# support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, +# 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# 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; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +Additional License(s) + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +*************************************************************************** + +%%The following software may be included in this product: +innochecksum.c + +Use of any of this software is governed by the terms of the license below: + +GNU GENERAL PUBLIC LICENSE + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to most +of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you can +do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a +fee, you must give the recipients all the rights that you have. You must make +sure that they, too, receive or can get the source code. And you must show them +these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer +you this license which gives you legal permission to copy, distribute and/or +modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced by +others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish +to avoid the danger that redistributors of a free program will individually +obtain patent licenses, in effect making the program proprietary. To prevent +this, we have made it clear that any patent must be licensed for everyone's free +use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program or +work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included without +limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is not +restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and appropriately +publish on each copy an appropriate copyright notice and disclaimer of warranty; +keep intact all the notices that refer to this License and to the absence of any +warranty; and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at +your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating that +you changed the files and the date of any change. + b) You must cause any work that you distribute or publish, that in whole or +in part contains or is derived from the Program or any part thereof, to be +licensed as a whole at no charge to all third parties under the terms of this +License. + c) If the modified program normally reads commands interactively when run, +you must cause it, when started running for such interactive use in the most +ordinary way, to print or display an announcement including an appropriate +copyright notice and a notice that there is no warranty (or else, saying that +you provide a warranty) and that users may redistribute the program under these +conditions, and telling the user how to view a copy of this License. (Exception: +if the Program itself is interactive but does not normally print such an +announcement, your work based on the Program is not required to print an +announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the entire whole, +and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on the +Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, under Section +2) in object code or executable form under the terms of Sections 1 and 2 above +provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source +code, which must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange; or, + b) Accompany it with a written offer, valid for at least three years, to +give any third party, for a charge no more than your cost of physically +performing source distribution, a complete machine-readable copy of the +corresponding source code, to be distributed under the terms of Sections 1 and 2 +above on a medium customarily used for software interchange; or, + c) Accompany it with the information you received as to the offer to +distribute corresponding source code. (This alternative is allowed only for +noncommercial distribution and only if you received the program in object code +or executable form with such an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all the +source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code distributed +need not include anything that is normally distributed (in either source or +binary form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component itself +accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source code +from the same place counts as distribution of the source code, even though third +parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or any +work based on the Program), you indicate your acceptance of this License to do +so, and all its terms and conditions for copying, distributing or modifying the +Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by third +parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement +or for any other reason (not limited to patent issues), conditions are imposed +on you (whether by court order, agreement or otherwise) that contradict the +conditions of this License, they do not excuse you from the conditions of this +License. If you cannot distribute so as to satisfy simultaneously your +obligations under this License and any other pertinent obligations, then as a +consequence you may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by all those +who receive copies directly or indirectly through you, then the only way you +could satisfy both it and this License would be to refrain entirely from +distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and the +section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original copyright +holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In such +case, this License incorporates the limitation as if written in the body of this +License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program specifies +a version number of this License which applies to it and "any later version", +you have the option of following the terms and conditions either of that version +or of any later version published by the Free Software Foundation. If the +Program does not specify a version number of this License, you may choose any +version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE +PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED +IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS +IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT +NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, +SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY +TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF +THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER +PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +END OF TERMS AND CONDITIONS +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use +to the public, the best way to achieve this is to make it free software which +everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + +one line to give the program's name and an idea of what it does. +Copyright (C) yyyy name of author + +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; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + +Gnomovision version 69, Copyright (C) year name of author +Gnomovision comes with ABSOLUTELY NO WARRANTY; for details +type `show w'. This is free software, and you are welcome +to redistribute it under certain conditions; type `show c' +for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here is +a sample; alter the names: + +Yoyodyne, Inc., hereby disclaims all copyright +interest in the program `Gnomovision' +(which makes passes at compilers) written +by James Hacker. + +signature of Ty Coon, 1 April 1989 +Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may consider +it more useful to permit linking proprietary applications with the library. If +this is what you want to do, use the GNU Lesser General Public License instead +of this License. + +Additional Documentation License(s) + +innochecksum.c is documented in the MySQL Reference +Manual at http://dev.mysql.com/doc/refman/5.1/en/innochecksum.html +The Reference Manual is not licensed under the GPL; rather, it +is offered under normal copyright, but with permission to +copy/redistribute electronically. + +*************************************************************************** + +%%The following software may be included in this product: +lib_sql.cc + +Use of any of this software is governed by the terms of the license below: + +/* + * Copyright (c) 2000 + * SWsoft company + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + + This code was modified by the MySQL team +*/ + +*************************************************************************** + +%%The following software may be included in this product: +libevent + +Use of any of this software is governed by the terms of the license below: + +/* + * Copyright (c) 2000-2004 Niels Provos + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +Additional License(s) + +http://creativecommons.org/licenses/publicdomain + +*************************************************************************** + +%%The following software may be included in this product: +Async DNS Library + +Use of any of this software is governed by the terms of the license below: + +/* Async DNS Library + * Adam Langley + * http://www.imperialviolet.org/eventdns.html + * Public Domain code + * + * This software is Public Domain. To view a copy of the public domain dedication, + * visit http://creativecommons.org/licenses/publicdomain/ or send a letter to + * Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. + * + * I ask and expect, but do not require, that all derivative works contain an + * attribution similar to: + * Parts developed by Adam Langley + * + * You may wish to replace the word "Parts" with something else depending on + * the amount of original code. + * + * (Derivative works does not include programs which link against, run or include + * the source verbatim in their source distributions) + * + * Version: 0.1b + */ + +*************************************************************************** + +%%The following software may be included in this product: +log.c + +Use of any of this software is governed by the terms of the license below: + +/* $OpenBSD: err.c,v 1.2 2002/06/25 15:50:15 mickey Exp $ */ + +/* + * log.c + * + * Based on err.c, which was adapted from OpenBSD libc *err* *warn* code. + * + * Copyright (c) 2005 Nick Mathewson + * + * Copyright (c) 2000 Dug Song + * + * Copyright (c) 1993 + * The Regents of the University of California. All rights +reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +*************************************************************************** + +%%The following software may be included in this product: +min_heap.h + +Use of any of this software is governed by the terms of the license below: + +/* + * Copyright (c) 2006 Maxim Yegorushkin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +*************************************************************************** + +%%The following software may be included in this product: +win32.c + +Use of any of this software is governed by the terms of the license below: + +/* + * Copyright 2000-2002 Niels Provos + * Copyright 2003 Michael A. Davis + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +*************************************************************************** + +%%The following software may be included in this product: +regex++ + +Use of any of this software is governed by the terms of the license below: + +Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved. +This software is not subject to any license of the American Telephone +and Telegraph Company or of the Regents of the University of California. + +Permission is granted to anyone to use this software for any purpose on +any computer system, and to alter it and redistribute it, subject +to the following restrictions: + +1. The author is not responsible for the consequences of use of this + software, no matter how awful, even if they arise from flaws in it. + +2. The origin of this software must not be misrepresented, either by + explicit claim or by omission. Since few users ever read sources, + credits must appear in the documentation. + +3. Altered versions must be plainly marked as such, and must not be + misrepresented as being the original software. Since few users + ever read sources, credits must appear in the documentation. + +4. This notice may not be removed or altered. + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +/*- + * Copyright (c) 1994 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)COPYRIGHT 8.1 (Berkeley) 3/16/94 + */ + +*************************************************************************** + +%%The following software may be included in this product: +Richard A. O'Keefe strings package + +Use of any of this software is governed by the terms of the license below: + +These files are in the public domain. This includes getopt.c, which +is the work of Henry Spencer, University of Toronto Zoology, who says of +it "None of this software is derived from Bell software. I had no access +to the source for Bell's versions at the time I wrote it. This software +is hereby explicitly placed in the public domain. It may be used for +any purpose on any machine by anyone." I would greatly prefer it if *my* +material received no military use. + +*************************************************************************** + +%%The following software may be included in this product: +t_ctype.h + +Use of any of this software is governed by the terms of the license below: + +http://bioinfo.mbb.yale.edu/genome/yeast/cluster/database/mysql/include/t_ctype.h + +/* + Copyright (C) 1998, 1999 by Pruet Boonma, all rights reserved. + Copyright (C) 1998 by Theppitak Karoonboonyanan, all rights reserved. + Permission to use, copy, modify, distribute and sell this software + and its documentation for any purpose is hereby granted without fee, + provided that the above copyright notice appear in all copies. + Smaphan Raruenrom and Pruet Boonma makes no representations about + the suitability of this software for any purpose. It is provided + "as is" without express or implied warranty. +*/ + +*************************************************************************** + +%%The following software may be included in this product: +SHA-1 in C + +Use of any of this software is governed by the terms of the license below: + + SHA-1 in C + By Steve Reid + 100% Public Domain + +Additional License(s) + +100% Public Domain + +*************************************************************************** + +%%The following software may be included in this product: +TCMalloc (part of google-perftools) + +Use of any of this software is governed by the terms of the license below: + +# Copyright (c) 1998-2006, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional License(s) + +*** File src/tests/ptmalloc/thread-m.h contains this GPLv2 (or later) +text: + +/* Basic platform-independent macro definitions for mutexes and + thread-specific data. + Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Wolfram Gloger , 1996. + + The GNU C 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; either version 2 of the + License, or (at your option) any later version. + + The GNU C 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 the GNU C Library; see the file COPYING.LIB. If +not, + write to the Free Software Foundation, Inc., 59 Temple Place - +Suite 330, + Boston, MA 02111-1307, USA. */ + + + +*** File src/tests/ptmalloc/malloc-machine.h contains this BSD like text: + +/* Basic platform-independent macro definitions for mutexes, + thread-specific data and parameters for malloc. + Posix threads (pthreads) version. + Copyright (C) 2004 Wolfram Gloger . + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that (i) the above copyright notices and this permission +notice appear in all copies of the software and related documentation, +and (ii) the name of Wolfram Gloger may not be used in any advertising +or publicity relating to the software. + +THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + +IN NO EVENT SHALL WOLFRAM GLOGER BE LIABLE FOR ANY SPECIAL, +INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY +DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY +OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +*/ + +*************************************************************************** + +%%The following software may be included in this product: +The tz database + +Use of any of this software is governed by the terms of the license below: + +Sources for Time Zone and Daylight Saving Time Data +@(#)tz-link.htm 7.54 + +Please send corrections to this web page to the time zone mailing list. +The tz database + +The public-domain time zone database contains code and data that represent the +history of local time for many representative locations around the globe. It is +updated periodically to reflect changes made by political bodies to time zone +boundaries, UTC offsets, and daylight-saving rules. This database (often called +tz or zoneinfo) is used by several implementations, including the GNU C Library +used in GNU/Linux, FreeBSD, NetBSD, OpenBSD, Cygwin, DJGPP, HP-UX, IRIX, Mac OS +X, OpenVMS, Solaris, Tru64, and UnixWare. + +Each location in the database represents a national region where all clocks +keeping local time have agreed since 1970. Locations are identified by continent +or ocean and then by the name of the location, which is typically the largest +city within the region. For example, America/New_York represents most of the US +eastern time zone; America/Phoenix represents most of Arizona, which uses +mountain time without daylight saving time (DST); America/Detroit represents +most of Michigan, which uses eastern time but with different DST rules in 1975; +and other entries represent smaller regions like Starke County, Indiana, which +switched from central to eastern time in 1991 and switched back in 2006. To use +the database on an extended POSIX implementation set the TZ environment variable +to the location's full name, e.g., TZ="America/New_York". + +In the tz database's FTP distribution the code is in the file tzcodeC.tar.gz, +where C is the code's version; similarly, the data are in tzdataD.tar.gz, where +D is the data's version. The following shell commands download these files to a +GNU/Linux or similar host; see the downloaded README file for what to do next. + +wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz' +gzip -dc tzcode*.tar.gz | tar -xf - +gzip -dc tzdata*.tar.gz | tar -xf - + +The code lets you compile the tz source files into machine-readable binary +files, one for each location. It also lets you read a tz binary file and +interpret time stamps for that location. + +The data are by no means authoritative. If you find errors, please send changes +to the time zone mailing list. You can also subscribe to the mailing list, +retrieve the archive of old messages (in gzip compressed format), or retrieve +archived older versions of code and data; there is also a smaller HTTP mirror. + +*************************************************************************** + +%%The following software may be included in this product: +UnicodeData.txt + +Use of any of this software is governed by the terms of the license below: + +Unicode Terms of Use + + For the general privacy policy governing access to this site, see the +Unicode Privacy Policy. For trademark usage, see the Unicode Consortium� +Trademarks and Logo Policy. + Notice to End User: Terms of Use + Carefully read the following legal agreement ("Agreement"). Use or copying +of the software and/or codes provided with this agreement (The "Software") +constitutes your acceptance of these terms + + 1. Unicode Copyright. + 1. Copyright � 1991-2008 Unicode, Inc. All rights reserved. + 2. Certain documents and files on this website contain a legend +indicating that "Modification is permitted." Any person is hereby authorized, +without fee, to modify such documents and files to create derivative works +conforming to the Unicode� Standard, subject to Terms and Conditions herein. + 3. Any person is hereby authorized, without fee, to view, use, +reproduce, and distribute all documents and files solely for informational +purposes in the creation of products supporting the Unicode Standard, subject to +the Terms and Conditions herein. + 4. Further specifications of rights and restrictions pertaining to +the use of the particular set of data files known as the "Unicode Character +Database" can be found in Exhibit 1. + 5. Each version of the Unicode Standard has further specifications +of rights and restrictions of use. For the book editions, these are found on the +back of the title page. For the online edition, certain files (such as the PDF +files for book chapters and code charts) carry specific restrictions. All other +files are covered under these general Terms of Use. To request a permission to +reproduce any part of the Unicode Standard, please contact the Unicode Consortium. + 6. No license is granted to "mirror" the Unicode website where a +fee is charged for access to the "mirror" site. + 7. Modification is not permitted with respect to this document. All +copies of this document must be verbatim. + 2. Restricted Rights Legend. Any technical data or software which is +licensed to the United States of America, its agencies and/or instrumentalities +under this Agreement is commercial technical data or commercial computer +software developed exclusively at private expense as defined in FAR 2.101, or +DFARS 252.227-7014 (June 1995), as applicable. For technical data, use, +duplication, or disclosure by the Government is subject to restrictions as set +forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995) and +this Agreement. For Software, in accordance with FAR 12-212 or DFARS 227-7202, +as applicable, use, duplication or disclosure by the Government is subject to +the restrictions set forth in this Agreement. + 3. Warranties and Disclaimers. + 1. This publication and/or website may include technical or +typographical errors or other inaccuracies . Changes are periodically added to +the information herein; these changes will be incorporated in new editions of +the publication and/or website. Unicode may make improvements and/or changes in +the product(s) and/or program(s) described in this publication and/or website at +any time. + 2. If this file has been purchased on magnetic or optical media +from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange +of the defective media within ninety (90) days of original purchase. + 3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR +SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, +IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE +AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN THIS +PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR LINKED +TO THIS PUBLICATION OR THE UNICODE WEBSITE. + 4. Waiver of Damages. In no event shall Unicode or its licensors be +liable for any special, incidental, indirect or consequential damages of any +kind, or any damages whatsoever, whether or not Unicode was advised of the +possibility of the damage, including, without limitation, those resulting from +the following: loss of use, data or profits, in connection with the use, +modification or distribution of this information or its derivatives. + 5. Trademarks. + 1. Unicode and the Unicode logo are registered trademarks of +Unicode, Inc. + 2. This site contains product names and corporate names of other +companies. All product names and company names and logos mentioned herein are +the trademarks or registered trademarks of their respective owners. Other +products and corporate names mentioned herein which are trademarks of a third +party are used only for explanation and for the owners' benefit and with no +intent to infringe. + 3. Use of third party products or information referred to herein is +at the user�s risk. + 6. Miscellaneous. + 1. Jurisdiction and Venue. This server is operated from a location +in the State of California, United States of America. Unicode makes no +representation that the materials are appropriate for use in other locations. If +you access this server from other locations, you are responsible for compliance +with local laws. This Agreement, all use of this site and any claims and damages +resulting from use of this site are governed solely by the laws of the State of +California without regard to any principles which would apply the laws of a +different jurisdiction. The user agrees that any disputes regarding this site +shall be resolved solely in the courts located in Santa Clara County, +California. The user agrees said courts have personal jurisdiction and agree to +waive any right to transfer the dispute to any other forum. + 2. Modification by Unicode Unicode shall have the right to modify +this Agreement at any time by posting it to this site. The user may not assign +any part of this Agreement without Unicode�s prior written consent. + 3. Taxes. The user agrees to pay any taxes arising from access to +this website or use of the information herein, except for those based on +Unicode�s net income. + 4. Severability. If any provision of this Agreement is declared +invalid or unenforceable, the remaining provisions of this Agreement shall +remain in effect. + 5. Entire Agreement. This Agreement constitutes the entire +agreement between the parties. + +EXHIBIT 1 +UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE + + Unicode Data Files include all data files under the directories +http://www.unicode.org/Public/, http://www.unicode.org/reports/, and +http://www.unicode.org/cldr/data/ . Unicode Software includes any source code +published in the Unicode Standard or under the directories +http://www.unicode.org/Public/, http://www.unicode.org/reports/, and +http://www.unicode.org/cldr/data/. + + NOTICE TO USER: Carefully read the following legal agreement. BY +DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES +("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND +AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU +DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES +OR SOFTWARE. + + COPYRIGHT AND PERMISSION NOTICE + + Copyright � 1991-2008 Unicode, Inc. All rights reserved. Distributed under +the Terms of Use in http://www.unicode.org/copyright.html. + + Permission is hereby granted, free of charge, to any person obtaining a copy +of the Unicode data files and any associated documentation (the "Data Files") or +Unicode software and any associated documentation (the "Software") to deal in +the Data Files or Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, and/or sell copies of +the Data Files or Software, and to permit persons to whom the Data Files or +Software are furnished to do so, provided that (a) the above copyright notice(s) +and this permission notice appear with all copies of the Data Files or Software, +(b) both the above copyright notice(s) and this permission notice appear in +associated documentation, and (c) there is clear notice in each modified Data +File or in the Software as well as in the documentation associated with the Data +File(s) or Software that the data or software has been modified. + + THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD +PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS +NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL +DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. + + Except as contained in this notice, the name of a copyright holder shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in these Data Files or Software without prior written authorization of the +copyright holder. + + Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be +registered in some jurisdictions. All other trademarks and registered trademarks +mentioned herein are the property of their respective owners. + +*************************************************************************** + +%%The following software may be included in this product: +zlib + +Use of any of this software is governed by the terms of the license below: + +/* zlib.h -- interface of the 'zlib' general purpose compression library + version 1.2.3, July 18th, 2005 + + Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly jloup@gzip.org + Mark Adler madler@alumni.caltech.edu + +*/ + +*************************************************************************** + +%%The following software may be included in this product: +dtoa.c + +Use of any of this software is governed by the terms of the license below: + +/**************************************************************** + + This file incorporates work covered by the following copyright and + permission notice: + + The author of this software is David M. Gay. + + Copyright (c) 1991, 2000, 2001 by Lucent Technologies. + + Permission to use, copy, modify, and distribute this software for any + purpose without fee is hereby granted, provided that this entire + notice is included in all copies of any software which is or includes a copy + or modification of this software and in all copies of the supporting + documentation for such software. + + THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED + WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY + REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY + OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. + + ***************************************************************/ + +*************************************************************************** + +%%The following software may be included in this product: +getarg.{c,h} + +Use of any of this software is governed by the terms of the license below: + +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/* + * Copyright (c) 1997, 1999 Kungliga Tekniska H366gskolan + * (Royal Institute of Technology, Stockholm, Sweden). + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +*************************************************************************** + +%%The following software may be included in this product: +MD5 message-digest algorithm (md5_hash.cpp) + +Use of any of this software is governed by the terms of the license below: + +/* + * This code implements the MD5 message-digest algorithm. + * The algorithm is due to Ron Rivest. This code was + * written by Colin Plumb in 1993, no copyright is claimed. + * This code is in the public domain; do with it what you wish. + * + * Equivalent code is available from RSA Data Security, Inc. + * This code has been tested against that, and is equivalent, + * except that you don't need to include two pages of legalese + * with every copy. + * + * The code has been modified by Mikael Ronstroem to handle + * calculating a hash value of a key that is always a multiple + * of 4 bytes long. Word 0 of the calculated 4-word hash value + * is returned as the hash value. + */ + +*************************************************************************** + +%%The following software may be included in this product: +nt_servc.{cc,h} + +Use of any of this software is governed by the terms of the license below: + +/** + @file + + @brief + Windows NT Service class library. + + Copyright Abandoned 1998 Irena Pancirov - Irnet Snc + This file is public domain and comes with NO WARRANTY of any kind +*/ + +*************************************************************************** + +%%The following software may be included in this product: +GNU Readline + +Use of any of this software is governed by the terms of the license below: + +GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. + +*************************************************************************** + +%%The following software may be included in this product: +pstack (part of GNU Binutils) + +Use of any of this software is governed by the terms of the license below: + +pstack is comprised of various .c and .h files; all begin like this: + +/* bucomm.h -- binutils common include file. + Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. + +This file is part of GNU Binutils. + +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; either version 2 of the License, or +(at your option) any later version. + +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. */ + +*************************************************************************** + +%%The following software may be included in this product: +libiberty.h (part of pstack GNU Binutils) + +Use of any of this software is governed by the terms of the license below: + +See +http://www.koders.com/c/fid99F596804BBE22C076522B848D5575F142079064.aspx + +/* Function declarations for libiberty. + Written by Cygnus Support, 1994. + + The libiberty library provides a number of functions which are + missing on some operating systems. We do not declare those here, + to avoid conflicts with the system header files on operating + systems that do support those functions. In this file we only + declare those functions which are specific to libiberty. */ + +*************************************************************************** + +%%The following software may be included in this product: +ieee.h (part of pstack GNU Binutils) + +Use of any of this software is governed by the terms of the license below: + +See +http://src.opensolaris.org/source/xref//sfw/usr/src/cmd/gdb/gdb-6.3/include/ieee.h + + +/* IEEE Standard 695-1980 "Universal Format for Object Modules" +header file + Contributed by Cygnus Support. */ + +*************************************************************************** + +%%The following software may be included in this product: +pstack.c (part of pstack GNU Binutils) + +Use of any of this software is governed by the terms of the license below: + +/* + pstack.c -- asynchronous stack trace of a running process + Copyright (c) 1999 Ross Thompson + Author: Ross Thompson + Critical bug fix: Tim Waugh +*/ + +/* + This file 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; either version 2 of the License, or + (at your option) any later version. + + 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. +*/ + +********************************************************************** \ No newline at end of file diff --git a/VERSION b/VERSION new file mode 100644 index 00000000000..be3984ec359 --- /dev/null +++ b/VERSION @@ -0,0 +1,4 @@ +MYSQL_VERSION_MAJOR=5 +MYSQL_VERSION_MINOR=5 +MYSQL_VERSION_PATCH=8 +MYSQL_VERSION_EXTRA= diff --git a/client/Makefile.am b/client/Makefile.am deleted file mode 100644 index 393573a061e..00000000000 --- a/client/Makefile.am +++ /dev/null @@ -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; diff --git a/client/mysql.cc b/client/mysql.cc index 51c8b34b0a8..241cca49a5d 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -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 */ diff --git a/client/mysqltest.cc b/client/mysqltest.cc index d3d20f109a2..fc111bf7645 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -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 */ { diff --git a/cmake/Makefile.am b/cmake/Makefile.am deleted file mode 100644 index af3ec4f980d..00000000000 --- a/cmake/Makefile.am +++ /dev/null @@ -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 - - diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake index 48d3765ea67..56a6d897318 100644 --- a/cmake/build_configurations/mysql_release.cmake +++ b/cmake/build_configurations/mysql_release.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() diff --git a/cmake/do_abi_check.cmake b/cmake/do_abi_check.cmake index 78006bd018c..96943e1a4c4 100644 --- a/cmake/do_abi_check.cmake +++ b/cmake/do_abi_check.cmake @@ -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}") diff --git a/cmake/dtrace.cmake b/cmake/dtrace.cmake index c12a74cba31..5beb45ca524 100644 --- a/cmake/dtrace.cmake +++ b/cmake/dtrace.cmake @@ -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} diff --git a/cmake/make_dist.cmake.in b/cmake/make_dist.cmake.in index 13950e08553..95412370c28 100644 --- a/cmake/make_dist.cmake.in +++ b/cmake/make_dist.cmake.in @@ -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 diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake index 9f0f7729c22..3ed93020e8a 100644 --- a/cmake/mysql_version.cmake +++ b/cmake/mysql_version.cmake @@ -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") diff --git a/cmake/os/Windows.cmake b/cmake/os/Windows.cmake index aac7e484f26..0dbfde5294c 100644 --- a/cmake/os/Windows.cmake +++ b/cmake/os/Windows.cmake @@ -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. diff --git a/cmake/os/WindowsCache.cmake b/cmake/os/WindowsCache.cmake index 4936ae369bc..ff068bfeaf6 100644 --- a/cmake/os/WindowsCache.cmake +++ b/cmake/os/WindowsCache.cmake @@ -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 "") diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake index bf34407db25..c6dd3fc451f 100644 --- a/cmake/plugin.cmake +++ b/cmake/plugin.cmake @@ -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" diff --git a/cmake/versioninfo.rc.in b/cmake/versioninfo.rc.in index 97c45ec86c0..c625ce8c7f4 100644 --- a/cmake/versioninfo.rc.in +++ b/cmake/versioninfo.rc.in @@ -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" diff --git a/cmd-line-utils/Makefile.am b/cmd-line-utils/Makefile.am deleted file mode 100644 index 622aa72fd43..00000000000 --- a/cmd-line-utils/Makefile.am +++ /dev/null @@ -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 diff --git a/cmd-line-utils/libedit/CMakeLists.txt b/cmd-line-utils/libedit/CMakeLists.txt index b0e375dfcbd..76fcfc3204e 100644 --- a/cmd-line-utils/libedit/CMakeLists.txt +++ b/cmd-line-utils/libedit/CMakeLists.txt @@ -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) diff --git a/cmd-line-utils/libedit/Makefile.am b/cmd-line-utils/libedit/Makefile.am deleted file mode 100644 index 88ea97afffd..00000000000 --- a/cmd-line-utils/libedit/Makefile.am +++ /dev/null @@ -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 diff --git a/cmd-line-utils/readline/Makefile.am b/cmd-line-utils/readline/Makefile.am deleted file mode 100644 index 48d3af34412..00000000000 --- a/cmd-line-utils/readline/Makefile.am +++ /dev/null @@ -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 diff --git a/config/ac-macros/alloca.m4 b/config/ac-macros/alloca.m4 deleted file mode 100644 index 8c730dd671f..00000000000 --- a/config/ac-macros/alloca.m4 +++ /dev/null @@ -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 -]) diff --git a/config/ac-macros/character_sets.m4 b/config/ac-macros/character_sets.m4 deleted file mode 100644 index c49e4f89316..00000000000 --- a/config/ac-macros/character_sets.m4 +++ /dev/null @@ -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 diff --git a/config/ac-macros/check_cpu.m4 b/config/ac-macros/check_cpu.m4 deleted file mode 100644 index d551f47769e..00000000000 --- a/config/ac-macros/check_cpu.m4 +++ /dev/null @@ -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 -])]) - diff --git a/config/ac-macros/compiler_flag.m4 b/config/ac-macros/compiler_flag.m4 deleted file mode 100644 index ce2ce6cbdfa..00000000000 --- a/config/ac-macros/compiler_flag.m4 +++ /dev/null @@ -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 -]) diff --git a/config/ac-macros/dtrace.m4 b/config/ac-macros/dtrace.m4 deleted file mode 100644 index a42d78d97fe..00000000000 --- a/config/ac-macros/dtrace.m4 +++ /dev/null @@ -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 --------------------------------------------------------------------------- diff --git a/config/ac-macros/large_file.m4 b/config/ac-macros/large_file.m4 deleted file mode 100644 index 279ce6d60f1..00000000000 --- a/config/ac-macros/large_file.m4 +++ /dev/null @@ -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 - ]) - diff --git a/config/ac-macros/maintainer.m4 b/config/ac-macros/maintainer.m4 deleted file mode 100644 index b4d2f08e558..00000000000 --- a/config/ac-macros/maintainer.m4 +++ /dev/null @@ -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]) -]) diff --git a/config/ac-macros/misc.m4 b/config/ac-macros/misc.m4 deleted file mode 100644 index 89de1e5f8fa..00000000000 --- a/config/ac-macros/misc.m4 +++ /dev/null @@ -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)] - ) -]) - diff --git a/config/ac-macros/plugins.m4 b/config/ac-macros/plugins.m4 deleted file mode 100644 index 2aed1267fe6..00000000000 --- a/config/ac-macros/plugins.m4 +++ /dev/null @@ -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 =========================================================================== diff --git a/config/ac-macros/readline.m4 b/config/ac-macros/readline.m4 deleted file mode 100644 index e1ed8420bfb..00000000000 --- a/config/ac-macros/readline.m4 +++ /dev/null @@ -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 - -]) diff --git a/config/ac-macros/ssl.m4 b/config/ac-macros/ssl.m4 deleted file mode 100644 index fc55f93d8d6..00000000000 --- a/config/ac-macros/ssl.m4 +++ /dev/null @@ -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" ]) -]) diff --git a/config/ac-macros/zlib.m4 b/config/ac-macros/zlib.m4 deleted file mode 100644 index f62bb056249..00000000000 --- a/config/ac-macros/zlib.m4 +++ /dev/null @@ -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 ------------------------------------------------------------------------ diff --git a/configure.in b/configure.in deleted file mode 100644 index 2d67f34b4bb..00000000000 --- a/configure.in +++ /dev/null @@ -1,3013 +0,0 @@ -dnl -*- ksh -*- -dnl Process this file with autoconf to produce a configure script. - -# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -# Minimum Autoconf version required. -AC_PREREQ(2.59) - -dnl Various people throughout the community may parse configure.in to -dnl get the MySQL version from the source branch. If the formatting -dnl of this line is going to be changed, please announce the change to -dnl internals@lists.mysql.com in advance of pushing the change. -dnl -dnl When changing the major version number please also check the switch -dnl statement in mysqlbinlog::check_master_version(). You may also need -dnl to update version.c in ndb. -AC_INIT([MySQL Server], [5.5.8], [], [mysql]) - -AC_CONFIG_SRCDIR([sql/mysqld.cc]) -AC_CANONICAL_SYSTEM -# USTAR format gives us the possibility to store longer path names in -# TAR files, the path name is split into two parts, a 155 chacater -# first part and a 100 character second part. -AM_INIT_AUTOMAKE([1.9 tar-ustar]) -AC_PROG_LIBTOOL - -AM_CONFIG_HEADER([include/config.h]) - -# Request support for automake silent-rules if available. -# Default to verbose output. One can use the configure-time -# option --enable-silent-rules or make V=0 to activate -# silent rules. -m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])]) - -PROTOCOL_VERSION=10 -DOT_FRM_VERSION=6 -# See the libtool docs for information on how to do shared lib versions. -SHARED_LIB_MAJOR_VERSION=16 -SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0 -NDB_SHARED_LIB_MAJOR_VERSION=3 -NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0 - -# Set all version vars based on $VERSION. How do we do this more elegant ? -# Remember that regexps needs to quote [ and ] since this is run through m4 -# We take some made up examples -# -# VERSION 5.1.40sp1-alpha 5.0.34a 5.5.1-m2 -# MYSQL_U_SCORE_VERSION 5.1.40sp1_alpha 5.0.34a 5.5.1_m2 -# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a 5.5.1 -# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34 5.5.1 -# MYSQL_BASE_VERSION 5.1 5.0 5.5 -# MYSQL_VERSION_ID 50140 50034 50501 -# -MYSQL_U_SCORE_VERSION=`echo $VERSION | sed -e "s|-|_|"` -MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"` -MYSQL_NUMERIC_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"` -MYSQL_BASE_VERSION=`echo $MYSQL_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"` -MYSQL_VERSION_ID=`echo $MYSQL_NUMERIC_VERSION | \ - awk -F. '{printf "%d%0.2d%0.2d", $1, $2, $3}'` -MYSQL_COPYRIGHT_YEAR=`date '+%Y'` - -# Add previous major version for debian package upgrade path -MYSQL_PREVIOUS_BASE_VERSION=5.0 - -# The port should be constant for a LONG time -MYSQL_TCP_PORT_DEFAULT=3306 -MYSQL_UNIX_ADDR_DEFAULT="/tmp/mysql.sock" - -dnl Include m4 -sinclude(config/ac-macros/maintainer.m4) -sinclude(config/ac-macros/alloca.m4) -sinclude(config/ac-macros/check_cpu.m4) -sinclude(config/ac-macros/character_sets.m4) -sinclude(config/ac-macros/compiler_flag.m4) -sinclude(config/ac-macros/plugins.m4) -sinclude(config/ac-macros/dtrace.m4) -sinclude(config/ac-macros/large_file.m4) -sinclude(config/ac-macros/misc.m4) -sinclude(config/ac-macros/readline.m4) -sinclude(config/ac-macros/ssl.m4) -sinclude(config/ac-macros/zlib.m4) - -# Remember to add a directory sql/share/LANGUAGE -AVAILABLE_LANGUAGES="\ -czech danish dutch english estonian french german greek hungarian \ -italian japanese korean norwegian norwegian-ny polish portuguese \ -romanian russian serbian slovak spanish swedish ukrainian" - -##### -##### - -AC_SUBST(MYSQL_U_SCORE_VERSION) -AC_SUBST(MYSQL_NO_DASH_VERSION) -AC_SUBST(MYSQL_BASE_VERSION) -AC_SUBST(MYSQL_VERSION_ID) -AC_SUBST(MYSQL_PREVIOUS_BASE_VERSION) -AC_SUBST(MYSQL_COPYRIGHT_YEAR) -AC_SUBST(PROTOCOL_VERSION) -AC_DEFINE_UNQUOTED([PROTOCOL_VERSION], [$PROTOCOL_VERSION], - [mysql client protocol version]) -AC_SUBST(DOT_FRM_VERSION) -AC_DEFINE_UNQUOTED([DOT_FRM_VERSION], [$DOT_FRM_VERSION], - [Version of .frm files]) -AC_SUBST(SHARED_LIB_MAJOR_VERSION) -AC_SUBST(SHARED_LIB_VERSION) -AC_SUBST(AVAILABLE_LANGUAGES) - -# Check whether a debug mode should be enabled. -AC_ARG_WITH([debug], - AS_HELP_STRING([--with-debug@<:@=full@:>@], - [Enable various amounts of debugging support (full adds a slow memory checker).]), - [with_debug=$withval], - [with_debug=no]) - -# Whether the maintainer mode should be enabled. -MY_MAINTAINER_MODE - -# Canonicalize the configuration name. - -# Check whether --with-system-type or --without-system-type was given. -AC_ARG_WITH(system-type, - [ --with-system-type Set the system type, like "sun-solaris10"], - [SYSTEM_TYPE="$withval"], - [SYSTEM_TYPE="$host_vendor-$host_os"]) -AC_ARG_WITH(machine-type, - [ --with-machine-type Set the machine type, like "powerpc"], - [MACHINE_TYPE="$withval"], - [MACHINE_TYPE="$host_cpu"]) -AC_SUBST(SYSTEM_TYPE) -AC_DEFINE_UNQUOTED([SYSTEM_TYPE], ["$SYSTEM_TYPE"], - [Name of system, eg sun-solaris]) -AC_SUBST(MACHINE_TYPE) -AC_DEFINE_UNQUOTED([MACHINE_TYPE], ["$MACHINE_TYPE"], - [Machine type name, eg sparc]) - -# Detect intel x86 like processor -BASE_MACHINE_TYPE=$MACHINE_TYPE -case $MACHINE_TYPE in - i?86) BASE_MACHINE_TYPE=i386 ;; -esac - -# Save some variables and the command line options for mysqlbug -SAVE_CC="$CC" -SAVE_CXX="$CXX" -SAVE_ASFLAGS="$ASFLAGS" -SAVE_CFLAGS="$CFLAGS" -SAVE_CXXFLAGS="$CXXFLAGS" -SAVE_LDFLAGS="$LDFLAGS" -SAVE_CXXLDFLAGS="$CXXLDFLAGS" -CONF_COMMAND="$0 $ac_configure_args" -AC_SUBST(CONF_COMMAND) -AC_SUBST(SAVE_CC) -AC_SUBST(SAVE_CXX) -AC_SUBST(SAVE_ASFLAGS) -AC_SUBST(SAVE_CFLAGS) -AC_SUBST(SAVE_CXXFLAGS) -AC_SUBST(SAVE_LDFLAGS) -AC_SUBST(SAVE_CXXLDFLAGS) -AC_SUBST(CXXLDFLAGS) - -#AC_ARG_PROGRAM # Automaticly invoked by AM_INIT_AUTOMAKE - -AM_SANITY_CHECK -# This is needed is SUBDIRS is set -AC_PROG_MAKE_SET - -############################################################################## -# The below section needs to be done before AC_PROG_CC -############################################################################## - -# Hack for OS X/Darwin and Metrowerks CodeWarrior -AC_ARG_WITH(darwin-mwcc, -[ --with-darwin-mwcc Use Metrowerks CodeWarrior wrappers on OS X/Darwin],[ - if [ "with_darwin_mwcc" = yes ] ; then - builddir=`pwd` - ccwrapper="$builddir/support-files/MacOSX/mwcc-wrapper" - arwrapper="$builddir/support-files/MacOSX/mwar-wrapper" - CC="$ccwrapper" - CXX="$ccwrapper" - LD="$ccwrapper" - AR="$arwrapper" - RANLIB=: - export CC CXX LD AR RANLIB - AC_SUBST(AR) - AC_SUBST(RANLIB) - fi -]) - -AM_CONDITIONAL(DARWIN_MWCC, test x$with_darwin_mwcc = xyes) - -if test "x${CFLAGS-}" = x ; then - cflags_is_set=no -else - cflags_is_set=yes -fi - -if test "x${CPPFLAGS-}" = x ; then - cppflags_is_set=no -else - cppflags_is_set=yes -fi - -if test "x${LDFLAGS-}" = x ; then - ldflags_is_set=no -else - ldflags_is_set=yes -fi - -################ End of section to be done before AC_PROG_CC ################# - -# The following hack should ensure that configure doesn't add optimizing -# or debugging flags to CFLAGS or CXXFLAGS -# C_EXTRA_FLAGS are flags that are automaticly added to both -# CFLAGS and CXXFLAGS -CFLAGS="$CFLAGS $C_EXTRA_FLAGS " -CXXFLAGS="$CXXFLAGS $C_EXTRA_FLAGS " - -dnl Checks for programs. -AC_PROG_AWK -AC_PROG_CC -AC_PROG_CXX -AC_PROG_CPP - -# Print version of CC and CXX compiler (if they support --version) -CC_VERSION=`$CC --version | sed 1q` -if test $? -eq "0" -then - AC_MSG_CHECKING("C Compiler version") - AC_MSG_RESULT("$CC $CC_VERSION") -else -CC_VERSION="" -fi -AC_SUBST(CC_VERSION) -MYSQL_CHECK_CXX_VERSION - -# Fix for sgi gcc / sgiCC which tries to emulate gcc -if test "$CC" = "sgicc" -then - ac_cv_prog_gcc="no" -fi -if test "$CXX" = "sgi++" -then - GXX="no" -fi - -if test "$ac_cv_prog_gcc" = "yes" -then - AS="$CC -c" - AC_SUBST(AS) -else - AC_PATH_PROG(AS, as, as) -fi - -# Still need ranlib for readline; local static use only so no libtool. -AC_PROG_RANLIB -# We use libtool -#AC_LIBTOOL_WIN32_DLL -AC_PROG_LIBTOOL - -# Ensure that we have --preserve-dup-deps defines, otherwise we get link -# problems of 'mysql' with CXX=g++ -LIBTOOL="$LIBTOOL --preserve-dup-deps" -AC_SUBST(LIBTOOL)dnl - -AC_SUBST(NM)dnl - -# NM= "$NM -X64" -#archive_expsym_cmds= `echo "$archive_expsym_cmds" | sed -e '/"$(CC)"//'` -#archive_expsym_cmds= "$CC -q64 $archive_expsym_cmds" -# CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-ansi//; s/-pedantic//; s/-Wcheck//'` - -#AC_LIBTOOL_DLOPEN AC_LIBTOOL_WIN32_DLL AC_DISABLE_FAST_INSTALL AC_DISABLE_SHARED AC_DISABLE_STATIC - -# AC_PROG_INSTALL -AC_PROG_INSTALL -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' - -# Not critical since the generated file is distributed -AC_CHECK_PROGS(YACC, ['bison -y -p MYSQL']) -AC_CHECK_PROG(PDFMANUAL, pdftex, manual.pdf) -AC_CHECK_PROG(DVIS, tex, manual.dvi) - -AC_PATH_PROG(uname_prog, uname, no) - -# We should go through this and put all the explictly system dependent -# stuff in one place -AC_MSG_CHECKING(operating system) -AC_CACHE_VAL(mysql_cv_sys_os, -[ -if test "$uname_prog" != "no"; then - mysql_cv_sys_os="`uname`" -else - mysql_cv_sys_os="Not Solaris" -fi -]) -AC_MSG_RESULT($mysql_cv_sys_os) - -# This should be rewritten to use $target_os -case "$target_os" in - sco3.2v5*) - CFLAGS="$CFLAGS -DSCO" - CXXFLAGS="$CXXFLAGS -DSCO" - LD='$(CC) $(CFLAGS)' - case "$CFLAGS" in - *-belf*) - AC_SYS_COMPILER_FLAG(-belf,sco_belf_option,CFLAGS,[],[ - case "$LDFLAGS" in - *-belf*) ;; - *) AC_MSG_WARN([Adding -belf option to ldflags.]) - LDFLAGS="$LDFLAGS -belf" - ;; - esac - ]) - ;; - *) - AC_SYS_COMPILER_FLAG(-belf,sco_belf_option,CFLAGS,[],[ - case "$LDFLAGS" in - *-belf*) ;; - *) - AC_MSG_WARN([Adding -belf option to ldflags.]) - LDFLAGS="$LDFLAGS -belf" - ;; - esac - ]) - ;; - esac - ;; - sysv5UnixWare* | sysv5OpenUNIX8*) - if test "$GCC" != "yes"; then - # Use the built-in alloca() - CFLAGS="$CFLAGS -Kalloca" - fi - CXXFLAGS="$CXXFLAGS -DNO_CPLUSPLUS_ALLOCA" - ;; - sysv5SCO_SV6.0.0*) - if test "$GCC" != "yes"; then - # Use the built-in alloca() - CFLAGS="$CFLAGS -Kalloca" - CXXFLAGS="$CFLAGS -Kalloca" - # Use no_implicit for templates - CXXFLAGS="$CXXFLAGS -Tno_implicit" - AC_DEFINE([HAVE_EXPLICIT_TEMPLATE_INSTANTIATION], - [1], [Defined by configure. Use explicit template instantiation.]) - fi - ;; -esac - -# The following is required for portable results of floating point calculations -# on PowerPC. The same must also be done for IA-64, but this options is missing -# in the IA-64 gcc backend. - -if test "$GCC" = "yes" -then - case "$host_cpu" in - *ppc* | *powerpc*) - CFLAGS="$CFLAGS -mno-fused-madd" - CXXFLAGS="$CXXFLAGS -mno-fused-madd" - ;; - esac -fi - -AC_SUBST(CC) -AC_SUBST(CFLAGS) -AC_SUBST(CXX) -AC_SUBST(CXXFLAGS) -AC_SUBST(ASFLAGS) -AC_SUBST(LD) -AC_SUBST(INSTALL_SCRIPT) - -export CC CXX CFLAGS LD LDFLAGS AR ARFLAGS - -if test "$GCC" = "yes" -then - # mysqld requires -fno-implicit-templates. - # Disable exceptions as they seams to create problems with gcc and threads. - # mysqld doesn't use run-time-type-checking, so we disable it. - # We should use -Wno-invalid-offsetof flag to disable some warnings from gcc - # regarding offset() usage in C++ which are done in a safe manner in the - # server - CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti" - AC_DEFINE([HAVE_EXPLICIT_TEMPLATE_INSTANTIATION], - [1], [Defined by configure. Use explicit template instantiation.]) -fi - -MYSQL_PROG_AR - -# libmysqlclient versioning when linked with GNU ld. -if $LD --version 2>/dev/null| grep GNU >/dev/null 2>&1; then - LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/libmysql/libmysql.ver" - AC_CONFIG_FILES(libmysql/libmysql.ver) -fi -AC_SUBST(LD_VERSION_SCRIPT) - - -# Avoid bug in fcntl on some versions of linux -AC_MSG_CHECKING([if we should use 'skip-external-locking' as default for $target_os]) -# Any variation of Linux -if expr "$target_os" : "[[Ll]]inux.*" > /dev/null -then - MYSQLD_DEFAULT_SWITCHES="--skip-external-locking" - TARGET_LINUX="true" - AC_MSG_RESULT([yes]) - AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux]) -else - MYSQLD_DEFAULT_SWITCHES="" - TARGET_LINUX="false" - AC_MSG_RESULT([no]) -fi -AC_SUBST(MYSQLD_DEFAULT_SWITCHES) -AC_SUBST(TARGET_LINUX) - -dnl Find paths to some shell programs -AC_PATH_PROG(LN, ln, ln) -# This must be able to take a -f flag like normal unix ln. -AC_PATH_PROG(LN_CP_F, ln, ln) -# If ln -f does not exists use -s (AFS systems) -if test -n "$LN_CP_F"; then - LN_CP_F="$LN_CP_F -s" -fi - -AC_PATH_PROG(MV, mv, mv) -AC_PATH_PROG(RM, rm, rm) -AC_PATH_PROG(CP, cp, cp) -AC_PATH_PROG(SED, sed, sed) -AC_PATH_PROG(CMP, cmp, cmp) -AC_PATH_PROG(CHMOD, chmod, chmod) -AC_PATH_PROG(HOSTNAME, hostname, hostname) -AC_PATH_PROG(DIFF, diff, diff) -# Check for a GNU tar named 'gtar', or 'gnutar' (MacOS X) and -# fall back to 'tar' otherwise and hope that it's a GNU tar as well -AC_CHECK_PROGS(TAR, gnutar gtar tar) - -dnl We use a path for perl so the script startup works -dnl We make sure to use perl, not perl5, in hopes that the RPMs will -dnl not depend on the perl5 binary being installed (probably a bug in RPM) -AC_PATH_PROG(PERL, perl, no) -if test "$PERL" != "no" && $PERL -e 'require 5' > /dev/null 2>&1 -then - PERL5=$PERL -else - AC_PATH_PROG(PERL5, perl5, no) - if test "$PERL5" != no - then - PERL=$PERL5 - ac_cv_path_PERL=$ac_cv_path_PERL5 - fi -fi - -AC_SUBST(HOSTNAME) -AC_SUBST(PERL) -AC_SUBST(PERL5) - -# Enable the abi_check rule only if gcc is available - -if test "$GCC" != "yes" || expr "$CC" : ".*icc.*" -then - ABI_CHECK="" -else - ABI_CHECK="abi_check" -fi - -AC_SUBST(ABI_CHECK) - -# Look for PS usage. We use double dollar-signs in FIND_PROC because this -# value is written to a makefile, which interprets away one level of -# dollar-signs. So, interpretation stages are m4 and then shell in autoconf, -# then Make, then shell. The autoconf substitution uses single quotes, so -# no unprotected single quotes should appear in the expression. -AC_PATH_PROG(PS, ps, ps) -AC_MSG_CHECKING("how to check if pid exists") -PS=$ac_cv_path_PS -# Linux style -if $PS wwwp $$ 2> /dev/null | grep -- "$0" > /dev/null -then - FIND_PROC="$PS wwwp \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null" -# Solaris -elif $PS -fp $$ 2> /dev/null | grep -- $0 > /dev/null -then - FIND_PROC="$PS -p \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null" -# BSD style -elif $PS -uaxww 2> /dev/null | grep -- $0 > /dev/null -then - FIND_PROC="$PS -uaxww | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null" -# SysV style -elif $PS -ef 2> /dev/null | grep -- $0 > /dev/null -then - FIND_PROC="$PS -ef | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null" -# Do anybody use this? -elif $PS $$ 2> /dev/null | grep -- $0 > /dev/null -then - FIND_PROC="$PS \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null" -else - case $SYSTEM_TYPE in - *freebsd*|*dragonfly*) - FIND_PROC="$PS p \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null" - ;; - *darwin*) - FIND_PROC="$PS -uaxww | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null" - ;; - *cygwin*) - FIND_PROC="$PS -e | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null" - ;; - *) - AC_MSG_ERROR([Could not find the right ps and/or grep switches. Which OS is this? See the Installation chapter in the Reference Manual.]) - esac -fi -AC_SUBST(FIND_PROC) -AC_MSG_RESULT("$FIND_PROC") - -# Check if a pid is valid -AC_PATH_PROG(KILL, kill, kill) -AC_MSG_CHECKING("for kill switches") -if $ac_cv_path_KILL -0 $$ -then - CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null" -elif kill -s 0 $$ -then - CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null" -else - AC_MSG_WARN([kill -0 to check for pid seems to fail]) - CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null" -fi -AC_SUBST(CHECK_PID) -AC_MSG_RESULT("$CHECK_PID") - -# We need an ANSI C compiler -AM_PROG_CC_STDC - -# We need an assembler, too -AM_PROG_AS -CCASFLAGS="$CCASFLAGS $ASFLAGS" - -# Check if we need noexec stack for assembler -AC_CHECK_NOEXECSTACK - -if test "$am_cv_prog_cc_stdc" = "no" -then - AC_MSG_ERROR([MySQL requires an ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.]) -fi - -NOINST_LDFLAGS="-static" - -static_nss="" -STATIC_NSS_FLAGS="" -OTHER_LIBC_LIB="" -AC_ARG_WITH(other-libc, - [ --with-other-libc=DIR Link against libc and other standard libraries - installed in the specified non-standard location - overriding default. Originally added to be able to - link against glibc 2.2 without making the user - upgrade the standard libc installation.], - [ - other_libc_include="$withval/include" - other_libc_lib="$withval/lib" - with_other_libc="yes" - enable_shared="no" - all_is_static="yes" - CFLAGS="$CFLAGS -I$other_libc_include" - # There seems to be a feature in gcc that treats system and libc headers - # silently when they violatate ANSI C++ standard, but it is strict otherwise - # since gcc cannot now recognize that our headers are libc, we work around - # by telling it to be permissive. Note that this option only works with - # new versions of gcc (2.95.x and above) - CXXFLAGS="$CXXFLAGS -fpermissive -I$other_libc_include" - if test -f "$other_libc_lib/libnss_files.a" - then - # libc has been compiled with --enable-static-nss - # we need special flags, but we will have to add those later - STATIC_NSS_FLAGS="-lc -lnss_files -lnss_dns -lresolv" - STATIC_NSS_FLAGS="$STATIC_NSS_FLAGS $STATIC_NSS_FLAGS" - OTHER_LIBC_LIB="-static -L$other_libc_lib" - static_nss=1 - else - # this is a dirty hack. We if we detect static nss glibc in the special - # location, we do not re-direct the linker to get libraries from there - # during check. The reason is that if we did, we would have to find a - # way to append the special static nss flags to LIBS every time we do - # any check - this is definitely feasible, but not worthwhile the risk - # of breaking other things. So for our purposes it would be sufficient - # to assume that whoever is using static NSS knows what he is doing and - # has sensible libraries in the regular location - LDFLAGS="$LDFLAGS -static -L$other_libc_lib " - fi - - # When linking against custom libc installed separately, we want to force - # all binary builds to be static, including the build done by configure - # itself to test for system features. - with_mysqld_ldflags="-all-static" - with_client_ldflags="-all-static" - NOINST_LDFLAGS="-all-static" - ], - [ - other_libc_include= - other_libc_lib= - with_other_libc="no" - ] -) -AC_SUBST(NOINST_LDFLAGS) - -# -# Check if we are using Linux and a glibc compiled with static nss -# (this is true on the MySQL build machines to avoid NSS problems) -# -AC_CHECK_TOOL([NM], [nm]) - -if test "$TARGET_LINUX" = "true" -a "$static_nss" = "" -then - tmp=`$NM ${other_libc_lib:-/usr/lib*}/libc.a | grep _nss_files_getaliasent_r1` - if test -n "$tmp" - then - STATIC_NSS_FLAGS="-lc -lnss_files -lnss_dns -lresolv" - STATIC_NSS_FLAGS="$STATIC_NSS_FLAGS $STATIC_NSS_FLAGS" - static_nss=1 - fi -fi - -AC_ARG_WITH(server-suffix, - [ --with-server-suffix Append value to the version string.], - [ MYSQL_SERVER_SUFFIX=`echo "$withval" | sed -e 's/^\(...................................\)..*$/\1/'` ], - [ MYSQL_SERVER_SUFFIX= ] - ) -AC_SUBST(MYSQL_SERVER_SUFFIX) - -# Set flags if we want to force to use pthreads -AC_ARG_WITH(pthread, - [ --with-pthread Force use of pthread library.], - [ with_pthread=$withval ], - [ with_pthread=no ] - ) - -# Force use of thread libs LIBS -AC_ARG_WITH(named-thread-libs, - [ --with-named-thread-libs=ARG - Use specified thread libraries instead of - those automatically found by configure.], - [ with_named_thread=$withval ], - [ with_named_thread=no ] - ) - -# Force use of a curses libs -AC_ARG_WITH(named-curses-libs, - [ --with-named-curses-libs=ARG - Use specified curses libraries instead of - those automatically found by configure.], - [ with_named_curses=$withval ], - [ with_named_curses=no ] - ) - -# Make thread safe client -AC_ARG_ENABLE(thread-safe-client, - [ --disable-thread-safe-client - Compile the client without threads.], - [ THREAD_SAFE_CLIENT=$enableval ], - [ THREAD_SAFE_CLIENT=yes ] - ) - -# compile with strings functions in assembler -AC_ARG_ENABLE(assembler, - [ --enable-assembler Use assembler versions of some string - functions if available.], - [ ENABLE_ASSEMBLER=$enableval ], - [ ENABLE_ASSEMBLER=no ] - ) - -AC_MSG_CHECKING(if we should use assembler functions) -# For now we only support assembler on i386 and sparc systems -AM_CONDITIONAL(ASSEMBLER_x86, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "i386" && $AS strings/strings-x86.s -o checkassembler >/dev/null 2>&1 && test -f checkassembler && (rm -f checkassembler; exit 0;)) -AM_CONDITIONAL(ASSEMBLER_sparc64, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparcv9") -AM_CONDITIONAL(ASSEMBLER, test "$ASSEMBLER_x86_TRUE" = "") - -if test "$ASSEMBLER_TRUE" = "" -then - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - -# Add query profiler -AC_MSG_CHECKING(if SHOW PROFILE should be enabled.) -AC_ARG_ENABLE(profiling, - AS_HELP_STRING([--enable-profiling], [Enable profiling of query lifetime.]), - [ ENABLED_PROFILING=$enableval ], - [ ENABLED_PROFILING=no ]) - -AC_DEFINE([ENABLED_PROFILING], [1], [If SHOW PROFILE should be enabled]) -if test "$ENABLED_PROFILING" = "yes" -then - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - -# Use this to set the place used for unix socket used to local communication. -AC_ARG_WITH(unix-socket-path, - [ --with-unix-socket-path=SOCKET - Where to put the unix-domain socket. SOCKET must be - an absolute file name.], - [ MYSQL_UNIX_ADDR=$withval ], - [ MYSQL_UNIX_ADDR=$MYSQL_UNIX_ADDR_DEFAULT ] - ) -AC_SUBST(MYSQL_UNIX_ADDR) - -AC_ARG_WITH(tcp-port, - [ --with-tcp-port=port-number - Which port to use for MySQL services (default 3306)], - [ MYSQL_TCP_PORT=$withval ], - [ MYSQL_TCP_PORT=$MYSQL_TCP_PORT_DEFAULT - # if we actually defaulted (as opposed to the pathological case of - # --with-tcp-port=<MYSQL_TCP_PORT_DEFAULT> which might in theory - # happen if whole batch of servers was built from a script), set - # the default to zero to indicate that; we don't lose information - # that way, because 0 obviously indicates that we can get the - # default value from MYSQL_TCP_PORT. this seems really evil, but - # testing for MYSQL_TCP_PORT==MYSQL_TCP_PORT_DEFAULT would make a - # a port of MYSQL_TCP_PORT_DEFAULT magic even if the builder did not - # intend it to mean "use the default, in fact, look up a good default - # from /etc/services if you can", but really, really meant 3306 when - # they passed in 3306. When they pass in a specific value, let them - # have it; don't second guess user and think we know better, this will - # just make people cross. this makes the the logic work like this - # (which is complicated enough): - # - # - if a port was set during build, use that as a default. - # - # - otherwise, try to look up a port in /etc/services; if that fails, - # use MYSQL_TCP_PORT_DEFAULT (at the time of this writing 3306) - # - # - allow the MYSQL_TCP_PORT environment variable to override that. - # - # - allow command-line parameters to override all of the above. - # - # the top-most MYSQL_TCP_PORT_DEFAULT is read from win/configure.js, - # so don't mess with that. - MYSQL_TCP_PORT_DEFAULT=0 ] - ) -AC_SUBST(MYSQL_TCP_PORT) -# We might want to document the assigned port in the manual. -AC_SUBST(MYSQL_TCP_PORT_DEFAULT) - -# Use this to set the place used for unix socket used to local communication. -AC_ARG_WITH(mysqld-user, - [ --with-mysqld-user=username - What user the mysqld daemon shall be run as.], - [ MYSQLD_USER=$withval ], - [ MYSQLD_USER=mysql ] - ) -AC_SUBST(MYSQLD_USER) - -# If we should allow LOAD DATA LOCAL -AC_MSG_CHECKING(If we should should enable LOAD DATA LOCAL by default) -AC_ARG_ENABLE(local-infile, - [ --enable-local-infile Enable LOAD DATA LOCAL INFILE (default: disabled)], - [ ENABLED_LOCAL_INFILE=$enableval ], - [ ENABLED_LOCAL_INFILE=no ] - ) -if test "$ENABLED_LOCAL_INFILE" = "yes" -then - AC_MSG_RESULT([yes]) - AC_DEFINE([ENABLED_LOCAL_INFILE], [1], - [If LOAD DATA LOCAL INFILE should be enabled by default]) -else - AC_MSG_RESULT([no]) -fi - -# If we should allow init-file, skip-grant-table and bootstrap options -AC_MSG_CHECKING(If we should should enable init-file, skip-grant-table options and bootstrap) -AC_ARG_ENABLE(grant-options, - [ --disable-grant-options Disables the use of --init-file, --skip-grant-tables and --bootstrap options], - [ mysql_grant_options_enabled=$enableval ], - [ mysql_grant_options_enabled=yes ] - ) -if test "$mysql_grant_options_enabled" = "yes" -then - AC_MSG_RESULT([yes]) -else - AC_DEFINE([DISABLE_GRANT_OPTIONS], [1], - [Disables the use of --init-file, --skip-grant-tables and --bootstrap options]) - AC_MSG_RESULT([no]) -fi - -MYSQL_SYS_LARGEFILE - -# Types that must be checked AFTER large file support is checked -AC_TYPE_SIZE_T - -#-------------------------------------------------------------------- -# Check for system header files -#-------------------------------------------------------------------- - -AC_HEADER_DIRENT -AC_HEADER_STDC -AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(fcntl.h fenv.h float.h floatingpoint.h fpu_control.h \ - ieeefp.h limits.h memory.h pwd.h select.h poll.h \ - stdlib.h stddef.h \ - strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \ - sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \ - unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \ - sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h linux/config.h \ - sys/prctl.h sys/resource.h sys/param.h port.h ieeefp.h \ - execinfo.h) - -AC_CHECK_HEADERS([xfs/xfs.h]) - -#-------------------------------------------------------------------- -# Check for system libraries. Adds the library to $LIBS -# and defines HAVE_LIBM etc -#-------------------------------------------------------------------- - -AC_CHECK_LIB(m, floor, [], AC_CHECK_LIB(m, __infinity)) - -AC_CHECK_LIB(nsl_r, gethostbyname_r, [], - AC_CHECK_LIB(nsl, gethostbyname_r)) -AC_CHECK_FUNC(gethostbyname_r) - -AC_SEARCH_LIBS(setsockopt, socket) -# This may get things to compile even if bind-8 is installed -AC_SEARCH_LIBS(bind, bind) -# Check if crypt() exists in libc or libcrypt, sets LIBS if needed -AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [crypt])) -# See if we need a library for address lookup. -AC_SEARCH_LIBS(inet_aton, [socket nsl resolv]) - -# For the sched_yield() function on Solaris -AC_SEARCH_LIBS(sched_yield, posix4, - AC_DEFINE(HAVE_SCHED_YIELD, 1, [sched_yield])) - -MYSQL_CHECK_ZLIB_WITH_COMPRESS - -# For large pages support -if test "$TARGET_LINUX" = "true" -then - # For SHM_HUGETLB on Linux - AC_CHECK_DECLS(SHM_HUGETLB, - AC_DEFINE([HAVE_LARGE_PAGES], [1], - [Define if you have large pages support]) - AC_DEFINE([HAVE_LARGE_PAGE_OPTION], [1], - [Define if you have large page option]) - AC_DEFINE([HUGETLB_USE_PROC_MEMINFO], [1], - [Define if /proc/meminfo shows the huge page size (Linux only)]) - , , - [ -#include <sys/shm.h> - ] - ) -else -# For large pages support on Solaris -AC_CHECK_DECLS(MHA_MAPSIZE_VA, - AC_DEFINE([HAVE_SOLARIS_LARGE_PAGES], [1], - [Define to 1 if you have large pages support]) - AC_DEFINE([HAVE_LARGE_PAGE_OPTION], [1], - [Define if you have large page option]) - , , - [ -#include <sys/mman.h> - ] -) -fi - -dnl Use of ALARMs to wakeup on timeout on sockets -dnl -dnl This feature makes use of a mutex and is a scalability hog we -dnl try to avoid using. However we need support for SO_SNDTIMEO and -dnl SO_RCVTIMEO socket options for this to work. So we will check -dnl if this feature is supported by a simple AC_RUN_IFELSE macro. However -dnl on some OS's there is support for setting those variables but -dnl they are silently ignored. For those OS's we will not attempt -dnl o use SO_SNDTIMEO and SO_RCVTIMEO even if it is said to work. -dnl See Bug#29093 for the problem with SO_SND/RCVTIMEO on HP/UX. -dnl To use alarm is simple, simply avoid setting anything. - - -AC_CACHE_CHECK([whether SO_SNDTIMEO and SO_RCVTIMEO work], - [mysql_cv_socket_timeout], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM([[ - #include <sys/types.h> - #include <sys/socket.h> - #include <sys/time.h> - ]],[[ - int fd = socket(AF_INET, SOCK_STREAM, 0); - struct timeval tv; - int ret= 0; - tv.tv_sec= 2; - tv.tv_usec= 0; - ret|= setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)); - ret|= setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)); - return !!ret; - ]])], - [mysql_cv_socket_timeout=yes], - [mysql_cv_socket_timeout=no], - [mysql_cv_socket_timeout=no - AC_MSG_WARN([Socket timeout options disabled due to cross-compiling])]) - ]) - -use_alarm=yes - -if test "$mysql_cv_socket_timeout" = yes; then - case $SYSTEM_TYPE in - dnl We trust the result from the following systems - *solaris*) use_alarm=no ;; - *freebsd*) use_alarm=no ;; - *darwin*) use_alarm=no ;; - *) - dnl We trust the result from Linux also - if test "$TARGET_LINUX" = "true"; then - use_alarm=no - fi - dnl We trust no one else for the moment - dnl (Windows is hardcoded to not use alarms) - ;; - esac -fi - -AC_ARG_WITH(alarm, - AS_HELP_STRING([--with-alarm], [Use alarm to implement socket timeout.]), - [use_alarm=$withval], []) - -AC_MSG_CHECKING(whether to use alarms to implement socket timeout) -if test "$use_alarm" = no ; then - AC_DEFINE([NO_ALARM], [1], [No need to use alarm for socket timeout]) - AC_DEFINE([SIGNAL_WITH_VIO_CLOSE], [1], [Need to use vio close for kill connection]) -fi -AC_MSG_RESULT($use_alarm) - -#-------------------------------------------------------------------- -# Check for IPv6 support -#-------------------------------------------------------------------- - -AC_CHECK_HEADERS(netinet/in6.h) - -AC_CHECK_TYPES([struct sockaddr_in6, struct in6_addr], - [have_in6_types=yes], - [have_in6_types=no], - [[ - #ifdef WIN32 - #include <winsock2.h> - #else - #include <sys/types.h> - #include <netinet/in.h> - #include <sys/socket.h> - #endif - - #ifdef HAVE_NETINET_IN6_H - #include <netinet/in6.h> - #endif - ]]) - -AC_MSG_CHECKING([for IPv6 support]) - -AC_ARG_ENABLE(ipv6, - AS_HELP_STRING([--disable-ipv6], [Disable support for IPv6 networking]), - [disable_ipv6=yes], [disable_ipv6=no]) - -if test x"$disable_ipv6" = xyes -o x"$have_in6_types" = xno; then - AC_MSG_RESULT([no]) -else - AC_DEFINE([HAVE_IPV6], [1], [Define if IPv6 networking support is present]) - AC_MSG_RESULT([yes]) -fi - -#-------------------------------------------------------------------------- -# Check if struct sockaddr_in::sin_len is available -#-------------------------------------------------------------------------- - -AC_CACHE_CHECK( - [if sockaddr_in::sin_len is available], - mysql_cv_have_sockaddr_in_sin_len, - AC_TRY_COMPILE( - [ - #ifdef WIN32 - #include <winsock2.h> - #else - #include <sys/types.h> - #include <netinet/in.h> - #include <sys/socket.h> - #endif - ], - [unsigned int i = sizeof(((struct sockaddr_in *) 0)->sin_len)], - mysql_cv_have_sockaddr_in_sin_len=yes, - mysql_cv_have_sockaddr_in_sin_len=no)) - -if test "$mysql_cv_have_sockaddr_in_sin_len" = "yes"; then - AC_DEFINE( - [HAVE_SOCKADDR_IN_SIN_LEN], - [1], - [If sockaddr_in::sin_len is available]) -fi - -#-------------------------------------------------------------------------- -# Check if struct sockaddr_in6::sin6_len is available -#-------------------------------------------------------------------------- - -AC_CACHE_CHECK( - [if sockaddr_in6::sin6_len is available], - mysql_cv_have_sockaddr_in6_sin6_len, - AC_TRY_COMPILE( - [ - #ifdef WIN32 - #include <winsock2.h> - #else - #include <sys/types.h> - #include <netinet/in.h> - #include <sys/socket.h> - #endif - - #ifdef HAVE_NETINET_IN6_H - #include <netinet/in6.h> - #endif - ], - [unsigned int i = sizeof(((struct sockaddr_in6 *) 0)->sin6_len)], - mysql_cv_have_sockaddr_in6_sin6_len=yes, - mysql_cv_have_sockaddr_in6_sin6_len=no)) - -if test "$mysql_cv_have_sockaddr_in_sin6_len" = "yes"; then - AC_DEFINE( - [HAVE_SOCKADDR_IN6_SIN6_LEN], - [1], - [If sockaddr_in6::sin6_len is available]) -fi - -#-------------------------------------------------------------------- -# Check for TCP wrapper support -#-------------------------------------------------------------------- - -AC_ARG_WITH(libwrap, -[ --with-libwrap[=DIR] Compile in libwrap (tcp_wrappers) support],[ - case "$with_libwrap" in - no) : ;; - yes|*) - _cppflags=${CPPFLAGS} - _ldflags=${LDFLAGS} - - if test "$with_libwrap" != "yes"; then - CPPFLAGS="${CPPFLAGS} -I$with_libwrap/include" - LDFLAGS="${LDFLAGS} -L$with_libwrap/lib" - fi - - _libs=${LIBS} - AC_CHECK_HEADER(tcpd.h, - LIBS="-lwrap $LIBS" - AC_MSG_CHECKING(for TCP wrappers library -lwrap) - AC_TRY_LINK([#include <tcpd.h> -int allow_severity = 0; -int deny_severity = 0; - -struct request_info *req; -],[hosts_access (req)], - AC_MSG_RESULT(yes) - AC_DEFINE([LIBWRAP], [1], [Define if you have -lwrap]) - AC_DEFINE([HAVE_LIBWRAP], [1], [Define if have -lwrap]) - if test "$with_libwrap" != "yes"; then - WRAPLIBS="-L${with_libwrap}/lib" - fi - WRAPLIBS="${WRAPLIBS} -lwrap", - AC_MSG_RESULT(no) - CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}), - CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}) - LDFLAGS=${_ldflags} LIBS=${_libs} - ;; - esac -]) -AC_SUBST(WRAPLIBS) - -# Check for gtty if termio.h doesn't exists -if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no" -then - AC_SEARCH_LIBS(gtty, compat) -fi - -# We make a special variable for non-threaded version of LIBS to avoid -# including thread libs into non-threaded version of MySQL client library. -# Later in this script LIBS will be augmented with a threads library. -NON_THREADED_LIBS="$LIBS" - -AC_CHECK_TYPES([int8, uint8, int16, uint16, int32, uint32, int64, uint64, - uchar, uint, ulong],[],[], [ -#include <sys/types.h> -]) -AC_CHECK_TYPES([fp_except], [], [], [ -#include <sys/types.h> -#include <ieeefp.h> -]) - -# -# Some system specific hacks -# - -MAX_C_OPTIMIZE="-O3" -MAX_CXX_OPTIMIZE="-O3" - -case $SYSTEM_TYPE in - *solaris2.7*) - # Solaris 2.7 has a broken /usr/include/widec.h - # Make a fixed copy in ./include - AC_MSG_WARN([Fixing broken include files for $SYSTEM_TYPE]) - echo " - Creating local copy of widec.h" - if test ! -d include - then - mkdir ./include - fi - builddir=`pwd` - sed -e "s|^#if[ ]*!defined(lint) && !defined(__lint)|#if !defined\(lint\) \&\& !defined\(__lint\) \&\& !defined\(getwc\)|" < /usr/include/widec.h > include/widec.h - CFLAGS="$CFLAGS -DHAVE_CURSES_H -I$builddir/include -DHAVE_RWLOCK_T" - CXXFLAGS="$CXXFLAGS -DHAVE_CURSES_H -I$builddir/include -DHAVE_RWLOCK_T" - ;; - *solaris2.8*) - # Solaris 2.8 has a broken /usr/include/widec.h - # Make a fixed copy in ./include - AC_MSG_WARN([Fixing broken include files for $SYSTEM_TYPE]) - echo " - Creating local copy of widec.h" - if test ! -d include - then - mkdir ./include - fi - builddir=`pwd` - sed -e "s|^#if[ ]*!defined(__lint)|#if !defined\(__lint\) \&\& !defined\(getwc\)|" < /usr/include/widec.h > include/widec.h - CFLAGS="$CFLAGS -DHAVE_CURSES_H -I$builddir/include -DHAVE_RWLOCK_T" - CXXFLAGS="$CXXFLAGS -DHAVE_CURSES_H -I$builddir/include -DHAVE_RWLOCK_T" - ;; - *solaris2.5.1*) - AC_MSG_WARN([Enabling getpass() workaround for Solaris 2.5.1]) - CFLAGS="$CFLAGS -DHAVE_BROKEN_GETPASS -DSOLARIS -DHAVE_RWLOCK_T"; - CXXFLAGS="$CXXFLAGS -DHAVE_RWLOCK_T -DSOLARIS" - ;; - *solaris*) - CFLAGS="$CFLAGS -DHAVE_RWLOCK_T" - CXXFLAGS="$CXXFLAGS -DHAVE_RWLOCK_T" - ;; - *SunOS*) - AC_MSG_WARN([Enabling getpass() workaround for SunOS]) - CFLAGS="$CFLAGS -DHAVE_BROKEN_GETPASS -DSOLARIS"; - ;; - *hpux10.20*) - AC_MSG_WARN([Enabling workarounds for hpux 10.20]) - CFLAGS="$CFLAGS -DHAVE_BROKEN_SNPRINTF -DSIGNALS_DONT_BREAK_READ -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHPUX10 -DSIGNAL_WITH_VIO_CLOSE -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT -DHAVE_POSIX1003_4a_MUTEX" - CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_SNPRINTF -D_INCLUDE_LONGLONG -DSIGNALS_DONT_BREAK_READ -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHPUX10 -DSIGNAL_WITH_VIO_CLOSE -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT -DHAVE_POSIX1003_4a_MUTEX" - if test "$with_named_thread" = "no" - then - AC_MSG_WARN([Using --with-named-thread=-lpthread]) - with_named_thread="-lcma" - fi - ;; - *hpux11.*) - AC_MSG_WARN([Enabling workarounds for hpux 11]) - CFLAGS="$CFLAGS -DHPUX11 -DSNPRINTF_RETURN_TRUNC -DHAVE_BROKEN_PREAD -DHAVE_BROKEN_GETPASS -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT" - CXXFLAGS="$CXXFLAGS -DHPUX11 -DSNPRINTF_RETURN_TRUNC -DHAVE_BROKEN_PREAD -D_INCLUDE_LONGLONG -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT" - if test "$with_named_thread" = "no" - then - AC_MSG_WARN([Using --with-named-thread=-lpthread]) - with_named_thread="-lpthread" - fi - # Fixes for HPUX 11.0 compiler - if test "$ac_cv_prog_gcc" = "no" - then -# set working flags first in line, letting override it (i. e. for debug): - CXXFLAGS="+O2 $CXXFLAGS" - MAX_C_OPTIMIZE="" - MAX_CXX_OPTIMIZE="" - ndb_cxxflags_fix="$ndb_cxxflags_fix -Aa" - fi - ;; - *rhapsody*) - if test "$ac_cv_prog_gcc" = "yes" - then - CPPFLAGS="$CPPFLAGS -traditional-cpp " - CFLAGS="-DHAVE_CTHREADS_WRAPPER -DDO_NOT_REMOVE_THREAD_WRAPPERS" - CXXFLAGS="-DHAVE_CTHREADS_WRAPPER" - if test $with_named_curses = "no" - then - with_named_curses="" - fi - fi - ;; - *darwin5*) - if test "$ac_cv_prog_gcc" = "yes" - then - FLAGS="-traditional-cpp -DHAVE_DARWIN5_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH" - CFLAGS="$CFLAGS $FLAGS" - CXXFLAGS="$CXXFLAGS $FLAGS" - MAX_C_OPTIMIZE="-O" - with_named_curses="" - fi - ;; - *darwin6*) - if test "$ac_cv_prog_gcc" = "yes" - then - FLAGS="-D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH -DDONT_DECLARE_CXA_PURE_VIRTUAL " - CFLAGS="$CFLAGS $FLAGS" - CXXFLAGS="$CXXFLAGS $FLAGS" - MAX_C_OPTIMIZE="-O" - fi - ;; - *darwin*) - if test "$ac_cv_prog_gcc" = "yes" - then - FLAGS="-D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL" - CFLAGS="$CFLAGS $FLAGS" - CXXFLAGS="$CXXFLAGS $FLAGS" - MAX_C_OPTIMIZE="-O" - fi - ;; - *freebsd*|*dragonfly*) - dnl These dependencies have not really been checked for some time - OSVERSION=`sysctl -a | grep osreldate | awk '{ print $2 }'` - if test "$OSVERSION" -gt "600000" - then - # Post user-level threads, MYSQLD_NET_RETRY_COUNT is not needed any more - : - elif test "$OSVERSION" -gt "480100" && \ - test "$OSVERSION" -lt "500000" || \ - test "$OSVERSION" -gt "500109" - then - AC_MSG_WARN([Adding fix for interrupted reads]) - CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000" - else - AC_MSG_WARN([Adding fix for interrupted reads and broken realpath]) - CFLAGS="$CFLAGS -DHAVE_BROKEN_REALPATH" - CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000 -DHAVE_BROKEN_REALPATH" - fi - ;; - *netbsd*) - AC_MSG_WARN([Adding flag -Dunix]) - CFLAGS="$CFLAGS -Dunix" - CXXFLAGS="$CXXFLAGS -Dunix" - OVERRIDE_MT_LD_ADD="\$(top_srcdir)/mit-pthreads/obj/libpthread.a" - ;; - *bsdi*) - AC_MSG_WARN([Adding fix for BSDI]) - CFLAGS="$CFLAGS -D__BSD__ -DHAVE_BROKEN_REALPATH" - AC_DEFINE_UNQUOTED([SOCKOPT_OPTLEN_TYPE], [size_t], - [Last argument to get/setsockopt]) - ;; - *sgi-irix6*) - if test "$with_named_thread" = "no" - then - AC_MSG_WARN([Using --with-named-thread=-lpthread]) - with_named_thread="-lpthread" - fi - CXXFLAGS="$CXXFLAGS -D_BOOL" - ;; - *aix4.3*) - AC_MSG_WARN([Adding defines for AIX]) - CFLAGS="$CFLAGS -Wa,-many -DUNDEF_HAVE_INITGROUPS -DSIGNALS_DONT_BREAK_READ" - CXXFLAGS="$CXXFLAGS -Wa,-many -DUNDEF_HAVE_INITGROUPS -DSIGNALS_DONT_BREAK_READ" - ;; -dnl Is this the right match for DEC OSF on alpha? - *dec-osf*) - if test "$ac_cv_prog_gcc" = "yes" && test "$host_cpu" = "alpha" - then - AC_MSG_WARN([Adding defines for DEC OSF on alpha]) - CFLAGS="$CFLAGS -mieee" - CXXFLAGS="$CXXFLAGS -mieee" - fi - AC_MSG_WARN([Adding defines for OSF1]) - # gethostbyname_r is deprecated and doesn't work ok on OSF1 - CFLAGS="$CFLAGS -DUNDEF_HAVE_GETHOSTBYNAME_R -DSNPRINTF_RETURN_TRUNC" - CXXFLAGS="$CXXFLAGS -DUNDEF_HAVE_GETHOSTBYNAME_R -DSNPRINTF_RETURN_TRUNC" - # fix to handle include of <stdint.h> correctly on OSF1 with cxx compiler - CXXFLAGS="$CXXFLAGS -I/usr/include/cxx -I/usr/include/cxx_cname -I/usr/include -I/usr/include.dtk" - ;; -esac - - -#---START: Used in for client configure -# Check if we threads are in libc or if we should use -# -lpthread, -lpthreads or mit-pthreads -# We have to check libc last because else it fails on Solaris 2.6 - -with_posix_threads="no" -# Search thread lib on Linux -if test "$with_named_thread" = "no" -then - AC_MSG_CHECKING("Linux threads") - if test "$TARGET_LINUX" = "true" - then - AC_MSG_RESULT("starting") - # use getconf to check glibc contents - AC_MSG_CHECKING("getconf GNU_LIBPTHREAD_VERSION") - case `getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` in - NPTL* ) - AC_MSG_RESULT("NPTL") - AC_DEFINE([HAVE_NPTL], [1], [NPTL threads implementation]) - with_named_thread="-lpthread" - ;; - LINUXTHREADS* ) - AC_MSG_RESULT("Linuxthreads") - AC_DEFINE([HAVE_LINUXTHREADS], [1], - [Whether we are using Xavier Leroy's LinuxThreads]) - with_named_thread="-lpthread" - ;; - * ) - AC_MSG_RESULT("unknown") - ;; - esac - if test "$with_named_thread" = "no" - then - # old method, check headers - # Look for LinuxThreads. - AC_MSG_CHECKING("LinuxThreads in header file comment") - res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l` - if test "$res" -gt 0 - then - AC_MSG_RESULT("Found") - AC_DEFINE([HAVE_LINUXTHREADS], [1], - [Whether we are using Xavier Leroy's LinuxThreads]) - # Linux 2.0 sanity check - AC_TRY_COMPILE([#include <sched.h>], [int a = sched_get_priority_min(1);], , - AC_MSG_ERROR([Syntax error in sched.h. Change _P to __P in the /usr/include/sched.h file. See the Installation chapter in the Reference Manual])) - # RedHat 5.0 does not work with dynamic linking of this. -static also - # gives a speed increase in linux so it does not hurt on other systems. - with_named_thread="-lpthread" - else - AC_MSG_RESULT("Not found") - # If this is a linux machine we should barf - AC_MSG_ERROR([This is a Linux system without a working getconf, -and Linuxthreads was not found. Please install it (or a new glibc) and try again. -See the Installation chapter in the Reference Manual for more information.]) - fi - else - AC_MSG_RESULT("no need to check headers") - fi - - AC_MSG_CHECKING("for pthread_create in -lpthread") - ac_save_LIBS="$LIBS" - LIBS="$LIBS -lpthread" - AC_TRY_LINK( [#include <pthread.h>], - [ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ], - AC_MSG_RESULT("yes"), - [ AC_MSG_RESULT("no") - AC_MSG_ERROR([ -This is a Linux system claiming to support threads, either Linuxthreads or NPTL, but linking a test program failed. -Please install one of these (or a new glibc) and try again. -See the Installation chapter in the Reference Manual for more information.]) ] - ) - LIBS="$ac_save_LIBS" - else - AC_MSG_RESULT("no") - fi # "$TARGET_LINUX" -fi # "$with_named_thread" = "no" -a "$with_mit_threads" = "no" - - -# Hack for DEC-UNIX (OSF1 -> Tru64) -if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no" -then - AC_MSG_CHECKING("DEC threads post OSF/1 3.2") - if test -f /usr/shlib/libpthread.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a - then - with_named_thread="-lpthread -lmach -lexc" - CFLAGS="$CFLAGS -D_REENTRANT" - CXXFLAGS="$CXXFLAGS -D_REENTRANT" - AC_DEFINE(HAVE_DEC_THREADS, [1], [Whether we are using DEC threads]) - AC_MSG_RESULT("yes") - else - AC_MSG_RESULT("no") - fi # DEC threads -fi # "$with_named_thread" = "no" -a "$with_mit_threads" = "no" - - -dnl This is needed because -lsocket has to come after the thread -dnl library on SCO. -AC_DEFUN([MYSQL_REMOVE_SOCKET_FROM_LIBS_HACK], [ - LIBS=`echo " $LIBS " | sed -e 's/ -lsocket / /g'` -]) -# Hack for SCO UNIX -if test "$with_named_thread" = "no" -then - AC_MSG_CHECKING("SCO threads") - if expr "$SYSTEM_TYPE" : ".*sco.*" > /dev/null - then - if test -f /usr/lib/libgthreads.a -o -f /usr/lib/libgthreads.so - then - MYSQL_REMOVE_SOCKET_FROM_LIBS_HACK - with_named_thread="-lgthreads -lsocket -lgthreads" - # sched.h conflicts with fsu-threads - touch ./include/sched.h - touch ./include/semaphore.h - - # We must have gcc - if expr "$CC" : ".*gcc.*" - then - AC_MSG_RESULT("yes") - else - AC_MSG_ERROR([On SCO UNIX MySQL must be compiled with gcc. See the Installation chapter in the Reference Manual.]) - fi - AC_MSG_RESULT("yes") - elif test -f /usr/local/lib/libpthread.a -o -f /usr/local/lib/libpthread.so - then - MYSQL_REMOVE_SOCKET_FROM_LIBS_HACK - with_named_thread="-lpthread -lsocket" - # sched.h conflicts with fsu-threads - # touch ./include/sched.h - - AC_MSG_CHECKING("for gcc") - # We must have gcc - if expr "$CC" : ".*gcc.*" - then - AC_MSG_RESULT("yes") - else - AC_MSG_ERROR([On SCO UNIX MySQL must be compiled with gcc. See the Installation chapter in the Reference Manual.]) - fi - AC_MSG_RESULT("yes") - # Hack for SCO UnixWare 7.1.x - # - elif test "$with_named_thread" = "no" - then - AC_MSG_RESULT("no") - AC_MSG_CHECKING("SCO UnixWare 7.1.x native threads") - if expr "$SYSTEM_TYPE" : ".*sco.*" > /dev/null - then - if test -f /usr/lib/libthread.so -o -f /usr/lib/libthreadT.so - then - MYSQL_REMOVE_SOCKET_FROM_LIBS_HACK - if expr "$CC" : ".*gcc.*" - then - with_named_thread="-pthread -lsocket -lnsl" - else - with_named_thread="-Kthread -lsocket -lnsl" - fi - if expr "$SYSTEM_TYPE" : ".*unixware7.0.0" > /dev/null - then - AC_DEFINE(HAVE_UNIXWARE7_THREADS, [1]) - fi - AC_MSG_RESULT("yes") - # We must have cc - AC_MSG_CHECKING("for gcc") - if expr "$CC" : ".*gcc.*" - then - CC="$CC -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK" - CXX="$CXX -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK" - else - CC="$CC -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK" - CXX="$CXX -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK" - fi - else - AC_MSG_ERROR([configure: error: Can't find thread libs on SCO UnixWare7. See the Installation chapter in the Reference Manual.]) - fi - else - AC_MSG_RESULT("no") - fi - else - AC_MSG_ERROR([On SCO UNIX MySQL requires that the FSUThreads package is installed. See the Installation chapter in the Reference Manual.]) - fi - else - AC_MSG_RESULT("no") - fi -fi - -# -# Check for SCO threading libraries -# -if test "$with_named_thread" = "no" -then - AC_MSG_CHECKING([SCO OpenServer 6, UnixWare 7 or OpenUNIX 8 native threads]) - if expr "$SYSTEM_TYPE" : ".*UnixWare.*" > /dev/null || \ - expr "$SYSTEM_TYPE" : ".*SCO_SV6.*" > /dev/null || \ - expr "$SYSTEM_TYPE" : ".*OpenUNIX.*" > /dev/null - then - if test -f /usr/lib/libthread.so -o -f /usr/lib/libthreadT.so - then - MYSQL_REMOVE_SOCKET_FROM_LIBS_HACK - if expr "$CC" : ".*gcc.*" > /dev/null - then - with_named_thread="-pthread -lsocket -lnsl" - CC="$CC -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"; - CXX="$CXX -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"; - else - with_named_thread="-Kthread -lsocket -lnsl" - CC="$CC -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"; - CXX="$CXX -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"; - fi - if expr "$SYSTEM_TYPE" : ".*unixware7.0.0" > /dev/null - then - AC_DEFINE(HAVE_UNIXWARE7_THREADS, [1], [Have UnixWare 7 (or similar) almost-POSIX threading library]) - fi - AC_MSG_RESULT(yes) - else - AC_MSG_ERROR([configure: error: Can't find thread library on SCO/Caldera system. See the Installation chapter in the Reference Manual.]) - fi - else - AC_MSG_RESULT(no) - fi -fi - -# Hack for Siemens UNIX -if test "$with_named_thread" = "no" -then - AC_MSG_CHECKING("Siemens threads") - if test -f /usr/lib/libxnet.so -a "$SYSTEM_TYPE" = "sni-sysv4" - then - LIBS="-lxnet $LIBS" - NON_THREADED_LIBS="-lxnet $NON_THREADED_LIBS" - with_named_thread="-Kthread $LDFLAGS -lxnet" - LD_FLAGS="" - CFLAGS="-Kthread $CFLAGS" - CXXFLAGS="-Kthread $CXXFLAGS" - AC_MSG_RESULT("yes") - else - AC_MSG_RESULT("no") - fi -fi - -# Use library named -lpthread -if test "$with_named_thread" = "no" -a "$with_pthread" = "yes" -then - with_named_thread="-lpthread" -fi - -#---END: - -# Hack for Solaris >= 2.5 -# We want both the new and the old interface - -if test "$with_named_thread" = "no" -then - AC_MSG_CHECKING("Solaris threads") - if test -f /usr/lib/libpthread.so -a -f /usr/lib/libthread.so - then - with_named_thread="-lpthread -lthread" - AC_MSG_RESULT("yes") - else - AC_MSG_RESULT("no") - fi -fi - -# Should we use named pthread library ? -AC_MSG_CHECKING("named thread libs:") -if test "$with_named_thread" != "no" -then - LIBS="$with_named_thread $LIBS $with_named_thread" - CLIENT_THREAD_LIBS="$with_named_thread" - with_posix_threads="yes" - AC_MSG_RESULT("$with_named_thread") -else - AC_MSG_RESULT("no") - # pthread_create is in standard libraries (As in BSDI 3.0) - AC_MSG_CHECKING("for pthread_create in -libc"); - AC_TRY_LINK( - [#include <pthread.h>], - [ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ], - with_posix_threads=yes, with_posix_threads=no) - AC_MSG_RESULT("$with_posix_threads") - if test "$with_posix_threads" = "no" - then - AC_MSG_CHECKING("for pthread_create in -lpthread") - ac_save_LIBS="$LIBS" - LIBS="$LIBS -lpthread" - CLIENT_THREAD_LIBS="-lpthread" - AC_TRY_LINK( - [#include <pthread.h>], - [ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ], - with_posix_threads=yes, with_posix_threads=no) - AC_MSG_RESULT("$with_posix_threads") - if test "$with_posix_threads" = "no" - then - LIBS=" $ac_save_LIBS -lpthreads" - CLIENT_THREAD_LIBS="-lpthreads" - AC_MSG_CHECKING("for pthread_create in -lpthreads") - AC_TRY_LINK( - [#include <pthread.h>], - [ pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ], - with_posix_threads=yes, with_posix_threads=no) - AC_MSG_RESULT("$with_posix_threads") - if test "$with_posix_threads" = "no" - then - # This is for FreeBSD - LIBS="$ac_save_LIBS -pthread" - CLIENT_THREAD_LIBS="-pthread" - AC_MSG_CHECKING("for pthread_create in -pthread") - AC_TRY_LINK( - [#include <pthread.h>], - [ pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ], - with_posix_threads=yes, with_posix_threads=no) - AC_MSG_RESULT("$with_posix_threads") - fi - fi - fi -fi - -#---START: Used in for client configure -# Must be checked after, because strtok_r may be in -lpthread -# On AIX strtok_r is in libc_r - -my_save_LIBS="$LIBS" -AC_CHECK_LIB(pthread,strtok_r) -LIBS="$my_save_LIBS" -if test "$ac_cv_lib_pthread_strtok_r" = "no" -then - AC_CHECK_LIB(c_r,strtok_r) - case "$with_osf32_threads---$target_os" in - # Don't keep -lc_r in LIBS; -pthread handles it magically - yes---* | *---freebsd* | *---hpux*) LIBS="$my_save_LIBS" ;; - - esac - AC_CHECK_FUNCS(strtok_r pthread_init) -else - AC_CHECK_FUNCS(strtok_r) -fi -#---END: - -# dlopen, dlerror -case "$with_mysqld_ldflags " in - - *"-all-static "*) - # No need to check for dlopen when mysqld is linked with - # -all-static as it won't be able to load any functions. - # NOTE! It would be better if it was possible to test if dlopen - # can be used, but a good way to test it couldn't be found - - ;; - - *) - # Check for dlopen, needed for user definable functions and plugins - # This must be checked after threads on AIX - - my_save_LIBS="$LIBS" - LIBS="" - AC_CHECK_LIB(dl,dlopen) - LIBDL=$LIBS - LIBS="$my_save_LIBS" - AC_SUBST(LIBDL) - - my_save_LIBS="$LIBS" - LIBS="$LIBS $LIBDL" - AC_CHECK_FUNCS(dlopen dlerror) - LIBS="$my_save_LIBS" - - ;; -esac - - -# System characteristics -AC_SYS_RESTARTABLE_SYSCALLS - -# Build optimized or debug version ? -# First check for gcc and g++ -if test "$GCC" = "yes" -then - DEBUG_CFLAGS="-g" - DEBUG_OPTIMIZE_CC="-O" - OPTIMIZE_CFLAGS="$MAX_C_OPTIMIZE" -else - DEBUG_CFLAGS="-g" - DEBUG_OPTIMIZE_CC="" - case $SYSTEM_TYPE in - *solaris*) - OPTIMIZE_CFLAGS="-O1" - ;; - *) - OPTIMIZE_CFLAGS="-O" - ;; - esac -fi -if test "$GXX" = "yes" -then - DEBUG_CXXFLAGS="-g" - DEBUG_OPTIMIZE_CXX="-O" - OPTIMIZE_CXXFLAGS="$MAX_CXX_OPTIMIZE" -else - DEBUG_OPTIMIZE_CXX="" - case $SYSTEM_TYPE in - *solaris*) - DEBUG_CXXFLAGS="-g0" - OPTIMIZE_CXXFLAGS="-O1" - ;; - *) - DEBUG_CXXFLAGS="-g" - OPTIMIZE_CXXFLAGS="-O" - ;; - esac -fi - -# If the user specified CFLAGS, we won't add any optimizations -if test -n "$SAVE_CFLAGS" -then - OPTIMIZE_CFLAGS="" - DEBUG_OPTIMIZE_CC="" -fi -# Ditto for CXXFLAGS -if test -n "$SAVE_CXXFLAGS" -then - OPTIMIZE_CXXFLAGS="" - DEBUG_OPTIMIZE_CXX="" -fi - -if test "$with_debug" = "yes" -then - AC_DEFINE([DBUG_ON], [1], [Use libdbug]) - CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC -DSAFE_MUTEX $CFLAGS" - CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX -DSAFE_MUTEX $CXXFLAGS" -else - # Optimized version. No debug - AC_DEFINE([DBUG_OFF], [1], [Don't use libdbug]) - CFLAGS="$OPTIMIZE_CFLAGS $CFLAGS" - CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS" -fi - -AC_ARG_WITH([valgrind], - [AS_HELP_STRING([--with-valgrind], - [Valgrind instrumentation @<:@default=no@:>@])], - [], [with_valgrind=no]) - -if test "$with_valgrind" != "no" -then - AC_CHECK_HEADERS([valgrind/valgrind.h valgrind/memcheck.h], - [AC_DEFINE([HAVE_VALGRIND], [1], [Define for Valgrind support])]) -fi - -# Debug Sync Facility. NOTE: depends on 'with_debug'. Must be behind it. -AC_MSG_CHECKING(if Debug Sync Facility should be enabled.) -AC_ARG_ENABLE(debug_sync, - AS_HELP_STRING([--enable-debug-sync], - [Build a version with Debug Sync Facility]), - [ enable_debug_sync=$enableval ], - [ enable_debug_sync=$with_debug ]) - -if test "$enable_debug_sync" != "no" -then - AC_DEFINE([ENABLED_DEBUG_SYNC], [1], - [If Debug Sync Facility should be enabled]) - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi - -AC_ARG_WITH([fast-mutexes], - AC_HELP_STRING([--with-fast-mutexes], - [Compile with fast mutexes (default is disabled)]), - [with_fast_mutexes=$withval], [with_fast_mutexes=no]) - -if test "$with_fast_mutexes" != "no" -then - if test "$with_debug" != "no" - then - AC_MSG_WARN(['--with-fast-mutexes' ignored when '--with-debug' is given]) - else - AC_DEFINE([MY_PTHREAD_FASTMUTEX], [1], - [Define to 1 if you want to use fast mutexes]) - fi -fi - -AC_ARG_WITH([atomic-ops], - AS_HELP_STRING([--with-atomic-ops=rwlocks|smp|up], - [Implement atomic operations using pthread rwlocks or atomic CPU - instructions for multi-processor or uniprocessor - configuration. By default gcc built-in sync functions are used, - if available and 'smp' configuration otherwise.])) -case "$with_atomic_ops" in - "up") AC_DEFINE([MY_ATOMIC_MODE_DUMMY], [1], - [Assume single-CPU mode, no concurrency]) ;; - "rwlocks") AC_DEFINE([MY_ATOMIC_MODE_RWLOCKS], [1], - [Use pthread rwlocks for atomic ops]) ;; - "smp") ;; - "") - ;; - *) AC_MSG_ERROR(["$with_atomic_ops" is not a valid value for --with-atomic-ops]) ;; -esac - -AC_CACHE_CHECK([whether the compiler provides atomic builtins], - [mysql_cv_gcc_atomic_builtins], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [ - ], - [[ - int foo= -10; int bar= 10; - long long int foo64= -10; long long int bar64= 10; - if (!__sync_fetch_and_add(&foo, bar) || foo) - return -1; - bar= __sync_lock_test_and_set(&foo, bar); - if (bar || foo != 10) - return -1; - bar= __sync_val_compare_and_swap(&bar, foo, 15); - if (bar) - return -1; - if (!__sync_fetch_and_add(&foo64, bar64) || foo64) - return -1; - bar64= __sync_lock_test_and_set(&foo64, bar64); - if (bar64 || foo64 != 10) - return -1; - bar64= __sync_val_compare_and_swap(&bar64, foo, 15); - if (bar64) - return -1; - return 0; - ]] - )], - [mysql_cv_gcc_atomic_builtins=yes], - [mysql_cv_gcc_atomic_builtins=no], - [mysql_cv_gcc_atomic_builtins=no] -)]) -if test "x$mysql_cv_gcc_atomic_builtins" = xyes; then - AC_DEFINE(HAVE_GCC_ATOMIC_BUILTINS, 1, - [Define to 1 if compiler provides atomic builtins.]) -fi - -AC_CACHE_CHECK([whether the OS provides atomic_* functions like Solaris], - [mysql_cv_solaris_atomic], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[ - #include <atomic.h> - ]], - [[ - int foo = -10; int bar = 10; - int64_t foo64 = -10; int64_t bar64 = 10; - if (atomic_add_int_nv((uint_t *)&foo, bar) || foo) - return -1; - bar = atomic_swap_uint((uint_t *)&foo, (uint_t)bar); - if (bar || foo != 10) - return -1; - bar = atomic_cas_uint((uint_t *)&bar, (uint_t)foo, 15); - if (bar) - return -1; - if (atomic_add_64_nv((volatile uint64_t *)&foo64, bar64) || foo64) - return -1; - bar64 = atomic_swap_64((volatile uint64_t *)&foo64, (uint64_t)bar64); - if (bar64 || foo64 != 10) - return -1; - bar64 = atomic_cas_64((volatile uint64_t *)&bar64, (uint_t)foo64, 15); - if (bar64) - return -1; - atomic_or_64((volatile uint64_t *)&bar64, 0); - return 0; - ]] - )], - [mysql_cv_solaris_atomic=yes], - [mysql_cv_solaris_atomic=no], - [mysql_cv_solaris_atomic=no] -)]) -if test "x$mysql_cv_solaris_atomic" = xyes; then - AC_DEFINE(HAVE_SOLARIS_ATOMIC, 1, - [Define to 1 if OS provides atomic_* functions like Solaris.]) -fi - -# Force static compilation to avoid linking problems/get more speed -AC_ARG_WITH(mysqld-ldflags, - [ --with-mysqld-ldflags Extra linking arguments for mysqld], - [MYSQLD_EXTRA_LDFLAGS=$withval], - [MYSQLD_EXTRA_LDFLAGS=]) -AC_SUBST(MYSQLD_EXTRA_LDFLAGS) - -AC_ARG_WITH(client-ldflags, - [ --with-client-ldflags Extra linking arguments for clients], - [CLIENT_EXTRA_LDFLAGS=$withval], - [CLIENT_EXTRA_LDFLAGS=]) -AC_SUBST(CLIENT_EXTRA_LDFLAGS) - -AC_ARG_WITH(mysqld-libs, - [ --with-mysqld-libs Extra libraries to link with for mysqld], - [MYSQLD_EXTRA_LIBS=$withval], - [MYSQLD_EXTRA_LIBS=]) -AC_SUBST(MYSQLD_EXTRA_LIBS) - -AC_ARG_WITH(lib-ccflags, - [ --with-lib-ccflags Extra CC options for libraries], - [LIB_EXTRA_CCFLAGS=$withval], - [LIB_EXTRA_CCFLAGS=]) -AC_SUBST(LIB_EXTRA_CCFLAGS) - -# Avoid stupid bug on some OS -AC_ARG_WITH(low-memory, - [ --with-low-memory Try to use less memory to compile to avoid - memory limitations.], - [with_lowmem=$withval], - [with_lowmem=no]) -if test "$with_lowmem" = "yes" -then - if test "$ac_cv_prog_gcc" = "yes" - then - LM_CFLAGS="-fno-inline" - else - LM_CFLAGS="-O0" - fi -else - LM_CFLAGS="" -fi -AC_SUBST(LM_CFLAGS) - -AC_ARG_WITH(comment, - [ --with-comment Comment about compilation environment.], - [with_comment=$withval], - [with_comment=no]) -if test "$with_comment" != "no" -then - COMPILATION_COMMENT=$with_comment -else - COMPILATION_COMMENT="Source distribution" -fi -AC_SUBST(COMPILATION_COMMENT) - -AC_MSG_CHECKING("need of special linking flags") -if test "$TARGET_LINUX" = "true" -a "$ac_cv_prog_gcc" = "yes" -a "$all_is_static" != "yes" -then - LDFLAGS="$LDFLAGS -rdynamic" - AC_MSG_RESULT("-rdynamic") -else - case "$SYSTEM_TYPE$with_mysqld_ldflags " in - *freebsd*"-all-static "*|*dragonfly*"-all-static "*) - AC_MSG_RESULT("none") - ;; - *freebsd*|*dragonfly*) - MYSQLD_EXTRA_LDFLAGS="$MYSQLD_EXTRA_LDFLAGS -export-dynamic" - AC_MSG_RESULT("-export-dynamic") - ;; - *) - AC_MSG_RESULT("none") - ;; - esac -fi - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_C_INLINE -AS_IF([test "x$ac_cv_c_inline" = "xno"], - [AC_MSG_WARN([The C compiler does not support inline. Beware that unused - functions might not be eliminated the object files.])]) -AC_TYPE_OFF_T -AC_STRUCT_ST_RDEV -AC_HEADER_TIME -AC_STRUCT_TM -MYSQL_NEEDS_MYSYS_NEW -# AC_CHECK_SIZEOF return 0 when it does not find the size of a -# type. We want a error instead. -AC_CHECK_SIZEOF(char, 1) -if test "$ac_cv_sizeof_char" -eq 0 -then - AC_MSG_ERROR([No size for char type. -A likely cause for this could be that there isn't any -static libraries installed. You can verify this by checking if you have libm.a -in /lib, /usr/lib or some other standard place. If this is the problem, -install the static libraries and try again. If this isn't the problem, -examine config.log for possible errors. If you want to report this, use -'scripts/mysqlbug' and include at least the last 20 rows from config.log!]) -fi -AC_CHECK_SIZEOF(char*, 4) -AC_CHECK_SIZEOF(short, 2) -AC_CHECK_SIZEOF(int, 4) -if test "$ac_cv_sizeof_int" -eq 0 -then - AC_MSG_ERROR("No size for int type.") -fi -AC_CHECK_SIZEOF(long, 4) -if test "$ac_cv_sizeof_long" -eq 0 -then - AC_MSG_ERROR("No size for long type.") -fi -AC_CHECK_SIZEOF(long long, 8) -if test "$ac_cv_sizeof_long_long" -eq 0 -then - AC_MSG_ERROR("MySQL needs a long long type.") -fi -# off_t is not a builtin type -AC_CHECK_SIZEOF(off_t, 4) -if test "$ac_cv_sizeof_off_t" -eq 0 -then - AC_MSG_ERROR("MySQL needs a off_t type.") -fi - -dnl -dnl check if time_t is unsigned -dnl - -MYSQL_CHECK_TIME_T - - -# do we need #pragma interface/#pragma implementation ? -# yes if it's gcc 2.x, and not icc pretending to be gcc, and not cygwin -AC_MSG_CHECKING(the need for @%:@pragma interface/implementation) -# instead of trying to match SYSTEM_TYPE and CC_VERSION (that doesn't -# follow any standard), we'll use well-defined preprocessor macros: -AC_TRY_CPP([ -#if !defined(__CYGWIN__) && !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ < 3) -#error USE_PRAGMA_IMPLEMENTATION -#endif -],AC_MSG_RESULT(no) ,AC_MSG_RESULT(yes) ; CXXFLAGS="$CXXFLAGS -DUSE_PRAGMA_IMPLEMENTATION") - -# This always gives a warning. Ignore it unless you are cross compiling -AC_C_BIGENDIAN -#---START: Used in for client configure -# Check base type of last arg to accept -MYSQL_TYPE_ACCEPT -#---END: -# Figure out what type of struct rlimit to use with setrlimit -MYSQL_TYPE_STRUCT_RLIMIT -# Find where the stack goes -MYSQL_STACK_DIRECTION -# We want to skip alloca on irix unconditionally. It may work on some version.. -MYSQL_FUNC_ALLOCA -# Do struct timespec have members tv_sec or ts_sec -MYSQL_TIMESPEC_TS -# Do we have the tzname variable -MYSQL_TZNAME -# Do the c++ compiler have a bool type -MYSQL_CXX_BOOL -# Check some common bugs with gcc 2.8.# on sparc -MYSQL_CHECK_LONGLONG_TO_FLOAT -if test "$ac_cv_conv_longlong_to_float" != "yes" -then - AC_MSG_ERROR([Your compiler cannot convert a longlong value to a float! - If you are using gcc 2.8.# you should upgrade to egcs 1.0.3 - or newer and try again]) -fi -AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>]) -AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>]) -AC_CHECK_TYPES([u_int32_t]) - -MYSQL_PTHREAD_YIELD - -###################################################################### -# For readline/libedit (We simply move the mimimum amount of stuff from -# the readline/libedit configure.in here) - -dnl Checks for header files. -AC_CHECK_HEADERS(malloc.h sys/cdefs.h) - -dnl Checks for library functions. -AC_FUNC_ALLOCA -AC_PROG_GCC_TRADITIONAL -AC_TYPE_SIGNAL -AC_CHECK_FUNCS(re_comp regcomp strdup) - -dnl Sun compilers have their own vis.h that is about something -dnl totally different. So, not to change the libedit source, we -dnl do some additional checks before we define HAVE_VIS_H. -AC_CHECK_HEADER(vis.h, - [AC_CHECK_FUNC(strvis, - [AC_DEFINE([HAVE_VIS_H], [1],[Found vis.h and the strvis() function])])]) - -AC_CHECK_FUNCS(strlcat strlcpy) -AC_CHECK_FUNCS(issetugid) -AC_CHECK_FUNCS(fgetln) -AC_CHECK_FUNCS(getline flockfile) - -# from old readline settting: - -MAKE_SHELL=/bin/sh -AC_SUBST(MAKE_SHELL) - -# Already-done: stdlib.h string.h unistd.h termios.h -AC_CHECK_HEADERS(varargs.h stdarg.h dirent.h locale.h ndir.h sys/dir.h \ - sys/file.h sys/ndir.h sys/ptem.h sys/pte.h sys/select.h sys/stream.h \ - sys/mman.h curses.h termcap.h termio.h termbits.h asm/termbits.h grp.h \ -paths.h semaphore.h langinfo.h) - -# Already-done: strcasecmp -AC_CHECK_FUNCS(lstat putenv select setenv setlocale strcoll tcgetattr) -AC_CHECK_FUNCS(nl_langinfo) - -AC_STAT_MACROS_BROKEN -MYSQL_SIGNAL_CHECK -MYSQL_CHECK_GETPW_FUNCS -MYSQL_HAVE_TIOCGWINSZ -MYSQL_HAVE_FIONREAD -MYSQL_HAVE_TIOCSTAT -MYSQL_STRUCT_DIRENT_D_INO -MYSQL_STRUCT_DIRENT_D_NAMLEN -MYSQL_TYPE_SIGHANDLER -MYSQL_CHECK_MULTIBYTE -if test "$with_named_curses" = "no" -then - MYSQL_CHECK_LIB_TERMCAP -else - TERMCAP_LIB="$with_named_curses" -fi -AC_SUBST(TERMCAP_LIB) - -# Check if the termcap function 'tgoto' is already declared in -# system header files or if it need to be declared locally -AC_CHECK_DECLS(tgoto,,,[ -#ifdef HAVE_CURSES_H -# include <curses.h> -#elif HAVE_NCURSES_H -# include <ncurses.h> -#endif -#ifdef HAVE_TERM_H -# include <term.h> -#endif -]) - -LIBEDIT_LOBJECTS="" -AC_CHECK_FUNC(strunvis, ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS unvis.o"]) -AC_CHECK_FUNC(strvis, ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS vis.o"]) -AC_CHECK_FUNC(strlcpy, ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS strlcpy.o"]) -AC_CHECK_FUNC(strlcat, ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS strlcat.o"]) -AC_CHECK_FUNC(fgetln, ,[LIBEDIT_LOBJECTS="$LIBEDIT_LOBJECTS fgetln.o"]) -AC_SUBST(LIBEDIT_LOBJECTS) -enable_readline="yes" - -# End of readline/libedit stuff -######################################################################### - -dnl Checks for library functions. - -# -# The following code disables intrinsic function support while we test for -# library functions. This is to avoid configure problems with Intel ecc -# compiler - -ORG_CFLAGS="$CFLAGS" -if test "$GCC" != "yes"; then - AC_SYS_COMPILER_FLAG(-nolib_inline,nolib_inline,CFLAGS,[],[]) -fi - -#AC_FUNC_MMAP -AC_TYPE_SIGNAL -MYSQL_TYPE_QSORT -AC_FUNC_UTIME_NULL -AC_FUNC_VPRINTF - -AC_CHECK_DECLS([fdatasync],,, -[ -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif -]) - -AC_CHECK_FUNCS(alarm bfill bmove bsearch bzero \ - chsize cuserid fchmod fcntl \ - fdatasync fesetround finite fpresetsticky fpsetmask fsync ftruncate \ - getcwd gethostbyaddr_r gethostbyname_r getpass getpassphrase getpwnam \ - getpwuid getrlimit getrusage getwd index initgroups isnan \ - localtime_r gethrtime gmtime_r \ - locking longjmp lrand48 madvise mallinfo memcpy memmove \ - mkstemp mlockall perror poll pread pthread_attr_create mmap mmap64 getpagesize \ - pthread_attr_getstacksize pthread_attr_setstacksize pthread_condattr_create \ - pthread_getsequence_np pthread_key_delete pthread_rwlock_rdlock \ - pthread_sigmask \ - readlink realpath rename rint rwlock_init setupterm \ - shmget shmat shmdt shmctl sigaction sigemptyset sigaddset \ - sighold sigset sigthreadmask port_create sleep thr_yield \ - snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr \ - strtol strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr \ - posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd printstack) - -# -# -# -case "$target" in - *-*-aix4* | *-*-sco*) - # (grr) aix 4.3 has a stub for clock_gettime, (returning ENOSYS) - # and using AC_TRY_RUN is hard when cross-compiling - # We also disable for SCO for the time being, the headers for the - # thread library we use conflicts with other headers. - ;; - *) AC_CHECK_FUNCS(clock_gettime) - ;; -esac - -case "$mysql_cv_sys_os" in - OS400) # i5/OS (OS/400) emits a SIGILL (Function not implemented) when - # unsupported priority values are passed to pthread_setschedprio. - # Since the only supported value is 1, treat it as inexistent. - ;; - SunOS) # Bug#42599 error: `pthread_setschedprio' was not declared in this scope - # In some installations, the pthread.h header used by GCC does not - # declare the pthread_setscheprio prototype, but the function is - # implemented. Since the function is used in C++ code, ensure that - # the function prototype is present. - AC_MSG_CHECKING([whether pthread_setschedprio is declared]) - AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([#include <pthread.h>], - [(void)(pthread_setschedprio);])], - [ac_cv_func_pthread_setschedprio=yes], - [ac_cv_func_pthread_setschedprio=no]) - AC_LANG_POP([C++]) - AC_MSG_RESULT([$ac_cv_func_pthread_setschedprio]) - if test "$ac_cv_func_pthread_setschedprio" = yes; then - AC_DEFINE(HAVE_PTHREAD_SETSCHEDPRIO, 1, - [Define to 1 if you have the `pthread_setschedprio' function.]) - fi - ;; - *) AC_CHECK_FUNCS(pthread_setschedprio) - ;; -esac - -# Check that isinf() is available in math.h and can be used in both C and C++ -# code -AC_MSG_CHECKING(for isinf in <math.h>) -AC_TRY_LINK([#include <math.h>], [float f = 0.0; int r = isinf(f); return r], - AC_MSG_RESULT(yes) - AC_MSG_CHECKING(whether isinf() is safe to use in C code) - AC_TRY_RUN([ -#include <math.h> -int main() -{ - double a= 10.0; - double b= 1e308; - - return !isinf(a * b); -} -], - [AC_MSG_RESULT(yes)], - [AC_MSG_RESULT(no) - AC_DEFINE([HAVE_BROKEN_ISINF], [1], - [Define to 1 if isinf() uses 80-bit register for intermediate values]) - ], - [ -# Let's be optimistic when cross-compiling, since the only compiler known -# to be affected by this isinf() bug is GCC 4.3 on 32-bit x86. - AC_MSG_RESULT([[cross-compiling, assuming 'yes']]) - ]) - AC_MSG_CHECKING(whether isinf() can be used in C++ code) - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - AC_TRY_LINK([#include <math.h>], [float f = 0.0; int r = isinf(f); return r], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_ISINF, [1], [isinf() macro or function]), - AC_MSG_RESULT(no)) - AC_LANG_RESTORE, - AC_MSG_RESULT(no)) - -CFLAGS="$ORG_CFLAGS" - -# Sanity check: We chould not have any fseeko symbol unless -# large_file_support=yes -AC_CHECK_FUNC(fseeko, -[if test "$large_file_support" = no -a "$TARGET_LINUX" = "true"; -then - AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!") -fi] -) - -# Check definition of gethostbyaddr_r (glibc2 defines this with 8 arguments) -ac_save_CXXFLAGS="$CXXFLAGS" -AC_CACHE_CHECK([style of gethost* routines], mysql_cv_gethost_style, -AC_LANG_SAVE -AC_LANG_CPLUSPLUS - -# Test whether madvise() is declared in C++ code -- it is not on some -# systems, such as Solaris -AC_CHECK_DECLS(madvise, [], [], [#if HAVE_SYS_MMAN_H -#include <sys/types.h> -#include <sys/mman.h> -#endif]) - -# Do not treat warnings as errors if we are linking against other libc -# this is to work around gcc not being permissive on non-system includes -# with respect to ANSI C++ -# We also remove the -fbranch-probabilities option as this will give warnings -# about not profiled code, which confuses configure -# We also must remove -W and -Wcheck which on icc produces warnings that -# we don't want to catch with -Werror - -if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no" -then - CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-ansi//; s/-pedantic//; s/-Wcheck//'` -fi - -AC_TRY_COMPILE( -[#undef inline -#if !defined(SCO) && !defined(__osf__) && !defined(_REENTRANT) -#define _REENTRANT -#endif -#include <pthread.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <netdb.h>], -[int skr; - struct hostent *foo = gethostbyaddr_r((const char *) 0, - 0, 0, (struct hostent *) 0, (char *) NULL, 0, &skr); return (foo == 0);], -mysql_cv_gethost_style=solaris, mysql_cv_gethost_style=other)) -AC_LANG_RESTORE -CXXFLAGS="$ac_save_CXXFLAGS" -if test "$mysql_cv_gethost_style" = "solaris" -then - AC_DEFINE([HAVE_SOLARIS_STYLE_GETHOST], [1], - [Solaris define gethostbyaddr_r with 7 arguments. glibc2 defines this with 8 arguments]) -fi - -#---START: Used in for client configure - -# Check definition of gethostbyname_r (glibc2.0.100 is different from Solaris) -ac_save_CXXFLAGS="$CXXFLAGS" -AC_CACHE_CHECK([style of gethostbyname_r routines], mysql_cv_gethostbyname_style, -AC_LANG_SAVE -AC_LANG_CPLUSPLUS -if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no" -then - CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-ansi//; s/-pedantic//; s/-Wcheck//'` -fi -AC_TRY_COMPILE( -[#undef inline -#if !defined(SCO) && !defined(__osf__) && !defined(_REENTRANT) -#define _REENTRANT -#endif -#include <pthread.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <netdb.h>], -[int skr; - - skr = gethostbyname_r((const char *) 0, - (struct hostent*) 0, (char*) 0, 0, (struct hostent **) 0, &skr);], -mysql_cv_gethostbyname_style=glibc2, mysql_cv_gethostbyname_style=other)) -AC_LANG_RESTORE -CXXFLAGS="$ac_save_CXXFLAGS" -if test "$mysql_cv_gethostbyname_style" = "glibc2" -then - AC_DEFINE([HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE], [1], - [Solaris define gethostbyname_r with 5 arguments. glibc2 defines this with 6 arguments]) -fi - -# Check 3rd argument of getthostbyname_r -ac_save_CXXFLAGS="$CXXFLAGS" -AC_CACHE_CHECK([3 argument to gethostbyname_r routines], mysql_cv_gethostbyname_arg, -AC_LANG_SAVE -AC_LANG_CPLUSPLUS -if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no" -then - CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-ansi//; s/-pedantic//; s/-Wcheck//'` -fi -AC_TRY_COMPILE( -[#undef inline -#if !defined(SCO) && !defined(__osf__) && !defined(_REENTRANT) -#define _REENTRANT -#endif -#include <pthread.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <netdb.h>], -[int skr; - - skr = gethostbyname_r((const char *) 0, (struct hostent*) 0, (struct hostent_data*) 0);], -mysql_cv_gethostbyname_arg=hostent_data, mysql_cv_gethostbyname_arg=char)) -AC_LANG_RESTORE -CXXFLAGS="$ac_save_CXXFLAGS" -if test "$mysql_cv_gethostbyname_arg" = "hostent_data" -then - AC_DEFINE([HAVE_GETHOSTBYNAME_R_RETURN_INT], [1], - [In OSF 4.0f the 3'd argument to gethostbyname_r is hostent_data *]) -fi - - -# Check definition of pthread_getspecific -AC_CACHE_CHECK("args to pthread_getspecific", mysql_cv_getspecific_args, -AC_TRY_COMPILE( -[#if !defined(SCO) && !defined(__osf__) && !defined(_REENTRANT) -#define _REENTRANT -#endif -#define _POSIX_PTHREAD_SEMANTICS -#include <pthread.h> ], -[ void *pthread_getspecific(pthread_key_t key); -pthread_getspecific((pthread_key_t) NULL); ], -mysql_cv_getspecific_args=POSIX, mysql_cv_getspecific_args=other)) - if test "$mysql_cv_getspecific_args" = "other" - then - AC_DEFINE([HAVE_NONPOSIX_PTHREAD_GETSPECIFIC], [1], - [For some non posix threads]) - fi - - # Check definition of pthread_mutex_init - AC_CACHE_CHECK("args to pthread_mutex_init", mysql_cv_mutex_init_args, - AC_TRY_COMPILE( -[#if !defined(SCO) && !defined(__osf__) -#define _REENTRANT -#endif -#define _POSIX_PTHREAD_SEMANTICS -#include <pthread.h> ], -[ - pthread_mutexattr_t attr; - pthread_mutex_t mp; - pthread_mutex_init(&mp,&attr); ], -mysql_cv_mutex_init_args=POSIX, mysql_cv_mutex_init_args=other)) - if test "$mysql_cv_mutex_init_args" = "other" - then - AC_DEFINE([HAVE_NONPOSIX_PTHREAD_MUTEX_INIT], [1], - [For some non posix threads]) - fi -#---END: - -#---START: Used in for client configure -# Check definition of readdir_r -AC_CACHE_CHECK("args to readdir_r", mysql_cv_readdir_r, -AC_TRY_LINK( -[#if !defined(SCO) && !defined(__osf__) -#define _REENTRANT -#endif -#define _POSIX_PTHREAD_SEMANTICS -#include <pthread.h> -#include <dirent.h>], -[ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result); -readdir_r((DIR *) NULL, (struct dirent *) NULL, (struct dirent **) NULL); ], -mysql_cv_readdir_r=POSIX, mysql_cv_readdir_r=other)) -if test "$mysql_cv_readdir_r" = "POSIX" -then - AC_DEFINE([HAVE_READDIR_R], [1], [POSIX readdir_r]) -fi - -# Check definition of posix sigwait() -AC_CACHE_CHECK("style of sigwait", mysql_cv_sigwait, -AC_TRY_LINK( -[#if !defined(SCO) && !defined(__osf__) -#define _REENTRANT -#endif -#define _POSIX_PTHREAD_SEMANTICS -#include <pthread.h> -#include <signal.h>], -[#ifndef _AIX -sigset_t set; -int sig; -sigwait(&set,&sig); -#endif], -mysql_cv_sigwait=POSIX, mysql_cv_sigwait=other)) -if test "$mysql_cv_sigwait" = "POSIX" -then - AC_DEFINE([HAVE_SIGWAIT], [1], [POSIX sigwait]) -fi - -if test "$mysql_cv_sigwait" != "POSIX" -then -unset mysql_cv_sigwait -# Check definition of posix sigwait() -AC_CACHE_CHECK("style of sigwait", mysql_cv_sigwait, -AC_TRY_LINK( -[#if !defined(SCO) && !defined(__osf__) -#define _REENTRANT -#endif -#define _POSIX_PTHREAD_SEMANTICS -#include <pthread.h> -#include <signal.h>], -[sigset_t set; -int sig; -sigwait(&set);], -mysql_cv_sigwait=NONPOSIX, mysql_cv_sigwait=other)) -if test "$mysql_cv_sigwait" = "NONPOSIX" -then - AC_DEFINE([HAVE_NONPOSIX_SIGWAIT], [1], [sigwait with one argument]) -fi -fi -#---END: - -#Check for x86 PAUSE instruction -AC_MSG_CHECKING("for x86 PAUSE instruction") -# We have to actually try running the test program, because of a bug -# in Solaris on x86_64, where it wrongly reports that PAUSE is not -# supported when trying to run an application. See -# http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684 -AC_TRY_RUN([ - int main() { - __asm__ __volatile__ ("pause"); - return 0; - } - ], - [x86_pause_exists=yes], - [x86_pause_exists=no], - [x86_pause_exists=no] # Cross-compile, assume no PAUSE instruction -) -AC_TRY_RUN([ - int main() { - __asm__ __volatile__ ("rep; nop"); - return 0; - } - ], - [x86_fake_pause_exists=yes], - [x86_fake_pause_exists=no], - [x86_fake_pause_exists=no] # Cross-compile, assume no x86 NOP instruction -) -if test "$x86_pause_exists" = "yes" -then - AC_DEFINE([HAVE_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist]) -else - if test "$x86_fake_pause_exists" = "yes" - then - AC_DEFINE([HAVE_FAKE_PAUSE_INSTRUCTION], [1], [Does x86 NOP instruction exist]) - fi -fi - -# Check if pthread_attr_setscope() exists -AC_CACHE_CHECK("for pthread_attr_setscope", mysql_cv_pthread_attr_setscope, -AC_TRY_LINK( -[#if !defined(SCO) && !defined(__osf__) -#define _REENTRANT -#endif -#define _POSIX_PTHREAD_SEMANTICS -#include <pthread.h>], -[pthread_attr_t thr_attr; -pthread_attr_setscope(&thr_attr,0);], -mysql_cv_pthread_attr_setscope=yes, mysql_cv_pthread_attr_setscope=no)) -if test "$mysql_cv_pthread_attr_setscope" = "yes" -then - AC_DEFINE([HAVE_PTHREAD_ATTR_SETSCOPE], [1], [pthread_attr_setscope]) -fi - -# Check for bad includes -AC_MSG_CHECKING("can netinet files be included") -AC_TRY_COMPILE( -[#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in_systm.h> -#include <netinet/in.h> -#include <netinet/ip.h> -#include <netinet/tcp.h>], -[ printf("1\n"); ], -netinet_inc=yes, netinet_inc=no) -if test "$netinet_inc" = "no" -then - AC_DEFINE([HAVE_BROKEN_NETINET_INCLUDES], [1], [Can netinet be included]) -fi -AC_MSG_RESULT("$netinet_inc") - -AC_CACHE_CHECK([support for weak symbols], mysql_cv_weak_symbol, -[AC_TRY_LINK([],[ - extern void __attribute__((weak)) foo(void); -], [mysql_cv_weak_symbol=yes], [mysql_cv_weak_symbol=no])]) - -if test "x$mysql_cv_weak_symbol" = xyes; then - AC_DEFINE(HAVE_WEAK_SYMBOL, 1, - [Define to 1 if compiler supports weak symbol attribute.]) -fi - -AC_CACHE_CHECK([whether __bss_start is defined], mysql_cv_bss_start, -[AC_TRY_LINK([],[ - extern char *__bss_start; - return __bss_start ? 1 : 0; -], [mysql_cv_bss_start=yes], [mysql_cv_bss_start=no])]) - -if test "x$mysql_cv_bss_start" = xyes; then - AC_DEFINE(HAVE_BSS_START, 1, - [Define to 1 if compiler defines __bss_start.]) -fi - -AC_LANG_SAVE -AC_LANG_CPLUSPLUS -AC_CHECK_HEADERS(cxxabi.h) -AC_CACHE_CHECK([for abi::__cxa_demangle], mysql_cv_cxa_demangle, -[AC_TRY_LINK([#include <cxxabi.h>], [ - char *foo= 0; int bar= 0; - foo= abi::__cxa_demangle(foo, foo, 0, &bar); -], [mysql_cv_cxa_demangle=yes], [mysql_cv_cxa_demangle=no])]) -AC_LANG_RESTORE - -if test "x$mysql_cv_cxa_demangle" = xyes; then - AC_DEFINE(HAVE_ABI_CXA_DEMANGLE, 1, - [Define to 1 if you have the `abi::__cxa_demangle' function.]) -fi - -#-------------------------------------------------------------------- -# Check for requested features -#-------------------------------------------------------------------- - -MYSQL_CHECK_BIG_TABLES -MYSQL_CHECK_MAX_INDEXES -MYSQL_CHECK_VIO -MYSQL_CHECK_SSL - -#-------------------------------------------------------------------- -# Declare our plugin modules -# Has to be done late, as the plugin may need to check for existence of -# functions tested above -#-------------------------------------------------------------------- - -MYSQL_STORAGE_ENGINE(partition, partition, [Partition Support], - [MySQL Partitioning Support], [max,max-no-ndb]) - -dnl -- ndbcluster requires partition to be enabled - -MYSQL_CONFIGURE_PLUGINS([default]) - -# Only build client code? -AC_ARG_WITH(server, - [ --without-server Only build the client.], - [with_server=$withval], - [with_server=yes] -) - -AC_ARG_WITH(embedded-server, - [ --with-embedded-server Build the embedded server (libmysqld).], - [with_embedded_server=$withval], - [with_embedded_server=no] -) - -AC_ARG_WITH(query_cache, - [ --without-query-cache Do not build query cache.], - [with_query_cache=$withval], - [with_query_cache=yes] -) - -if test "$with_query_cache" = "yes" -then - AC_DEFINE([HAVE_QUERY_CACHE], [1], [If we want to have query cache]) -fi - -AC_ARG_WITH(geometry, - [ --without-geometry Do not build geometry-related parts.], - [with_geometry=$withval], - [with_geometry=yes] -) - -if test "$with_geometry" = "yes" -then - AC_DEFINE([HAVE_SPATIAL], [1], [Spatial extentions]) - AC_DEFINE([HAVE_RTREE_KEYS], [1], [RTree keys]) -fi - -AC_ARG_WITH(embedded_privilege_control, - [ --with-embedded-privilege-control - Build parts to check user's privileges. - Only affects embedded library.], - [with_embedded_privilege_control=$withval], - [with_embedded_privilege_control=no] -) - -if test "$with_embedded_privilege_control" = "yes" -then - AC_DEFINE([HAVE_EMBEDDED_PRIVILEGE_CONTROL], [1], - [Access checks in embedded library]) -fi - -#MYSQL_CHECK_CPU - -libmysqld_dirs= -if test "$with_embedded_server" = "yes" -then - libmysqld_dirs=libmysqld - - # We can't build embedded library without building the server, because - # we depend on libmysys, libmystrings, libmyisam, etc. - with_server=yes -fi -# XXX: We need to add @libmysqld_extra_libs@ (or whatever) so that -# mysql_config --libmysqld-libs will print out something like -# -L/path/to/lib/mysql -lmysqld -lmyisam -lmysys -lmystrings -ldbug ... -AC_SUBST([libmysqld_dirs]) - -# Shall we build the docs? -AC_ARG_WITH(docs, - [ --without-docs Skip building of the documentation.], - [with_docs=$withval], - [with_docs=yes] -) - -if test "$with_docs" = "yes" -then - docs_dirs="Docs" - if test -f "$srcdir/Docs/manual.chm" ; then - extra_docs="manual.chm" - fi -else - docs_dirs="" - extra_docs="" -fi -AC_SUBST(docs_dirs) -AC_SUBST(extra_docs) - -# Shall we build the man pages? -AC_ARG_WITH(man, - [ --without-man Skip building of the man pages.], - [with_man=$withval], - [with_man=yes] -) - -# Don't build readline, i have it already -AC_ARG_WITH(readline, - [ --without-readline Use system readline instead of bundled copy.], - [ with_readline=$withval ], - [ with_readline=undefined ] - ) - -AC_ARG_WITH(libedit, - [ --without-libedit Use system libedit instead of bundled copy.], - [ with_libedit=$withval ], - [ with_libedit=undefined ] - ) - -if test "$with_readline/$with_libedit" = "undefined/undefined" -a ! -e "$srcdir/cmd-line-utils" -then - with_readline=no - with_libedit=no -fi - -# -# We support next variants of compilation: -# --with-readline -# | yes | no | undefined -# --with-libedit | | | -# ---------------+----------------+------+---------------------------------- -# yes | ERROR! | use libedit from mysql sources -# ---------------+----------------+------+---------------------------------- -# no | use readline | use system readline or external libedit -# | from mysql | according to results of m4 tests -# ---------------+ sources (if it + +---------------------------------- -# undefined | is presented) | | use libedit from mysql sources - - -compile_readline="no" -compile_libedit="no" - -if [test "$with_libedit" = "yes"] && [test "$with_readline" = "yes"] -then - AC_MSG_ERROR([You can not use --with-readline and --with-libedit at the same time, please choose one of it]) -fi - -readline_topdir="" -readline_basedir="" -readline_dir="" -readline_h_ln_cmd="" -readline_link="" -want_to_use_readline="no" - -if [test "$with_libedit" = "yes"] || [test "$with_libedit" = "undefined"] && [test "$with_readline" = "undefined"] -then - readline_topdir="cmd-line-utils" - readline_basedir="libedit" - readline_dir="$readline_topdir/$readline_basedir" - readline_link="\$(top_builddir)/cmd-line-utils/libedit/libedit.a" - readline_h_ln_cmd="\$(LN) -s \$(top_srcdir)/cmd-line-utils/libedit/readline readline" - compile_libedit=yes - AC_DEFINE_UNQUOTED(HAVE_HIST_ENTRY, 1) - AC_DEFINE_UNQUOTED(USE_LIBEDIT_INTERFACE, 1) -elif test "$with_readline" = "yes" -then - readline_topdir="cmd-line-utils" - readline_basedir="readline" - readline_dir="$readline_topdir/$readline_basedir" - readline_link="\$(top_builddir)/cmd-line-utils/readline/libreadline.a" - readline_h_ln_cmd="\$(LN) -s \$(top_srcdir)/cmd-line-utils/readline readline" - compile_readline=yes - want_to_use_readline="yes" - AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE, 1) -else - # Use system readline library - AC_LANG_SAVE - AC_LANG_CPLUSPLUS - MYSQL_CHECK_LIBEDIT_INTERFACE - MYSQL_CHECK_NEW_RL_INTERFACE - MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY - AC_LANG_RESTORE - if [test "$mysql_cv_new_rl_interface" = "yes"] && [test -d "$srcdir/cmd-line-utils/readline"] - then - # Use the new readline interface, but only if the package includes a bundled libreadline - # this way we avoid linking commercial source with GPL readline - readline_link="-lreadline" - want_to_use_readline="yes" - elif [test "$mysql_cv_libedit_interface" = "yes"] - then - # Use libedit - readline_link="-ledit" - else - AC_MSG_ERROR([Could not find system readline or libedit libraries - Use --with-readline or --with-libedit to use the bundled - versions of libedit or readline]) - fi -fi - -# if there is no readline, but we want to build with readline, we fail -if [test "$want_to_use_readline" = "yes"] && [test ! -d "$srcdir/cmd-line-utils/readline"] -then - AC_MSG_ERROR([This commercially licensed MySQL source package can't - be built with libreadline. Please use --with-libedit to use - the bundled version of libedit instead.]) -fi - -AC_SUBST(readline_dir) -AC_SUBST(readline_topdir) -AC_SUBST(readline_basedir) -AC_SUBST(readline_link) -AC_SUBST(readline_h_ln_cmd) - - - -# Include man pages, if desired, adapted to the configured parts. -if test X"$with_man" = Xyes -then - # First, create the list of all man pages present. - MANLISTFIL=manlist.$$ - TMPLISTFIL=`echo $MANLISTFIL | sed -e 's/manlist/tmplist/'` - if test -f $MANLISTFIL -o -f $TMPLISTFIL - then - echo "Temp file '$MANLISTFIL' or '$TMPLISTFIL' already exists in '`pwd`' - aborting" - exit 1 - fi - touch $MANLISTFIL $TMPLISTFIL - - ls $srcdir/man/*.[[18]] > $MANLISTFIL - - # Then, remove all those pages from the list which are specific to parts - # (table handlers, features, ...) which are not configured in this run. - AC_MSG_CHECKING("for man pages to remove") - MAN_DROP="dropping" - if test X"$with_plugin_ndbcluster" != Xyes - then - MAN_DROP="$MAN_DROP ndbcluster" - grep -v '/ndb' $MANLISTFIL > $TMPLISTFIL ; mv -f $TMPLISTFIL $MANLISTFIL - fi - if test X"$with_embedded_server" != Xyes - then - MAN_DROP="$MAN_DROP embedded" - grep -v 'embedded' $MANLISTFIL > $TMPLISTFIL ; mv -f $TMPLISTFIL $MANLISTFIL - fi - if test X"$with_plugin_innobase" != Xyes - then - MAN_DROP="$MAN_DROP innodb" - grep -v 'inno' $MANLISTFIL > $TMPLISTFIL ; mv -f $TMPLISTFIL $MANLISTFIL - fi - AC_MSG_RESULT([$MAN_DROP]) - - # Finally, split the man pages into sections 1 and 8. - # Get rid of line breaks. - man1_files=`sed -n -e '/\.1$/s/^.*man\///p' <$MANLISTFIL` - man8_files=`sed -n -e '/\.8$/s/^.*man\///p' <$MANLISTFIL` - - man_dirs="man" - man1_files=`echo $man1_files` - man8_files=`echo $man8_files` - rm -f $MANLISTFIL $TMPLISTFIL -else - man_dirs="" - man1_files="" - man8_files="" -fi -AC_SUBST(man_dirs) -AC_SUBST(man1_files) -AC_SUBST(man8_files) - -# If we have threads generate some library functions and test programs -sql_server_dirs= -sql_server= -server_scripts= - -dnl This probably should be cleaned up more - for now the threaded -dnl client is just using plain-old libs. -sql_client_dirs="strings mysys dbug extra regex libmysql" - -AM_CONDITIONAL(THREAD_SAFE_CLIENT, test "$THREAD_SAFE_CLIENT" != "no") - -if test "$THREAD_SAFE_CLIENT" != "no" -then - sql_client_dirs="$sql_client_dirs libmysql_r" - AC_DEFINE([THREAD_SAFE_CLIENT], [1], [Should the client be thread safe]) -fi -sql_client_dirs="$sql_client_dirs client" - -CLIENT_LIBS="$NON_THREADED_LIBS $openssl_libs $ZLIB_LIBS $STATIC_NSS_FLAGS" - -AC_SUBST(CLIENT_LIBS) -AC_SUBST(CLIENT_THREAD_LIBS) -AC_SUBST(NON_THREADED_LIBS) -AC_SUBST(STATIC_NSS_FLAGS) -AC_SUBST(sql_client_dirs) - -if test "$with_server" != "no" -o "$THREAD_SAFE_CLIENT" != "no" -then - AC_DEFINE([THREAD], [1], - [Define if you want to have threaded code. This may be undef on client code]) - # Avoid _PROGRAMS names - THREAD_LOBJECTS="thr_alarm.o thr_lock.o thr_mutex.o thr_rwlock.o my_pthread.o my_thr_init.o mf_keycache.o" - AC_SUBST(THREAD_LOBJECTS) -fi -AM_CONDITIONAL(NEED_THREAD, test "$with_server" != "no" -o "$THREAD_SAFE_CLIENT" != "no") - -if test "$with_server" != "no" -then - server_scripts="mysqld_safe mysql_install_db" - sql_server_dirs="strings mysys dbug extra regex storage plugin" - - sql_server="vio sql" -fi - -# "innochecksum" is not in the "innobase/" subdirectory, but should be switched -AM_CONDITIONAL([BUILD_INNODB_TOOLS], [test X"$with_plugin_innobase" = Xyes]) - -# IMPORTANT - do not modify LIBS past this line - this hack is the only way -# I know to add the static NSS magic if we have static NSS libraries with -# glibc - Sasha - -LDFLAGS="$LDFLAGS $OTHER_LIBC_LIB" -LIBS="$LIBS $STATIC_NSS_FLAGS" - -AC_SUBST(sql_server_dirs) -AC_SUBST(sql_server) -AC_SUBST(server_scripts) - -AC_SUBST(mysql_plugin_dirs) -AC_SUBST(mysql_plugin_libs) -AC_SUBST(mysql_optional_plugins) -AC_SUBST(mysql_mandatory_plugins) - -# Now that sql_client_dirs and sql_server_dirs are stable, determine the union. -# We support client-only builds by "--without-server", but not vice versa, -# so we start with the client list, then add each server item not yet present. -sql_union_dirs=" $sql_client_dirs " -for DIR in $sql_server_dirs -do - if echo " $sql_union_dirs " | grep " $DIR " >/dev/null - then - : # already present, skip - else - sql_union_dirs="$sql_union_dirs $DIR " - fi -done -AC_SUBST(sql_union_dirs) - -# -# Setup maintainer mode options by the end to not disturb -# system and other checks. -# -MY_MAINTAINER_MODE_SETUP - -# Some usefull subst -AC_SUBST(CC) -AC_SUBST(GXX) - -# Set configuration options for make_binary_distribution -AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS) - -#-------------------------------------------------------------------- -# Support for WL#2373 (Use cycle counter for timing) -#-------------------------------------------------------------------- - -AC_CHECK_HEADERS(time.h) -AC_CHECK_HEADERS(sys/time.h) -AC_CHECK_HEADERS(sys/times.h) -AC_CHECK_HEADERS(asm/msr.h) -#msr.h has rdtscll() - -AC_CHECK_HEADERS(ia64intrin.h) - -AC_CHECK_FUNCS(times) -AC_CHECK_FUNCS(gettimeofday) -AC_CHECK_FUNCS(read_real_time) -# This should work on AIX. - -AC_CHECK_FUNCS(ftime) -# This is still a normal call for milliseconds. - -AC_CHECK_FUNCS(time) -# We can use time() on Macintosh if there is no ftime(). - -AC_CHECK_FUNCS(rdtscll) -# I doubt that we'll ever reach the check for this. - -# When compiling with Sun Studio C / C++ we need to include -# my_timer_cycles.il, an "inline templates" separate file, -# on the command line. It has assembly code, "rd %tick" for -# SPARC or "rdtsc" for x86. -RDTSC_SPARC_ASSEMBLY="" -case $CC_VERSION in - *Sun*C*) - RDTSC_SPARC_ASSEMBLY="my_timer_cycles.il" - ;; -esac -case $CXX_VERSION in - *Sun*C++*) - RDTSC_SPARC_ASSEMBLY="my_timer_cycles.il" - ;; -esac - -AC_SUBST([RDTSC_SPARC_ASSEMBLY]) - - -#-------------------------------------------------------------------- -# Output results -#-------------------------------------------------------------------- - -if test -d "$srcdir/cmd-line-utils/readline" ; then - AC_CONFIG_FILES(cmd-line-utils/readline/Makefile) -fi - -AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl - unittest/Makefile unittest/mytap/Makefile unittest/mytap/t/Makefile dnl - unittest/mysys/Makefile unittest/strings/Makefile dnl - unittest/examples/Makefile dnl - strings/Makefile regex/Makefile storage/Makefile dnl - man/Makefile BUILD/Makefile vio/Makefile dnl - libmysql/Makefile libmysql_r/Makefile client/Makefile dnl - sql/Makefile sql/share/Makefile dnl - sql/sql_builtin.cc sql-common/Makefile libservices/Makefile dnl - dbug/Makefile scripts/Makefile include/Makefile dnl - tests/Makefile Docs/Makefile support-files/Makefile dnl - support-files/MacOSX/Makefile support-files/RHEL4-SElinux/Makefile dnl - cmd-line-utils/Makefile cmd-line-utils/libedit/Makefile dnl - libmysqld/Makefile libmysqld/examples/Makefile dnl - mysql-test/Makefile mysql-test/lib/My/SafeProcess/Makefile dnl - sql-bench/Makefile include/mysql_version.h plugin/Makefile win/Makefile dnl - cmake/Makefile packaging/Makefile - ) - -AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h) - -# Ensure that table handlers gets all modifications to CFLAGS/CXXFLAGS -AC_CONFIG_COMMANDS_POST(ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' CXXFLAGS='$CXXFLAGS'") - -AC_OUTPUT - -# The first line "Thank you ..." is checked in ./Do-compile to verify that configure -# ended sucessfully - don't remove it. -echo -echo "Thank you for choosing MySQL!" -echo -echo "Remember to check the platform specific part of the reference manual" -echo "for hints about installing MySQL on your platform." -echo "Also have a look at the files in the Docs directory." -echo diff --git a/dbug/Makefile.am b/dbug/Makefile.am deleted file mode 100644 index 3581b3597ee..00000000000 --- a/dbug/Makefile.am +++ /dev/null @@ -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 - diff --git a/extra/Makefile.am b/extra/Makefile.am deleted file mode 100644 index ff62749ac4c..00000000000 --- a/extra/Makefile.am +++ /dev/null @@ -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 $< diff --git a/extra/yassl/Makefile.am b/extra/yassl/Makefile.am deleted file mode 100644 index 43cae0514f9..00000000000 --- a/extra/yassl/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -SUBDIRS = taocrypt src testsuite -EXTRA_DIST = CMakeLists.txt diff --git a/extra/yassl/src/Makefile.am b/extra/yassl/src/Makefile.am deleted file mode 100644 index 300cdcd096f..00000000000 --- a/extra/yassl/src/Makefile.am +++ /dev/null @@ -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@ diff --git a/extra/yassl/taocrypt/Makefile.am b/extra/yassl/taocrypt/Makefile.am deleted file mode 100644 index deab5227f7f..00000000000 --- a/extra/yassl/taocrypt/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -SUBDIRS = src test benchmark -EXTRA_DIST = CMakeLists.txt $(wildcard mySTL/*.hpp) diff --git a/extra/yassl/taocrypt/benchmark/Makefile.am b/extra/yassl/taocrypt/benchmark/Makefile.am deleted file mode 100644 index 0171c7366bb..00000000000 --- a/extra/yassl/taocrypt/benchmark/Makefile.am +++ /dev/null @@ -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 diff --git a/extra/yassl/taocrypt/src/Makefile.am b/extra/yassl/taocrypt/src/Makefile.am deleted file mode 100644 index a8d08b6e9d5..00000000000 --- a/extra/yassl/taocrypt/src/Makefile.am +++ /dev/null @@ -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) diff --git a/extra/yassl/taocrypt/test/Makefile.am b/extra/yassl/taocrypt/test/Makefile.am deleted file mode 100644 index 38f04f1387f..00000000000 --- a/extra/yassl/taocrypt/test/Makefile.am +++ /dev/null @@ -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 diff --git a/extra/yassl/testsuite/Makefile.am b/extra/yassl/testsuite/Makefile.am deleted file mode 100644 index d74c972a084..00000000000 --- a/extra/yassl/testsuite/Makefile.am +++ /dev/null @@ -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 diff --git a/include/Makefile.am b/include/Makefile.am deleted file mode 100644 index 415e2ef8c8c..00000000000 --- a/include/Makefile.am +++ /dev/null @@ -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) > $@ diff --git a/include/m_ctype.h b/include/m_ctype.h index 42e8f88cc0e..c054de8d7fd 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -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, diff --git a/include/m_string.h b/include/m_string.h index 6557ae36c9b..d2194858589 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -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 */ diff --git a/include/mysql.h b/include/mysql.h index b52235b484e..d3b24f0198a 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -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 diff --git a/libmysql/Makefile.am b/libmysql/Makefile.am deleted file mode 100644 index 07f66c28ddb..00000000000 --- a/libmysql/Makefile.am +++ /dev/null @@ -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 diff --git a/libmysql/Makefile.shared b/libmysql/Makefile.shared deleted file mode 100644 index 5a7236f1e6d..00000000000 --- a/libmysql/Makefile.shared +++ /dev/null @@ -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@ diff --git a/libmysql/acinclude.m4 b/libmysql/acinclude.m4 deleted file mode 100644 index c0211f3759f..00000000000 --- a/libmysql/acinclude.m4 +++ /dev/null @@ -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: diff --git a/libmysql/conf_to_src.c b/libmysql/conf_to_src.c index 785e3cad4c1..f39a2e1856f 100644 --- a/libmysql/conf_to_src.c +++ b/libmysql/conf_to_src.c @@ -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 diff --git a/libmysql/errmsg.c b/libmysql/errmsg.c index 823f83026c9..b99b3f2de30 100644 --- a/libmysql/errmsg.c +++ b/libmysql/errmsg.c @@ -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 diff --git a/libmysql/get_password.c b/libmysql/get_password.c index 56514a8d864..455b4b3c8f1 100644 --- a/libmysql/get_password.c +++ b/libmysql/get_password.c @@ -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 diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index e9327d770fb..c498ed0f089 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -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 diff --git a/libmysql_r/Makefile.am b/libmysql_r/Makefile.am deleted file mode 100644 index 30aa2467dab..00000000000 --- a/libmysql_r/Makefile.am +++ /dev/null @@ -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 diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt index 545d03532c1..25f4b752a30 100644 --- a/libmysqld/CMakeLists.txt +++ b/libmysqld/CMakeLists.txt @@ -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 ) diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am deleted file mode 100644 index 279f1007243..00000000000 --- a/libmysqld/Makefile.am +++ /dev/null @@ -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 diff --git a/libmysqld/examples/Makefile.am b/libmysqld/examples/Makefile.am deleted file mode 100644 index 66c40d88e29..00000000000 --- a/libmysqld/examples/Makefile.am +++ /dev/null @@ -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 diff --git a/libservices/Makefile.am b/libservices/Makefile.am deleted file mode 100644 index d25c5c9680c..00000000000 --- a/libservices/Makefile.am +++ /dev/null @@ -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 diff --git a/man/Makefile.am b/man/Makefile.am deleted file mode 100644 index 027edccc249..00000000000 --- a/man/Makefile.am +++ /dev/null @@ -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_* diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am deleted file mode 100644 index 030a4823b36..00000000000 --- a/mysql-test/Makefile.am +++ /dev/null @@ -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 diff --git a/mysql-test/extra/binlog_tests/binlog.test b/mysql-test/extra/binlog_tests/binlog.test index 900e46ff90a..54aa08ff3ab 100644 --- a/mysql-test/extra/binlog_tests/binlog.test +++ b/mysql-test/extra/binlog_tests/binlog.test @@ -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; diff --git a/mysql-test/extra/binlog_tests/binlog_insert_delayed.test b/mysql-test/extra/binlog_tests/binlog_insert_delayed.test index 2526b2dd149..7b31a3ebf17 100644 --- a/mysql-test/extra/binlog_tests/binlog_insert_delayed.test +++ b/mysql-test/extra/binlog_tests/binlog_insert_delayed.test @@ -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 diff --git a/mysql-test/extra/binlog_tests/binlog_truncate.test b/mysql-test/extra/binlog_tests/binlog_truncate.test index 24cf363f780..d434f792db0 100644 --- a/mysql-test/extra/binlog_tests/binlog_truncate.test +++ b/mysql-test/extra/binlog_tests/binlog_truncate.test @@ -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; } diff --git a/mysql-test/extra/binlog_tests/blackhole.test b/mysql-test/extra/binlog_tests/blackhole.test index c694c34622f..90146d41471 100644 --- a/mysql-test/extra/binlog_tests/blackhole.test +++ b/mysql-test/extra/binlog_tests/blackhole.test @@ -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; diff --git a/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test b/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test index 6bf9a27afaf..040da1959dc 100644 --- a/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test +++ b/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test @@ -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 diff --git a/mysql-test/extra/rpl_tests/create_recursive_construct.inc b/mysql-test/extra/rpl_tests/create_recursive_construct.inc index 12693e752fe..6e130a8154f 100644 --- a/mysql-test/extra/rpl_tests/create_recursive_construct.inc +++ b/mysql-test/extra/rpl_tests/create_recursive_construct.inc @@ -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; diff --git a/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc b/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc index 8e89cde004d..094e84537db 100644 --- a/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc +++ b/mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc @@ -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 diff --git a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test index 568cf802763..77b7e9a57ea 100644 --- a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test +++ b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test @@ -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; diff --git a/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test b/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test index 40e155bc314..c7e3d1abc03 100644 --- a/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test +++ b/mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test @@ -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 diff --git a/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test b/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test index 14368ba4321..172483e1466 100644 --- a/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test +++ b/mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test @@ -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 diff --git a/mysql-test/extra/rpl_tests/rpl_insert_delayed.test b/mysql-test/extra/rpl_tests/rpl_insert_delayed.test index 7fd3451184a..d158b6595ba 100644 --- a/mysql-test/extra/rpl_tests/rpl_insert_delayed.test +++ b/mysql-test/extra/rpl_tests/rpl_insert_delayed.test @@ -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) } diff --git a/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test b/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test index 844f93d0906..4a20fc48ac4 100644 --- a/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test +++ b/mysql-test/extra/rpl_tests/rpl_insert_id_pk.test @@ -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 diff --git a/mysql-test/extra/rpl_tests/rpl_not_null.test b/mysql-test/extra/rpl_tests/rpl_not_null.test index 58dbd9ce29f..290a0a0173f 100644 --- a/mysql-test/extra/rpl_tests/rpl_not_null.test +++ b/mysql-test/extra/rpl_tests/rpl_not_null.test @@ -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; diff --git a/mysql-test/include/check_slave_is_running.inc b/mysql-test/include/check_slave_is_running.inc index 5fbbe0d684c..51c418e6c64 100644 --- a/mysql-test/include/check_slave_is_running.inc +++ b/mysql-test/include/check_slave_is_running.inc @@ -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. diff --git a/mysql-test/include/check_slave_param.inc b/mysql-test/include/check_slave_param.inc index d82c26851ea..b27825eee6c 100644 --- a/mysql-test/include/check_slave_param.inc +++ b/mysql-test/include/check_slave_param.inc @@ -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 diff --git a/mysql-test/include/ctype_8bit.inc b/mysql-test/include/ctype_8bit.inc new file mode 100644 index 00000000000..7259db54d05 --- /dev/null +++ b/mysql-test/include/ctype_8bit.inc @@ -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; diff --git a/mysql-test/include/ctype_czech.inc b/mysql-test/include/ctype_czech.inc new file mode 100644 index 00000000000..bc83d462a22 --- /dev/null +++ b/mysql-test/include/ctype_czech.inc @@ -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; diff --git a/mysql-test/include/ctype_like_ignorable.inc b/mysql-test/include/ctype_like_ignorable.inc new file mode 100644 index 00000000000..9f2fa7ae741 --- /dev/null +++ b/mysql-test/include/ctype_like_ignorable.inc @@ -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; diff --git a/mysql-test/include/ctype_numconv.inc b/mysql-test/include/ctype_numconv.inc index c4a39879947..83d69cfa40d 100644 --- a/mysql-test/include/ctype_numconv.inc +++ b/mysql-test/include/ctype_numconv.inc @@ -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 # diff --git a/mysql-test/include/diff_tables.inc b/mysql-test/include/diff_tables.inc index d6216f3fe1e..bdd929f39a4 100644 --- a/mysql-test/include/diff_tables.inc +++ b/mysql-test/include/diff_tables.inc @@ -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; } diff --git a/mysql-test/include/have_example_plugin.inc b/mysql-test/include/have_example_plugin.inc index 3a667d2e21a..8920399555d 100644 --- a/mysql-test/include/have_example_plugin.inc +++ b/mysql-test/include/have_example_plugin.inc @@ -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) } diff --git a/mysql-test/include/have_semisync_plugin.inc b/mysql-test/include/have_semisync_plugin.inc index d3b42dbf5fb..95899f559aa 100644 --- a/mysql-test/include/have_semisync_plugin.inc +++ b/mysql-test/include/have_semisync_plugin.inc @@ -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; } diff --git a/mysql-test/include/have_simple_parser.inc b/mysql-test/include/have_simple_parser.inc index 745f68603fe..d077916c5e7 100644 --- a/mysql-test/include/have_simple_parser.inc +++ b/mysql-test/include/have_simple_parser.inc @@ -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) } diff --git a/mysql-test/include/have_udf.inc b/mysql-test/include/have_udf.inc index d9ca1450043..5c404b03729 100644 --- a/mysql-test/include/have_udf.inc +++ b/mysql-test/include/have_udf.inc @@ -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) } diff --git a/mysql-test/include/mysql_upgrade_preparation.inc b/mysql-test/include/mysql_upgrade_preparation.inc index 5de8a79d6e0..a3c81c4c1e7 100644 --- a/mysql-test/include/mysql_upgrade_preparation.inc +++ b/mysql-test/include/mysql_upgrade_preparation.inc @@ -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 diff --git a/mysql-test/include/no_valgrind_without_big.inc b/mysql-test/include/no_valgrind_without_big.inc index 743e974daec..ea1f2ac91ab 100644 --- a/mysql-test/include/no_valgrind_without_big.inc +++ b/mysql-test/include/no_valgrind_without_big.inc @@ -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 + } } - diff --git a/mysql-test/include/not_parallel.inc b/mysql-test/include/not_parallel.inc index 39432c59813..615bdf68453 100644 --- a/mysql-test/include/not_parallel.inc +++ b/mysql-test/include/not_parallel.inc @@ -1,3 +1,3 @@ -if (`SELECT '$MTR_PARALLEL' > 1`) { +if ($MTR_PARALLEL > 1) { --skip test requires --parallel=1 } diff --git a/mysql-test/include/restart_mysqld.inc b/mysql-test/include/restart_mysqld.inc index 0f363ff1ee3..d92115f0a61 100644 --- a/mysql-test/include/restart_mysqld.inc +++ b/mysql-test/include/restart_mysqld.inc @@ -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 diff --git a/mysql-test/include/rpl_diff_tables.inc b/mysql-test/include/rpl_diff_tables.inc index c3a45578a79..a82e094a209 100644 --- a/mysql-test/include/rpl_diff_tables.inc +++ b/mysql-test/include/rpl_diff_tables.inc @@ -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))` diff --git a/mysql-test/include/setup_fake_relay_log.inc b/mysql-test/include/setup_fake_relay_log.inc index c5d709601cf..1b517862235 100644 --- a/mysql-test/include/setup_fake_relay_log.inc +++ b/mysql-test/include/setup_fake_relay_log.inc @@ -40,9 +40,16 @@ let $_fake_relay_log_printable= `SELECT REPLACE('$fake_relay_log', '$MYSQL_TEST_ --echo Setting up fake replication from $_fake_relay_log_printable # Sanity check. +let $running= 0; let $_sql_running= query_get_value(SHOW SLAVE STATUS, Slave_SQL_Running, 1); let $_io_running= query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1); -if (`SELECT "$_sql_running" = "Yes" OR "$_io_running" = "Yes"`) { +if ($_sql_running == Yes) { + let $running= 1; +} +if ($_io_running == Yes) { + let $running= 1; +} +if ($running) { --echo Error: Slave was running when test case sourced --echo include/setup_fake_replication.inc --echo Slave_IO_Running = $_io_running; Slave_SQL_Running = $_sql_running diff --git a/mysql-test/include/show_rpl_debug_info.inc b/mysql-test/include/show_rpl_debug_info.inc index 9944e6cd25f..dedf689cd19 100644 --- a/mysql-test/include/show_rpl_debug_info.inc +++ b/mysql-test/include/show_rpl_debug_info.inc @@ -50,7 +50,7 @@ eval SHOW BINLOG EVENTS IN '$binlog_name'; let $_master_con= $master_connection; if (!$_master_con) { - if (`SELECT '$_con' = 'slave'`) + if ($_con == slave) { let $_master_con= master; } @@ -80,7 +80,7 @@ if ($_master_con) --echo --echo **** SHOW BINLOG EVENTS on $_master_con **** eval SHOW BINLOG EVENTS IN '$master_binlog_name_sql'; - if (`SELECT '$master_binlog_name_io' != '$master_binlog_name_sql'`) + if ($master_binlog_name_io != $master_binlog_name_sql) { eval SHOW BINLOG EVENTS IN '$master_binlog_name_io'; } diff --git a/mysql-test/include/truncate_file.inc b/mysql-test/include/truncate_file.inc index c82108681bd..2326d6c0b94 100644 --- a/mysql-test/include/truncate_file.inc +++ b/mysql-test/include/truncate_file.inc @@ -1,6 +1,6 @@ # truncate a giving file, all contents of the file are be cleared -if (`SELECT 'x$file' = 'x'`) +if (!$file) { --echo Please assign a file name to $file!! exit; diff --git a/mysql-test/include/wait_for_slave_io_to_stop.inc b/mysql-test/include/wait_for_slave_io_to_stop.inc index f61b0db1ed7..512bb6b7243 100644 --- a/mysql-test/include/wait_for_slave_io_to_stop.inc +++ b/mysql-test/include/wait_for_slave_io_to_stop.inc @@ -14,7 +14,7 @@ # if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE # STATUS will return an empty set. let $_slave_io_running= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1); -if (`SELECT '$_slave_io_running' != 'No such row'`) +if ($_slave_io_running != No such row) { let $slave_param= Slave_IO_Running; let $slave_param_value= No; diff --git a/mysql-test/include/wait_for_slave_sql_error.inc b/mysql-test/include/wait_for_slave_sql_error.inc index 80836f908c6..3ae34b1fb9e 100644 --- a/mysql-test/include/wait_for_slave_sql_error.inc +++ b/mysql-test/include/wait_for_slave_sql_error.inc @@ -34,7 +34,7 @@ let $slave_error_message= Failed while waiting for slave to stop the SQL thread source include/wait_for_slave_param.inc; let $_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1); -if (`SELECT '$_error' != '$slave_sql_errno'`) { +if ($_error != $slave_sql_errno) { --echo **** Slave stopped with wrong error code: $_error (expected $slave_sql_errno) **** source include/show_rpl_debug_info.inc; --echo **** Slave stopped with wrong error code: $_error (expected $slave_sql_errno) **** diff --git a/mysql-test/include/wait_for_slave_sql_to_stop.inc b/mysql-test/include/wait_for_slave_sql_to_stop.inc index 6992613b646..50bf53e421d 100644 --- a/mysql-test/include/wait_for_slave_sql_to_stop.inc +++ b/mysql-test/include/wait_for_slave_sql_to_stop.inc @@ -14,7 +14,7 @@ # if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE # STATUS will return an empty set. let $_slave_io_running= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1); -if (`SELECT '$_slave_io_running' != 'No such row'`) +if ($_slave_io_running != No such row) { let $slave_param= Slave_SQL_Running; let $slave_param_value= No; diff --git a/mysql-test/include/wait_for_slave_to_stop.inc b/mysql-test/include/wait_for_slave_to_stop.inc index 56d0e7b0c91..618c5397cb7 100644 --- a/mysql-test/include/wait_for_slave_to_stop.inc +++ b/mysql-test/include/wait_for_slave_to_stop.inc @@ -14,7 +14,7 @@ # if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE # STATUS will return an empty set. let $_slave_io_running= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1); -if (`SELECT '$_slave_io_running' != 'No such row'`) +if ($_slave_io_running != No such row) { let $slave_error_message= Failed while waiting for slave to stop; diff --git a/mysql-test/include/wait_show_condition.inc b/mysql-test/include/wait_show_condition.inc index 07bde560f20..68e05ce4644 100644 --- a/mysql-test/include/wait_show_condition.inc +++ b/mysql-test/include/wait_show_condition.inc @@ -50,7 +50,7 @@ inc $max_run_time; let $found= 0; let $max_end_time= `SELECT UNIX_TIMESTAMP() + $max_run_time`; -if (`SELECT '$wait_for_all' != '1'`) +if ($wait_for_all != 1) { while (`SELECT UNIX_TIMESTAMP() <= $max_end_time AND $found = 0`) { @@ -58,24 +58,27 @@ if (`SELECT '$wait_for_all' != '1'`) real_sleep 0.2; let $rowno= 1; let $process_result= 1; - while (`SELECT $process_result = 1 AND $found = 0`) + let $do_loop= 1; + while ($do_loop) { let $field_value= query_get_value($show_statement, $field, $rowno); if (`SELECT '$field_value' $condition`) { let $found= 1; + let $do_loop= 0; } - if (`SELECT '$field_value' = 'No such row'`) + if ($field_value == No such row) { # We are behind the last row of the result set. let $process_result= 0; + let $do_loop= 0; } inc $rowno; } } } -if (`SELECT '$wait_for_all' = '1'`) +if ($wait_for_all == 1) { while (`SELECT UNIX_TIMESTAMP() <= $max_end_time AND $found = 0`) { @@ -83,16 +86,19 @@ if (`SELECT '$wait_for_all' = '1'`) real_sleep 0.2; let $rowno= 1; let $process_result= 1; - while (`SELECT $process_result = 1 AND $found = 0`) + let $do_loop= 1; + while ($do_loop) { let $field_value= query_get_value($show_statement, $field, $rowno); - if (`SELECT '$field_value' = 'No such row'`) + if ($field_value == No such row) { let $found= 1; + let $do_loop= 0; } if (`SELECT $found = 0 AND NOT '$field_value' $condition`) { let process_result= 0; + let $do_loop= 0; } inc $rowno; } diff --git a/mysql-test/lib/My/SafeProcess/Makefile.am b/mysql-test/lib/My/SafeProcess/Makefile.am deleted file mode 100644 index 33cab066611..00000000000 --- a/mysql-test/lib/My/SafeProcess/Makefile.am +++ /dev/null @@ -1,25 +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 - -testroot = $(prefix) -safedir = $(testroot)/mysql-test/lib/My/SafeProcess -#nobase_bin_PROGRAMS = ... -safe_PROGRAMS = my_safe_process - -my_safe_process_SOURCES = safe_process.cc - -EXTRA_DIST = safe_kill_win.cc \ - safe_process_win.cc \ - CMakeLists.txt diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index a7d7a8aefa4..1ab64fa3579 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -150,7 +150,7 @@ sub collect_test_cases ($$$$) { { last unless $opt_reorder; # test->{name} is always in suite.name format - if ( $test->{name} =~ /.*\.$tname/ ) + if ( $test->{name} =~ /^$sname.*\.$tname$/ ) { $found= 1; last; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 28956eb0092..5acb3095f89 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -607,7 +607,10 @@ sub run_test_server ($$$) { if ( !$opt_force ) { # Test has failed, force is off push(@$completed, $result); - return $completed; + return $completed unless $result->{'dont_kill_server'}; + # Prevent kill of server, to get valgrind report + print $sock "BYE\n"; + next; } elsif ($opt_max_test_fail > 0 and $num_failed_test >= $opt_max_test_fail) { @@ -854,15 +857,16 @@ sub run_worker ($) { mtr_report("Server said BYE"); stop_all_servers($opt_shutdown_timeout); mark_time_used('restart'); + my $valgrind_reports= 0; if ($opt_valgrind_mysqld) { - valgrind_exit_reports(); + $valgrind_reports= valgrind_exit_reports(); } if ( $opt_gprof ) { gprof_collect (find_mysqld($basedir), keys %gprof_dirs); } mark_time_used('init'); print_times_used($server, $thread_num); - exit(0); + exit($valgrind_reports); } else { mtr_error("Could not understand server, '$line'"); @@ -1811,17 +1815,17 @@ sub executable_setup () { if ( ! $opt_skip_ndbcluster ) { $exe_ndbd= - my_find_bin($basedir, + my_find_bin($bindir, ["storage/ndb/src/kernel", "libexec", "sbin", "bin"], "ndbd"); $exe_ndb_mgmd= - my_find_bin($basedir, + my_find_bin($bindir, ["storage/ndb/src/mgmsrv", "libexec", "sbin", "bin"], "ndb_mgmd"); $exe_ndb_waiter= - my_find_bin($basedir, + my_find_bin($bindir, ["storage/ndb/tools/", "bin"], "ndb_waiter"); @@ -2193,12 +2197,12 @@ sub environment_setup { if ( ! $opt_skip_ndbcluster ) { $ENV{'NDB_MGM'}= - my_find_bin($basedir, + my_find_bin($bindir, ["storage/ndb/src/mgmclient", "bin"], "ndb_mgm"); $ENV{'NDB_TOOLS_DIR'}= - my_find_dir($basedir, + my_find_dir($bindir, ["storage/ndb/tools", "bin"]); $ENV{'NDB_EXAMPLES_DIR'}= @@ -2206,7 +2210,7 @@ sub environment_setup { ["storage/ndb/ndbapi-examples", "bin"]); $ENV{'NDB_EXAMPLES_BINARY'}= - my_find_bin($basedir, + my_find_bin($bindir, ["storage/ndb/ndbapi-examples/ndbapi_simple", "bin"], "ndbapi_simple", NOT_REQUIRED); @@ -3846,7 +3850,6 @@ sub run_testcase ($) { # ---------------------------------------------------- # Check if it was an expected crash # ---------------------------------------------------- - SRVDIED: my $check_crash = check_expected_crash_and_restart($proc); if ($check_crash) { @@ -3856,6 +3859,7 @@ sub run_testcase ($) { next; } + SRVDIED: # ---------------------------------------------------- # Stop the test case timer # ---------------------------------------------------- @@ -4386,7 +4390,12 @@ sub after_failure ($) { sub report_failure_and_restart ($) { my $tinfo= shift; - stop_all_servers(); + if ($opt_valgrind_mysqld && ($tinfo->{'warnings'} || $tinfo->{'timeout'})) { + # In these cases we may want valgrind report from normal termination + $tinfo->{'dont_kill_server'}= 1; + } + # Shotdown properly if not to be killed (for valgrind) + stop_all_servers($tinfo->{'dont_kill_server'} ? $opt_shutdown_timeout : 0); $tinfo->{'result'}= 'MTR_RES_FAILED'; @@ -5526,6 +5535,8 @@ sub valgrind_arguments { # sub valgrind_exit_reports() { + my $found_err= 0; + foreach my $log_file (keys %mysqld_logs) { my @culprits= (); @@ -5561,7 +5572,7 @@ sub valgrind_exit_reports() { next; } # This line marks the start of a valgrind report - $found_report= 1 if $line =~ /ERROR SUMMARY:/; + $found_report= 1 if $line =~ /^==\d+== .* SUMMARY:/; if ($found_report) { $line=~ s/^==\d+== //; @@ -5578,8 +5589,11 @@ sub valgrind_exit_reports() { mtr_print ("Valgrind report from $log_file after tests:\n", @culprits); mtr_print_line(); print ("$valgrind_rep\n"); + $found_err= 1; } } + + return $found_err; } # diff --git a/mysql-test/r/ctype_binary.result b/mysql-test/r/ctype_binary.result index d79265b29c7..4d526a86ade 100644 --- a/mysql-test/r/ctype_binary.result +++ b/mysql-test/r/ctype_binary.result @@ -2748,6 +2748,25 @@ DROP TABLE t1; # End of Bug#54916 # # +# Bug#58190 BETWEEN no longer uses indexes for date or datetime fields +# +SELECT @@collation_connection; +@@collation_connection +binary +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'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range date_column date_column 4 NULL 1 Using where +ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL; +EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range date_column date_column 9 NULL 1 Using where +DROP TABLE t1; +# # Bug#52159 returning time type from function and empty left join causes debug assertion # CREATE FUNCTION f1() RETURNS TIME RETURN 1; diff --git a/mysql-test/r/ctype_cp1251.result b/mysql-test/r/ctype_cp1251.result index babed8951a2..b65230e94b4 100644 --- a/mysql-test/r/ctype_cp1251.result +++ b/mysql-test/r/ctype_cp1251.result @@ -82,6 +82,314 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=cp1251 DROP TABLE t1; # +# Start of 5.1 tests +# +SELECT @@collation_connection; +@@collation_connection +cp1251_general_ci +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; +chr upper lower utf8 roundtrip issafe +00 00 00 00 00 +01 01 01 01 01 +02 02 02 02 02 +03 03 03 03 03 +04 04 04 04 04 +05 05 05 05 05 +06 06 06 06 06 +07 07 07 07 07 +08 08 08 08 08 +09 09 09 09 09 +0A 0A 0A 0A 0A +0B 0B 0B 0B 0B +0C 0C 0C 0C 0C +0D 0D 0D 0D 0D +0E 0E 0E 0E 0E +0F 0F 0F 0F 0F +10 10 10 10 10 +11 11 11 11 11 +12 12 12 12 12 +13 13 13 13 13 +14 14 14 14 14 +15 15 15 15 15 +16 16 16 16 16 +17 17 17 17 17 +18 18 18 18 18 +19 19 19 19 19 +1A 1A 1A 1A 1A +1B 1B 1B 1B 1B +1C 1C 1C 1C 1C +1D 1D 1D 1D 1D +1E 1E 1E 1E 1E +1F 1F 1F 1F 1F +20 20 20 20 20 +21 21 21 21 21 +22 22 22 22 22 +23 23 23 23 23 +24 24 24 24 24 +25 25 25 25 25 +26 26 26 26 26 +27 27 27 27 27 +28 28 28 28 28 +29 29 29 29 29 +2A 2A 2A 2A 2A +2B 2B 2B 2B 2B +2C 2C 2C 2C 2C +2D 2D 2D 2D 2D +2E 2E 2E 2E 2E +2F 2F 2F 2F 2F +30 30 30 30 30 +31 31 31 31 31 +32 32 32 32 32 +33 33 33 33 33 +34 34 34 34 34 +35 35 35 35 35 +36 36 36 36 36 +37 37 37 37 37 +38 38 38 38 38 +39 39 39 39 39 +3A 3A 3A 3A 3A +3B 3B 3B 3B 3B +3C 3C 3C 3C 3C +3D 3D 3D 3D 3D +3E 3E 3E 3E 3E +3F 3F 3F 3F 3F +40 40 40 40 40 +41 61 61 41 41 +42 62 62 42 42 +43 63 63 43 43 +44 64 64 44 44 +45 65 65 45 45 +46 66 66 46 46 +47 67 67 47 47 +48 68 68 48 48 +49 69 69 49 49 +4A 6A 6A 4A 4A +4B 6B 6B 4B 4B +4C 6C 6C 4C 4C +4D 6D 6D 4D 4D +4E 6E 6E 4E 4E +4F 6F 6F 4F 4F +50 70 70 50 50 +51 71 71 51 51 +52 72 72 52 52 +53 73 73 53 53 +54 74 74 54 54 +55 75 75 55 55 +56 76 76 56 56 +57 77 77 57 57 +58 78 78 58 58 +59 79 79 59 59 +5A 7A 7A 5A 5A +5B 5B 5B 5B 5B +5C 5C 5C 5C 5C +5D 5D 5D 5D 5D +5E 5E 5E 5E 5E +5F 5F 5F 5F 5F +60 60 60 60 60 +61 61 61 61 61 +62 62 62 62 62 +63 63 63 63 63 +64 64 64 64 64 +65 65 65 65 65 +66 66 66 66 66 +67 67 67 67 67 +68 68 68 68 68 +69 69 69 69 69 +6A 6A 6A 6A 6A +6B 6B 6B 6B 6B +6C 6C 6C 6C 6C +6D 6D 6D 6D 6D +6E 6E 6E 6E 6E +6F 6F 6F 6F 6F +70 70 70 70 70 +71 71 71 71 71 +72 72 72 72 72 +73 73 73 73 73 +74 74 74 74 74 +75 75 75 75 75 +76 76 76 76 76 +77 77 77 77 77 +78 78 78 78 78 +79 79 79 79 79 +7A 7A 7A 7A 7A +7B 7B 7B 7B 7B +7C 7C 7C 7C 7C +7D 7D 7D 7D 7D +7E 7E 7E 7E 7E +7F 7F 7F 7F 7F +80 90 90 D082 80 +81 83 83 D083 81 +82 82 82 E2809A 82 +83 83 83 D193 83 +84 84 84 E2809E 84 +85 85 85 E280A6 85 +86 86 86 E280A0 86 +87 87 87 E280A1 87 +88 88 88 E282AC 88 +89 89 89 E280B0 89 +8A 9A 9A D089 8A +8B 8B 8B E280B9 8B +8C 9C 9C D08A 8C +8D 9D 9D D08C 8D +8E 9E 9E D08B 8E +8F 9F 9F D08F 8F +90 90 90 D192 90 +91 91 91 E28098 91 +92 92 92 E28099 92 +93 93 93 E2809C 93 +94 94 94 E2809D 94 +95 95 95 E280A2 95 +96 96 96 E28093 96 +97 97 97 E28094 97 +98 98 98 3F 3F Round trip unsafe +99 99 99 E284A2 99 +9A 9A 9A D199 9A +9B 9B 9B E280BA 9B +9C 9C 9C D19A 9C +9D 9D 9D D19C 9D +9E 9E 9E D19B 9E +9F 9F 9F D19F 9F +A0 A0 A0 C2A0 A0 +A1 A2 A2 D08E A1 +A2 A2 A2 D19E A2 +A3 BC BC D088 A3 +A4 A4 A4 C2A4 A4 +A5 B4 B4 D290 A5 +A6 A6 A6 C2A6 A6 +A7 A7 A7 C2A7 A7 +A8 B8 B8 D081 A8 +A9 A9 A9 C2A9 A9 +AA BA BA D084 AA +AB AB AB C2AB AB +AC AC AC C2AC AC +AD AD AD C2AD AD +AE AE AE C2AE AE +AF BF BF D087 AF +B0 B0 B0 C2B0 B0 +B1 B1 B1 C2B1 B1 +B2 B3 B3 D086 B2 +B3 B3 B3 D196 B3 +B4 B4 B4 D291 B4 +B5 B5 B5 C2B5 B5 +B6 B6 B6 C2B6 B6 +B7 B7 B7 C2B7 B7 +B8 B8 B8 D191 B8 +B9 B9 B9 E28496 B9 +BA BA BA D194 BA +BB BB BB C2BB BB +BC BC BC D198 BC +BD BE BE D085 BD +BE BE BE D195 BE +BF BF BF D197 BF +C0 E0 E0 D090 C0 +C1 E1 E1 D091 C1 +C2 E2 E2 D092 C2 +C3 E3 E3 D093 C3 +C4 E4 E4 D094 C4 +C5 E5 E5 D095 C5 +C6 E6 E6 D096 C6 +C7 E7 E7 D097 C7 +C8 E8 E8 D098 C8 +C9 E9 E9 D099 C9 +CA EA EA D09A CA +CB EB EB D09B CB +CC EC EC D09C CC +CD ED ED D09D CD +CE EE EE D09E CE +CF EF EF D09F CF +D0 F0 F0 D0A0 D0 +D1 F1 F1 D0A1 D1 +D2 F2 F2 D0A2 D2 +D3 F3 F3 D0A3 D3 +D4 F4 F4 D0A4 D4 +D5 F5 F5 D0A5 D5 +D6 F6 F6 D0A6 D6 +D7 F7 F7 D0A7 D7 +D8 F8 F8 D0A8 D8 +D9 F9 F9 D0A9 D9 +DA FA FA D0AA DA +DB FB FB D0AB DB +DC FC FC D0AC DC +DD FD FD D0AD DD +DE FE FE D0AE DE +DF FF FF D0AF DF +E0 E0 E0 D0B0 E0 +E1 E1 E1 D0B1 E1 +E2 E2 E2 D0B2 E2 +E3 E3 E3 D0B3 E3 +E4 E4 E4 D0B4 E4 +E5 E5 E5 D0B5 E5 +E6 E6 E6 D0B6 E6 +E7 E7 E7 D0B7 E7 +E8 E8 E8 D0B8 E8 +E9 E9 E9 D0B9 E9 +EA EA EA D0BA EA +EB EB EB D0BB EB +EC EC EC D0BC EC +ED ED ED D0BD ED +EE EE EE D0BE EE +EF EF EF D0BF EF +F0 F0 F0 D180 F0 +F1 F1 F1 D181 F1 +F2 F2 F2 D182 F2 +F3 F3 F3 D183 F3 +F4 F4 F4 D184 F4 +F5 F5 F5 D185 F5 +F6 F6 F6 D186 F6 +F7 F7 F7 D187 F7 +F8 F8 F8 D188 F8 +F9 F9 F9 D189 F9 +FA FA FA D18A FA +FB FB FB D18B FB +FC FC FC D18C FC +FD FD FD D18D FD +FE FE FE D18E FE +FF FF FF D18F FF +DROP TABLE t1; +# +# End of 5.1 tests +# +# # Start of 5.5 tests # # @@ -2830,6 +3138,25 @@ DROP TABLE t1; # End of Bug#54916 # # +# Bug#58190 BETWEEN no longer uses indexes for date or datetime fields +# +SELECT @@collation_connection; +@@collation_connection +cp1251_general_ci +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'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range date_column date_column 4 NULL 1 Using where +ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL; +EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range date_column date_column 9 NULL 1 Using where +DROP TABLE t1; +# # Bug#52159 returning time type from function and empty left join causes debug assertion # CREATE FUNCTION f1() RETURNS TIME RETURN 1; diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result index 6edddecb88f..3585f0934b0 100644 --- a/mysql-test/r/ctype_latin1.result +++ b/mysql-test/r/ctype_latin1.result @@ -3158,6 +3158,25 @@ DROP TABLE t1; # End of Bug#54916 # # +# Bug#58190 BETWEEN no longer uses indexes for date or datetime fields +# +SELECT @@collation_connection; +@@collation_connection +latin1_swedish_ci +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'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range date_column date_column 4 NULL 1 Using where +ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL; +EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range date_column date_column 9 NULL 1 Using where +DROP TABLE t1; +# # Bug#52159 returning time type from function and empty left join causes debug assertion # CREATE FUNCTION f1() RETURNS TIME RETURN 1; diff --git a/mysql-test/r/ctype_like_range.result b/mysql-test/r/ctype_like_range.result new file mode 100644 index 00000000000..a06c6ad9ed8 --- /dev/null +++ b/mysql-test/r/ctype_like_range.result @@ -0,0 +1,2310 @@ +DROP TABLE IF EXISTS t1; +DROP VIEW IF EXISTS v1; +CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, a VARBINARY(32)); +INSERT INTO t1 (a) VALUES (''),('_'),('%'),('\_'),('\%'),('\\'); +INSERT INTO t1 (a) VALUES ('a'),('c'); +INSERT INTO t1 (a) VALUES ('a_'),('c_'); +INSERT INTO t1 (a) VALUES ('a%'),('c%'); +INSERT INTO t1 (a) VALUES ('aa'),('cc'),('ch'); +INSERT INTO t1 (a) VALUES ('aa_'),('cc_'),('ch_'); +INSERT INTO t1 (a) VALUES ('aa%'),('cc%'),('ch%'); +INSERT INTO t1 (a) VALUES ('aaa'),('ccc'),('cch'); +INSERT INTO t1 (a) VALUES ('aaa_'),('ccc_'),('cch_'); +INSERT INTO t1 (a) VALUES ('aaa%'),('ccc%'),('cch%'); +INSERT INTO t1 (a) VALUES ('aaaaaaaaaaaaaaaaaaaa'); +CREATE VIEW v1 AS +SELECT id, 'a' AS name, a AS val FROM t1 +UNION +SELECT id, 'mn', HEX(LIKE_RANGE_MIN(a, 16)) AS min FROM t1 +UNION +SELECT id, 'mx', HEX(LIKE_RANGE_MAX(a, 16)) AS max FROM t1 +UNION +SELECT id, 'sp', REPEAT('-', 32) AS sep FROM t1 +ORDER BY id, name; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 00 +2 mx FF +2 sp -------------------------------- +3 a % +3 mn +3 mx FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +3 sp -------------------------------- +4 a \_ +4 mn 5F +4 mx 5F +4 sp -------------------------------- +5 a \% +5 mn 25 +5 mx 25 +5 sp -------------------------------- +6 a \ +6 mn 5C +6 mx 5C +6 sp -------------------------------- +7 a a +7 mn 61 +7 mx 61 +7 sp -------------------------------- +8 a c +8 mn 63 +8 mx 63 +8 sp -------------------------------- +9 a a_ +9 mn 6100 +9 mx 61FF +9 sp -------------------------------- +10 a c_ +10 mn 6300 +10 mx 63FF +10 sp -------------------------------- +11 a a% +11 mn 61 +11 mx 61FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +11 sp -------------------------------- +12 a c% +12 mn 63 +12 mx 63FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +12 sp -------------------------------- +13 a aa +13 mn 6161 +13 mx 6161 +13 sp -------------------------------- +14 a cc +14 mn 6363 +14 mx 6363 +14 sp -------------------------------- +15 a ch +15 mn 6368 +15 mx 6368 +15 sp -------------------------------- +16 a aa_ +16 mn 616100 +16 mx 6161FF +16 sp -------------------------------- +17 a cc_ +17 mn 636300 +17 mx 6363FF +17 sp -------------------------------- +18 a ch_ +18 mn 636800 +18 mx 6368FF +18 sp -------------------------------- +19 a aa% +19 mn 6161 +19 mx 6161FFFFFFFFFFFFFFFFFFFFFFFFFFFF +19 sp -------------------------------- +20 a cc% +20 mn 6363 +20 mx 6363FFFFFFFFFFFFFFFFFFFFFFFFFFFF +20 sp -------------------------------- +21 a ch% +21 mn 6368 +21 mx 6368FFFFFFFFFFFFFFFFFFFFFFFFFFFF +21 sp -------------------------------- +22 a aaa +22 mn 616161 +22 mx 616161 +22 sp -------------------------------- +23 a ccc +23 mn 636363 +23 mx 636363 +23 sp -------------------------------- +24 a cch +24 mn 636368 +24 mx 636368 +24 sp -------------------------------- +25 a aaa_ +25 mn 61616100 +25 mx 616161FF +25 sp -------------------------------- +26 a ccc_ +26 mn 63636300 +26 mx 636363FF +26 sp -------------------------------- +27 a cch_ +27 mn 63636800 +27 mx 636368FF +27 sp -------------------------------- +28 a aaa% +28 mn 616161 +28 mx 616161FFFFFFFFFFFFFFFFFFFFFFFFFF +28 sp -------------------------------- +29 a ccc% +29 mn 636363 +29 mx 636363FFFFFFFFFFFFFFFFFFFFFFFFFF +29 sp -------------------------------- +30 a cch% +30 mn 636368 +30 mx 636368FFFFFFFFFFFFFFFFFFFFFFFFFF +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 61616161616161616161616161616161 +31 mx 61616161616161616161616161616161 +31 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET latin1; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 00 +2 mx FF +2 sp -------------------------------- +3 a % +3 mn 00000000000000000000000000000000 +3 mx FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +3 sp -------------------------------- +4 a \_ +4 mn 5F +4 mx 5F +4 sp -------------------------------- +5 a \% +5 mn 25 +5 mx 25 +5 sp -------------------------------- +6 a \ +6 mn 5C +6 mx 5C +6 sp -------------------------------- +7 a a +7 mn 61 +7 mx 61 +7 sp -------------------------------- +8 a c +8 mn 63 +8 mx 63 +8 sp -------------------------------- +9 a a_ +9 mn 6100 +9 mx 61FF +9 sp -------------------------------- +10 a c_ +10 mn 6300 +10 mx 63FF +10 sp -------------------------------- +11 a a% +11 mn 61000000000000000000000000000000 +11 mx 61FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +11 sp -------------------------------- +12 a c% +12 mn 63000000000000000000000000000000 +12 mx 63FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +12 sp -------------------------------- +13 a aa +13 mn 6161 +13 mx 6161 +13 sp -------------------------------- +14 a cc +14 mn 6363 +14 mx 6363 +14 sp -------------------------------- +15 a ch +15 mn 6368 +15 mx 6368 +15 sp -------------------------------- +16 a aa_ +16 mn 616100 +16 mx 6161FF +16 sp -------------------------------- +17 a cc_ +17 mn 636300 +17 mx 6363FF +17 sp -------------------------------- +18 a ch_ +18 mn 636800 +18 mx 6368FF +18 sp -------------------------------- +19 a aa% +19 mn 61610000000000000000000000000000 +19 mx 6161FFFFFFFFFFFFFFFFFFFFFFFFFFFF +19 sp -------------------------------- +20 a cc% +20 mn 63630000000000000000000000000000 +20 mx 6363FFFFFFFFFFFFFFFFFFFFFFFFFFFF +20 sp -------------------------------- +21 a ch% +21 mn 63680000000000000000000000000000 +21 mx 6368FFFFFFFFFFFFFFFFFFFFFFFFFFFF +21 sp -------------------------------- +22 a aaa +22 mn 616161 +22 mx 616161 +22 sp -------------------------------- +23 a ccc +23 mn 636363 +23 mx 636363 +23 sp -------------------------------- +24 a cch +24 mn 636368 +24 mx 636368 +24 sp -------------------------------- +25 a aaa_ +25 mn 61616100 +25 mx 616161FF +25 sp -------------------------------- +26 a ccc_ +26 mn 63636300 +26 mx 636363FF +26 sp -------------------------------- +27 a cch_ +27 mn 63636800 +27 mx 636368FF +27 sp -------------------------------- +28 a aaa% +28 mn 61616100000000000000000000000000 +28 mx 616161FFFFFFFFFFFFFFFFFFFFFFFFFF +28 sp -------------------------------- +29 a ccc% +29 mn 63636300000000000000000000000000 +29 mx 636363FFFFFFFFFFFFFFFFFFFFFFFFFF +29 sp -------------------------------- +30 a cch% +30 mn 63636800000000000000000000000000 +30 mx 636368FFFFFFFFFFFFFFFFFFFFFFFFFF +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 61616161616161616161616161616161 +31 mx 61616161616161616161616161616161 +31 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 00000000000000000000000000000000 +2 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +2 sp -------------------------------- +3 a % +3 mn 00000000000000000000000000000000 +3 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +3 sp -------------------------------- +4 a \_ +4 mn 5F +4 mx 5F +4 sp -------------------------------- +5 a \% +5 mn 25 +5 mx 25 +5 sp -------------------------------- +6 a \ +6 mn 5C +6 mx 5C +6 sp -------------------------------- +7 a a +7 mn 61 +7 mx 61 +7 sp -------------------------------- +8 a c +8 mn 63 +8 mx 63 +8 sp -------------------------------- +9 a a_ +9 mn 61000000000000000000000000000000 +9 mx 61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +9 sp -------------------------------- +10 a c_ +10 mn 63000000000000000000000000000000 +10 mx 63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +10 sp -------------------------------- +11 a a% +11 mn 61000000000000000000000000000000 +11 mx 61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +11 sp -------------------------------- +12 a c% +12 mn 63000000000000000000000000000000 +12 mx 63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +12 sp -------------------------------- +13 a aa +13 mn 6161 +13 mx 6161 +13 sp -------------------------------- +14 a cc +14 mn 6363 +14 mx 6363 +14 sp -------------------------------- +15 a ch +15 mn 6368 +15 mx 6368 +15 sp -------------------------------- +16 a aa_ +16 mn 61610000000000000000000000000000 +16 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +16 sp -------------------------------- +17 a cc_ +17 mn 63630000000000000000000000000000 +17 mx 6363EFBFBFEFBFBFEFBFBFEFBFBF2020 +17 sp -------------------------------- +18 a ch_ +18 mn 63680000000000000000000000000000 +18 mx 6368EFBFBFEFBFBFEFBFBFEFBFBF2020 +18 sp -------------------------------- +19 a aa% +19 mn 61610000000000000000000000000000 +19 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +19 sp -------------------------------- +20 a cc% +20 mn 63630000000000000000000000000000 +20 mx 6363EFBFBFEFBFBFEFBFBFEFBFBF2020 +20 sp -------------------------------- +21 a ch% +21 mn 63680000000000000000000000000000 +21 mx 6368EFBFBFEFBFBFEFBFBFEFBFBF2020 +21 sp -------------------------------- +22 a aaa +22 mn 616161 +22 mx 616161 +22 sp -------------------------------- +23 a ccc +23 mn 636363 +23 mx 636363 +23 sp -------------------------------- +24 a cch +24 mn 636368 +24 mx 636368 +24 sp -------------------------------- +25 a aaa_ +25 mn 61616100000000000000000000000000 +25 mx 616161EFBFBFEFBFBFEFBFBFEFBFBF20 +25 sp -------------------------------- +26 a ccc_ +26 mn 63636300000000000000000000000000 +26 mx 636363EFBFBFEFBFBFEFBFBFEFBFBF20 +26 sp -------------------------------- +27 a cch_ +27 mn 63636800000000000000000000000000 +27 mx 636368EFBFBFEFBFBFEFBFBFEFBFBF20 +27 sp -------------------------------- +28 a aaa% +28 mn 61616100000000000000000000000000 +28 mx 616161EFBFBFEFBFBFEFBFBFEFBFBF20 +28 sp -------------------------------- +29 a ccc% +29 mn 63636300000000000000000000000000 +29 mx 636363EFBFBFEFBFBFEFBFBFEFBFBF20 +29 sp -------------------------------- +30 a cch% +30 mn 63636800000000000000000000000000 +30 mx 636368EFBFBFEFBFBFEFBFBFEFBFBF20 +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 6161616161 +31 mx 6161616161 +31 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 09090909090909090909090909090909 +2 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +2 sp -------------------------------- +3 a % +3 mn 09090909090909090909090909090909 +3 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +3 sp -------------------------------- +4 a \_ +4 mn 5F +4 mx 5F +4 sp -------------------------------- +5 a \% +5 mn 25 +5 mx 25 +5 sp -------------------------------- +6 a \ +6 mn 5C +6 mx 5C +6 sp -------------------------------- +7 a a +7 mn 61 +7 mx 61 +7 sp -------------------------------- +8 a c +8 mn 63 +8 mx 63 +8 sp -------------------------------- +9 a a_ +9 mn 61090909090909090909090909090909 +9 mx 61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +9 sp -------------------------------- +10 a c_ +10 mn 63090909090909090909090909090909 +10 mx 63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +10 sp -------------------------------- +11 a a% +11 mn 61090909090909090909090909090909 +11 mx 61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +11 sp -------------------------------- +12 a c% +12 mn 63090909090909090909090909090909 +12 mx 63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +12 sp -------------------------------- +13 a aa +13 mn 6161 +13 mx 6161 +13 sp -------------------------------- +14 a cc +14 mn 6363 +14 mx 6363 +14 sp -------------------------------- +15 a ch +15 mn 6368 +15 mx 6368 +15 sp -------------------------------- +16 a aa_ +16 mn 61610909090909090909090909090909 +16 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +16 sp -------------------------------- +17 a cc_ +17 mn 63630909090909090909090909090909 +17 mx 6363EFBFBFEFBFBFEFBFBFEFBFBF2020 +17 sp -------------------------------- +18 a ch_ +18 mn 63680909090909090909090909090909 +18 mx 6368EFBFBFEFBFBFEFBFBFEFBFBF2020 +18 sp -------------------------------- +19 a aa% +19 mn 61610909090909090909090909090909 +19 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +19 sp -------------------------------- +20 a cc% +20 mn 63630909090909090909090909090909 +20 mx 6363EFBFBFEFBFBFEFBFBFEFBFBF2020 +20 sp -------------------------------- +21 a ch% +21 mn 63680909090909090909090909090909 +21 mx 6368EFBFBFEFBFBFEFBFBFEFBFBF2020 +21 sp -------------------------------- +22 a aaa +22 mn 616161 +22 mx 616161 +22 sp -------------------------------- +23 a ccc +23 mn 636363 +23 mx 636363 +23 sp -------------------------------- +24 a cch +24 mn 636368 +24 mx 636368 +24 sp -------------------------------- +25 a aaa_ +25 mn 61616109090909090909090909090909 +25 mx 616161EFBFBFEFBFBFEFBFBFEFBFBF20 +25 sp -------------------------------- +26 a ccc_ +26 mn 63636309090909090909090909090909 +26 mx 636363EFBFBFEFBFBFEFBFBFEFBFBF20 +26 sp -------------------------------- +27 a cch_ +27 mn 63636809090909090909090909090909 +27 mx 636368EFBFBFEFBFBFEFBFBFEFBFBF20 +27 sp -------------------------------- +28 a aaa% +28 mn 61616109090909090909090909090909 +28 mx 616161EFBFBFEFBFBFEFBFBFEFBFBF20 +28 sp -------------------------------- +29 a ccc% +29 mn 63636309090909090909090909090909 +29 mx 636363EFBFBFEFBFBFEFBFBFEFBFBF20 +29 sp -------------------------------- +30 a cch% +30 mn 63636809090909090909090909090909 +30 mx 636368EFBFBFEFBFBFEFBFBFEFBFBF20 +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 6161616161 +31 mx 6161616161 +31 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_czech_ci; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 09090909090909090909090909090909 +2 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +2 sp -------------------------------- +3 a % +3 mn 09090909090909090909090909090909 +3 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +3 sp -------------------------------- +4 a \_ +4 mn 5F +4 mx 5F +4 sp -------------------------------- +5 a \% +5 mn 25 +5 mx 25 +5 sp -------------------------------- +6 a \ +6 mn 5C +6 mx 5C +6 sp -------------------------------- +7 a a +7 mn 61 +7 mx 61 +7 sp -------------------------------- +8 a c +8 mn 63 +8 mx 63 +8 sp -------------------------------- +9 a a_ +9 mn 61090909090909090909090909090909 +9 mx 61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +9 sp -------------------------------- +10 a c_ +10 mn 09090909090909090909090909090909 +10 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +10 sp -------------------------------- +11 a a% +11 mn 61090909090909090909090909090909 +11 mx 61EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +11 sp -------------------------------- +12 a c% +12 mn 09090909090909090909090909090909 +12 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +12 sp -------------------------------- +13 a aa +13 mn 6161 +13 mx 6161 +13 sp -------------------------------- +14 a cc +14 mn 6363 +14 mx 6363 +14 sp -------------------------------- +15 a ch +15 mn 6368 +15 mx 6368 +15 sp -------------------------------- +16 a aa_ +16 mn 61610909090909090909090909090909 +16 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +16 sp -------------------------------- +17 a cc_ +17 mn 63090909090909090909090909090909 +17 mx 63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +17 sp -------------------------------- +18 a ch_ +18 mn 63680909090909090909090909090909 +18 mx 6368EFBFBFEFBFBFEFBFBFEFBFBF2020 +18 sp -------------------------------- +19 a aa% +19 mn 61610909090909090909090909090909 +19 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +19 sp -------------------------------- +20 a cc% +20 mn 63090909090909090909090909090909 +20 mx 63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +20 sp -------------------------------- +21 a ch% +21 mn 63680909090909090909090909090909 +21 mx 6368EFBFBFEFBFBFEFBFBFEFBFBF2020 +21 sp -------------------------------- +22 a aaa +22 mn 616161 +22 mx 616161 +22 sp -------------------------------- +23 a ccc +23 mn 636363 +23 mx 636363 +23 sp -------------------------------- +24 a cch +24 mn 636368 +24 mx 636368 +24 sp -------------------------------- +25 a aaa_ +25 mn 61616109090909090909090909090909 +25 mx 616161EFBFBFEFBFBFEFBFBFEFBFBF20 +25 sp -------------------------------- +26 a ccc_ +26 mn 63630909090909090909090909090909 +26 mx 6363EFBFBFEFBFBFEFBFBFEFBFBF2020 +26 sp -------------------------------- +27 a cch_ +27 mn 63636809090909090909090909090909 +27 mx 636368EFBFBFEFBFBFEFBFBFEFBFBF20 +27 sp -------------------------------- +28 a aaa% +28 mn 61616109090909090909090909090909 +28 mx 616161EFBFBFEFBFBFEFBFBFEFBFBF20 +28 sp -------------------------------- +29 a ccc% +29 mn 63630909090909090909090909090909 +29 mx 6363EFBFBFEFBFBFEFBFBFEFBFBF2020 +29 sp -------------------------------- +30 a cch% +30 mn 63636809090909090909090909090909 +30 mx 636368EFBFBFEFBFBFEFBFBFEFBFBF20 +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 6161616161 +31 mx 6161616161 +31 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_danish_ci; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 09090909090909090909090909090909 +2 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +2 sp -------------------------------- +3 a % +3 mn 09090909090909090909090909090909 +3 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +3 sp -------------------------------- +4 a \_ +4 mn 5F +4 mx 5F +4 sp -------------------------------- +5 a \% +5 mn 25 +5 mx 25 +5 sp -------------------------------- +6 a \ +6 mn 5C +6 mx 5C +6 sp -------------------------------- +7 a a +7 mn 61 +7 mx 61 +7 sp -------------------------------- +8 a c +8 mn 63 +8 mx 63 +8 sp -------------------------------- +9 a a_ +9 mn 09090909090909090909090909090909 +9 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +9 sp -------------------------------- +10 a c_ +10 mn 63090909090909090909090909090909 +10 mx 63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +10 sp -------------------------------- +11 a a% +11 mn 09090909090909090909090909090909 +11 mx EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF20 +11 sp -------------------------------- +12 a c% +12 mn 63090909090909090909090909090909 +12 mx 63EFBFBFEFBFBFEFBFBFEFBFBFEFBFBF +12 sp -------------------------------- +13 a aa +13 mn 6161 +13 mx 6161 +13 sp -------------------------------- +14 a cc +14 mn 6363 +14 mx 6363 +14 sp -------------------------------- +15 a ch +15 mn 6368 +15 mx 6368 +15 sp -------------------------------- +16 a aa_ +16 mn 61610909090909090909090909090909 +16 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +16 sp -------------------------------- +17 a cc_ +17 mn 63630909090909090909090909090909 +17 mx 6363EFBFBFEFBFBFEFBFBFEFBFBF2020 +17 sp -------------------------------- +18 a ch_ +18 mn 63680909090909090909090909090909 +18 mx 6368EFBFBFEFBFBFEFBFBFEFBFBF2020 +18 sp -------------------------------- +19 a aa% +19 mn 61610909090909090909090909090909 +19 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +19 sp -------------------------------- +20 a cc% +20 mn 63630909090909090909090909090909 +20 mx 6363EFBFBFEFBFBFEFBFBFEFBFBF2020 +20 sp -------------------------------- +21 a ch% +21 mn 63680909090909090909090909090909 +21 mx 6368EFBFBFEFBFBFEFBFBFEFBFBF2020 +21 sp -------------------------------- +22 a aaa +22 mn 616161 +22 mx 616161 +22 sp -------------------------------- +23 a ccc +23 mn 636363 +23 mx 636363 +23 sp -------------------------------- +24 a cch +24 mn 636368 +24 mx 636368 +24 sp -------------------------------- +25 a aaa_ +25 mn 61610909090909090909090909090909 +25 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +25 sp -------------------------------- +26 a ccc_ +26 mn 63636309090909090909090909090909 +26 mx 636363EFBFBFEFBFBFEFBFBFEFBFBF20 +26 sp -------------------------------- +27 a cch_ +27 mn 63636809090909090909090909090909 +27 mx 636368EFBFBFEFBFBFEFBFBFEFBFBF20 +27 sp -------------------------------- +28 a aaa% +28 mn 61610909090909090909090909090909 +28 mx 6161EFBFBFEFBFBFEFBFBFEFBFBF2020 +28 sp -------------------------------- +29 a ccc% +29 mn 63636309090909090909090909090909 +29 mx 636363EFBFBFEFBFBFEFBFBFEFBFBF20 +29 sp -------------------------------- +30 a cch% +30 mn 63636809090909090909090909090909 +30 mx 636368EFBFBFEFBFBFEFBFBFEFBFBF20 +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 61616161090909090909090909090909 +31 mx 61616161EFBFBFEFBFBFEFBFBFEFBFBF +31 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 0000 +2 mx FFFF +2 sp -------------------------------- +3 a % +3 mn 00000000000000000000000000000000 +3 mx FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +3 sp -------------------------------- +4 a \_ +4 mn 005F +4 mx 005F +4 sp -------------------------------- +5 a \% +5 mn 0025 +5 mx 0025 +5 sp -------------------------------- +6 a \ +6 mn 005C +6 mx 005C +6 sp -------------------------------- +7 a a +7 mn 0061 +7 mx 0061 +7 sp -------------------------------- +8 a c +8 mn 0063 +8 mx 0063 +8 sp -------------------------------- +9 a a_ +9 mn 00610000 +9 mx 0061FFFF +9 sp -------------------------------- +10 a c_ +10 mn 00630000 +10 mx 0063FFFF +10 sp -------------------------------- +11 a a% +11 mn 00610000000000000000000000000000 +11 mx 0061FFFFFFFFFFFFFFFFFFFFFFFFFFFF +11 sp -------------------------------- +12 a c% +12 mn 00630000000000000000000000000000 +12 mx 0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF +12 sp -------------------------------- +13 a aa +13 mn 00610061 +13 mx 00610061 +13 sp -------------------------------- +14 a cc +14 mn 00630063 +14 mx 00630063 +14 sp -------------------------------- +15 a ch +15 mn 00630068 +15 mx 00630068 +15 sp -------------------------------- +16 a aa_ +16 mn 006100610000 +16 mx 00610061FFFF +16 sp -------------------------------- +17 a cc_ +17 mn 006300630000 +17 mx 00630063FFFF +17 sp -------------------------------- +18 a ch_ +18 mn 006300680000 +18 mx 00630068FFFF +18 sp -------------------------------- +19 a aa% +19 mn 00610061000000000000000000000000 +19 mx 00610061FFFFFFFFFFFFFFFFFFFFFFFF +19 sp -------------------------------- +20 a cc% +20 mn 00630063000000000000000000000000 +20 mx 00630063FFFFFFFFFFFFFFFFFFFFFFFF +20 sp -------------------------------- +21 a ch% +21 mn 00630068000000000000000000000000 +21 mx 00630068FFFFFFFFFFFFFFFFFFFFFFFF +21 sp -------------------------------- +22 a aaa +22 mn 006100610061 +22 mx 006100610061 +22 sp -------------------------------- +23 a ccc +23 mn 006300630063 +23 mx 006300630063 +23 sp -------------------------------- +24 a cch +24 mn 006300630068 +24 mx 006300630068 +24 sp -------------------------------- +25 a aaa_ +25 mn 0061006100610000 +25 mx 006100610061FFFF +25 sp -------------------------------- +26 a ccc_ +26 mn 0063006300630000 +26 mx 006300630063FFFF +26 sp -------------------------------- +27 a cch_ +27 mn 0063006300680000 +27 mx 006300630068FFFF +27 sp -------------------------------- +28 a aaa% +28 mn 00610061006100000000000000000000 +28 mx 006100610061FFFFFFFFFFFFFFFFFFFF +28 sp -------------------------------- +29 a ccc% +29 mn 00630063006300000000000000000000 +29 mx 006300630063FFFFFFFFFFFFFFFFFFFF +29 sp -------------------------------- +30 a cch% +30 mn 00630063006800000000000000000000 +30 mx 006300630068FFFFFFFFFFFFFFFFFFFF +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 00610061006100610061006100610061 +31 mx 00610061006100610061006100610061 +31 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 0009 +2 mx FFFF +2 sp -------------------------------- +3 a % +3 mn 00090009000900090009000900090009 +3 mx FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +3 sp -------------------------------- +4 a \_ +4 mn 005F +4 mx 005F +4 sp -------------------------------- +5 a \% +5 mn 0025 +5 mx 0025 +5 sp -------------------------------- +6 a \ +6 mn 005C +6 mx 005C +6 sp -------------------------------- +7 a a +7 mn 0061 +7 mx 0061 +7 sp -------------------------------- +8 a c +8 mn 0063 +8 mx 0063 +8 sp -------------------------------- +9 a a_ +9 mn 00610009 +9 mx 0061FFFF +9 sp -------------------------------- +10 a c_ +10 mn 00630009 +10 mx 0063FFFF +10 sp -------------------------------- +11 a a% +11 mn 00610009000900090009000900090009 +11 mx 0061FFFFFFFFFFFFFFFFFFFFFFFFFFFF +11 sp -------------------------------- +12 a c% +12 mn 00630009000900090009000900090009 +12 mx 0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF +12 sp -------------------------------- +13 a aa +13 mn 00610061 +13 mx 00610061 +13 sp -------------------------------- +14 a cc +14 mn 00630063 +14 mx 00630063 +14 sp -------------------------------- +15 a ch +15 mn 00630068 +15 mx 00630068 +15 sp -------------------------------- +16 a aa_ +16 mn 006100610009 +16 mx 00610061FFFF +16 sp -------------------------------- +17 a cc_ +17 mn 006300630009 +17 mx 00630063FFFF +17 sp -------------------------------- +18 a ch_ +18 mn 006300680009 +18 mx 00630068FFFF +18 sp -------------------------------- +19 a aa% +19 mn 00610061000900090009000900090009 +19 mx 00610061FFFFFFFFFFFFFFFFFFFFFFFF +19 sp -------------------------------- +20 a cc% +20 mn 00630063000900090009000900090009 +20 mx 00630063FFFFFFFFFFFFFFFFFFFFFFFF +20 sp -------------------------------- +21 a ch% +21 mn 00630068000900090009000900090009 +21 mx 00630068FFFFFFFFFFFFFFFFFFFFFFFF +21 sp -------------------------------- +22 a aaa +22 mn 006100610061 +22 mx 006100610061 +22 sp -------------------------------- +23 a ccc +23 mn 006300630063 +23 mx 006300630063 +23 sp -------------------------------- +24 a cch +24 mn 006300630068 +24 mx 006300630068 +24 sp -------------------------------- +25 a aaa_ +25 mn 0061006100610009 +25 mx 006100610061FFFF +25 sp -------------------------------- +26 a ccc_ +26 mn 0063006300630009 +26 mx 006300630063FFFF +26 sp -------------------------------- +27 a cch_ +27 mn 0063006300680009 +27 mx 006300630068FFFF +27 sp -------------------------------- +28 a aaa% +28 mn 00610061006100090009000900090009 +28 mx 006100610061FFFFFFFFFFFFFFFFFFFF +28 sp -------------------------------- +29 a ccc% +29 mn 00630063006300090009000900090009 +29 mx 006300630063FFFFFFFFFFFFFFFFFFFF +29 sp -------------------------------- +30 a cch% +30 mn 00630063006800090009000900090009 +30 mx 006300630068FFFFFFFFFFFFFFFFFFFF +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 00610061006100610061006100610061 +31 mx 00610061006100610061006100610061 +31 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_czech_ci; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 0009 +2 mx FFFF +2 sp -------------------------------- +3 a % +3 mn 00090009000900090009000900090009 +3 mx FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +3 sp -------------------------------- +4 a \_ +4 mn 005F +4 mx 005F +4 sp -------------------------------- +5 a \% +5 mn 0025 +5 mx 0025 +5 sp -------------------------------- +6 a \ +6 mn 005C +6 mx 005C +6 sp -------------------------------- +7 a a +7 mn 0061 +7 mx 0061 +7 sp -------------------------------- +8 a c +8 mn 0063 +8 mx 0063 +8 sp -------------------------------- +9 a a_ +9 mn 00610009 +9 mx 0061FFFF +9 sp -------------------------------- +10 a c_ +10 mn 00090009000900090009000900090009 +10 mx FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +10 sp -------------------------------- +11 a a% +11 mn 00610009000900090009000900090009 +11 mx 0061FFFFFFFFFFFFFFFFFFFFFFFFFFFF +11 sp -------------------------------- +12 a c% +12 mn 00090009000900090009000900090009 +12 mx FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +12 sp -------------------------------- +13 a aa +13 mn 00610061 +13 mx 00610061 +13 sp -------------------------------- +14 a cc +14 mn 00630063 +14 mx 00630063 +14 sp -------------------------------- +15 a ch +15 mn 00630068 +15 mx 00630068 +15 sp -------------------------------- +16 a aa_ +16 mn 006100610009 +16 mx 00610061FFFF +16 sp -------------------------------- +17 a cc_ +17 mn 00630009000900090009000900090009 +17 mx 0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF +17 sp -------------------------------- +18 a ch_ +18 mn 006300680009 +18 mx 00630068FFFF +18 sp -------------------------------- +19 a aa% +19 mn 00610061000900090009000900090009 +19 mx 00610061FFFFFFFFFFFFFFFFFFFFFFFF +19 sp -------------------------------- +20 a cc% +20 mn 00630009000900090009000900090009 +20 mx 0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF +20 sp -------------------------------- +21 a ch% +21 mn 00630068000900090009000900090009 +21 mx 00630068FFFFFFFFFFFFFFFFFFFFFFFF +21 sp -------------------------------- +22 a aaa +22 mn 006100610061 +22 mx 006100610061 +22 sp -------------------------------- +23 a ccc +23 mn 006300630063 +23 mx 006300630063 +23 sp -------------------------------- +24 a cch +24 mn 006300630068 +24 mx 006300630068 +24 sp -------------------------------- +25 a aaa_ +25 mn 0061006100610009 +25 mx 006100610061FFFF +25 sp -------------------------------- +26 a ccc_ +26 mn 00630063000900090009000900090009 +26 mx 00630063FFFFFFFFFFFFFFFFFFFFFFFF +26 sp -------------------------------- +27 a cch_ +27 mn 0063006300680009 +27 mx 006300630068FFFF +27 sp -------------------------------- +28 a aaa% +28 mn 00610061006100090009000900090009 +28 mx 006100610061FFFFFFFFFFFFFFFFFFFF +28 sp -------------------------------- +29 a ccc% +29 mn 00630063000900090009000900090009 +29 mx 00630063FFFFFFFFFFFFFFFFFFFFFFFF +29 sp -------------------------------- +30 a cch% +30 mn 00630063006800090009000900090009 +30 mx 006300630068FFFFFFFFFFFFFFFFFFFF +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 00610061006100610061006100610061 +31 mx 00610061006100610061006100610061 +31 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_danish_ci; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 0009 +2 mx FFFF +2 sp -------------------------------- +3 a % +3 mn 00090009000900090009000900090009 +3 mx FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +3 sp -------------------------------- +4 a \_ +4 mn 005F +4 mx 005F +4 sp -------------------------------- +5 a \% +5 mn 0025 +5 mx 0025 +5 sp -------------------------------- +6 a \ +6 mn 005C +6 mx 005C +6 sp -------------------------------- +7 a a +7 mn 0061 +7 mx 0061 +7 sp -------------------------------- +8 a c +8 mn 0063 +8 mx 0063 +8 sp -------------------------------- +9 a a_ +9 mn 00090009000900090009000900090009 +9 mx FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +9 sp -------------------------------- +10 a c_ +10 mn 00630009 +10 mx 0063FFFF +10 sp -------------------------------- +11 a a% +11 mn 00090009000900090009000900090009 +11 mx FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +11 sp -------------------------------- +12 a c% +12 mn 00630009000900090009000900090009 +12 mx 0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF +12 sp -------------------------------- +13 a aa +13 mn 00610061 +13 mx 00610061 +13 sp -------------------------------- +14 a cc +14 mn 00630063 +14 mx 00630063 +14 sp -------------------------------- +15 a ch +15 mn 00630068 +15 mx 00630068 +15 sp -------------------------------- +16 a aa_ +16 mn 006100610009 +16 mx 00610061FFFF +16 sp -------------------------------- +17 a cc_ +17 mn 006300630009 +17 mx 00630063FFFF +17 sp -------------------------------- +18 a ch_ +18 mn 006300680009 +18 mx 00630068FFFF +18 sp -------------------------------- +19 a aa% +19 mn 00610061000900090009000900090009 +19 mx 00610061FFFFFFFFFFFFFFFFFFFFFFFF +19 sp -------------------------------- +20 a cc% +20 mn 00630063000900090009000900090009 +20 mx 00630063FFFFFFFFFFFFFFFFFFFFFFFF +20 sp -------------------------------- +21 a ch% +21 mn 00630068000900090009000900090009 +21 mx 00630068FFFFFFFFFFFFFFFFFFFFFFFF +21 sp -------------------------------- +22 a aaa +22 mn 006100610061 +22 mx 006100610061 +22 sp -------------------------------- +23 a ccc +23 mn 006300630063 +23 mx 006300630063 +23 sp -------------------------------- +24 a cch +24 mn 006300630068 +24 mx 006300630068 +24 sp -------------------------------- +25 a aaa_ +25 mn 00610061000900090009000900090009 +25 mx 00610061FFFFFFFFFFFFFFFFFFFFFFFF +25 sp -------------------------------- +26 a ccc_ +26 mn 0063006300630009 +26 mx 006300630063FFFF +26 sp -------------------------------- +27 a cch_ +27 mn 0063006300680009 +27 mx 006300630068FFFF +27 sp -------------------------------- +28 a aaa% +28 mn 00610061000900090009000900090009 +28 mx 00610061FFFFFFFFFFFFFFFFFFFFFFFF +28 sp -------------------------------- +29 a ccc% +29 mn 00630063006300090009000900090009 +29 mx 006300630063FFFFFFFFFFFFFFFFFFFF +29 sp -------------------------------- +30 a cch% +30 mn 00630063006800090009000900090009 +30 mx 006300630068FFFFFFFFFFFFFFFFFFFF +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 00610061006100610061006100610061 +31 mx 00610061006100610061006100610061 +31 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 0000 +2 mx FFFF +2 sp -------------------------------- +3 a % +3 mn 00000000000000000000000000000000 +3 mx FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +3 sp -------------------------------- +4 a \_ +4 mn 005F +4 mx 005F +4 sp -------------------------------- +5 a \% +5 mn 0025 +5 mx 0025 +5 sp -------------------------------- +6 a \ +6 mn 005C +6 mx 005C +6 sp -------------------------------- +7 a a +7 mn 0061 +7 mx 0061 +7 sp -------------------------------- +8 a c +8 mn 0063 +8 mx 0063 +8 sp -------------------------------- +9 a a_ +9 mn 00610000 +9 mx 0061FFFF +9 sp -------------------------------- +10 a c_ +10 mn 00630000 +10 mx 0063FFFF +10 sp -------------------------------- +11 a a% +11 mn 00610000000000000000000000000000 +11 mx 0061FFFFFFFFFFFFFFFFFFFFFFFFFFFF +11 sp -------------------------------- +12 a c% +12 mn 00630000000000000000000000000000 +12 mx 0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF +12 sp -------------------------------- +13 a aa +13 mn 00610061 +13 mx 00610061 +13 sp -------------------------------- +14 a cc +14 mn 00630063 +14 mx 00630063 +14 sp -------------------------------- +15 a ch +15 mn 00630068 +15 mx 00630068 +15 sp -------------------------------- +16 a aa_ +16 mn 006100610000 +16 mx 00610061FFFF +16 sp -------------------------------- +17 a cc_ +17 mn 006300630000 +17 mx 00630063FFFF +17 sp -------------------------------- +18 a ch_ +18 mn 006300680000 +18 mx 00630068FFFF +18 sp -------------------------------- +19 a aa% +19 mn 00610061000000000000000000000000 +19 mx 00610061FFFFFFFFFFFFFFFFFFFFFFFF +19 sp -------------------------------- +20 a cc% +20 mn 00630063000000000000000000000000 +20 mx 00630063FFFFFFFFFFFFFFFFFFFFFFFF +20 sp -------------------------------- +21 a ch% +21 mn 00630068000000000000000000000000 +21 mx 00630068FFFFFFFFFFFFFFFFFFFFFFFF +21 sp -------------------------------- +22 a aaa +22 mn 006100610061 +22 mx 006100610061 +22 sp -------------------------------- +23 a ccc +23 mn 006300630063 +23 mx 006300630063 +23 sp -------------------------------- +24 a cch +24 mn 006300630068 +24 mx 006300630068 +24 sp -------------------------------- +25 a aaa_ +25 mn 0061006100610000 +25 mx 006100610061FFFF +25 sp -------------------------------- +26 a ccc_ +26 mn 0063006300630000 +26 mx 006300630063FFFF +26 sp -------------------------------- +27 a cch_ +27 mn 0063006300680000 +27 mx 006300630068FFFF +27 sp -------------------------------- +28 a aaa% +28 mn 00610061006100000000000000000000 +28 mx 006100610061FFFFFFFFFFFFFFFFFFFF +28 sp -------------------------------- +29 a ccc% +29 mn 00630063006300000000000000000000 +29 mx 006300630063FFFFFFFFFFFFFFFFFFFF +29 sp -------------------------------- +30 a cch% +30 mn 00630063006800000000000000000000 +30 mx 006300630068FFFFFFFFFFFFFFFFFFFF +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 0061006100610061 +31 mx 0061006100610061 +31 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_unicode_ci; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 0009 +2 mx FFFF +2 sp -------------------------------- +3 a % +3 mn 00090009000900090009000900090009 +3 mx FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +3 sp -------------------------------- +4 a \_ +4 mn 005F +4 mx 005F +4 sp -------------------------------- +5 a \% +5 mn 0025 +5 mx 0025 +5 sp -------------------------------- +6 a \ +6 mn 005C +6 mx 005C +6 sp -------------------------------- +7 a a +7 mn 0061 +7 mx 0061 +7 sp -------------------------------- +8 a c +8 mn 0063 +8 mx 0063 +8 sp -------------------------------- +9 a a_ +9 mn 00610009 +9 mx 0061FFFF +9 sp -------------------------------- +10 a c_ +10 mn 00630009 +10 mx 0063FFFF +10 sp -------------------------------- +11 a a% +11 mn 00610009000900090009000900090009 +11 mx 0061FFFFFFFFFFFFFFFFFFFFFFFFFFFF +11 sp -------------------------------- +12 a c% +12 mn 00630009000900090009000900090009 +12 mx 0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF +12 sp -------------------------------- +13 a aa +13 mn 00610061 +13 mx 00610061 +13 sp -------------------------------- +14 a cc +14 mn 00630063 +14 mx 00630063 +14 sp -------------------------------- +15 a ch +15 mn 00630068 +15 mx 00630068 +15 sp -------------------------------- +16 a aa_ +16 mn 006100610009 +16 mx 00610061FFFF +16 sp -------------------------------- +17 a cc_ +17 mn 006300630009 +17 mx 00630063FFFF +17 sp -------------------------------- +18 a ch_ +18 mn 006300680009 +18 mx 00630068FFFF +18 sp -------------------------------- +19 a aa% +19 mn 00610061000900090009000900090009 +19 mx 00610061FFFFFFFFFFFFFFFFFFFFFFFF +19 sp -------------------------------- +20 a cc% +20 mn 00630063000900090009000900090009 +20 mx 00630063FFFFFFFFFFFFFFFFFFFFFFFF +20 sp -------------------------------- +21 a ch% +21 mn 00630068000900090009000900090009 +21 mx 00630068FFFFFFFFFFFFFFFFFFFFFFFF +21 sp -------------------------------- +22 a aaa +22 mn 006100610061 +22 mx 006100610061 +22 sp -------------------------------- +23 a ccc +23 mn 006300630063 +23 mx 006300630063 +23 sp -------------------------------- +24 a cch +24 mn 006300630068 +24 mx 006300630068 +24 sp -------------------------------- +25 a aaa_ +25 mn 0061006100610009 +25 mx 006100610061FFFF +25 sp -------------------------------- +26 a ccc_ +26 mn 0063006300630009 +26 mx 006300630063FFFF +26 sp -------------------------------- +27 a cch_ +27 mn 0063006300680009 +27 mx 006300630068FFFF +27 sp -------------------------------- +28 a aaa% +28 mn 00610061006100090009000900090009 +28 mx 006100610061FFFFFFFFFFFFFFFFFFFF +28 sp -------------------------------- +29 a ccc% +29 mn 00630063006300090009000900090009 +29 mx 006300630063FFFFFFFFFFFFFFFFFFFF +29 sp -------------------------------- +30 a cch% +30 mn 00630063006800090009000900090009 +30 mx 006300630068FFFFFFFFFFFFFFFFFFFF +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 0061006100610061 +31 mx 0061006100610061 +31 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_czech_ci; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 0009 +2 mx FFFF +2 sp -------------------------------- +3 a % +3 mn 00090009000900090009000900090009 +3 mx FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +3 sp -------------------------------- +4 a \_ +4 mn 005F +4 mx 005F +4 sp -------------------------------- +5 a \% +5 mn 0025 +5 mx 0025 +5 sp -------------------------------- +6 a \ +6 mn 005C +6 mx 005C +6 sp -------------------------------- +7 a a +7 mn 0061 +7 mx 0061 +7 sp -------------------------------- +8 a c +8 mn 0063 +8 mx 0063 +8 sp -------------------------------- +9 a a_ +9 mn 00610009 +9 mx 0061FFFF +9 sp -------------------------------- +10 a c_ +10 mn 00090009000900090009000900090009 +10 mx FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +10 sp -------------------------------- +11 a a% +11 mn 00610009000900090009000900090009 +11 mx 0061FFFFFFFFFFFFFFFFFFFFFFFFFFFF +11 sp -------------------------------- +12 a c% +12 mn 00090009000900090009000900090009 +12 mx FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +12 sp -------------------------------- +13 a aa +13 mn 00610061 +13 mx 00610061 +13 sp -------------------------------- +14 a cc +14 mn 00630063 +14 mx 00630063 +14 sp -------------------------------- +15 a ch +15 mn 00630068 +15 mx 00630068 +15 sp -------------------------------- +16 a aa_ +16 mn 006100610009 +16 mx 00610061FFFF +16 sp -------------------------------- +17 a cc_ +17 mn 00630009000900090009000900090009 +17 mx 0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF +17 sp -------------------------------- +18 a ch_ +18 mn 006300680009 +18 mx 00630068FFFF +18 sp -------------------------------- +19 a aa% +19 mn 00610061000900090009000900090009 +19 mx 00610061FFFFFFFFFFFFFFFFFFFFFFFF +19 sp -------------------------------- +20 a cc% +20 mn 00630009000900090009000900090009 +20 mx 0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF +20 sp -------------------------------- +21 a ch% +21 mn 00630068000900090009000900090009 +21 mx 00630068FFFFFFFFFFFFFFFFFFFFFFFF +21 sp -------------------------------- +22 a aaa +22 mn 006100610061 +22 mx 006100610061 +22 sp -------------------------------- +23 a ccc +23 mn 006300630063 +23 mx 006300630063 +23 sp -------------------------------- +24 a cch +24 mn 006300630068 +24 mx 006300630068 +24 sp -------------------------------- +25 a aaa_ +25 mn 0061006100610009 +25 mx 006100610061FFFF +25 sp -------------------------------- +26 a ccc_ +26 mn 00630063000900090009000900090009 +26 mx 00630063FFFFFFFFFFFFFFFFFFFFFFFF +26 sp -------------------------------- +27 a cch_ +27 mn 0063006300680009 +27 mx 006300630068FFFF +27 sp -------------------------------- +28 a aaa% +28 mn 00610061006100090009000900090009 +28 mx 006100610061FFFFFFFFFFFFFFFFFFFF +28 sp -------------------------------- +29 a ccc% +29 mn 00630063000900090009000900090009 +29 mx 00630063FFFFFFFFFFFFFFFFFFFFFFFF +29 sp -------------------------------- +30 a cch% +30 mn 00630063006800090009000900090009 +30 mx 006300630068FFFFFFFFFFFFFFFFFFFF +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 0061006100610061 +31 mx 0061006100610061 +31 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_danish_ci; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 0009 +2 mx FFFF +2 sp -------------------------------- +3 a % +3 mn 00090009000900090009000900090009 +3 mx FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +3 sp -------------------------------- +4 a \_ +4 mn 005F +4 mx 005F +4 sp -------------------------------- +5 a \% +5 mn 0025 +5 mx 0025 +5 sp -------------------------------- +6 a \ +6 mn 005C +6 mx 005C +6 sp -------------------------------- +7 a a +7 mn 0061 +7 mx 0061 +7 sp -------------------------------- +8 a c +8 mn 0063 +8 mx 0063 +8 sp -------------------------------- +9 a a_ +9 mn 00090009000900090009000900090009 +9 mx FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +9 sp -------------------------------- +10 a c_ +10 mn 00630009 +10 mx 0063FFFF +10 sp -------------------------------- +11 a a% +11 mn 00090009000900090009000900090009 +11 mx FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +11 sp -------------------------------- +12 a c% +12 mn 00630009000900090009000900090009 +12 mx 0063FFFFFFFFFFFFFFFFFFFFFFFFFFFF +12 sp -------------------------------- +13 a aa +13 mn 00610061 +13 mx 00610061 +13 sp -------------------------------- +14 a cc +14 mn 00630063 +14 mx 00630063 +14 sp -------------------------------- +15 a ch +15 mn 00630068 +15 mx 00630068 +15 sp -------------------------------- +16 a aa_ +16 mn 006100610009 +16 mx 00610061FFFF +16 sp -------------------------------- +17 a cc_ +17 mn 006300630009 +17 mx 00630063FFFF +17 sp -------------------------------- +18 a ch_ +18 mn 006300680009 +18 mx 00630068FFFF +18 sp -------------------------------- +19 a aa% +19 mn 00610061000900090009000900090009 +19 mx 00610061FFFFFFFFFFFFFFFFFFFFFFFF +19 sp -------------------------------- +20 a cc% +20 mn 00630063000900090009000900090009 +20 mx 00630063FFFFFFFFFFFFFFFFFFFFFFFF +20 sp -------------------------------- +21 a ch% +21 mn 00630068000900090009000900090009 +21 mx 00630068FFFFFFFFFFFFFFFFFFFFFFFF +21 sp -------------------------------- +22 a aaa +22 mn 006100610061 +22 mx 006100610061 +22 sp -------------------------------- +23 a ccc +23 mn 006300630063 +23 mx 006300630063 +23 sp -------------------------------- +24 a cch +24 mn 006300630068 +24 mx 006300630068 +24 sp -------------------------------- +25 a aaa_ +25 mn 00610061000900090009000900090009 +25 mx 00610061FFFFFFFFFFFFFFFFFFFFFFFF +25 sp -------------------------------- +26 a ccc_ +26 mn 0063006300630009 +26 mx 006300630063FFFF +26 sp -------------------------------- +27 a cch_ +27 mn 0063006300680009 +27 mx 006300630068FFFF +27 sp -------------------------------- +28 a aaa% +28 mn 00610061000900090009000900090009 +28 mx 00610061FFFFFFFFFFFFFFFFFFFFFFFF +28 sp -------------------------------- +29 a ccc% +29 mn 00630063006300090009000900090009 +29 mx 006300630063FFFFFFFFFFFFFFFFFFFF +29 sp -------------------------------- +30 a cch% +30 mn 00630063006800090009000900090009 +30 mx 006300630068FFFFFFFFFFFFFFFFFFFF +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 0061006100610061 +31 mx 0061006100610061 +31 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 00000000 +2 mx 0000FFFF +2 sp -------------------------------- +3 a % +3 mn 00000000000000000000000000000000 +3 mx 0000FFFF0000FFFF0000FFFF0000FFFF +3 sp -------------------------------- +4 a \_ +4 mn 0000005F +4 mx 0000005F +4 sp -------------------------------- +5 a \% +5 mn 00000025 +5 mx 00000025 +5 sp -------------------------------- +6 a \ +6 mn 0000005C +6 mx 0000005C +6 sp -------------------------------- +7 a a +7 mn 00000061 +7 mx 00000061 +7 sp -------------------------------- +8 a c +8 mn 00000063 +8 mx 00000063 +8 sp -------------------------------- +9 a a_ +9 mn 0000006100000000 +9 mx 000000610000FFFF +9 sp -------------------------------- +10 a c_ +10 mn 0000006300000000 +10 mx 000000630000FFFF +10 sp -------------------------------- +11 a a% +11 mn 00000061000000000000000000000000 +11 mx 000000610000FFFF0000FFFF0000FFFF +11 sp -------------------------------- +12 a c% +12 mn 00000063000000000000000000000000 +12 mx 000000630000FFFF0000FFFF0000FFFF +12 sp -------------------------------- +13 a aa +13 mn 0000006100000061 +13 mx 0000006100000061 +13 sp -------------------------------- +14 a cc +14 mn 0000006300000063 +14 mx 0000006300000063 +14 sp -------------------------------- +15 a ch +15 mn 0000006300000068 +15 mx 0000006300000068 +15 sp -------------------------------- +16 a aa_ +16 mn 000000610000006100000000 +16 mx 00000061000000610000FFFF +16 sp -------------------------------- +17 a cc_ +17 mn 000000630000006300000000 +17 mx 00000063000000630000FFFF +17 sp -------------------------------- +18 a ch_ +18 mn 000000630000006800000000 +18 mx 00000063000000680000FFFF +18 sp -------------------------------- +19 a aa% +19 mn 00000061000000610000000000000000 +19 mx 00000061000000610000FFFF0000FFFF +19 sp -------------------------------- +20 a cc% +20 mn 00000063000000630000000000000000 +20 mx 00000063000000630000FFFF0000FFFF +20 sp -------------------------------- +21 a ch% +21 mn 00000063000000680000000000000000 +21 mx 00000063000000680000FFFF0000FFFF +21 sp -------------------------------- +22 a aaa +22 mn 000000610000006100000061 +22 mx 000000610000006100000061 +22 sp -------------------------------- +23 a ccc +23 mn 000000630000006300000063 +23 mx 000000630000006300000063 +23 sp -------------------------------- +24 a cch +24 mn 000000630000006300000068 +24 mx 000000630000006300000068 +24 sp -------------------------------- +25 a aaa_ +25 mn 00000061000000610000006100000000 +25 mx 0000006100000061000000610000FFFF +25 sp -------------------------------- +26 a ccc_ +26 mn 00000063000000630000006300000000 +26 mx 0000006300000063000000630000FFFF +26 sp -------------------------------- +27 a cch_ +27 mn 00000063000000630000006800000000 +27 mx 0000006300000063000000680000FFFF +27 sp -------------------------------- +28 a aaa% +28 mn 00000061000000610000006100000000 +28 mx 0000006100000061000000610000FFFF +28 sp -------------------------------- +29 a ccc% +29 mn 00000063000000630000006300000000 +29 mx 0000006300000063000000630000FFFF +29 sp -------------------------------- +30 a cch% +30 mn 00000063000000630000006800000000 +30 mx 0000006300000063000000680000FFFF +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 00000061000000610000006100000061 +31 mx 00000061000000610000006100000061 +31 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_unicode_ci; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 00000009 +2 mx 0000FFFF +2 sp -------------------------------- +3 a % +3 mn 00000009000000090000000900000009 +3 mx 0000FFFF0000FFFF0000FFFF0000FFFF +3 sp -------------------------------- +4 a \_ +4 mn 0000005F +4 mx 0000005F +4 sp -------------------------------- +5 a \% +5 mn 00000025 +5 mx 00000025 +5 sp -------------------------------- +6 a \ +6 mn 0000005C +6 mx 0000005C +6 sp -------------------------------- +7 a a +7 mn 00000061 +7 mx 00000061 +7 sp -------------------------------- +8 a c +8 mn 00000063 +8 mx 00000063 +8 sp -------------------------------- +9 a a_ +9 mn 0000006100000009 +9 mx 000000610000FFFF +9 sp -------------------------------- +10 a c_ +10 mn 0000006300000009 +10 mx 000000630000FFFF +10 sp -------------------------------- +11 a a% +11 mn 00000061000000090000000900000009 +11 mx 000000610000FFFF0000FFFF0000FFFF +11 sp -------------------------------- +12 a c% +12 mn 00000063000000090000000900000009 +12 mx 000000630000FFFF0000FFFF0000FFFF +12 sp -------------------------------- +13 a aa +13 mn 0000006100000061 +13 mx 0000006100000061 +13 sp -------------------------------- +14 a cc +14 mn 0000006300000063 +14 mx 0000006300000063 +14 sp -------------------------------- +15 a ch +15 mn 0000006300000068 +15 mx 0000006300000068 +15 sp -------------------------------- +16 a aa_ +16 mn 000000610000006100000009 +16 mx 00000061000000610000FFFF +16 sp -------------------------------- +17 a cc_ +17 mn 000000630000006300000009 +17 mx 00000063000000630000FFFF +17 sp -------------------------------- +18 a ch_ +18 mn 000000630000006800000009 +18 mx 00000063000000680000FFFF +18 sp -------------------------------- +19 a aa% +19 mn 00000061000000610000000900000009 +19 mx 00000061000000610000FFFF0000FFFF +19 sp -------------------------------- +20 a cc% +20 mn 00000063000000630000000900000009 +20 mx 00000063000000630000FFFF0000FFFF +20 sp -------------------------------- +21 a ch% +21 mn 00000063000000680000000900000009 +21 mx 00000063000000680000FFFF0000FFFF +21 sp -------------------------------- +22 a aaa +22 mn 000000610000006100000061 +22 mx 000000610000006100000061 +22 sp -------------------------------- +23 a ccc +23 mn 000000630000006300000063 +23 mx 000000630000006300000063 +23 sp -------------------------------- +24 a cch +24 mn 000000630000006300000068 +24 mx 000000630000006300000068 +24 sp -------------------------------- +25 a aaa_ +25 mn 00000061000000610000006100000009 +25 mx 0000006100000061000000610000FFFF +25 sp -------------------------------- +26 a ccc_ +26 mn 00000063000000630000006300000009 +26 mx 0000006300000063000000630000FFFF +26 sp -------------------------------- +27 a cch_ +27 mn 00000063000000630000006800000009 +27 mx 0000006300000063000000680000FFFF +27 sp -------------------------------- +28 a aaa% +28 mn 00000061000000610000006100000009 +28 mx 0000006100000061000000610000FFFF +28 sp -------------------------------- +29 a ccc% +29 mn 00000063000000630000006300000009 +29 mx 0000006300000063000000630000FFFF +29 sp -------------------------------- +30 a cch% +30 mn 00000063000000630000006800000009 +30 mx 0000006300000063000000680000FFFF +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 00000061000000610000006100000061 +31 mx 00000061000000610000006100000061 +31 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_czech_ci; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 00000009 +2 mx 0000FFFF +2 sp -------------------------------- +3 a % +3 mn 00000009000000090000000900000009 +3 mx 0000FFFF0000FFFF0000FFFF0000FFFF +3 sp -------------------------------- +4 a \_ +4 mn 0000005F +4 mx 0000005F +4 sp -------------------------------- +5 a \% +5 mn 00000025 +5 mx 00000025 +5 sp -------------------------------- +6 a \ +6 mn 0000005C +6 mx 0000005C +6 sp -------------------------------- +7 a a +7 mn 00000061 +7 mx 00000061 +7 sp -------------------------------- +8 a c +8 mn 00000063 +8 mx 00000063 +8 sp -------------------------------- +9 a a_ +9 mn 0000006100000009 +9 mx 000000610000FFFF +9 sp -------------------------------- +10 a c_ +10 mn 00000009000000090000000900000009 +10 mx 0000FFFF0000FFFF0000FFFF0000FFFF +10 sp -------------------------------- +11 a a% +11 mn 00000061000000090000000900000009 +11 mx 000000610000FFFF0000FFFF0000FFFF +11 sp -------------------------------- +12 a c% +12 mn 00000009000000090000000900000009 +12 mx 0000FFFF0000FFFF0000FFFF0000FFFF +12 sp -------------------------------- +13 a aa +13 mn 0000006100000061 +13 mx 0000006100000061 +13 sp -------------------------------- +14 a cc +14 mn 0000006300000063 +14 mx 0000006300000063 +14 sp -------------------------------- +15 a ch +15 mn 0000006300000068 +15 mx 0000006300000068 +15 sp -------------------------------- +16 a aa_ +16 mn 000000610000006100000009 +16 mx 00000061000000610000FFFF +16 sp -------------------------------- +17 a cc_ +17 mn 00000063000000090000000900000009 +17 mx 000000630000FFFF0000FFFF0000FFFF +17 sp -------------------------------- +18 a ch_ +18 mn 000000630000006800000009 +18 mx 00000063000000680000FFFF +18 sp -------------------------------- +19 a aa% +19 mn 00000061000000610000000900000009 +19 mx 00000061000000610000FFFF0000FFFF +19 sp -------------------------------- +20 a cc% +20 mn 00000063000000090000000900000009 +20 mx 000000630000FFFF0000FFFF0000FFFF +20 sp -------------------------------- +21 a ch% +21 mn 00000063000000680000000900000009 +21 mx 00000063000000680000FFFF0000FFFF +21 sp -------------------------------- +22 a aaa +22 mn 000000610000006100000061 +22 mx 000000610000006100000061 +22 sp -------------------------------- +23 a ccc +23 mn 000000630000006300000063 +23 mx 000000630000006300000063 +23 sp -------------------------------- +24 a cch +24 mn 000000630000006300000068 +24 mx 000000630000006300000068 +24 sp -------------------------------- +25 a aaa_ +25 mn 00000061000000610000006100000009 +25 mx 0000006100000061000000610000FFFF +25 sp -------------------------------- +26 a ccc_ +26 mn 00000063000000630000000900000009 +26 mx 00000063000000630000FFFF0000FFFF +26 sp -------------------------------- +27 a cch_ +27 mn 00000063000000630000006800000009 +27 mx 0000006300000063000000680000FFFF +27 sp -------------------------------- +28 a aaa% +28 mn 00000061000000610000006100000009 +28 mx 0000006100000061000000610000FFFF +28 sp -------------------------------- +29 a ccc% +29 mn 00000063000000630000000900000009 +29 mx 00000063000000630000FFFF0000FFFF +29 sp -------------------------------- +30 a cch% +30 mn 00000063000000630000006800000009 +30 mx 0000006300000063000000680000FFFF +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 00000061000000610000006100000061 +31 mx 00000061000000610000006100000061 +31 sp -------------------------------- +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_danish_ci; +SELECT * FROM v1; +id name val +1 a +1 mn +1 mx +1 sp -------------------------------- +2 a _ +2 mn 00000009 +2 mx 0000FFFF +2 sp -------------------------------- +3 a % +3 mn 00000009000000090000000900000009 +3 mx 0000FFFF0000FFFF0000FFFF0000FFFF +3 sp -------------------------------- +4 a \_ +4 mn 0000005F +4 mx 0000005F +4 sp -------------------------------- +5 a \% +5 mn 00000025 +5 mx 00000025 +5 sp -------------------------------- +6 a \ +6 mn 0000005C +6 mx 0000005C +6 sp -------------------------------- +7 a a +7 mn 00000061 +7 mx 00000061 +7 sp -------------------------------- +8 a c +8 mn 00000063 +8 mx 00000063 +8 sp -------------------------------- +9 a a_ +9 mn 00000009000000090000000900000009 +9 mx 0000FFFF0000FFFF0000FFFF0000FFFF +9 sp -------------------------------- +10 a c_ +10 mn 0000006300000009 +10 mx 000000630000FFFF +10 sp -------------------------------- +11 a a% +11 mn 00000009000000090000000900000009 +11 mx 0000FFFF0000FFFF0000FFFF0000FFFF +11 sp -------------------------------- +12 a c% +12 mn 00000063000000090000000900000009 +12 mx 000000630000FFFF0000FFFF0000FFFF +12 sp -------------------------------- +13 a aa +13 mn 0000006100000061 +13 mx 0000006100000061 +13 sp -------------------------------- +14 a cc +14 mn 0000006300000063 +14 mx 0000006300000063 +14 sp -------------------------------- +15 a ch +15 mn 0000006300000068 +15 mx 0000006300000068 +15 sp -------------------------------- +16 a aa_ +16 mn 000000610000006100000009 +16 mx 00000061000000610000FFFF +16 sp -------------------------------- +17 a cc_ +17 mn 000000630000006300000009 +17 mx 00000063000000630000FFFF +17 sp -------------------------------- +18 a ch_ +18 mn 000000630000006800000009 +18 mx 00000063000000680000FFFF +18 sp -------------------------------- +19 a aa% +19 mn 00000061000000610000000900000009 +19 mx 00000061000000610000FFFF0000FFFF +19 sp -------------------------------- +20 a cc% +20 mn 00000063000000630000000900000009 +20 mx 00000063000000630000FFFF0000FFFF +20 sp -------------------------------- +21 a ch% +21 mn 00000063000000680000000900000009 +21 mx 00000063000000680000FFFF0000FFFF +21 sp -------------------------------- +22 a aaa +22 mn 000000610000006100000061 +22 mx 000000610000006100000061 +22 sp -------------------------------- +23 a ccc +23 mn 000000630000006300000063 +23 mx 000000630000006300000063 +23 sp -------------------------------- +24 a cch +24 mn 000000630000006300000068 +24 mx 000000630000006300000068 +24 sp -------------------------------- +25 a aaa_ +25 mn 00000061000000610000000900000009 +25 mx 00000061000000610000FFFF0000FFFF +25 sp -------------------------------- +26 a ccc_ +26 mn 00000063000000630000006300000009 +26 mx 0000006300000063000000630000FFFF +26 sp -------------------------------- +27 a cch_ +27 mn 00000063000000630000006800000009 +27 mx 0000006300000063000000680000FFFF +27 sp -------------------------------- +28 a aaa% +28 mn 00000061000000610000000900000009 +28 mx 00000061000000610000FFFF0000FFFF +28 sp -------------------------------- +29 a ccc% +29 mn 00000063000000630000006300000009 +29 mx 0000006300000063000000630000FFFF +29 sp -------------------------------- +30 a cch% +30 mn 00000063000000630000006800000009 +30 mx 0000006300000063000000680000FFFF +30 sp -------------------------------- +31 a aaaaaaaaaaaaaaaaaaaa +31 mn 00000061000000610000006100000061 +31 mx 00000061000000610000006100000061 +31 sp -------------------------------- +DROP VIEW v1; +DROP TABLE t1; diff --git a/mysql-test/r/ctype_uca.result b/mysql-test/r/ctype_uca.result index 04727f84ff2..7b9023578b3 100644 --- a/mysql-test/r/ctype_uca.result +++ b/mysql-test/r/ctype_uca.result @@ -2888,3 +2888,101 @@ a hex(b) c DROP TABLE t1; set names utf8; End for 5.0 tests +# +# Start of 5.5 tests +# +SET collation_connection=utf8_czech_ci; +SELECT @@collation_connection; +@@collation_connection +utf8_czech_ci +# +# Bug#57737 Character sets: search fails with like, contraction, index +# +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%'; +s1 +c +ce +cé +ch +ALTER TABLE t1 ADD KEY s1 (s1); +SELECT * FROM t1 WHERE s1 LIKE 'c%'; +s1 +c +ce +cé +ch +ALTER TABLE t1 DROP KEY s1, ADD KEY(s1(1)); +SELECT * FROM t1 WHERE s1 LIKE 'ch'; +s1 +ch +DROP TABLE t1; +SELECT @@collation_connection; +@@collation_connection +utf8_czech_ci +# +# Bug#57737 Character sets: search fails with like, contraction, index +# Part#2 - ignorable characters +# +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%'; +HEX(s1) +61000000000009 +61 +ALTER TABLE t1 ADD KEY s1 (s1); +SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%'; +HEX(s1) +61000000000009 +61 +DROP TABLE t1; +SET collation_connection=ucs2_czech_ci; +SELECT @@collation_connection; +@@collation_connection +ucs2_czech_ci +# +# Bug#57737 Character sets: search fails with like, contraction, index +# +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%'; +s1 +c +ce +cé +ch +ALTER TABLE t1 ADD KEY s1 (s1); +SELECT * FROM t1 WHERE s1 LIKE 'c%'; +s1 +c +ce +cé +ch +ALTER TABLE t1 DROP KEY s1, ADD KEY(s1(1)); +SELECT * FROM t1 WHERE s1 LIKE 'ch'; +s1 +ch +DROP TABLE t1; +SELECT @@collation_connection; +@@collation_connection +ucs2_czech_ci +# +# Bug#57737 Character sets: search fails with like, contraction, index +# Part#2 - ignorable characters +# +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%'; +HEX(s1) +0061000000000000000000000009 +0061 +ALTER TABLE t1 ADD KEY s1 (s1); +SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%'; +HEX(s1) +0061000000000000000000000009 +0061 +DROP TABLE t1; +# +# End of 5.5 tests +# diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index 1008f201366..11d5117bbe1 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -3990,6 +3990,25 @@ DROP TABLE t1; # End of Bug#54916 # # +# Bug#58190 BETWEEN no longer uses indexes for date or datetime fields +# +SELECT @@collation_connection; +@@collation_connection +ucs2_general_ci +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'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where +ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL; +EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where +DROP TABLE t1; +# # Bug#52159 returning time type from function and empty left join causes debug assertion # CREATE FUNCTION f1() RETURNS TIME RETURN 1; diff --git a/mysql-test/r/ctype_utf16_uca.result b/mysql-test/r/ctype_utf16_uca.result index d83ef2af09e..18adaf2f79c 100644 --- a/mysql-test/r/ctype_utf16_uca.result +++ b/mysql-test/r/ctype_utf16_uca.result @@ -2368,6 +2368,52 @@ NULL NULL NULL drop table t1; +SET collation_connection=utf16_czech_ci; +SELECT @@collation_connection; +@@collation_connection +utf16_czech_ci +# +# Bug#57737 Character sets: search fails with like, contraction, index +# +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%'; +s1 +c +ce +cé +ch +ALTER TABLE t1 ADD KEY s1 (s1); +SELECT * FROM t1 WHERE s1 LIKE 'c%'; +s1 +c +ce +cé +ch +ALTER TABLE t1 DROP KEY s1, ADD KEY(s1(1)); +SELECT * FROM t1 WHERE s1 LIKE 'ch'; +s1 +ch +DROP TABLE t1; +SELECT @@collation_connection; +@@collation_connection +utf16_czech_ci +# +# Bug#57737 Character sets: search fails with like, contraction, index +# Part#2 - ignorable characters +# +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%'; +HEX(s1) +0061000000000000000000000009 +0061 +ALTER TABLE t1 ADD KEY s1 (s1); +SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%'; +HEX(s1) +0061000000000000000000000009 +0061 +DROP TABLE t1; # # End of 5.5 tests # diff --git a/mysql-test/r/ctype_utf32_uca.result b/mysql-test/r/ctype_utf32_uca.result index 5006009fc9c..fd5a4199217 100644 --- a/mysql-test/r/ctype_utf32_uca.result +++ b/mysql-test/r/ctype_utf32_uca.result @@ -2368,6 +2368,52 @@ NULL NULL NULL drop table t1; +SET collation_connection=utf32_czech_ci; +SELECT @@collation_connection; +@@collation_connection +utf32_czech_ci +# +# Bug#57737 Character sets: search fails with like, contraction, index +# +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%'; +s1 +c +ce +cé +ch +ALTER TABLE t1 ADD KEY s1 (s1); +SELECT * FROM t1 WHERE s1 LIKE 'c%'; +s1 +c +ce +cé +ch +ALTER TABLE t1 DROP KEY s1, ADD KEY(s1(1)); +SELECT * FROM t1 WHERE s1 LIKE 'ch'; +s1 +ch +DROP TABLE t1; +SELECT @@collation_connection; +@@collation_connection +utf32_czech_ci +# +# Bug#57737 Character sets: search fails with like, contraction, index +# Part#2 - ignorable characters +# +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%'; +HEX(s1) +00000061000000000000000000000000000000000000000000000009 +00000061 +ALTER TABLE t1 ADD KEY s1 (s1); +SELECT HEX(s1) FROM t1 WHERE s1 LIKE 'a%'; +HEX(s1) +00000061000000000000000000000000000000000000000000000009 +00000061 +DROP TABLE t1; # # End of 5.5 tests # diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 02ff80890e0..935348aa95c 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -1898,6 +1898,37 @@ CONVERT(a, CHAR) CONVERT(b, CHAR) 70000 1092 DROP TABLE t1; End of 5.0 tests +SELECT LENGTH(RPAD(0.0115E88, 61297, _utf8'яэюя')); +LENGTH(RPAD(0.0115E88, 61297, _utf8'яэюя')) +122587 +SELECT LENGTH(RPAD(0.0115E88, 61297, _utf8'йцуя')); +LENGTH(RPAD(0.0115E88, 61297, _utf8'йцуя')) +122587 +SELECT HEX(RPAD(0x20, 2, _utf8 0xD18F)); +HEX(RPAD(0x20, 2, _utf8 0xD18F)) +20D1 +SELECT HEX(RPAD(0x20, 4, _utf8 0xD18F)); +HEX(RPAD(0x20, 4, _utf8 0xD18F)) +20D18FD1 +SELECT HEX(LPAD(0x20, 2, _utf8 0xD18F)); +HEX(LPAD(0x20, 2, _utf8 0xD18F)) +D120 +SELECT HEX(LPAD(0x20, 4, _utf8 0xD18F)); +HEX(LPAD(0x20, 4, _utf8 0xD18F)) +D18FD120 +SELECT HEX(RPAD(_utf8 0xD18F, 3, 0x20)); +HEX(RPAD(_utf8 0xD18F, 3, 0x20)) +D18F20 +SELECT HEX(LPAD(_utf8 0xD18F, 3, 0x20)); +HEX(LPAD(_utf8 0xD18F, 3, 0x20)) +20D18F +SELECT HEX(INSERT(_utf8 0xD18F, 2, 1, 0x20)); +HEX(INSERT(_utf8 0xD18F, 2, 1, 0x20)) +D120 +SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20)); +HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20)) +D120D18E +End of 5.1 tests Start of 5.4 tests SET NAMES utf8mb3; SHOW VARIABLES LIKE 'character_set_results%'; @@ -4848,6 +4879,25 @@ DROP TABLE t1; # End of Bug#54916 # # +# Bug#58190 BETWEEN no longer uses indexes for date or datetime fields +# +SELECT @@collation_connection; +@@collation_connection +utf8_general_ci +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'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range date_column date_column 4 NULL 1 Using where +ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL; +EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range date_column date_column 9 NULL 1 Using where +DROP TABLE t1; +# # Bug#52159 returning time type from function and empty left join causes debug assertion # CREATE FUNCTION f1() RETURNS TIME RETURN 1; diff --git a/mysql-test/r/explain.result b/mysql-test/r/explain.result index b8dbb54e5fb..b9ae362f6cd 100644 --- a/mysql-test/r/explain.result +++ b/mysql-test/r/explain.result @@ -271,4 +271,50 @@ EXPLAIN SELECT c1 FROM t1 WHERE c2 = 1 AND c4 = 1 AND c5 = 1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref c2,c2_2 c2 10 const,const 3 Using where DROP TABLE t1; +# +# Bug#56814 Explain + subselect + fulltext crashes server +# +CREATE TABLE t1(f1 VARCHAR(6) NOT NULL, +FULLTEXT KEY(f1),UNIQUE(f1)); +INSERT INTO t1 VALUES ('test'); +EXPLAIN SELECT 1 FROM t1 +WHERE 1 > ALL((SELECT 1 FROM t1 JOIN t1 a ON (MATCH(t1.f1) AGAINST ("")) +WHERE t1.f1 GROUP BY t1.f1)); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system NULL NULL NULL NULL 1 +2 SUBQUERY a system NULL NULL NULL NULL 1 Using filesort +2 SUBQUERY t1 fulltext f1 f1 0 1 Using where +PREPARE stmt FROM +'EXPLAIN SELECT 1 FROM t1 + WHERE 1 > ALL((SELECT 1 FROM t1 RIGHT OUTER JOIN t1 a + ON (MATCH(t1.f1) AGAINST ("")) + WHERE t1.f1 GROUP BY t1.f1))'; +EXECUTE stmt; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system NULL NULL NULL NULL 1 +2 SUBQUERY a system NULL NULL NULL NULL 1 Using filesort +2 SUBQUERY t1 fulltext f1 f1 0 1 Using where +EXECUTE stmt; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system NULL NULL NULL NULL 1 +2 SUBQUERY a system NULL NULL NULL NULL 1 Using filesort +2 SUBQUERY t1 fulltext f1 f1 0 1 Using where +DEALLOCATE PREPARE stmt; +PREPARE stmt FROM +'EXPLAIN SELECT 1 FROM t1 + WHERE 1 > ALL((SELECT 1 FROM t1 JOIN t1 a + ON (MATCH(t1.f1) AGAINST ("")) + WHERE t1.f1 GROUP BY t1.f1))'; +EXECUTE stmt; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system NULL NULL NULL NULL 1 +2 SUBQUERY a system NULL NULL NULL NULL 1 Using filesort +2 SUBQUERY t1 fulltext f1 f1 0 1 Using where +EXECUTE stmt; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 system NULL NULL NULL NULL 1 +2 SUBQUERY a system NULL NULL NULL NULL 1 Using filesort +2 SUBQUERY t1 fulltext f1 f1 0 1 Using where +DEALLOCATE PREPARE stmt; +DROP TABLE t1; End of 5.1 tests. diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index a75f502c735..8c66156152e 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -652,4 +652,49 @@ Table Op Msg_type Msg_text test.t1 repair status OK SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size; DROP TABLE t1; +# +# Bug#54484 explain + prepared statement: crash and Got error -1 from storage engine +# +CREATE TABLE t1(f1 VARCHAR(6) NOT NULL, FULLTEXT KEY(f1), UNIQUE(f1)); +INSERT INTO t1 VALUES ('test'); +SELECT 1 FROM t1 WHERE 1 > +ALL((SELECT 1 FROM t1 JOIN t1 a +ON (MATCH(t1.f1) against ("")) +WHERE t1.f1 GROUP BY t1.f1)) xor f1; +1 +1 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: 'test' +Warning 1292 Truncated incorrect INTEGER value: 'test' +PREPARE stmt FROM +'SELECT 1 FROM t1 WHERE 1 > + ALL((SELECT 1 FROM t1 RIGHT OUTER JOIN t1 a + ON (MATCH(t1.f1) against ("")) + WHERE t1.f1 GROUP BY t1.f1)) xor f1'; +EXECUTE stmt; +1 +1 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: 'test' +Warning 1292 Truncated incorrect INTEGER value: 'test' +EXECUTE stmt; +1 +1 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: 'test' +Warning 1292 Truncated incorrect INTEGER value: 'test' +DEALLOCATE PREPARE stmt; +PREPARE stmt FROM +'SELECT 1 FROM t1 WHERE 1 > + ALL((SELECT 1 FROM t1 JOIN t1 a + ON (MATCH(t1.f1) against ("")) + WHERE t1.f1 GROUP BY t1.f1))'; +EXECUTE stmt; +1 +1 +EXECUTE stmt; +1 +1 +DEALLOCATE PREPARE stmt; +DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index 302de9de9f7..69be0107b8f 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -1038,6 +1038,14 @@ GROUP_CONCAT(t1.a ORDER BY t1.a) 1,1,2,2 DEALLOCATE PREPARE stmt; DROP TABLE t1; +# +# Bug#57194 group_concat cause crash and/or invalid memory reads with type errors +# +CREATE TABLE t1(f1 int); +INSERT INTO t1 values (0),(0); +SELECT POLYGON((SELECT 1 FROM (SELECT 1 IN (GROUP_CONCAT(t1.f1)) FROM t1, t1 t GROUP BY t.f1 ) d)); +ERROR 22007: Illegal non geometric '(select 1 from (select (1 = group_concat(`test`.`t1`.`f1` separator ',')) AS `1 IN (GROUP_CONCAT(t1.f1))` from `test`.`t1` join `test`.`t1` `t` group by `t`.`f1`) `d`)' value found during parsing +DROP TABLE t1; End of 5.1 tests DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1 (a VARCHAR(6), b INT); diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index 835715ac51e..ac9a22a0b82 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -481,6 +481,18 @@ RAND(i) 0.15522042769493574 DROP TABLE t1; # +# Bug#57477 SIGFPE when dividing a huge number a negative number +# +SELECT -9999999999999999991 DIV -1; +ERROR 22003: BIGINT value is out of range in '(-(9999999999999999991) DIV -(1))' +SELECT -9223372036854775808 DIV -1; +ERROR 22003: BIGINT value is out of range in '(-(9223372036854775808) DIV -(1))' +SELECT -9223372036854775808 MOD -1; +-9223372036854775808 MOD -1 +0 +SELECT -9223372036854775808999 MOD -1; +-9223372036854775808999 MOD -1 +0 select 123456789012345678901234567890.123456789012345678901234567890 div 1 as x; ERROR 22003: BIGINT value is out of range in '(123456789012345678901234567890.123456789012345678901234567890 DIV 1)' select "123456789012345678901234567890.123456789012345678901234567890" div 1 as x; diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index 3c5dc0faa0c..0a0158708de 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -351,6 +351,12 @@ GREATEST(a, (SELECT b FROM t1 LIMIT 1)) 3 1 DROP TABLE t1; +SELECT INET_NTOA(0); +INET_NTOA(0) +0.0.0.0 +SELECT '1' IN ('1', INET_NTOA(0)); +'1' IN ('1', INET_NTOA(0)) +1 # # Bug #52165: Assertion failed: file .\dtoa.c, line 465 # @@ -382,3 +388,4 @@ CREATE TABLE t1 (a INT); SELECT 1 from t1 HAVING NAME_CONST('', a); ERROR HY000: Incorrect arguments to NAME_CONST DROP TABLE t1; +End of tests diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 0ed46ba270b..34987530b5a 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -1341,3 +1341,12 @@ SELECT * FROM t1 WHERE date_date <= addtime(date_add("2000-1-1", INTERVAL "1:1:1 date_date DROP TABLE t1; # +# Bug#57512 str_to_date crash... +# +SELECT WEEK(STR_TO_DATE(NULL,0)); +WEEK(STR_TO_DATE(NULL,0)) +NULL +SELECT SUBDATE(STR_TO_DATE(NULL,0), INTERVAL 1 HOUR); +SUBDATE(STR_TO_DATE(NULL,0), INTERVAL 1 HOUR) +NULL +# diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 2621f69da06..188485d366f 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -1846,6 +1846,16 @@ SELECT SUBSTRING(a,1,10), LENGTH(a) FROM t1 GROUP BY a; SUBSTRING(a,1,10) LENGTH(a) 1111111111 1300 DROP TABLE t1; +# +# Bug#57688 Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field +# +CREATE TABLE t1(f1 INT NOT NULL); +INSERT INTO t1 VALUES (16777214),(0); +SELECT COUNT(*) FROM t1 LEFT JOIN t1 t2 +ON 1 WHERE t2.f1 > 1 GROUP BY t2.f1; +COUNT(*) +2 +DROP TABLE t1; # End of 5.1 tests # # Bug#49771: Incorrect MIN (date) when minimum value is 0000-00-00 diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 0af32d8f749..99ca9f05535 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -1402,4 +1402,34 @@ id select_type table type possible_keys key key_len ref rows filtered Extra Warnings: Note 1003 select straight_join `test`.`jt1`.`f1` AS `f1` from `test`.`t1` `jt6` left join (`test`.`t1` `jt3` join `test`.`t1` `jt4` left join `test`.`t1` `jt5` on(1) left join `test`.`t1` `jt2` on(1)) on((`test`.`jt6`.`f1` and 1)) left join `test`.`t1` `jt1` on(1) where 1 DROP TABLE t1; +# +# Bug#57688 Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field +# +CREATE TABLE t1 (f1 INT NOT NULL, PRIMARY KEY (f1)); +CREATE TABLE t2 (f1 INT NOT NULL, f2 INT NOT NULL, PRIMARY KEY (f1, f2)); +INSERT INTO t1 VALUES (4); +INSERT INTO t2 VALUES (3, 3); +INSERT INTO t2 VALUES (7, 7); +EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1 +WHERE t1.f1 = 4 +GROUP BY t2.f1, t2.f2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system PRIMARY NULL NULL NULL 1 Using temporary; Using filesort +1 SIMPLE t2 ref PRIMARY PRIMARY 4 const 1 Using index +SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1 +WHERE t1.f1 = 4 +GROUP BY t2.f1, t2.f2; +f1 f1 f2 +4 NULL NULL +EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1 +WHERE t1.f1 = 4 AND t2.f1 IS NOT NULL AND t2.f2 IS NOT NULL +GROUP BY t2.f1, t2.f2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system PRIMARY NULL NULL NULL 1 Using filesort +1 SIMPLE t2 ref PRIMARY PRIMARY 4 const 1 Using where; Using index +SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1 +WHERE t1.f1 = 4 AND t2.f1 IS NOT NULL AND t2.f2 IS NOT NULL +GROUP BY t2.f1, t2.f2; +f1 f1 f2 +DROP TABLE t1,t2; End of 5.1 tests diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index 3c53faff526..45297ffad8d 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -433,4 +433,75 @@ Bug #47147: mysql client option --skip-column-names does not apply to vertical o *************************** 1. row *************************** 1 +# +# Bug #54899: --one-database option cannot handle DROP/CREATE DATABASE +# commands. +# +CREATE DATABASE connected_db; +USE connected_db; +SHOW TABLES; +Tables_in_connected_db +table_in_connected_db +DROP DATABASE connected_db; + +# +# Testing --one-database option +# +CREATE DATABASE connected_db; +SHOW TABLES IN connected_db; +Tables_in_connected_db +t1 +SHOW TABLES IN test; +Tables_in_test +t1 +USE test; +DROP TABLE t1; +DROP DATABASE connected_db; + +SHOW TABLES IN test; +Tables_in_test +SHOW TABLES IN test1; +Tables_in_test1 +DROP DATABASE test1; + +# +# Checking --one-database option followed by the execution of +# connect command. +# +CREATE DATABASE connected_db; +SHOW TABLES IN connected_db; +Tables_in_connected_db +t1 +t2 +SHOW TABLES IN test; +Tables_in_test +t1 +t2 +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP DATABASE connected_db; + +# +# Checking --one-database option with no database specified +# at command-line. +# +SHOW TABLES IN test; +Tables_in_test + +# +# Checking --one-database option with non_existent_db +# specified with USE command +# +SHOW TABLES IN test; +Tables_in_test +table_in_test +DROP DATABASE test; + +CREATE DATABASE test; +SHOW TABLES IN test; +Tables_in_test +table_in_test +DROP DATABASE test; +CREATE DATABASE test; + End of tests diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index cff845a2819..6892164c225 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -308,6 +308,10 @@ var3 two columns with same name var4 from query that returns NULL var5 from query that returns no row failing query in let +create table t1 (a varchar(100)); +insert into t1 values ('`select 42`'); +`select 42` +drop table t1; mysqltest: At line 1: Error running query 'failing query': 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'failing query' at line 1 mysqltest: At line 1: Missing required argument 'filename' to command 'source' mysqltest: At line 1: Could not open './non_existingFile' for reading, errno: 2 @@ -399,10 +403,43 @@ true-inner true-inner again true-outer Counter is greater than 0, (counter=10) +Counter should still be 10, is 10 Counter is not 0, (counter=0) +Not space var works Counter is true, (counter=alpha) -Beta is true while with string, only once +5<7 +5<7 again +5<7 still +5<6 +5>=5 +5>=5 again +5>3 +5==5 +5!=8 +5!=five +5==3+2 +5 == 5 +hello == hello +hello == hello +hello != goodbye +'quoted' == ''quoted'' +two words +'two words' +"two words" +two words are two words +right answer +anything goes +0 != string +mysqltest: At line 2: Only == and != are supported for string values +mysqltest: At line 2: Found junk '~= 6' after $variable in condition +mysqltest: At line 2: Expression in if/while must beging with $, ` or a number +counter is 2 +counter is 3 +counter is 4 +counter is 5 +counter is 6 +counter is 7 1 Testing while with not mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc": At line 64: Nesting too deeply @@ -807,8 +844,6 @@ dir-list.txt SELECT 'c:\\a.txt' AS col; col z -hej -mysqltest: At line 1: Found junk ' != 143' after $variable in expression select 1; 1 1 diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index 525cc439cd1..6515d2a4e0c 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -1,5 +1,31 @@ drop table if exists t1, t2; # +# Bug#56287: crash when using Partition datetime in sub in query +# +CREATE TABLE t1 +(c1 bigint(20) unsigned NOT NULL AUTO_INCREMENT, +c2 varchar(40) not null default '', +c3 datetime not NULL, +PRIMARY KEY (c1,c3), +KEY partidx(c3)) +ENGINE=InnoDB +PARTITION BY RANGE (TO_DAYS(c3)) +(PARTITION p200912 VALUES LESS THAN (to_days('2010-01-01')), +PARTITION p201103 VALUES LESS THAN (to_days('2011-04-01')), +PARTITION p201912 VALUES LESS THAN MAXVALUE); +insert into t1(c2,c3) values ("Test row",'2010-01-01 00:00:00'); +SELECT PARTITION_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test'; +PARTITION_NAME TABLE_ROWS +p200912 0 +p201103 1 +p201912 0 +SELECT count(*) FROM t1 p where c3 in +(select c3 from t1 t where t.c3 < date '2011-04-26 19:19:44' + and t.c3 > date '2011-04-26 19:18:44') ; +count(*) +0 +DROP TABLE t1; +# # Bug#54747: Deadlock between REORGANIZE PARTITION and # SELECT is not detected # diff --git a/mysql-test/r/plugin_auth.result b/mysql-test/r/plugin_auth.result index 7119ba11077..8a649f63598 100644 --- a/mysql-test/r/plugin_auth.result +++ b/mysql-test/r/plugin_auth.result @@ -255,3 +255,67 @@ GRANT PROXY ON standard_user TO ''@''; DROP USER ''@''; DROP USER standard_user; DROP DATABASE shared; +# +# Bug #57551 : Live upgrade fails between 5.1.52 -> 5.5.7-rc +# +CALL mtr.add_suppression("Missing system table mysql.proxies_priv."); +DROP TABLE mysql.proxies_priv; +# Must come back with mysql.proxies_priv absent. +SELECT * FROM mysql.proxies_priv; +ERROR 42S02: Table 'mysql.proxies_priv' doesn't exist +CREATE USER u1@localhost; +GRANT ALL PRIVILEGES ON *.* TO u1@localhost; +REVOKE ALL PRIVILEGES ON *.* FROM u1@localhost; +GRANT ALL PRIVILEGES ON *.* TO u1@localhost; +CREATE USER u2@localhost; +GRANT ALL PRIVILEGES ON *.* TO u2@localhost; +# access denied because of no privileges to root +GRANT PROXY ON u2@localhost TO u1@localhost; +ERROR 28000: Access denied for user 'root'@'localhost' +# access denied because of no privileges to root +REVOKE PROXY ON u2@localhost FROM u1@localhost; +ERROR 28000: Access denied for user 'root'@'localhost' +# go try graning proxy on itself, so that it will need the table +GRANT PROXY ON u2@localhost TO u1@localhost; +ERROR 42S02: Table 'mysql.proxies_priv' doesn't exist +REVOKE PROXY ON u2@localhost FROM u1@localhost; +ERROR 42S02: Table 'mysql.proxies_priv' doesn't exist +# test if REVOKE works without the proxies_priv table +REVOKE ALL PRIVILEGES ON *.* FROM u1@localhost, u2@localhost; +# test if DROP USER work without the proxies_priv table +DROP USER u1@localhost,u2@localhost; +# test if FLUSH PRIVILEGES works without the proxies_priv table +FLUSH PRIVILEGES; +mtr.global_suppressions OK +mtr.test_suppressions OK +mysql.columns_priv OK +mysql.db OK +mysql.event OK +mysql.func OK +mysql.general_log OK +mysql.help_category OK +mysql.help_keyword OK +mysql.help_relation OK +mysql.help_topic OK +mysql.host OK +mysql.ndb_binlog_index OK +mysql.plugin OK +mysql.proc OK +mysql.procs_priv OK +mysql.servers OK +mysql.slow_log OK +mysql.tables_priv OK +mysql.time_zone OK +mysql.time_zone_leap_second OK +mysql.time_zone_name OK +mysql.time_zone_transition OK +mysql.time_zone_transition_type OK +mysql.user OK +SELECT Host,User,Proxied_host,Proxied_user,With_grant FROM mysql.proxies_priv; +Host localhost +User root +Proxied_host +Proxied_user +With_grant 1 +FLUSH PRIVILEGES; +End of 5.5 tests diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index a680e837cae..e41a9bc7637 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -445,6 +445,9 @@ IF( count(*), 1) 1 DROP TABLE t1; +select @v:=@v:=sum(1) from dual; +@v:=@v:=sum(1) +1 End of 5.1 tests DROP TABLE IF EXISTS t1; CREATE TABLE t1(f1 INT AUTO_INCREMENT, PRIMARY KEY(f1)); diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index be81afe1a43..ee180169916 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -1511,6 +1511,39 @@ SELECT @@skip_name_resolve; SHOW VARIABLES LIKE 'skip_name_resolve'; Variable_name Value skip_name_resolve OFF +# +# Bug #43233 : Some server variables are clipped during "update," +# not "check" stage +# +SET @kbs=@@global.key_buffer_size; +SET @kcbs=@@global.key_cache_block_size; +throw errors in STRICT mode +SET SQL_MODE=STRICT_ALL_TABLES; +SET @@global.max_binlog_cache_size=-1; +ERROR 42000: Variable 'max_binlog_cache_size' can't be set to the value of '-1' +SET @@global.max_join_size=0; +ERROR 42000: Variable 'max_join_size' can't be set to the value of '0' +SET @@global.key_buffer_size=0; +ERROR HY000: Cannot drop default keycache +SET @@global.key_cache_block_size=0; +ERROR 42000: Variable 'key_cache_block_size' can't be set to the value of '0' +throw warnings in default mode +SET SQL_MODE=DEFAULT; +SET @@global.max_binlog_cache_size=-1; +Warnings: +Warning 1292 Truncated incorrect max_binlog_cache_size value: '-1' +SET @@global.max_join_size=0; +Warnings: +Warning 1292 Truncated incorrect max_join_size value: '0' +SET @@global.key_buffer_size=0; +ERROR HY000: Cannot drop default keycache +SET @@global.key_cache_block_size=0; +Warnings: +Warning 1292 Truncated incorrect key_cache_block_size value: '0' +SET @@global.max_binlog_cache_size=DEFAULT; +SET @@global.max_join_size=DEFAULT; +SET @@global.key_buffer_size=@kbs; +SET @@global.key_cache_block_size=@kcbs; End of 5.1 tests # diff --git a/mysql-test/r/xml.result b/mysql-test/r/xml.result index af4cf8efedd..f5cf30e865b 100644 --- a/mysql-test/r/xml.result +++ b/mysql-test/r/xml.result @@ -1101,3 +1101,16 @@ ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111 SELECT EXTRACTVALUE('', LPAD(0.1111E-15, '2011', 1)); ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' value found during parsing End of 5.1 tests +# +# Start of 5.5 tests +# +# +# Bug#58175 xml functions read initialized bytes when conversions happen +# +SET NAMES latin1; +SELECT UPDATEXML(CONVERT('' USING swe7), TRUNCATE('',1), 0); +UPDATEXML(CONVERT('' USING swe7), TRUNCATE('',1), 0) +NULL +# +# End of 5.5 tests +# diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result index e45f4a76643..abb02164d91 100644 --- a/mysql-test/suite/binlog/r/binlog_row_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result @@ -1218,8 +1218,8 @@ master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT drop table t1,t2,t3,tt1; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; -insert delayed into t1 values (207); -insert delayed into t1 values (null); +insert /* before delayed */ delayed /* after delayed */ into t1 values (207); +insert /*! delayed */ into t1 values (null); insert delayed into t1 values (300); FLUSH TABLES; show binlog events from <binlog_start>; @@ -1330,3 +1330,62 @@ Log_name Pos Event_type Server_id End_log_pos Info # # Write_rows 1 # table_id: # flags: STMT_END_F # # Query 1 # COMMIT DROP TABLE t1; + +# BUG#54903 BINLOG statement toggles session variables +# ---------------------------------------------------------------------- +# This test verify that BINLOG statement doesn't change current session's +# variables foreign_key_checks and unique_checks. + +CREATE TABLE t1 (c1 INT KEY); +SET @@SESSION.foreign_key_checks= ON; +SET @@SESSION.unique_checks= ON; +# INSERT INTO t1 VALUES (1) +# foreign_key_checks=0 and unique_checks=0 +BINLOG ' +dfLtTBMBAAAAKQAAANcAAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE= +dfLtTBcBAAAAIgAAAPkAAAAAABcAAAAAAAcAAf/+AQAAAA== +'; +SELECT * FROM t1; +c1 +1 +# Their values should be ON +SHOW SESSION VARIABLES LIKE "%_checks"; +Variable_name Value +foreign_key_checks ON +unique_checks ON + +SET @@SESSION.foreign_key_checks= OFF; +SET @@SESSION.unique_checks= OFF; +# INSERT INTO t1 VALUES(2) +# foreign_key_checks=1 and unique_checks=1 +BINLOG ' +dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE= +dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA== +'; +SELECT * FROM t1; +c1 +1 +2 +# Their values should be OFF +SHOW SESSION VARIABLES LIKE "%_checks"; +Variable_name Value +foreign_key_checks OFF +unique_checks OFF +# INSERT INTO t1 VALUES(2) +# foreign_key_checks=1 and unique_checks=1 +# It should not change current session's variables, even error happens +BINLOG ' +dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE= +dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA== +'; +ERROR 23000: Duplicate entry '2' for key 'PRIMARY' +SELECT * FROM t1; +c1 +1 +2 +# Their values should be OFF +SHOW SESSION VARIABLES LIKE "%_checks"; +Variable_name Value +foreign_key_checks OFF +unique_checks OFF +DROP TABLE t1; diff --git a/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result b/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result index 2219961aca0..cdcc96b94b0 100644 --- a/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result +++ b/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result @@ -1,6 +1,6 @@ create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; -insert delayed into t1 values (207); -insert delayed into t1 values (null); +insert /* before delayed */ delayed /* after delayed */ into t1 values (207); +insert /*! delayed */ into t1 values (null); insert delayed into t1 values (300); FLUSH TABLES; show binlog events from <binlog_start>; @@ -10,14 +10,14 @@ master-bin.000001 # Query # # use `mtr`; INSERT INTO test_suppressions (pattern) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; insert delayed into t1 values (207) +master-bin.000001 # Query # # use `test`; insert /* before delayed */ /* after delayed */ into t1 values (207) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # BEGIN master-bin.000001 # Intvar # # INSERT_ID=208 -master-bin.000001 # Query # # use `test`; insert delayed into t1 values (null) +master-bin.000001 # Query # # use `test`; insert /*! */ into t1 values (null) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # BEGIN -master-bin.000001 # Query # # use `test`; insert delayed into t1 values (300) +master-bin.000001 # Query # # use `test`; insert into t1 values (300) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; FLUSH TABLES RESET MASTER; diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result index 187a778d9cc..5960952e22e 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result @@ -717,8 +717,8 @@ master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhos master-bin.000001 # Query # # COMMIT drop table t1,t2,t3,tt1; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; -insert delayed into t1 values (207); -insert delayed into t1 values (null); +insert /* before delayed */ delayed /* after delayed */ into t1 values (207); +insert /*! delayed */ into t1 values (null); insert delayed into t1 values (300); FLUSH TABLES; show binlog events from <binlog_start>; @@ -820,3 +820,62 @@ Log_name Pos Event_type Server_id End_log_pos Info # # Write_rows 1 # table_id: # flags: STMT_END_F # # Query 1 # COMMIT DROP TABLE t1; + +# BUG#54903 BINLOG statement toggles session variables +# ---------------------------------------------------------------------- +# This test verify that BINLOG statement doesn't change current session's +# variables foreign_key_checks and unique_checks. + +CREATE TABLE t1 (c1 INT KEY); +SET @@SESSION.foreign_key_checks= ON; +SET @@SESSION.unique_checks= ON; +# INSERT INTO t1 VALUES (1) +# foreign_key_checks=0 and unique_checks=0 +BINLOG ' +dfLtTBMBAAAAKQAAANcAAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE= +dfLtTBcBAAAAIgAAAPkAAAAAABcAAAAAAAcAAf/+AQAAAA== +'; +SELECT * FROM t1; +c1 +1 +# Their values should be ON +SHOW SESSION VARIABLES LIKE "%_checks"; +Variable_name Value +foreign_key_checks ON +unique_checks ON + +SET @@SESSION.foreign_key_checks= OFF; +SET @@SESSION.unique_checks= OFF; +# INSERT INTO t1 VALUES(2) +# foreign_key_checks=1 and unique_checks=1 +BINLOG ' +dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE= +dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA== +'; +SELECT * FROM t1; +c1 +1 +2 +# Their values should be OFF +SHOW SESSION VARIABLES LIKE "%_checks"; +Variable_name Value +foreign_key_checks OFF +unique_checks OFF +# INSERT INTO t1 VALUES(2) +# foreign_key_checks=1 and unique_checks=1 +# It should not change current session's variables, even error happens +BINLOG ' +dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE= +dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA== +'; +ERROR 23000: Duplicate entry '2' for key 'PRIMARY' +SELECT * FROM t1; +c1 +1 +2 +# Their values should be OFF +SHOW SESSION VARIABLES LIKE "%_checks"; +Variable_name Value +foreign_key_checks OFF +unique_checks OFF +DROP TABLE t1; diff --git a/mysql-test/suite/binlog/t/binlog_max_extension.test b/mysql-test/suite/binlog/t/binlog_max_extension.test index 9f52d195e21..4525ce41aed 100644 --- a/mysql-test/suite/binlog/t/binlog_max_extension.test +++ b/mysql-test/suite/binlog/t/binlog_max_extension.test @@ -38,9 +38,7 @@ RESET MASTER; ########## # 1. Stop master server --- write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -wait -EOF +-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -- shutdown_server 10 -- source include/wait_until_disconnected.inc @@ -52,9 +50,7 @@ master-bin.2147483646 EOF # 3. Restart the server --- append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -restart -EOF +-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -- enable_reconnect -- source include/wait_until_connected_again.inc @@ -70,9 +66,7 @@ FLUSH LOGS; ############## # 1. Stop the server --- write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -wait -EOF +-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -- shutdown_server 10 -- source include/wait_until_disconnected.inc @@ -85,8 +79,6 @@ EOF -- remove_file $MYSQLD_DATADIR/master-bin.2147483647 # 3. Restart the server --- append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -restart -EOF +-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -- enable_reconnect -- source include/wait_until_connected_again.inc diff --git a/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_db_filter.test b/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_db_filter.test index 6682d84d9c9..2e3e53b86f1 100644 --- a/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_db_filter.test +++ b/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_db_filter.test @@ -83,17 +83,17 @@ while($i) -- let $flags=--database=b42941 # construct CLI for mysqlbinlog - if(`SELECT $i=3`) + if($i==3) { -- let $flags= $flags --verbose --hexdump } - if(`SELECT $i=2`) + if($i==2) { -- let $flags= $flags --verbose } -# if(`SELECT $i=1`) +# if($i==1) # { # do nothing $flags is already set as it should be # } diff --git a/mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test b/mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test index a2f6afc1004..85571a6c582 100644 --- a/mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test +++ b/mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test @@ -116,7 +116,7 @@ DROP TABLE t1; SET GLOBAL log_warnings = @old_log_warnings; let $log_error_= `SELECT @@GLOBAL.log_error`; -if(!`select LENGTH('$log_error_')`) +if(!$log_error_) { # MySQL Server on windows is started with --console and thus # does not know the location of its .err log, use default location diff --git a/mysql-test/suite/binlog/t/binlog_unsafe.test b/mysql-test/suite/binlog/t/binlog_unsafe.test index 5c649477dd8..7d10bb73824 100644 --- a/mysql-test/suite/binlog/t/binlog_unsafe.test +++ b/mysql-test/suite/binlog/t/binlog_unsafe.test @@ -141,11 +141,11 @@ END| # In each iteration of this loop, we select one method to make the # statement unsafe. --let $unsafe_type= 0 -while (`SELECT $unsafe_type < 9`) { +while ($unsafe_type < 9) { --echo - if (`SELECT $unsafe_type = 0`) { + if ($unsafe_type == 0) { --echo ==== Testing UUID() unsafeness ==== --let $desc_0= unsafe UUID() function --let $stmt_sidef_0= INSERT INTO t0 VALUES (UUID()) @@ -155,7 +155,7 @@ while (`SELECT $unsafe_type < 9`) { --let $CRC_ARG_expected_number_of_warnings= 1 } - if (`SELECT $unsafe_type = 1`) { + if ($unsafe_type == 1) { --echo ==== Testing @@hostname unsafeness ==== --let $desc_0= unsafe @@hostname variable --let $stmt_sidef_0= INSERT INTO t0 VALUES (@@hostname) @@ -168,7 +168,7 @@ while (`SELECT $unsafe_type < 9`) { --let $CRC_ARG_expected_number_of_warnings= 1 } - if (`SELECT $unsafe_type = 2`) { + if ($unsafe_type == 2) { --echo ==== Testing SELECT...LIMIT unsafeness ==== --let $desc_0= unsafe SELECT...LIMIT statement --let $stmt_sidef_0= INSERT INTO t0 SELECT * FROM data_table LIMIT 1 @@ -178,7 +178,7 @@ while (`SELECT $unsafe_type < 9`) { --let $CRC_ARG_expected_number_of_warnings= 1 } - if (`SELECT $unsafe_type = 3`) { + if ($unsafe_type == 3) { --echo ==== Testing INSERT DELAYED safeness after BUG#54579 is fixed ==== --let $desc_0= unsafe INSERT DELAYED statement --let $stmt_sidef_0= INSERT DELAYED INTO t0 VALUES (1), (2) @@ -188,7 +188,7 @@ while (`SELECT $unsafe_type < 9`) { --let $CRC_ARG_expected_number_of_warnings= 0 } - if (`SELECT $unsafe_type = 4`) { + if ($unsafe_type == 4) { --echo ==== Testing unsafeness of insert of two autoinc values ==== --let $desc_0= unsafe update of two autoinc columns --let $stmt_sidef_0= INSERT INTO double_autoinc_table VALUES (NULL) @@ -198,7 +198,7 @@ while (`SELECT $unsafe_type < 9`) { --let $CRC_ARG_expected_number_of_warnings= 1 } - if (`SELECT $unsafe_type = 5`) { + if ($unsafe_type == 5) { --echo ==== Testing unsafeness of UDF's ==== --let $desc_0= unsafe UDF --let $stmt_sidef_0= INSERT INTO t0 VALUES (myfunc_int(10)) @@ -208,7 +208,7 @@ while (`SELECT $unsafe_type < 9`) { --let $CRC_ARG_expected_number_of_warnings= 1 } - if (`SELECT $unsafe_type = 6`) { + if ($unsafe_type == 6) { --echo ==== Testing unsafeness of access to mysql.general_log ==== --let $desc_0= unsafe use of mysql.general_log --let $stmt_sidef_0= INSERT INTO t0 SELECT COUNT(*) FROM mysql.general_log @@ -218,7 +218,7 @@ while (`SELECT $unsafe_type < 9`) { --let $CRC_ARG_expected_number_of_warnings= 1 } - if (`SELECT $unsafe_type = 7`) { + if ($unsafe_type == 7) { --echo ==== Testing a statement that is unsafe in many ways ==== --let $desc_0= statement that is unsafe in many ways # Concatenate three unsafe values, and then concatenate NULL to @@ -230,7 +230,7 @@ while (`SELECT $unsafe_type < 9`) { --let $CRC_ARG_expected_number_of_warnings= 6 } - if (`SELECT $unsafe_type = 8`) { + if ($unsafe_type == 8) { --echo ==== Testing a statement that is unsafe several times ==== --let $desc_0= statement that is unsafe several times --let $stmt_sidef_0= INSERT INTO ta0 VALUES (multi_unsafe_func()) @@ -249,7 +249,7 @@ while (`SELECT $unsafe_type < 9`) { # construct. Instead, we just invoke the unsafe statement directly. --let $call_type_1= 0 - while (`SELECT $call_type_1 < 8`) { + while ($call_type_1 < 8) { #--echo debug: level 1, types $call_type_1 -> $unsafe_type --let $CRC_ARG_level= 1 --let $CRC_ARG_type= $call_type_1 @@ -280,7 +280,7 @@ while (`SELECT $unsafe_type < 9`) { # construct. --let $call_type_2= 0 - while (`SELECT $call_type_2 < 7`) { + while ($call_type_2 < 7) { #--echo debug: level 2, types $call_type_2 -> $call_type_1 -> $unsafe_type --let $CRC_ARG_level= 2 --let $CRC_ARG_type= $call_type_2 @@ -309,7 +309,7 @@ while (`SELECT $unsafe_type < 9`) { # construct. --let $call_type_3= 0 - while (`SELECT $call_type_3 < 7`) { + while ($call_type_3 < 7) { #--echo debug: level 3, types $call_type_2 -> $call_type_2 -> $call_type_1 -> $unsafe_type --let $CRC_ARG_level= 3 --let $CRC_ARG_type= $call_type_3 diff --git a/mysql-test/suite/federated/federated_bug_25714.test b/mysql-test/suite/federated/federated_bug_25714.test index 82745b2a094..633e469f595 100644 --- a/mysql-test/suite/federated/federated_bug_25714.test +++ b/mysql-test/suite/federated/federated_bug_25714.test @@ -1,5 +1,5 @@ # Check that path to the specific test program has been setup -if (`select LENGTH("$MYSQL_BUG25714") = 0`) +if (!$MYSQL_BUG25714) { skip Need bug25714 test program; } diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result index 5a52ba0ee54..7d96a4acf3f 100644 --- a/mysql-test/suite/innodb/r/innodb_mysql.result +++ b/mysql-test/suite/innodb/r/innodb_mysql.result @@ -2622,6 +2622,47 @@ SELECT LEAST((SELECT '' FROM t1),NOW()) FROM `t1`; ERROR 22007: Incorrect datetime value: '' for column 'NOW()' at row 2 DROP TABLE t1; SET SQL_MODE=DEFAULT; +# +# Bug#56862 Execution of a query that uses index merge returns a wrong result +# +CREATE TABLE t1 ( +pk int NOT NULL AUTO_INCREMENT PRIMARY KEY, +a int, +b int, +INDEX idx(a)) +ENGINE=INNODB; +INSERT INTO t1(a,b) VALUES +(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500), +(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800), +(6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700), +(13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000); +INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1; +INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1; +INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1 VALUES (1000000, 0, 0); +SET SESSION sort_buffer_size = 1024*36; +EXPLAIN +SELECT COUNT(*) FROM +(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) +WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 1536 Using sort_union(idx,PRIMARY); Using where +SELECT COUNT(*) FROM +(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) +WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; +COUNT(*) +1537 +SET SESSION sort_buffer_size = DEFAULT; +DROP TABLE t1; End of 5.1 tests # # Test for bug #39932 "create table fails if column for FK is in different diff --git a/mysql-test/suite/innodb/t/innodb_mysql.test b/mysql-test/suite/innodb/t/innodb_mysql.test index 052db7d789a..acc843341eb 100644 --- a/mysql-test/suite/innodb/t/innodb_mysql.test +++ b/mysql-test/suite/innodb/t/innodb_mysql.test @@ -786,6 +786,49 @@ CREATE TABLE t2 DROP TABLE t1; SET SQL_MODE=DEFAULT; +--echo # +--echo # Bug#56862 Execution of a query that uses index merge returns a wrong result +--echo # + +CREATE TABLE t1 ( + pk int NOT NULL AUTO_INCREMENT PRIMARY KEY, + a int, + b int, + INDEX idx(a)) +ENGINE=INNODB; + +INSERT INTO t1(a,b) VALUES + (11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500), + (3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800), + (6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700), + (13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000); +INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1; +INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1; +INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1 VALUES (1000000, 0, 0); + +SET SESSION sort_buffer_size = 1024*36; + +EXPLAIN +SELECT COUNT(*) FROM + (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) + WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; + +SELECT COUNT(*) FROM + (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) + WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; + +SET SESSION sort_buffer_size = DEFAULT; + +DROP TABLE t1; --echo End of 5.1 tests diff --git a/mysql-test/suite/perfschema_stress/t/modify.test b/mysql-test/suite/perfschema_stress/t/modify.test index 08b0699ace6..f37255c6b09 100644 --- a/mysql-test/suite/perfschema_stress/t/modify.test +++ b/mysql-test/suite/perfschema_stress/t/modify.test @@ -19,7 +19,7 @@ let $have_table= `SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'`; -if (`SELECT ($have_table = 0)`) { +if (!$have_table) { --source suite/perfschema_stress/t/setup.test } diff --git a/mysql-test/suite/perfschema_stress/t/setup.test b/mysql-test/suite/perfschema_stress/t/setup.test index 9f643edfebe..e55ed5e8630 100644 --- a/mysql-test/suite/perfschema_stress/t/setup.test +++ b/mysql-test/suite/perfschema_stress/t/setup.test @@ -23,10 +23,10 @@ if (`SELECT VERSION() LIKE '%embedded%'`) --disable_query_log --disable_result_log -if (`SELECT LENGTH('$engine_type') = 0`) { +if (!$engine_type) { let $engine_type= $default_engine_type; } -if (`SELECT '$engine_type' = 'Falcon'`) { +if ($engine_type == Falcon) { --source include/have_falcon.inc } diff --git a/mysql-test/suite/perfschema_stress/t/work.test b/mysql-test/suite/perfschema_stress/t/work.test index 8f1bc42c5bc..4408a00b0c9 100644 --- a/mysql-test/suite/perfschema_stress/t/work.test +++ b/mysql-test/suite/perfschema_stress/t/work.test @@ -19,7 +19,7 @@ let $have_table= `SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'`; -if (`SELECT ($have_table = 0)`) { +if (!$have_table) { --source suite/perfschema_stress/t/setup.test } diff --git a/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result b/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result index 6b0c1c38c16..14ba6080ec0 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result +++ b/mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result @@ -51,8 +51,8 @@ CREATE TABLE t1(a int, UNIQUE(a)); INSERT DELAYED IGNORE INTO t1 VALUES(1); INSERT DELAYED IGNORE INTO t1 VALUES(1); flush table t1; -use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1) -use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1) +use `test`; INSERT IGNORE INTO t1 VALUES(1) +use `test`; INSERT IGNORE INTO t1 VALUES(1) select * from t1; a 1 @@ -60,10 +60,10 @@ On slave show binlog events in 'slave-bin.000002' from <binlog_start> limit 1,6; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000002 # Query # # BEGIN -slave-bin.000002 # Query # # use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1) +slave-bin.000002 # Query # # use `test`; INSERT IGNORE INTO t1 VALUES(1) slave-bin.000002 # Query # # COMMIT slave-bin.000002 # Query # # BEGIN -slave-bin.000002 # Query # # use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1) +slave-bin.000002 # Query # # use `test`; INSERT IGNORE INTO t1 VALUES(1) slave-bin.000002 # Query # # COMMIT select * from t1; a diff --git a/mysql-test/suite/rpl/t/rpl_change_master.test b/mysql-test/suite/rpl/t/rpl_change_master.test index 514d6cf8c0f..5a8362e3df0 100644 --- a/mysql-test/suite/rpl/t/rpl_change_master.test +++ b/mysql-test/suite/rpl/t/rpl_change_master.test @@ -23,7 +23,7 @@ source include/stop_slave.inc; let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1); let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1); -if (`SELECT $read_pos = $exec_pos`) +if ($read_pos == $exec_pos) { source include/show_rpl_debug_info.inc; echo 'Read_Master_Log_Pos: $read_pos' == 'Exec_Master_Log_Pos: $exec_pos'; @@ -32,7 +32,7 @@ if (`SELECT $read_pos = $exec_pos`) change master to master_user='root'; let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1); let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1); -if (`SELECT $read_pos <> $exec_pos`) +if ($read_pos != $exec_pos) { source include/show_rpl_debug_info.inc; echo 'Read_Master_Log_Pos: $read_pos' <> 'Exec_Master_Log_Pos: $exec_pos'; diff --git a/mysql-test/suite/rpl/t/rpl_concurrency_error.test b/mysql-test/suite/rpl/t/rpl_concurrency_error.test index 2e216d25211..8f5277b3f72 100644 --- a/mysql-test/suite/rpl/t/rpl_concurrency_error.test +++ b/mysql-test/suite/rpl/t/rpl_concurrency_error.test @@ -53,24 +53,24 @@ while ($type) { let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); connection conn1; - if (`select $type = 2`) + if ($type == 2) { SET AUTOCOMMIT = 1; BEGIN; } - if (`select $type = 1`) + if ($type == 1) { SET AUTOCOMMIT = 0; } eval UPDATE t SET f = 'yellow $type' WHERE i = 3; connection conn2; - if (`select $type = 2`) + if ($type == 2) { SET AUTOCOMMIT = 1; BEGIN; } - if (`select $type = 1`) + if ($type == 1) { SET AUTOCOMMIT = 0; } @@ -88,24 +88,24 @@ while ($type) let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1); connection conn1; - if (`select $type = 2`) + if ($type == 2) { SET AUTOCOMMIT = 1; BEGIN; } - if (`select $type = 1`) + if ($type == 1) { SET AUTOCOMMIT = 0; } eval UPDATE t SET f = 'gray $type' WHERE i = 3; connection conn2; - if (`select $type = 2`) + if ($type == 2) { SET AUTOCOMMIT = 1; BEGIN; } - if (`select $type = 1`) + if ($type == 1) { SET AUTOCOMMIT = 0; } diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat.test b/mysql-test/suite/rpl/t/rpl_heartbeat.test index 59c3e10915e..5862abf5c6b 100644 --- a/mysql-test/suite/rpl/t/rpl_heartbeat.test +++ b/mysql-test/suite/rpl/t/rpl_heartbeat.test @@ -142,7 +142,7 @@ source include/check_slave_param.inc; let $slave_wait_param_counter= 300; let $slave_value= query_get_value("SHOW STATUS like 'Slave_received_heartbeats'", Value, 1); # Checking the fact that at least one heartbeat is received -while (`select $slave_value = 0`) +while (!$slave_value) { dec $slave_wait_param_counter; if (!$slave_wait_param_counter) diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test index 1f8ce4c1d78..afa304531b8 100644 --- a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test +++ b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test @@ -153,15 +153,11 @@ SET @@global.slave_net_timeout=50; --enable_warnings --replace_result $MASTER_MYPORT MASTER_PORT eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=30; ---write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect -wait -EOF +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect --echo Reload slave --shutdown_server 10 --source include/wait_until_disconnected.inc ---append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect -restart -EOF +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect --enable_reconnect --source include/wait_until_connected_again.inc SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period'; @@ -456,15 +452,11 @@ let $status_var_comparsion= >; --source include/wait_for_status_var.inc --echo Heartbeat event received --connection master ---write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -wait -EOF +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --echo Reload master --shutdown_server 10 --source include/wait_until_disconnected.inc ---append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -restart -EOF +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --enable_reconnect --source include/wait_until_connected_again.inc --connection slave diff --git a/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test b/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test index 8797da4eccc..3790bed029d 100644 --- a/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test +++ b/mysql-test/suite/rpl/t/rpl_mysql_upgrade.test @@ -30,7 +30,7 @@ sync_slave_with_master; connection master; let $after_position= query_get_value(SHOW MASTER STATUS, Position, 1); -if (`SELECT '$before_position'='$after_position'`) +if ($before_position == $after_position) { echo Master position is not changed; } @@ -48,7 +48,7 @@ connection master; let $after_file= query_get_value(SHOW MASTER STATUS, File, 1); let $after_position= query_get_value(SHOW MASTER STATUS, Position, 1); -if (!`SELECT '$before_position'='$after_position'`) +if ($before_position != $after_position) { echo Master position has been changed; } diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync.test b/mysql-test/suite/rpl/t/rpl_semi_sync.test index 1bf4f1a3396..47a54fc72e6 100644 --- a/mysql-test/suite/rpl/t/rpl_semi_sync.test +++ b/mysql-test/suite/rpl/t/rpl_semi_sync.test @@ -58,7 +58,7 @@ echo [ on master ]; disable_query_log; let $value = query_get_value(show variables like 'rpl_semi_sync_master_enabled', Value, 1); -if (`select '$value' = 'No such row'`) +if ($value == No such row) { set sql_log_bin=0; eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_PLUGIN'; @@ -123,7 +123,7 @@ echo [ on slave ]; disable_query_log; let $value= query_get_value(show variables like 'rpl_semi_sync_slave_enabled', Value, 1); -if (`select '$value' = 'No such row'`) +if ($value == No such row) { set sql_log_bin=0; eval INSTALL PLUGIN rpl_semi_sync_slave SONAME '$SEMISYNC_SLAVE_PLUGIN'; diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_event.test b/mysql-test/suite/rpl/t/rpl_semi_sync_event.test index feb885ce07b..3499b846c31 100644 --- a/mysql-test/suite/rpl/t/rpl_semi_sync_event.test +++ b/mysql-test/suite/rpl/t/rpl_semi_sync_event.test @@ -20,7 +20,7 @@ enable_query_log; connection master; disable_query_log; let $value = query_get_value(show variables like 'rpl_semi_sync_master_enabled', Value, 1); -if (`select '$value' = 'No such row'`) +if ($value == No such row) { set sql_log_bin=0; eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_PLUGIN'; @@ -34,7 +34,7 @@ source include/stop_slave.inc; disable_query_log; let $value= query_get_value(show variables like 'rpl_semi_sync_slave_enabled', Value, 1); -if (`select '$value' = 'No such row'`) +if ($value == No such row) { set sql_log_bin=0; eval INSTALL PLUGIN rpl_semi_sync_slave SONAME '$SEMISYNC_SLAVE_PLUGIN'; diff --git a/mysql-test/suite/rpl/t/rpl_slow_query_log.test b/mysql-test/suite/rpl/t/rpl_slow_query_log.test index 334c4393b83..b1ea55ee8ee 100644 --- a/mysql-test/suite/rpl/t/rpl_slow_query_log.test +++ b/mysql-test/suite/rpl/t/rpl_slow_query_log.test @@ -233,7 +233,7 @@ let $master_slow_query= `SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text -- sync_slave_with_master let $slave_slow_query= `SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text like '$slow_query'`; -if (`SELECT $master_slow_query != $slave_slow_query`) +if ($master_slow_query != $slave_slow_query) { -- connection master -- echo *********************************************** @@ -250,7 +250,7 @@ if (`SELECT $master_slow_query != $slave_slow_query`) -- die "Assertion failed! Master and slave slow log contents differ. Bailing out!" } -if (`SELECT $master_slow_query = $slave_slow_query`) +if ($master_slow_query == $slave_slow_query) { -- echo ### Assertion is good. Both Master and Slave exhibit the -- echo ### same number of queries in slow log: $master_slow_query @@ -276,7 +276,7 @@ let $master_slow_query= `SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text -- sync_slave_with_master let $slave_slow_query= `SELECT count(*) = 1 FROM mysql.slow_log WHERE sql_text like '$slow_query'`; -if (`SELECT $master_slow_query != $slave_slow_query`) +if ($master_slow_query != $slave_slow_query) { -- connection master -- echo *********************************************** @@ -293,7 +293,7 @@ if (`SELECT $master_slow_query != $slave_slow_query`) -- die "Assertion failed! Master and slave slow log contents differ. Bailing out!" } -if (`SELECT $master_slow_query = $slave_slow_query`) +if ($master_slow_query == $slave_slow_query) { -- echo ### Assertion is good. Both Master and Slave exhibit the -- echo ### same number of queries in slow log: $master_slow_query diff --git a/mysql-test/suite/rpl/t/rpl_ssl.test b/mysql-test/suite/rpl/t/rpl_ssl.test index 0f216983a32..38a61e07358 100644 --- a/mysql-test/suite/rpl/t/rpl_ssl.test +++ b/mysql-test/suite/rpl/t/rpl_ssl.test @@ -75,7 +75,7 @@ source include/check_slave_is_running.inc; let $slave_count= `select count(*) from t1`; -if (`select $slave_count != $master_count`) +if ($slave_count != $master_count) { echo master and slave differed in number of rows; echo master: $master_count; diff --git a/mysql-test/suite/rpl/t/rpl_sync.test b/mysql-test/suite/rpl/t/rpl_sync.test index 4ec02325572..3b0cbbabe25 100644 --- a/mysql-test/suite/rpl/t/rpl_sync.test +++ b/mysql-test/suite/rpl/t/rpl_sync.test @@ -151,3 +151,4 @@ source include/diff_tables.inc; connection master; drop table t1; --remove_file $MYSQLD_SLAVE_DATADIR/master.backup +--sync_slave_with_master diff --git a/mysql-test/suite/rpl/t/rpl_trigger.test b/mysql-test/suite/rpl/t/rpl_trigger.test index 753f68e67d4..6575816662a 100644 --- a/mysql-test/suite/rpl/t/rpl_trigger.test +++ b/mysql-test/suite/rpl/t/rpl_trigger.test @@ -315,9 +315,7 @@ FLUSH LOGS; # Stop master server --echo --> Stop master server ---write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -wait -EOF +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --shutdown_server 10 --source include/wait_until_disconnected.inc # Replace binlog @@ -325,9 +323,7 @@ remove_file $MYSQLD_DATADIR/master-bin.000001; copy_file $MYSQL_TEST_DIR/std_data/bug16266.000001 $MYSQLD_DATADIR/master-bin.000001; --echo --> Start master server ---append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect -restart -EOF +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --enable_reconnect --source include/wait_until_connected_again.inc let $binlog_version= query_get_value(SHOW BINLOG EVENTS, Info, 1); diff --git a/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result b/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result index a94a906e121..356b3c9e879 100644 --- a/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result +++ b/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result @@ -1,20 +1,20 @@ select @@global.shared_memory_base_name; @@global.shared_memory_base_name -MYSQLTEST_VARDIR/tmp/mysqld.1.sock +MYSQL_TMP_DIR/mysqld.1.sock select @@session.shared_memory_base_name; ERROR HY000: Variable 'shared_memory_base_name' is a GLOBAL variable show global variables like 'shared_memory_base_name'; Variable_name Value -shared_memory_base_name MYSQLTEST_VARDIR/tmp/mysqld.1.sock +shared_memory_base_name MYSQL_TMP_DIR/mysqld.1.sock show session variables like 'shared_memory_base_name'; Variable_name Value -shared_memory_base_name MYSQLTEST_VARDIR/tmp/mysqld.1.sock +shared_memory_base_name MYSQL_TMP_DIR/mysqld.1.sock select * from information_schema.global_variables where variable_name='shared_memory_base_name'; VARIABLE_NAME VARIABLE_VALUE -SHARED_MEMORY_BASE_NAME MYSQLTEST_VARDIR/tmp/mysqld.1.sock +SHARED_MEMORY_BASE_NAME MYSQL_TMP_DIR/mysqld.1.sock select * from information_schema.session_variables where variable_name='shared_memory_base_name'; VARIABLE_NAME VARIABLE_VALUE -SHARED_MEMORY_BASE_NAME MYSQLTEST_VARDIR/tmp/mysqld.1.sock +SHARED_MEMORY_BASE_NAME MYSQL_TMP_DIR/mysqld.1.sock set global shared_memory_base_name=1; ERROR HY000: Variable 'shared_memory_base_name' is a read only variable set session shared_memory_base_name=1; diff --git a/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test b/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test index 24418a78687..da165564791 100644 --- a/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test +++ b/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test @@ -3,17 +3,17 @@ # # only global # ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR select @@global.shared_memory_base_name; --error ER_INCORRECT_GLOBAL_LOCAL_VAR select @@session.shared_memory_base_name; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR show global variables like 'shared_memory_base_name'; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR show session variables like 'shared_memory_base_name'; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR select * from information_schema.global_variables where variable_name='shared_memory_base_name'; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR select * from information_schema.session_variables where variable_name='shared_memory_base_name'; # diff --git a/mysql-test/suite/sys_vars/t/slow_launch_time_func.test b/mysql-test/suite/sys_vars/t/slow_launch_time_func.test index c9a7d28bb8a..1f384888f81 100644 --- a/mysql-test/suite/sys_vars/t/slow_launch_time_func.test +++ b/mysql-test/suite/sys_vars/t/slow_launch_time_func.test @@ -84,7 +84,7 @@ let $value_before= CONNECT (conn2,localhost,root,,); let $value_after= query_get_value(show status like 'slow_launch_threads', Value, 1); -if (!`SELECT $value_after = $value_before`) +if ($value_after != $value_before) { --echo ERROR: Subtest FN_DYNVARS_124_02 failed --echo A new connect must not be counted as 'slow_launch_thread' if diff --git a/mysql-test/t/change_user.test b/mysql-test/t/change_user.test index ed2e1d05f86..1879dbc53cf 100644 --- a/mysql-test/t/change_user.test +++ b/mysql-test/t/change_user.test @@ -117,7 +117,7 @@ let $before= query_get_value(SHOW GLOBAL STATUS LIKE 'com_select',Value,1); let $after= query_get_value(SHOW GLOBAL STATUS LIKE 'com_select',Value,1); -if (`select $after != $before`){ +if ($after != $before){ SHOW GLOBAL STATUS LIKE 'com_select'; die The value of com_select changed during change_user; } diff --git a/mysql-test/t/ctype_cp1251.test b/mysql-test/t/ctype_cp1251.test index 4dfb0be3892..3203a1032b4 100644 --- a/mysql-test/t/ctype_cp1251.test +++ b/mysql-test/t/ctype_cp1251.test @@ -59,6 +59,16 @@ DROP TABLE t1; # End of 4.1 tests +--echo # +--echo # Start of 5.1 tests +--echo # + +--source include/ctype_8bit.inc + +--echo # +--echo # End of 5.1 tests +--echo # + --echo # --echo # Start of 5.5 tests --echo # diff --git a/mysql-test/t/ctype_like_range.test b/mysql-test/t/ctype_like_range.test new file mode 100644 index 00000000000..34a7637222b --- /dev/null +++ b/mysql-test/t/ctype_like_range.test @@ -0,0 +1,87 @@ +--source include/have_debug.inc +--source include/have_ucs2.inc +--source include/have_utf16.inc +--source include/have_utf32.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP VIEW IF EXISTS v1; +--enable_warnings + +CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, a VARBINARY(32)); +INSERT INTO t1 (a) VALUES (''),('_'),('%'),('\_'),('\%'),('\\'); +INSERT INTO t1 (a) VALUES ('a'),('c'); +INSERT INTO t1 (a) VALUES ('a_'),('c_'); +INSERT INTO t1 (a) VALUES ('a%'),('c%'); +INSERT INTO t1 (a) VALUES ('aa'),('cc'),('ch'); +INSERT INTO t1 (a) VALUES ('aa_'),('cc_'),('ch_'); +INSERT INTO t1 (a) VALUES ('aa%'),('cc%'),('ch%'); +INSERT INTO t1 (a) VALUES ('aaa'),('ccc'),('cch'); +INSERT INTO t1 (a) VALUES ('aaa_'),('ccc_'),('cch_'); +INSERT INTO t1 (a) VALUES ('aaa%'),('ccc%'),('cch%'); +INSERT INTO t1 (a) VALUES ('aaaaaaaaaaaaaaaaaaaa'); + +CREATE VIEW v1 AS + SELECT id, 'a' AS name, a AS val FROM t1 +UNION + SELECT id, 'mn', HEX(LIKE_RANGE_MIN(a, 16)) AS min FROM t1 +UNION + SELECT id, 'mx', HEX(LIKE_RANGE_MAX(a, 16)) AS max FROM t1 +UNION + SELECT id, 'sp', REPEAT('-', 32) AS sep FROM t1 +ORDER BY id, name; +SELECT * FROM v1; + +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET latin1; +SELECT * FROM v1; + +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8; +SELECT * FROM v1; + +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci; +SELECT * FROM v1; + +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_czech_ci; +SELECT * FROM v1; + +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_danish_ci; +SELECT * FROM v1; + +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2; +SELECT * FROM v1; + +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci; +SELECT * FROM v1; + +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_czech_ci; +SELECT * FROM v1; + +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET ucs2 COLLATE ucs2_danish_ci; +SELECT * FROM v1; + +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16; +SELECT * FROM v1; + +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_unicode_ci; +SELECT * FROM v1; + +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_czech_ci; +SELECT * FROM v1; + +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf16 COLLATE utf16_danish_ci; +SELECT * FROM v1; + +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32; +SELECT * FROM v1; + +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_unicode_ci; +SELECT * FROM v1; + +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_czech_ci; +SELECT * FROM v1; + +ALTER TABLE t1 MODIFY a VARCHAR(32) CHARACTER SET utf32 COLLATE utf32_danish_ci; +SELECT * FROM v1; + +DROP VIEW v1; +DROP TABLE t1; diff --git a/mysql-test/t/ctype_uca.test b/mysql-test/t/ctype_uca.test index 11a489ba24d..723962bbb3f 100644 --- a/mysql-test/t/ctype_uca.test +++ b/mysql-test/t/ctype_uca.test @@ -545,3 +545,19 @@ set collation_connection=ucs2_unicode_ci; set names utf8; -- echo End for 5.0 tests + +--echo # +--echo # Start of 5.5 tests +--echo # +# +# Test my_like_range and contractions +# +SET collation_connection=utf8_czech_ci; +--source include/ctype_czech.inc +--source include/ctype_like_ignorable.inc +SET collation_connection=ucs2_czech_ci; +--source include/ctype_czech.inc +--source include/ctype_like_ignorable.inc +--echo # +--echo # End of 5.5 tests +--echo # diff --git a/mysql-test/t/ctype_utf16_uca.test b/mysql-test/t/ctype_utf16_uca.test index 5314777c6f4..a6295c82dec 100644 --- a/mysql-test/t/ctype_utf16_uca.test +++ b/mysql-test/t/ctype_utf16_uca.test @@ -284,6 +284,13 @@ DROP TABLE IF EXISTS t1; set collation_connection=utf16_unicode_ci; --source include/ctype_regex.inc +# +# Test my_like_range and contractions +# +SET collation_connection=utf16_czech_ci; +--source include/ctype_czech.inc +--source include/ctype_like_ignorable.inc + --echo # --echo # End of 5.5 tests diff --git a/mysql-test/t/ctype_utf32_uca.test b/mysql-test/t/ctype_utf32_uca.test index 9386cc9e65e..a62ffbf95c7 100644 --- a/mysql-test/t/ctype_utf32_uca.test +++ b/mysql-test/t/ctype_utf32_uca.test @@ -286,6 +286,14 @@ set collation_connection=utf32_unicode_ci; --source include/ctype_regex.inc +# +# Test my_like_range and contractions +# +SET collation_connection=utf32_czech_ci; +--source include/ctype_czech.inc +--source include/ctype_like_ignorable.inc + + --echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index c7586c71229..4cd9a635e24 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -1439,6 +1439,25 @@ DROP TABLE t1; --echo End of 5.0 tests +# +# Bug #57272: crash in rpad() when using utf8 +# +SELECT LENGTH(RPAD(0.0115E88, 61297, _utf8'яэюя')); +SELECT LENGTH(RPAD(0.0115E88, 61297, _utf8'йцуя')); +SELECT HEX(RPAD(0x20, 2, _utf8 0xD18F)); +SELECT HEX(RPAD(0x20, 4, _utf8 0xD18F)); +SELECT HEX(LPAD(0x20, 2, _utf8 0xD18F)); +SELECT HEX(LPAD(0x20, 4, _utf8 0xD18F)); + +SELECT HEX(RPAD(_utf8 0xD18F, 3, 0x20)); +SELECT HEX(LPAD(_utf8 0xD18F, 3, 0x20)); + +SELECT HEX(INSERT(_utf8 0xD18F, 2, 1, 0x20)); +SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20)); + + +--echo End of 5.1 tests + --echo Start of 5.4 tests # diff --git a/mysql-test/t/execution_constants.test b/mysql-test/t/execution_constants.test index e61d79f5249..92b1deb9921 100644 --- a/mysql-test/t/execution_constants.test +++ b/mysql-test/t/execution_constants.test @@ -49,7 +49,7 @@ while ($i) let $i = 1// # Check that mysql_errno is 1436 - if (`select $mysql_errno != 1436`) + if ($mysql_errno != 1436) { die Wrong error triggered, expected 1436 but got $mysql_errno// } diff --git a/mysql-test/t/explain.test b/mysql-test/t/explain.test index 60108b3b038..931948b1b65 100644 --- a/mysql-test/t/explain.test +++ b/mysql-test/t/explain.test @@ -238,4 +238,40 @@ EXPLAIN SELECT c1 FROM t1 WHERE c2 = 1 AND c4 = 1 AND c5 = 1; DROP TABLE t1; +--echo # +--echo # Bug#56814 Explain + subselect + fulltext crashes server +--echo # + +CREATE TABLE t1(f1 VARCHAR(6) NOT NULL, +FULLTEXT KEY(f1),UNIQUE(f1)); +INSERT INTO t1 VALUES ('test'); + +EXPLAIN SELECT 1 FROM t1 +WHERE 1 > ALL((SELECT 1 FROM t1 JOIN t1 a ON (MATCH(t1.f1) AGAINST ("")) +WHERE t1.f1 GROUP BY t1.f1)); + +PREPARE stmt FROM +'EXPLAIN SELECT 1 FROM t1 + WHERE 1 > ALL((SELECT 1 FROM t1 RIGHT OUTER JOIN t1 a + ON (MATCH(t1.f1) AGAINST ("")) + WHERE t1.f1 GROUP BY t1.f1))'; + +EXECUTE stmt; +EXECUTE stmt; + +DEALLOCATE PREPARE stmt; + +PREPARE stmt FROM +'EXPLAIN SELECT 1 FROM t1 + WHERE 1 > ALL((SELECT 1 FROM t1 JOIN t1 a + ON (MATCH(t1.f1) AGAINST ("")) + WHERE t1.f1 GROUP BY t1.f1))'; + +EXECUTE stmt; +EXECUTE stmt; + +DEALLOCATE PREPARE stmt; + +DROP TABLE t1; + --echo End of 5.1 tests. diff --git a/mysql-test/t/fix_priv_tables.test b/mysql-test/t/fix_priv_tables.test index eeda9bc8d15..f68c8b518c8 100644 --- a/mysql-test/t/fix_priv_tables.test +++ b/mysql-test/t/fix_priv_tables.test @@ -3,7 +3,7 @@ # Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set # to the location of mysql_fix_privilege_tables.sql -if (`SELECT LENGTH("$MYSQL_FIX_PRIVILEGE_TABLES") <= 0`) +if (!$MYSQL_FIX_PRIVILEGE_TABLES) { skip Test need MYSQL_FIX_PRIVILEGE_TABLES; } diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index 388b1432390..8631932d5c0 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -594,4 +594,40 @@ REPAIR TABLE t1; SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size; DROP TABLE t1; +--echo # +--echo # Bug#54484 explain + prepared statement: crash and Got error -1 from storage engine +--echo # + +CREATE TABLE t1(f1 VARCHAR(6) NOT NULL, FULLTEXT KEY(f1), UNIQUE(f1)); +INSERT INTO t1 VALUES ('test'); + +SELECT 1 FROM t1 WHERE 1 > + ALL((SELECT 1 FROM t1 JOIN t1 a + ON (MATCH(t1.f1) against ("")) + WHERE t1.f1 GROUP BY t1.f1)) xor f1; + +PREPARE stmt FROM +'SELECT 1 FROM t1 WHERE 1 > + ALL((SELECT 1 FROM t1 RIGHT OUTER JOIN t1 a + ON (MATCH(t1.f1) against ("")) + WHERE t1.f1 GROUP BY t1.f1)) xor f1'; + +EXECUTE stmt; +EXECUTE stmt; + +DEALLOCATE PREPARE stmt; + +PREPARE stmt FROM +'SELECT 1 FROM t1 WHERE 1 > + ALL((SELECT 1 FROM t1 JOIN t1 a + ON (MATCH(t1.f1) against ("")) + WHERE t1.f1 GROUP BY t1.f1))'; + +EXECUTE stmt; +EXECUTE stmt; + +DEALLOCATE PREPARE stmt; + +DROP TABLE t1; + --echo End of 5.1 tests diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index 0624fce3a34..13b3697cbf6 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -738,6 +738,17 @@ EXECUTE stmt; DEALLOCATE PREPARE stmt; DROP TABLE t1; +--echo # +--echo # Bug#57194 group_concat cause crash and/or invalid memory reads with type errors +--echo # + +CREATE TABLE t1(f1 int); +INSERT INTO t1 values (0),(0); +--disable_ps_protocol +--error ER_ILLEGAL_VALUE_FOR_TYPE +SELECT POLYGON((SELECT 1 FROM (SELECT 1 IN (GROUP_CONCAT(t1.f1)) FROM t1, t1 t GROUP BY t.f1 ) d)); +--enable_ps_protocol +DROP TABLE t1; --echo End of 5.1 tests diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index 5d5dea74e28..7f9ed6d8a93 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -316,6 +316,14 @@ SELECT RAND(i) FROM t1; DROP TABLE t1; --echo # +--echo # Bug#57477 SIGFPE when dividing a huge number a negative number +--echo # +--error ER_DATA_OUT_OF_RANGE +SELECT -9999999999999999991 DIV -1; +--error ER_DATA_OUT_OF_RANGE +SELECT -9223372036854775808 DIV -1; +SELECT -9223372036854775808 MOD -1; +SELECT -9223372036854775808999 MOD -1; # # Bug #8457: Precision math: diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test index 8cea850b184..31462d83c41 100644 --- a/mysql-test/t/func_misc.test +++ b/mysql-test/t/func_misc.test @@ -480,6 +480,13 @@ SELECT DISTINCT GREATEST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1; DROP TABLE t1; +# +# Bug #57283: inet_ntoa() crashes +# +SELECT INET_NTOA(0); +SELECT '1' IN ('1', INET_NTOA(0)); + + --echo # --echo # Bug #52165: Assertion failed: file .\dtoa.c, line 465 --echo # @@ -516,3 +523,4 @@ SELECT 1 from t1 HAVING NAME_CONST('', a); DROP TABLE t1; +--echo End of tests diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 0a2b473ca59..25600a2d583 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -852,5 +852,13 @@ INSERT INTO t1 VALUES ('2008-01-03 00:00:00'), ('2008-01-03 00:00:00'); SELECT * FROM t1 WHERE date_date >= subtime(now(), "00:30:00"); SELECT * FROM t1 WHERE date_date <= addtime(date_add("2000-1-1", INTERVAL "1:1:1" HOUR_SECOND), "00:20:00"); DROP TABLE t1; + +--echo # +--echo # Bug#57512 str_to_date crash... +--echo # + +SELECT WEEK(STR_TO_DATE(NULL,0)); +SELECT SUBDATE(STR_TO_DATE(NULL,0), INTERVAL 1 HOUR); + --echo # diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index 2fb73af0c99..282b286749a 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -1236,6 +1236,17 @@ SELECT SUBSTRING(a,1,10), LENGTH(a) FROM t1 GROUP BY a; SELECT SUBSTRING(a,1,10), LENGTH(a) FROM t1 GROUP BY a; DROP TABLE t1; +--echo # +--echo # Bug#57688 Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field +--echo # + +CREATE TABLE t1(f1 INT NOT NULL); +INSERT INTO t1 VALUES (16777214),(0); + +SELECT COUNT(*) FROM t1 LEFT JOIN t1 t2 +ON 1 WHERE t2.f1 > 1 GROUP BY t2.f1; + +DROP TABLE t1; --echo # End of 5.1 tests diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test index cf881e6aaa2..3251ff292b6 100644 --- a/mysql-test/t/join_outer.test +++ b/mysql-test/t/join_outer.test @@ -981,4 +981,33 @@ EXPLAIN EXTENDED SELECT STRAIGHT_JOIN jt1.f1 FROM t1 AS jt1 DROP TABLE t1; +--echo # +--echo # Bug#57688 Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field +--echo # + +CREATE TABLE t1 (f1 INT NOT NULL, PRIMARY KEY (f1)); +CREATE TABLE t2 (f1 INT NOT NULL, f2 INT NOT NULL, PRIMARY KEY (f1, f2)); + +INSERT INTO t1 VALUES (4); +INSERT INTO t2 VALUES (3, 3); +INSERT INTO t2 VALUES (7, 7); + +EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1 +WHERE t1.f1 = 4 +GROUP BY t2.f1, t2.f2; + +SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1 +WHERE t1.f1 = 4 +GROUP BY t2.f1, t2.f2; + +EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1 +WHERE t1.f1 = 4 AND t2.f1 IS NOT NULL AND t2.f2 IS NOT NULL +GROUP BY t2.f1, t2.f2; + +SELECT * FROM t1 LEFT JOIN t2 ON t2.f1 = t1.f1 +WHERE t1.f1 = 4 AND t2.f1 IS NOT NULL AND t2.f2 IS NOT NULL +GROUP BY t2.f1, t2.f2; + +DROP TABLE t1,t2; + --echo End of 5.1 tests diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test index 3a2084aef08..973af8e580a 100644 --- a/mysql-test/t/mysql.test +++ b/mysql-test/t/mysql.test @@ -425,5 +425,149 @@ drop table t1; --echo --exec $MYSQL --skip-column-names --vertical test -e "select 1 as a" +--echo + +--echo # +--echo # Bug #54899: --one-database option cannot handle DROP/CREATE DATABASE +--echo # commands. +--echo # +--write_file $MYSQLTEST_VARDIR/tmp/bug54899.sql +DROP DATABASE connected_db; +CREATE DATABASE connected_db; +USE connected_db; +CREATE TABLE `table_in_connected_db`(a INT); +EOF + +CREATE DATABASE connected_db; +--exec $MYSQL --one-database connected_db < $MYSQLTEST_VARDIR/tmp/bug54899.sql +USE connected_db; +SHOW TABLES; +DROP DATABASE connected_db; +--remove_file $MYSQLTEST_VARDIR/tmp/bug54899.sql + +--echo + +--echo # +--echo # Testing --one-database option +--echo # +--write_file $MYSQLTEST_VARDIR/tmp/one_db.sql +CREATE TABLE t1 (i INT); +CREATE TABLE test.t1 (i INT); +USE test; +# Following statements should be filtered. +CREATE TABLE connected_db.t2 (i INT); +CREATE TABLE t2 (i INT); +EOF + +CREATE DATABASE connected_db; +--exec $MYSQL --one-database connected_db < $MYSQLTEST_VARDIR/tmp/one_db.sql +SHOW TABLES IN connected_db; +SHOW TABLES IN test; +USE test; +DROP TABLE t1; +DROP DATABASE connected_db; +--remove_file $MYSQLTEST_VARDIR/tmp/one_db.sql + +--echo +--write_file $MYSQLTEST_VARDIR/tmp/one_db.sql +CREATE DATABASE test1; +USE test1; +USE test1; +# Following statements should be filtered. +CREATE TABLE connected_db.t1 (i INT); +EOF + +--exec $MYSQL --one-database test < $MYSQLTEST_VARDIR/tmp/one_db.sql +SHOW TABLES IN test; +SHOW TABLES IN test1; +DROP DATABASE test1; +--remove_file $MYSQLTEST_VARDIR/tmp/one_db.sql + +--echo + +--echo # +--echo # Checking --one-database option followed by the execution of +--echo # connect command. +--echo # +--write_file $MYSQLTEST_VARDIR/tmp/one_db.sql +CREATE TABLE t1 (i INT); +CREATE TABLE test.t1 (i INT); +CONNECT test; +CREATE TABLE connected_db.t2 (i INT); +CREATE TABLE t2 (i INT); +USE connected_db; +# Following statements should be filtered. +CREATE TABLE connected_db.t3 (i INT); +CREATE TABLE t3 (i INT); +EOF + +CREATE DATABASE connected_db; +--exec $MYSQL --one-database connected_db < $MYSQLTEST_VARDIR/tmp/one_db.sql +SHOW TABLES IN connected_db; +SHOW TABLES IN test; +DROP TABLE test.t1; +DROP TABLE test.t2; +DROP DATABASE connected_db; +--remove_file $MYSQLTEST_VARDIR/tmp/one_db.sql + +--echo + +--echo # +--echo # Checking --one-database option with no database specified +--echo # at command-line. +--echo # +--write_file $MYSQLTEST_VARDIR/tmp/one_db.sql +# All following statements should be filtered. +CREATE TABLE t1 (i INT); +CREATE TABLE test.t1 (i INT); +USE test; +CREATE TABLE test.t2 (i INT); +CREATE TABLE t2 (i INT); +EOF + +--exec $MYSQL --one-database < $MYSQLTEST_VARDIR/tmp/one_db.sql +SHOW TABLES IN test; +--remove_file $MYSQLTEST_VARDIR/tmp/one_db.sql + +--echo + +--echo # +--echo # Checking --one-database option with non_existent_db +--echo # specified with USE command +--echo # + +# CASE 1 : When 'test' database exists and passed at commandline. +--write_file $MYSQLTEST_VARDIR/tmp/one_db_1.sql +CREATE TABLE `table_in_test`(i INT); +USE non_existent_db; +# Following statement should be filtered out. +CREATE TABLE `table_in_non_existent_db`(i INT); +EOF + +# CASE 2 : When 'test' database exists but dropped and recreated in load file. +--write_file $MYSQLTEST_VARDIR/tmp/one_db_2.sql +DROP DATABASE test; +CREATE DATABASE test; +USE non_existent_db; +# Following statements should be filtered out. +CREATE TABLE `table_in_non_existent_db`(i INT); +USE test; +# Following statements should not be filtered out. +CREATE TABLE `table_in_test`(i INT); +EOF + +--exec $MYSQL --one-database test < $MYSQLTEST_VARDIR/tmp/one_db_1.sql +SHOW TABLES IN test; +DROP DATABASE test; +--echo +CREATE DATABASE test; +--exec $MYSQL --one-database test < $MYSQLTEST_VARDIR/tmp/one_db_2.sql +SHOW TABLES IN test; +DROP DATABASE test; +CREATE DATABASE test; + +--remove_file $MYSQLTEST_VARDIR/tmp/one_db_1.sql +--remove_file $MYSQLTEST_VARDIR/tmp/one_db_2.sql + --echo --echo End of tests diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 8fb05e52cdc..186b0e0fbfa 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -854,6 +854,13 @@ let $var2= `failing query`; echo $var2; EOF +create table t1 (a varchar(100)); +insert into t1 values ('`select 42`'); +let $a= `select * from t1`; +# This should output `select 42`, not evaluate it again to 42 +echo $a; +drop table t1; + --error 1 --exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/let.sql 2>&1 @@ -1134,6 +1141,11 @@ if (!$counter) { echo Counter is not 0, (counter=10); } +if (! $counter) +{ + let $counter=5; +} +echo Counter should still be 10, is $counter; let $counter=0; if($counter) { @@ -1143,6 +1155,10 @@ if (!$counter) { echo Counter is not 0, (counter=0); } +if (! $counter) +{ + echo Not space var works; +} # ---------------------------------------------------------------------------- # Test if with some non-numerics @@ -1163,10 +1179,11 @@ if ($counter) { echo oops, -0 is true; } -if (beta) -{ - echo Beta is true; -} +# This is no longer allowed, as a precaution against mistyped conditionals +# if (beta) +# { +# echo Beta is true; +# } let $counter=gamma; while ($counter) { @@ -1174,6 +1191,191 @@ while ($counter) let $counter=000; } +# ---------------------------------------------------------------------------- +# Test if with compare conditions +# ---------------------------------------------------------------------------- + +let $ifvar= 5; +let $ifvar2= 6; + +if ($ifvar < 7) +{ + echo 5<7; +} +if ($ifvar< 7) +{ + echo 5<7 again; +} +if ($ifvar<7) +{ + echo 5<7 still; +} +if ($ifvar < $ifvar2) +{ + echo 5<6; +} +if ($ifvar <= 4) +{ + echo 5<=4; +} +if ($ifvar >= 5) +{ + echo 5>=5; +} +if ($ifvar>=5) +{ + echo 5>=5 again; +} +if ($ifvar > 3) +{ + echo 5>3; +} +if ($ifvar == 4) +{ + echo 5==4; +} +if ($ifvar == 5) +{ + echo 5==5; +} +if ($ifvar != 8) +{ + echo 5!=8; +} +# Any number should compare unequal to any string +if ($ifvar != five) +{ + echo 5!=five; +} +if ($ifvar == `SELECT 3+2`) +{ + echo 5==3+2; +} +if ($ifvar == 5) +{ + echo 5 == 5; +} +let $ifvar= hello; +if ($ifvar == hello there) +{ + echo hello == hello there; +} +if ($ifvar == hello) +{ + echo hello == hello; +} +if ($ifvar == hell) +{ + echo hello == hell; +} +if ($ifvar == hello) +{ + echo hello == hello; +} +if ($ifvar != goodbye) +{ + echo hello != goodbye; +} +let $ifvar= 'quoted'; +if ($ifvar == ''quoted'') +{ + echo 'quoted' == ''quoted''; +} +let $ifvar= two words; +if ($ifvar == two words) +{ + echo two words; +} +if ($ifvar == 'two words') +{ + echo 'two words'; +} +if ($ifvar == "two words") +{ + echo "two words"; +} +if ($ifvar == `SELECT 'two words'`) +{ + echo two words are two words; +} +if (42) +{ + echo right answer; +} +if (0) +{ + echo wrong answer; +} +# Non-empty string treated as 'true' +if (`SELECT 'something'`) +{ + echo anything goes; +} +# Make sure 0 and string compare right +let $ifvar= 0; +if ($ifvar == string) +{ + echo 0 == string; +} +if ($ifvar != string) +{ + echo 0 != string; +} +--write_file $MYSQL_TMP_DIR/mysqltest.sql +let $var= 5; +if ($var >= four) +{ + echo 5>=four; +} +EOF +--error 1 +--exec $MYSQL_TEST < $MYSQL_TMP_DIR/mysqltest.sql 2>&1 +remove_file $MYSQL_TMP_DIR/mysqltest.sql; + +--write_file $MYSQL_TMP_DIR/mysqltest.sql +let $var= 5; +if ($var ~= 6) +{ + echo 5~=6; +} +EOF +--error 1 +--exec $MYSQL_TEST < $MYSQL_TMP_DIR/mysqltest.sql 2>&1 +remove_file $MYSQL_TMP_DIR/mysqltest.sql; + +--write_file $MYSQL_TMP_DIR/mysqltest.sql +let $var= text; +if (var == text) +{ + echo Oops I forgot the $; +} +EOF +--error 1 +--exec $MYSQL_TEST < $MYSQL_TMP_DIR/mysqltest.sql 2>&1 +remove_file $MYSQL_TMP_DIR/mysqltest.sql; + +# ---------------------------------------------------------------------------- +# Test while with compare conditions +# ---------------------------------------------------------------------------- + +let $counter= 2; + +while ($counter < 5) +{ + echo counter is $counter; + inc $counter; +} +let $ifvar=; +while ($ifvar != stop) +{ + if ($counter >= 7) + { + let $ifvar= stop; + } + echo counter is $counter; + inc $counter; +} + # ---------------------------------------------------------------------------- # Test while, { and } # ---------------------------------------------------------------------------- @@ -2438,15 +2640,15 @@ let $count= 0; while ($run) { let $Field= query_get_value($show_statement, Field, $rowno); - if (`SELECT '$Field' = 'No such row'`) + if ($Field == No such row) { let $run= 0; } - if (`SELECT '$Field' <> 'No such row'`) + if ($Field != No such row) { let $Type= query_get_value($show_statement, Type, $rowno); let $Null= query_get_value($show_statement, Null, $rowno); - if (`SELECT '$Null' = 'YES'`) + if ($Null == YES) { inc $count; } @@ -2529,26 +2731,6 @@ rmdir $MYSQLTEST_VARDIR/tmp/testdir; --replace_result c:\\a.txt z SELECT 'c:\\a.txt' AS col; -# -# Bug#32307 mysqltest - does not detect illegal if syntax -# - -let $test= 1; -if ($test){ - echo hej; -} - ---write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql -if ($mysql_errno != 1436) -{ - echo ^ Should not be allowed! -} -EOF ---error 1 ---exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1 -remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql; - - # ---------------------------------------------------------------------------- # Test that -- is not allowed as comment, only as mysqltest builtin command # ---------------------------------------------------------------------------- diff --git a/mysql-test/t/named_pipe.test b/mysql-test/t/named_pipe.test index e88fd8e1ef8..0e6c963024f 100644 --- a/mysql-test/t/named_pipe.test +++ b/mysql-test/t/named_pipe.test @@ -5,7 +5,7 @@ # Only run this test if named pipe is avaliable let $nmp= query_get_value("SHOW VARIABLES LIKE 'named_pipe'", Value, 1); -if (`SELECT '$nmp' != 'ON'`){ +if ($nmp != ON){ skip No named pipe support; } diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index ddc2812f617..84dd516d153 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -8,6 +8,31 @@ drop table if exists t1, t2; let $MYSQLD_DATADIR= `SELECT @@datadir`; +--echo # +--echo # Bug#56287: crash when using Partition datetime in sub in query +--echo # +CREATE TABLE t1 +(c1 bigint(20) unsigned NOT NULL AUTO_INCREMENT, + c2 varchar(40) not null default '', + c3 datetime not NULL, + PRIMARY KEY (c1,c3), + KEY partidx(c3)) +ENGINE=InnoDB +PARTITION BY RANGE (TO_DAYS(c3)) +(PARTITION p200912 VALUES LESS THAN (to_days('2010-01-01')), + PARTITION p201103 VALUES LESS THAN (to_days('2011-04-01')), + PARTITION p201912 VALUES LESS THAN MAXVALUE); + +insert into t1(c2,c3) values ("Test row",'2010-01-01 00:00:00'); + +SELECT PARTITION_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test'; +SELECT count(*) FROM t1 p where c3 in +(select c3 from t1 t where t.c3 < date '2011-04-26 19:19:44' + and t.c3 > date '2011-04-26 19:18:44') ; + +DROP TABLE t1; + + --echo # --echo # Bug#54747: Deadlock between REORGANIZE PARTITION and --echo # SELECT is not detected @@ -109,6 +134,7 @@ SELECT * FROM t1; COMMIT; DROP TABLE t1; + --echo # --echo # Bug#51830: Incorrect partition pruning on range partition (regression) --echo # @@ -551,6 +577,19 @@ connection default; --echo # Connection default SELECT * FROM t1; COMMIT; +DROP TABLE t1; + +# +# Bug #55146 Assertion `m_part_spec.start_part == m_part_spec.end_part' in index_read_idx_map +# + +CREATE TABLE t1 (i1 int NOT NULL primary key, f1 int) ENGINE = InnoDB + PARTITION BY HASH(i1) PARTITIONS 2; + +INSERT INTO t1 VALUES (1,1), (2,2); + +SELECT * FROM t1 WHERE i1 = ( SELECT i1 FROM t1 WHERE f1=0 LIMIT 1 ); + DROP TABLE t1; --enable_parsing diff --git a/mysql-test/t/plugin_auth.test b/mysql-test/t/plugin_auth.test index 439cabaef18..3b1dd93c4d1 100644 --- a/mysql-test/t/plugin_auth.test +++ b/mysql-test/t/plugin_auth.test @@ -1,5 +1,6 @@ --source include/have_plugin_auth.inc --source include/not_embedded.inc +--source include/mysql_upgrade_preparation.inc query_vertical SELECT PLUGIN_STATUS, PLUGIN_TYPE, PLUGIN_DESCRIPTION FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME='test_plugin_server'; @@ -335,3 +336,62 @@ GRANT PROXY ON standard_user TO ''@''; DROP USER ''@''; DROP USER standard_user; DROP DATABASE shared; + + +--echo # +--echo # Bug #57551 : Live upgrade fails between 5.1.52 -> 5.5.7-rc +--echo # + +CALL mtr.add_suppression("Missing system table mysql.proxies_priv."); + +DROP TABLE mysql.proxies_priv; + +--echo # Must come back with mysql.proxies_priv absent. +--source include/restart_mysqld.inc + +--error ER_NO_SUCH_TABLE +SELECT * FROM mysql.proxies_priv; + +CREATE USER u1@localhost; +GRANT ALL PRIVILEGES ON *.* TO u1@localhost; +REVOKE ALL PRIVILEGES ON *.* FROM u1@localhost; +GRANT ALL PRIVILEGES ON *.* TO u1@localhost; + +CREATE USER u2@localhost; +GRANT ALL PRIVILEGES ON *.* TO u2@localhost; + +--echo # access denied because of no privileges to root +--error ER_ACCESS_DENIED_NO_PASSWORD_ERROR +GRANT PROXY ON u2@localhost TO u1@localhost; + +--echo # access denied because of no privileges to root +--error ER_ACCESS_DENIED_NO_PASSWORD_ERROR +REVOKE PROXY ON u2@localhost FROM u1@localhost; + +--echo # go try graning proxy on itself, so that it will need the table +connect(proxy_granter_con,localhost,u2,); +connection proxy_granter_con; + +--error ER_NO_SUCH_TABLE +GRANT PROXY ON u2@localhost TO u1@localhost; +--error ER_NO_SUCH_TABLE +REVOKE PROXY ON u2@localhost FROM u1@localhost; + +connection default; +disconnect proxy_granter_con; + +--echo # test if REVOKE works without the proxies_priv table +REVOKE ALL PRIVILEGES ON *.* FROM u1@localhost, u2@localhost; + +--echo # test if DROP USER work without the proxies_priv table +DROP USER u1@localhost,u2@localhost; + +--echo # test if FLUSH PRIVILEGES works without the proxies_priv table +FLUSH PRIVILEGES; + +--exec $MYSQL_UPGRADE --skip-verbose --force 2>&1 +--query_vertical SELECT Host,User,Proxied_host,Proxied_user,With_grant FROM mysql.proxies_priv + +FLUSH PRIVILEGES; + +--echo End of 5.5 tests diff --git a/mysql-test/t/shm.test b/mysql-test/t/shm.test index 567caa4989a..0f880e58741 100644 --- a/mysql-test/t/shm.test +++ b/mysql-test/t/shm.test @@ -4,7 +4,7 @@ # Only run this test if shared memory is avaliable let $shm= query_get_value("SHOW VARIABLES LIKE 'shared_memory'", Value, 1); -if (`SELECT '$shm' != 'ON'`){ +if ($shm != ON){ skip No shm support; } let $shm_name= query_get_value("SHOW GLOBAL VARIABLES LIKE 'shared_memory_base_name'", Value, 1); diff --git a/mysql-test/t/system_mysql_db_fix40123.test b/mysql-test/t/system_mysql_db_fix40123.test index 8c2060d76ba..7a96f22e0d1 100644 --- a/mysql-test/t/system_mysql_db_fix40123.test +++ b/mysql-test/t/system_mysql_db_fix40123.test @@ -3,7 +3,7 @@ # Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set # to the location of mysql_fix_privilege_tables.sql -if (`SELECT LENGTH("$MYSQL_FIX_PRIVILEGE_TABLES") <= 0`) +if (!$MYSQL_FIX_PRIVILEGE_TABLES) { skip Test need MYSQL_FIX_PRIVILEGE_TABLES; } diff --git a/mysql-test/t/system_mysql_db_fix50030.test b/mysql-test/t/system_mysql_db_fix50030.test index 7d55a091b6d..8adf0a09b22 100644 --- a/mysql-test/t/system_mysql_db_fix50030.test +++ b/mysql-test/t/system_mysql_db_fix50030.test @@ -3,7 +3,7 @@ # Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set # to the location of mysql_fix_privilege_tables.sql -if (`SELECT LENGTH("$MYSQL_FIX_PRIVILEGE_TABLES") <= 0`) +if (!$MYSQL_FIX_PRIVILEGE_TABLES) { skip Test needs MYSQL_FIX_PRIVILEGE_TABLES; } diff --git a/mysql-test/t/system_mysql_db_fix50117.test b/mysql-test/t/system_mysql_db_fix50117.test index 260400b9c8a..9aeb654716c 100644 --- a/mysql-test/t/system_mysql_db_fix50117.test +++ b/mysql-test/t/system_mysql_db_fix50117.test @@ -3,7 +3,7 @@ # Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set # to the location of mysql_fix_privilege_tables.sql -if (`SELECT LENGTH("$MYSQL_FIX_PRIVILEGE_TABLES") <= 0`) +if (!$MYSQL_FIX_PRIVILEGE_TABLES) { skip Test needs MYSQL_FIX_PRIVILEGE_TABLES; } diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test index 06508c43766..b1a54495330 100644 --- a/mysql-test/t/user_var.test +++ b/mysql-test/t/user_var.test @@ -344,6 +344,13 @@ FROM t1 GROUP BY a LIMIT 1; DROP TABLE t1; +# +# BUG#56138 "valgrind errors about overlapping memory when +# double-assigning same variable" +# + +select @v:=@v:=sum(1) from dual; + --echo End of 5.1 tests # diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 75099523062..d31939ed3dd 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -1243,6 +1243,50 @@ SET GLOBAL max_binlog_cache_size = @old_max_binlog_cache_size; SELECT @@skip_name_resolve; SHOW VARIABLES LIKE 'skip_name_resolve'; +--echo # +--echo # Bug #43233 : Some server variables are clipped during "update," +--echo # not "check" stage +--echo # + +SET @kbs=@@global.key_buffer_size; +SET @kcbs=@@global.key_cache_block_size; + +--echo throw errors in STRICT mode +SET SQL_MODE=STRICT_ALL_TABLES; + +# sys_var_ulonglong_ptr: sys_max_binlog_cache_size +--error ER_WRONG_VALUE_FOR_VAR +SET @@global.max_binlog_cache_size=-1; + +# sys_var_thd_ha_rows: "max_join_size" et al. +--error ER_WRONG_VALUE_FOR_VAR +SET @@global.max_join_size=0; + +# sys_var_key_buffer_size: "key_buffer_size" +--error ER_WARN_CANT_DROP_DEFAULT_KEYCACHE +SET @@global.key_buffer_size=0; + +# sys_var_key_cache_long: "key_cache_block_size" et al. +--error ER_WRONG_VALUE_FOR_VAR +SET @@global.key_cache_block_size=0; + +--echo throw warnings in default mode +SET SQL_MODE=DEFAULT; + +SET @@global.max_binlog_cache_size=-1; +SET @@global.max_join_size=0; +# this is an exception. since this is a new error/warning, let's stay +# compatible with the upcoming 5.6. +--error ER_WARN_CANT_DROP_DEFAULT_KEYCACHE +SET @@global.key_buffer_size=0; +SET @@global.key_cache_block_size=0; + +# cleanup +SET @@global.max_binlog_cache_size=DEFAULT; +SET @@global.max_join_size=DEFAULT; +SET @@global.key_buffer_size=@kbs; +SET @@global.key_cache_block_size=@kcbs; + --echo End of 5.1 tests ########################################################################### diff --git a/mysql-test/t/xml.test b/mysql-test/t/xml.test index e9f137adf1b..4d5c5e1a91e 100644 --- a/mysql-test/t/xml.test +++ b/mysql-test/t/xml.test @@ -628,3 +628,18 @@ SELECT EXTRACTVALUE('', LPAD(0.1111E-15, '2011', 1)); --echo End of 5.1 tests + + +--echo # +--echo # Start of 5.5 tests +--echo # + +--echo # +--echo # Bug#58175 xml functions read initialized bytes when conversions happen +--echo # +SET NAMES latin1; +SELECT UPDATEXML(CONVERT('' USING swe7), TRUNCATE('',1), 0); + +--echo # +--echo # End of 5.5 tests +--echo # diff --git a/mysys/Makefile.am b/mysys/Makefile.am deleted file mode 100644 index 357fa321da6..00000000000 --- a/mysys/Makefile.am +++ /dev/null @@ -1,158 +0,0 @@ -# Copyright (C) 2000-2006 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 - -MYSQLDATAdir = $(localstatedir) -MYSQLSHAREdir = $(pkgdatadir) -MYSQLBASEdir= $(prefix) -INCLUDES = @ZLIB_INCLUDES@ @RDTSC_SPARC_ASSEMBLY@ \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include -I$(srcdir) -pkglib_LIBRARIES = libmysys.a -LDADD = libmysys.a $(top_builddir)/strings/libmystrings.a $(top_builddir)/dbug/libdbug.a -noinst_HEADERS = mysys_priv.h my_static.h my_handler_errors.h -libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \ - mf_path.c mf_loadpath.c my_file.c \ - my_open.c my_create.c my_seek.c my_read.c \ - my_pread.c my_write.c my_getpagesize.c \ - mf_keycaches.c my_crc32.c \ - mf_iocache.c mf_iocache2.c mf_cache.c mf_tempfile.c \ - mf_tempdir.c my_lock.c mf_brkhant.c my_alarm.c \ - my_malloc.c my_once.c mulalloc.c \ - my_alloc.c my_new.cc my_atomic.c lf_hash.c \ - lf_dynarray.c lf_alloc-pin.c \ - my_fopen.c my_fstream.c my_getsystime.c \ - my_error.c errors.c my_div.c my_mess.c \ - mf_format.c mf_same.c mf_dirname.c mf_fn_ext.c \ - my_symlink.c my_symlink2.c \ - mf_pack.c mf_unixpath.c mf_arr_appstr.c \ - mf_wcomp.c my_gethwaddr.c \ - mf_qsort.c mf_qsort2.c mf_sort.c \ - ptr_cmp.c mf_radix.c queues.c my_getncpus.c \ - tree.c list.c hash.c array.c string.c typelib.c \ - my_copy.c my_lib.c \ - my_delete.c my_rename.c my_redel.c \ - my_chsize.c my_quick.c my_lockmem.c my_static.c \ - my_sync.c my_getopt.c my_mkdir.c \ - default.c my_compress.c checksum.c \ - my_port.c my_sleep.c \ - charset.c charset-def.c my_bitmap.c my_bit.c md5.c \ - my_gethostbyname.c rijndael.c my_aes.c sha1.c \ - my_handler.c my_largepage.c \ - my_memmem.c stacktrace.c \ - my_windac.c my_access.c base64.c my_libwrap.c \ - my_rdtsc.c - -if NEED_THREAD -# mf_keycache is used only in the server, so it is safe to leave the file -# out of the non-threaded library. -# In fact, it will currently not compile without thread support. -libmysys_a_SOURCES += mf_keycache.c -endif - -EXTRA_DIST = thr_alarm.c thr_lock.c my_pthread.c my_thr_init.c \ - thr_mutex.c thr_rwlock.c \ - CMakeLists.txt mf_soundex.c \ - my_conio.c my_wincond.c my_winthread.c my_winerr.c \ - my_winfile.c \ - my_timer_cycles.il -libmysys_a_LIBADD = @THREAD_LOBJECTS@ -# test_dir_DEPENDENCIES= $(LIBRARIES) -# testhash_DEPENDENCIES= $(LIBRARIES) -# test_charset_DEPENDENCIES= $(LIBRARIES) -# charset2html_DEPENDENCIES= $(LIBRARIES) -DEFS = -DDEFAULT_BASEDIR=\"$(prefix)\" \ - -DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \ - -DDEFAULT_CHARSET_HOME="\"$(MYSQLBASEdir)\"" \ - -DSHAREDIR="\"$(MYSQLSHAREdir)\"" \ - -DDEFAULT_HOME_ENV=MYSQL_HOME \ - -DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX \ - -DDEFAULT_SYSCONFDIR="\"$(sysconfdir)\"" \ - @DEFS@ - -libmysys_a_DEPENDENCIES= @THREAD_LOBJECTS@ - -# I hope this always does the right thing. Otherwise this is only test programs -FLAGS=$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) @NOINST_LDFLAGS@ - -# -# The CP .. RM stuff is to avoid problems with some compilers (like alpha ccc) -# which automaticly removes the object files you use to compile a final program -# - -test_bitmap$(EXEEXT): my_bitmap.c $(LIBRARIES) - $(LINK) $(FLAGS) -DMAIN ./my_bitmap.c $(LDADD) $(LIBS) - -test_priority_queue$(EXEEXT): queues.c $(LIBRARIES) - $(LINK) $(FLAGS) -DMAIN ./queues.c $(LDADD) $(LIBS) - -test_thr_alarm$(EXEEXT): thr_alarm.c $(LIBRARIES) - $(CP) $(srcdir)/thr_alarm.c ./test_thr_alarm.c - $(LINK) $(FLAGS) -DMAIN ./test_thr_alarm.c $(LDADD) $(LIBS) - $(RM) -f ./test_thr_alarm.c - -test_thr_lock$(EXEEXT): thr_lock.c $(LIBRARIES) - $(CP) $(srcdir)/thr_lock.c test_thr_lock.c - $(LINK) $(FLAGS) -DMAIN ./test_thr_lock.c $(LDADD) $(LIBS) - $(RM) -f ./test_thr_lock.c - -test_vsnprintf$(EXEEXT): my_vsnprintf.c $(LIBRARIES) - $(CP) $(srcdir)/my_vsnprintf.c test_vsnprintf.c - $(LINK) $(FLAGS) -DMAIN ./test_vsnprintf.c $(LDADD) $(LIBS) - $(RM) -f test_vsnprintf.c - -test_io_cache$(EXEEXT): mf_iocache.c $(LIBRARIES) - $(CP) $(srcdir)/mf_iocache.c test_io_cache.c - $(LINK) $(FLAGS) -DMAIN ./test_io_cache.c $(LDADD) $(LIBS) - $(RM) -f test_io_cache.c - -test_dir$(EXEEXT): test_dir.c $(LIBRARIES) - $(LINK) $(FLAGS) -DMAIN $(srcdir)/test_dir.c $(LDADD) $(LIBS) - -test_charset$(EXEEXT): test_charset.c $(LIBRARIES) - $(LINK) $(FLAGS) -DMAIN $(srcdir)/test_charset.c $(LDADD) $(LIBS) - -testhash$(EXEEXT): testhash.c $(LIBRARIES) - $(LINK) $(FLAGS) -DMAIN $(srcdir)/testhash.c $(LDADD) $(LIBS) - -test_gethwaddr$(EXEEXT): my_gethwaddr.c $(LIBRARIES) - $(CP) $(srcdir)/my_gethwaddr.c ./test_gethwaddr.c - $(LINK) $(FLAGS) -DMAIN ./test_gethwaddr.c $(LDADD) $(LIBS) - $(RM) -f ./test_gethwaddr.c - -test_base64$(EXEEXT): base64.c $(LIBRARIES) - $(CP) $(srcdir)/base64.c ./test_base64.c - $(LINK) $(FLAGS) -DMAIN ./test_base64.c $(LDADD) $(LIBS) - $(RM) -f ./test_base64.c - -if HAVE_DTRACE_DASH_G -libmysys_a_LIBADD += probes_mysql.o -libmysys_a_DEPENDENCIES += probes_mysql.o dtrace_files dtrace_providers -CLEANFILES = probes_mysql.o dtrace_files dtrace_providers -DTRACEFILES = mf_keycache.o -DTRACEPROVIDER = probes_mysql.d -CLEANFILES += $(DTRACEPROVIDER) dtrace_sources - -dtrace_files: - echo $(DTRACEFILES) > $@ -dtrace_providers: probes_mysql.d - echo $(DTRACEPROVIDER) > $@ -probes_mysql.d: - -$(RM) -f probes_mysql.d - $(CP) $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d - echo timestamp > dtrace_sources - -probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) - $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ -endif diff --git a/mysys/my_rdtsc.c b/mysys/my_rdtsc.c index c8ef38efbdc..2afe3ec31dd 100644 --- a/mysys/my_rdtsc.c +++ b/mysys/my_rdtsc.c @@ -868,14 +868,8 @@ void my_timer_init(MY_TIMER_INFO *mti) clock() -- We don't use because it would overflow frequently. - clock_gettime() -- Often we don't use this even when it exists. - In configure.in, we use AC_CHECK_FUNCS(clock_gettime). Not - AC_CHECK_LIB(rc,clock_gettime) - AC_CHECK_FUNCS(clock_gettime) - If we had the above lines in configure.in, we'd have to use - /usr/lib/librt.so or /usr/lib64/librt.so when linking, and - the size of librt.so is 40KB. In tests, clock_gettime often - had resolution = 1000. + clock_gettime() -- In tests, clock_gettime often had + resolution = 1000. ftime() -- A "man ftime" says: "This function is obsolete. Don't use it." On every platform that we tested, if ftime() diff --git a/mysys/my_symlink.c b/mysys/my_symlink.c index 258e227bb7b..b57edd2179a 100644 --- a/mysys/my_symlink.c +++ b/mysys/my_symlink.c @@ -113,7 +113,6 @@ int my_is_symlink(const char *filename __attribute__((unused))) #endif } - /* Resolve all symbolic links in path 'to' may be equal to 'filename' @@ -146,8 +145,24 @@ int my_realpath(char *to, const char *filename, result= -1; } DBUG_RETURN(result); +#else +#ifdef _WIN32 + int ret= GetFullPathName(filename,FN_REFLEN, + to, + NULL); + if (ret == 0 || ret > FN_REFLEN) + { + if (ret > FN_REFLEN) + my_errno= ENAMETOOLONG; + else + my_errno= EACCES; + if (MyFlags & MY_WME) + my_error(EE_REALPATH, MYF(0), filename, my_errno); + return -1; + } #else my_load_path(to, filename, NullS); +#endif return 0; #endif } diff --git a/packaging/Makefile.am b/packaging/Makefile.am deleted file mode 100644 index 3e6a79367b6..00000000000 --- a/packaging/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -EXTRA_DIST = \ - WiX/AdminBackground.jpg \ - WiX/AdminHeader.jpg \ - WiX/CMakeLists.txt \ - WiX/extra.wxs.in \ - WiX/CPackWixConfig.cmake \ - WiX/create_msi.cmake.in \ - WiX/custom_ui.wxs \ - WiX/MySQLServer.ico \ - WiX/mysql_server.wxs.in \ - WiX/ca/CMakeLists.txt \ - WiX/ca/CustomAction.cpp \ - WiX/ca/CustomAction.def \ - WiX/ca/CustomAction.rc diff --git a/packaging/WiX/ca/CMakeLists.txt b/packaging/WiX/ca/CMakeLists.txt index c74b51284c7..a03ceb9a5d2 100644 --- a/packaging/WiX/ca/CMakeLists.txt +++ b/packaging/WiX/ca/CMakeLists.txt @@ -16,7 +16,7 @@ INCLUDE_DIRECTORIES(${WIX_DIR}/../SDK/inc) LINK_DIRECTORIES(${WIX_DIR}/../SDK/lib) -SET(WIXCA_SOURCES CustomAction.cpp CustomAction.rc CustomAction.def) +SET(WIXCA_SOURCES CustomAction.cpp CustomAction.def) IF(CMAKE_SIZEOF_VOID_P EQUAL 8) LINK_LIBRARIES(wcautil_x64 dutil_x64 msi version) diff --git a/packaging/WiX/ca/CustomAction.rc b/packaging/WiX/ca/CustomAction.rc deleted file mode 100644 index 3f37126ee77..00000000000 --- a/packaging/WiX/ca/CustomAction.rc +++ /dev/null @@ -1,18 +0,0 @@ -#include "afxres.h" -#undef APSTUDIO_READONLY_SYMBOLS - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x0L - FILESUBTYPE 0x0L -BEGIN -END - diff --git a/packaging/WiX/create_msi.cmake.in b/packaging/WiX/create_msi.cmake.in index 404095fb567..a1899b701fd 100644 --- a/packaging/WiX/create_msi.cmake.in +++ b/packaging/WiX/create_msi.cmake.in @@ -7,7 +7,7 @@ SET(CMAKE_CFG_INTDIR "@CMAKE_CFG_INTDIR@") SET(VERSION "@VERSION@") SET(MAJOR_VERSION "@MAJOR_VERSION@") SET(MINOR_VERSION "@MINOR_VERSION@") -SET(PATCH "@PATCH@") +SET(PATCH_VERSION "@PATCH_VERSION@") SET(CMAKE_SIZEOF_VOID_P @CMAKE_SIZEOF_VOID_P@) SET(MANUFACTURER "@MANUFACTURER@") SET(WIXCA_LOCATION "@WIXCA_LOCATION@") diff --git a/packaging/WiX/mysql_server.wxs.in b/packaging/WiX/mysql_server.wxs.in index 59cc817a302..43a30538384 100644 --- a/packaging/WiX/mysql_server.wxs.in +++ b/packaging/WiX/mysql_server.wxs.in @@ -4,7 +4,7 @@ Id="*" UpgradeCode="49EB7A6A-1CEF-4A1E-9E89-B9A4993963E3" Name="MySQL Server @MAJOR_VERSION@.@MINOR_VERSION@" - Version="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@" + Version="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@" Language="1033" Manufacturer="@MANUFACTURER@"> @@ -25,12 +25,12 @@ <UpgradeVersion Minimum="@MAJOR_VERSION@.@MINOR_VERSION@.0" IncludeMinimum="yes" - Maximum="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@" + Maximum="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@" Property="OLDERVERSIONBEINGUPGRADED" MigrateFeatures="yes" /> <UpgradeVersion - Minimum="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@" + Minimum="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@" OnlyDetect="yes" Property="NEWERVERSIONDETECTED" /> </Upgrade> @@ -128,10 +128,10 @@ Impersonate="no" Return="check" /> <InstallExecuteSequence> - <Custom Action="UnregisterProperty" After="InstallInitialize">Installed And Not UPGRADINGPRODUCTCODE</Custom> - <Custom Action="UnregisterPropertySilent" After="InstallInitialize">Installed And Not UPGRADINGPRODUCTCODE</Custom> - <Custom Action="UnregisterService" After="UnregisterProperty">Installed And Not UPGRADINGPRODUCTCODE And UILevel>4</Custom> - <Custom Action="UnregisterServiceSilently" After="UnregisterPropertySilent">Installed And Not UPGRADINGPRODUCTCODE And UILevel<=4</Custom> + <Custom Action="UnregisterProperty" After="InstallInitialize">Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL"</Custom> + <Custom Action="UnregisterPropertySilent" After="InstallInitialize">Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL"</Custom> + <Custom Action="UnregisterService" After="UnregisterProperty">Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL" And UILevel>4</Custom> + <Custom Action="UnregisterServiceSilently" After="UnregisterPropertySilent">Installed And Not UPGRADINGPRODUCTCODE And REMOVE="ALL" And UILevel<=4</Custom> </InstallExecuteSequence> <!-- Installation root--> @@ -160,4 +160,4 @@ @CPACK_WIX_INCLUDES@ </Product> -</Wix> \ No newline at end of file +</Wix> diff --git a/plugin/Makefile.am b/plugin/Makefile.am deleted file mode 100644 index 4a84ce4915a..00000000000 --- a/plugin/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# Process this file with automake to create Makefile.in - -AUTOMAKE_OPTIONS = foreign - -# extra plugin example files are listed here, to -# keep its Makefile.am cleaner as a template -EXTRA_DIST = fulltext/configure.in - -SUBDIRS = @mysql_pg_dirs@ -DIST_SUBDIRS = @mysql_pg_distdirs@ - -# As of 5.5.3-m3, we want to include the plugin files of a debug build in the package -install-exec-hook: - $(mkinstalldirs) $(DESTDIR)$(pkglibdir) $(DESTDIR)$(pkglibdir)/plugin - test ! -d debug || $(TAR) cf - debug | ( cd $(DESTDIR)$(pkglibdir)/plugin && $(TAR) xvf - ) diff --git a/plugin/audit_null/Makefile.am b/plugin/audit_null/Makefile.am deleted file mode 100644 index 4408c3f7c47..00000000000 --- a/plugin/audit_null/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2007 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -#Makefile.am example for a plugin - -pkgplugindir= $(pkglibdir)/plugin - -AM_CPPFLAGS = -I$(top_srcdir)/include - -EXTRA_LTLIBRARIES= adt_null.la -pkgplugin_LTLIBRARIES= @plugin_audit_null_shared_target@ -adt_null_la_LDFLAGS= -module -rpath $(pkgplugindir) -adt_null_la_CPPFLAGS= $(AM_CPPFLAGS) -DMYSQL_DYNAMIC_PLUGIN -adt_null_la_SOURCES= audit_null.c - -EXTRA_LIBRARIES= libadtnull.a -noinst_LIBRARIES= @plugin_audit_null_static_target@ -libadtnull_a_SOURCES= audit_null.c - -EXTRA_DIST= plug.in CMakeLists.txt diff --git a/plugin/audit_null/plug.in b/plugin/audit_null/plug.in deleted file mode 100644 index 15b1a48b408..00000000000 --- a/plugin/audit_null/plug.in +++ /dev/null @@ -1,4 +0,0 @@ -MYSQL_PLUGIN(audit_null, [NULL Audit Plug-in], - [Simple black-hole Audit example plug-in]) -MYSQL_PLUGIN_DYNAMIC(audit_null, [adt_null.la]) -MYSQL_PLUGIN_STATIC(audit_null, [libadtnull.a]) diff --git a/plugin/auth/Makefile.am b/plugin/auth/Makefile.am deleted file mode 100644 index 30e185f36f7..00000000000 --- a/plugin/auth/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -pkgplugindir=$(pkglibdir)/plugin - -AM_LDFLAGS=-module -rpath $(pkgplugindir) -AM_CPPFLAGS=-DMYSQL_DYNAMIC_PLUGIN -Wno-pointer-sign -I$(top_srcdir)/include - -pkgplugin_LTLIBRARIES= auth.la auth_test_plugin.la qa_auth_interface.la qa_auth_server.la qa_auth_client.la -auth_la_SOURCES= dialog.c -auth_test_plugin_la_SOURCES= test_plugin.c - -qa_auth_interface_la_SOURCES= qa_auth_interface.c -qa_auth_server_la_SOURCES= qa_auth_server.c -qa_auth_client_la_SOURCES= qa_auth_client.c - -if HAVE_PEERCRED -pkgplugin_LTLIBRARIES+= auth_socket.la -auth_socket_la_SOURCES= auth_socket.c -endif - -EXTRA_DIST= plug.in - diff --git a/plugin/auth/plug.in b/plugin/auth/plug.in deleted file mode 100644 index 776367652ab..00000000000 --- a/plugin/auth/plug.in +++ /dev/null @@ -1,12 +0,0 @@ -MYSQL_PLUGIN(auth, [Collection of Authentication Plugins], - [Collection of Authentication Plugins]) -MYSQL_PLUGIN_DYNAMIC(auth, [dialog.la auth_test_plugin.la]) -AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ -#define _GNU_SOURCE -#include <sys/socket.h> -]],[ - struct ucred cred; - getsockopt(0, SOL_SOCKET, SO_PEERCRED, &cred, 0); -])],have_peercred=yes) -AM_CONDITIONAL(HAVE_PEERCRED, test x$have_peercred = xyes) diff --git a/plugin/daemon_example/Makefile.am b/plugin/daemon_example/Makefile.am deleted file mode 100644 index d60271521b3..00000000000 --- a/plugin/daemon_example/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright (C) 2006 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -#Makefile.am example for a daemon -MYSQLDATAdir = $(localstatedir) -MYSQLSHAREdir = $(pkgdatadir) -MYSQLBASEdir= $(prefix) -MYSQLLIBdir= $(pkglibdir) -pkgplugindir = $(pkglibdir)/plugin -INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ - -I$(top_srcdir)/regex \ - -I$(top_srcdir)/sql \ - -I$(srcdir) @ZLIB_INCLUDES@ - -EXTRA_LTLIBRARIES = libdaemon_example.la -pkgplugin_LTLIBRARIES = @plugin_daemon_example_shared_target@ -libdaemon_example_la_LDFLAGS = -module -rpath $(pkgplugindir) -L$(top_builddir)/libservices -lmysqlservices - -libdaemon_example_la_CXXFLAGS= $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN -libdaemon_example_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN -libdaemon_example_la_SOURCES = daemon_example.cc - - -EXTRA_LIBRARIES = libdaemon_example.a -noinst_LIBRARIES = @plugin_daemon_example_static_target@ -libdaemon_example_a_CXXFLAGS = $(AM_CXXFLAGS) -libdaemon_example_a_CFLAGS = $(AM_CFLAGS) -libdaemon_example_a_SOURCES= daemon_example.cc -EXTRA_DIST = CMakeLists.txt diff --git a/plugin/daemon_example/configure.in b/plugin/daemon_example/configure.in deleted file mode 100644 index 8924b7f5bc4..00000000000 --- a/plugin/daemon_example/configure.in +++ /dev/null @@ -1,9 +0,0 @@ -# configure.in example for a daemon - -AC_INIT(daemon_example, 0.1) -AM_INIT_AUTOMAKE -AC_DISABLE_STATIC -AC_PROG_LIBTOOL -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT - diff --git a/plugin/daemon_example/plug.in b/plugin/daemon_example/plug.in deleted file mode 100644 index 72e87a70f59..00000000000 --- a/plugin/daemon_example/plug.in +++ /dev/null @@ -1,3 +0,0 @@ -MYSQL_PLUGIN(daemon_example,[Daemon Example Plugin], - [This is an example plugin daemon.]) -MYSQL_PLUGIN_DYNAMIC(daemon_example, [libdaemon_example.la]) diff --git a/plugin/fulltext/Makefile.am b/plugin/fulltext/Makefile.am deleted file mode 100644 index 80a8753b332..00000000000 --- a/plugin/fulltext/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (C) 2005-2006 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU 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 - -#Makefile.am example for a plugin - -pkgplugindir=$(pkglibdir)/plugin -INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include -#noinst_LTLIBRARIES= mypluglib.la -pkgplugin_LTLIBRARIES= mypluglib.la -mypluglib_la_SOURCES= plugin_example.c -mypluglib_la_LDFLAGS= -module -rpath $(pkgplugindir) -mypluglib_la_CFLAGS= -DMYSQL_DYNAMIC_PLUGIN -EXTRA_DIST= CMakeLists.txt diff --git a/plugin/fulltext/configure.in b/plugin/fulltext/configure.in deleted file mode 100644 index 2fefa68727c..00000000000 --- a/plugin/fulltext/configure.in +++ /dev/null @@ -1,9 +0,0 @@ -# configure.in example for a plugin - -AC_INIT(plugin_example, 0.1) -AM_INIT_AUTOMAKE -AC_DISABLE_STATIC -AC_PROG_LIBTOOL -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT - diff --git a/plugin/fulltext/plug.in b/plugin/fulltext/plug.in deleted file mode 100644 index 5bfc401f805..00000000000 --- a/plugin/fulltext/plug.in +++ /dev/null @@ -1,3 +0,0 @@ -MYSQL_PLUGIN(ftexample, [Simple Parser], - [Simple full-text parser plugin]) -MYSQL_PLUGIN_DYNAMIC(ftexample, [mypluglib.la]) diff --git a/plugin/semisync/Makefile.am b/plugin/semisync/Makefile.am deleted file mode 100644 index ec1ecee46a2..00000000000 --- a/plugin/semisync/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) 2006 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -## Makefile.am for semi-synchronous replication - -pkgplugindir = $(pkglibdir)/plugin -INCLUDES = -I$(top_srcdir)/include \ - -I$(top_srcdir)/sql \ - -I$(top_srcdir)/regex \ - -I$(srcdir) - -noinst_HEADERS = semisync.h semisync_master.h semisync_slave.h - -pkgplugin_LTLIBRARIES = semisync_master.la semisync_slave.la - -semisync_master_la_LDFLAGS = -module -rpath $(pkgplugindir) -L$(top_builddir)/libservices -lmysqlservices -semisync_master_la_CXXFLAGS= $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN -semisync_master_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN -semisync_master_la_SOURCES = semisync.cc semisync_master.cc semisync_master_plugin.cc - -semisync_slave_la_LDFLAGS = -module -rpath $(pkgplugindir) -L$(top_builddir)/libservices -lmysqlservices -semisync_slave_la_CXXFLAGS= $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN -semisync_slave_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN -semisync_slave_la_SOURCES = semisync.cc semisync_slave.cc semisync_slave_plugin.cc - -EXTRA_DIST= CMakeLists.txt plug.in diff --git a/plugin/semisync/configure.in b/plugin/semisync/configure.in deleted file mode 100644 index 894251258db..00000000000 --- a/plugin/semisync/configure.in +++ /dev/null @@ -1,9 +0,0 @@ -# configure.in for semi-synchronous replication - -AC_INIT(mysql-semi-sync-plugin, 0.2) -AM_INIT_AUTOMAKE -AC_DISABLE_STATIC -AC_PROG_LIBTOOL -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT - diff --git a/plugin/semisync/plug.in b/plugin/semisync/plug.in deleted file mode 100644 index 82bd9772644..00000000000 --- a/plugin/semisync/plug.in +++ /dev/null @@ -1,3 +0,0 @@ -MYSQL_PLUGIN(semisync,[Semi-synchronous Replication Plugin], - [Semi-synchronous replication plugin.]) -MYSQL_PLUGIN_DYNAMIC(semisync, [semisync_master.la semisync_slave.la]) diff --git a/regex/Makefile.am b/regex/Makefile.am deleted file mode 100644 index 0fd62a777f6..00000000000 --- a/regex/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2000-2003, 2005-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 -noinst_LIBRARIES = libregex.a -LDADD= libregex.a $(top_builddir)/strings/libmystrings.a -noinst_HEADERS = cclass.h cname.h regex2.h utils.h engine.c my_regex.h -libregex_a_SOURCES = regerror.c regcomp.c regexec.c regfree.c reginit.c -noinst_PROGRAMS = re -re_SOURCES = split.c debug.c main.c -re_LDFLAGS= @NOINST_LDFLAGS@ -EXTRA_DIST = tests CHANGES COPYRIGHT WHATSNEW regexp.c \ - debug.ih engine.ih main.ih regcomp.ih regerror.ih \ - regex.3 regex.7 CMakeLists.txt - -test: re tests - ./re < tests - ./re -el < tests - ./re -er < tests diff --git a/scripts/Makefile.am b/scripts/Makefile.am deleted file mode 100644 index 0200410fd8f..00000000000 --- a/scripts/Makefile.am +++ /dev/null @@ -1,192 +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 - -## Process this file with automake to create Makefile.in - -BUILT_SOURCES = mysql_fix_privilege_tables.sql \ - mysql_fix_privilege_tables_sql.c - -EXTRA_PROGRAMS = comp_sql - -bin_SCRIPTS = @server_scripts@ \ - msql2mysql \ - mysql_config \ - mysql_fix_extensions \ - mysql_setpermission \ - mysql_secure_installation \ - mysql_zap \ - mysqlaccess \ - mysqlbug \ - mysql_convert_table_format \ - mysql_find_rows \ - mysqlhotcopy \ - mysqldumpslow \ - mysqld_multi - -noinst_SCRIPTS = make_binary_distribution \ - make_sharedlib_distribution \ - dheadgen.pl - -EXTRA_SCRIPTS = make_binary_distribution.sh \ - make_sharedlib_distribution.sh \ - msql2mysql.sh \ - mysql_config.sh \ - mysql_config.pl.in \ - mysql_fix_extensions.sh \ - mysql_install_db.sh \ - mysql_install_db.pl.in \ - mysql_setpermission.sh \ - mysql_secure_installation.sh \ - mysql_secure_installation.pl.in \ - mysql_zap.sh \ - mysqlaccess.sh \ - mysqlbug.sh \ - mysql_convert_table_format.sh \ - mysql_find_rows.sh \ - mysqlhotcopy.sh \ - mysqldumpslow.sh \ - mysqld_multi.sh \ - mysqld_safe.sh \ - dheadgen.pl - -EXTRA_DIST = $(EXTRA_SCRIPTS) \ - mysqlaccess.conf \ - mysqlbug \ - make_win_bin_dist \ - mysql_fix_privilege_tables_sql.c \ - mysql_system_tables_fix.sql \ - CMakeLists.txt - -dist_pkgdata_DATA = fill_help_tables.sql \ - mysql_fix_privilege_tables.sql \ - mysql_system_tables.sql \ - mysql_system_tables_data.sql \ - mysql_test_data_timezone.sql - -CLEANFILES = @server_scripts@ \ - make_binary_distribution \ - make_sharedlib_distribution \ - msql2mysql \ - mysql_config \ - mysql_fix_extensions \ - mysql_setpermission \ - mysql_secure_installation \ - mysql_zap \ - mysqlaccess \ - mysql_convert_table_format \ - mysql_find_rows \ - mysqlhotcopy \ - mysqldumpslow \ - mysqld_multi - -pkgplugindir = $(pkglibdir)/plugin - -# Default same as 'pkgdatadir', but we can override it -pkgsuppdir = $(datadir)/@PACKAGE@ - -# mysqlbug should be distributed built so that people can report build -# failures with it. -DISTCLEANFILES = $(BUILT_SOURCES) mysqlbug - -# We want the right version and configure comand line in mysqlbug -mysqlbug: ${top_builddir}/config.status mysqlbug.sh - -# Build mysql_fix_privilege_tables.sql from the files that contain -# the system tables for this version of MySQL plus any commands -# needed to upgrade the system tables from an older version -mysql_fix_privilege_tables.sql: mysql_system_tables.sql \ - mysql_system_tables_fix.sql - @echo "Building $@"; - @cat mysql_system_tables.sql mysql_system_tables_fix.sql > $@ - -# -# Build mysql_fix_privilege_tables_sql.c from -# mysql_fix_privileges_tables.sql using comp_sql -# The "sleep" ensures the generated file has a younger timestamp than its source -# (which may have been generated in this very same "make" run). -# -mysql_fix_privilege_tables_sql.c: comp_sql.c mysql_fix_privilege_tables.sql - $(MAKE) $(AM_MAKEFLAGS) comp_sql$(EXEEXT) - sleep 2 - $(top_builddir)/scripts/comp_sql$(EXEEXT) \ - mysql_fix_privilege_tables \ - $(top_srcdir)/scripts/mysql_fix_privilege_tables.sql $@ - - -SUFFIXES = .sh - -.sh: - @RM@ -f $@ $@-t - @SED@ \ - -e 's!@''bindir''@!$(bindir)!g' \ - -e 's!@''sbindir''@!$(sbindir)!g' \ - -e 's!@''scriptdir''@!$(bindir)!g' \ - -e 's!@''prefix''@!$(prefix)!g' \ - -e 's!@''datadir''@!$(datadir)!g' \ - -e 's!@''localstatedir''@!$(localstatedir)!g' \ - -e 's!@''libexecdir''@!$(libexecdir)!g' \ - -e 's!@''pkglibdir''@!$(pkglibdir)!g' \ - -e 's!@''pkgincludedir''@!$(pkgincludedir)!g' \ - -e 's!@''pkgdatadir''@!$(pkgdatadir)!g' \ - -e 's!@''pkgplugindir''@!$(pkgplugindir)!g' \ - -e 's!@''pkgsuppdir''@!$(pkgsuppdir)!g' \ - -e 's!@''sysconfdir''@!$(sysconfdir)!g' \ - -e 's!@''mandir''@!$(mandir)!g' \ - -e 's!@''infodir''@!$(infodir)!g' \ - -e 's!@''CC''@!@CC@!'\ - -e 's!@''CXX''@!@CXX@!'\ - -e 's!@''GXX''@!@GXX@!'\ - -e 's!@''SAVE_CC''@!@SAVE_CC@!'\ - -e 's!@''SAVE_CXX''@!@SAVE_CXX@!'\ - -e 's!@''CC_VERSION''@!@CC_VERSION@!'\ - -e 's!@''CXX_VERSION''@!@CXX_VERSION@!'\ - -e 's!@''PERL''@!@PERL@!' \ - -e 's!@''SAVE_ASFLAGS''@!@SAVE_ASFLAGS@!'\ - -e 's!@''SAVE_CFLAGS''@!@SAVE_CFLAGS@!'\ - -e 's!@''SAVE_CXXFLAGS''@!@SAVE_CXXFLAGS@!'\ - -e 's!@''SAVE_LDFLAGS''@!@SAVE_LDFLAGS@!'\ - -e 's!@''ASFLAGS''@!@ASFLAGS@!'\ - -e 's!@''CFLAGS''@!@CFLAGS@!'\ - -e 's!@''CXXFLAGS''@!@CXXFLAGS@!'\ - -e 's!@''LDFLAGS''@!@LDFLAGS@!'\ - -e 's!@''LIBDL''@!@LIBDL@!'\ - -e 's!@''CLIENT_LIBS''@!@CLIENT_LIBS@!' \ - -e 's!@''ZLIB_LIBS''@!@ZLIB_LIBS@!' \ - -e 's!@''LIBS''@!@LIBS@!' \ - -e 's!@''WRAPLIBS''@!@WRAPLIBS@!' \ - -e 's!@''openssl_libs''@!@openssl_libs@!' \ - -e 's!@''VERSION''@!@VERSION@!' \ - -e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \ - -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \ - -e 's!@''COMPILATION_COMMENT''@!@COMPILATION_COMMENT@!' \ - -e 's!@''MACHINE_TYPE''@!@MACHINE_TYPE@!' \ - -e 's!@''HOSTNAME''@!@HOSTNAME@!' \ - -e 's!@''SYSTEM_TYPE''@!@SYSTEM_TYPE@!' \ - -e 's!@''CHECK_PID''@!@CHECK_PID@!' \ - -e 's!@''FIND_PROC''@!@FIND_PROC@!' \ - -e 's!@''MYSQLD_DEFAULT_SWITCHES''@!@MYSQLD_DEFAULT_SWITCHES@!' \ - -e 's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!' \ - -e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \ - -e 's!@''MYSQL_TCP_PORT_DEFAULT''@!@MYSQL_TCP_PORT_DEFAULT@!' \ - -e 's!@''TARGET_LINUX''@!@TARGET_LINUX@!' \ - -e "s!@""CONF_COMMAND""@!@CONF_COMMAND@!" \ - -e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \ - -e 's!@''STATIC_NSS_FLAGS''@!@STATIC_NSS_FLAGS@!' \ - -e 's!@''NON_THREADED_LIBS''@!@NON_THREADED_LIBS@!' \ - -e 's!@''ZLIB_DEPS''@!@ZLIB_DEPS@!' \ - -e "s!@MAKE@!$(MAKE)!" \ - $< > $@-t - @CHMOD@ +x $@-t - @MV@ $@-t $@ diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh index 951699317fd..455bc93e642 100644 --- a/scripts/make_binary_distribution.sh +++ b/scripts/make_binary_distribution.sh @@ -304,8 +304,8 @@ mv $DEST/bin/mysql_install_db $DEST/scripts/ # Copy readme and license files cp README Docs/INSTALL-BINARY $DEST/ -if [ -f COPYING -a -f EXCEPTIONS-CLIENT ] ; then - cp COPYING EXCEPTIONS-CLIENT $DEST/ +if [ -f COPYING ] ; then + cp COPYING $DEST/ elif [ -f LICENSE.mysql ] ; then cp LICENSE.mysql $DEST/ else diff --git a/scripts/make_sharedlib_distribution.sh b/scripts/make_sharedlib_distribution.sh deleted file mode 100644 index f6669788233..00000000000 --- a/scripts/make_sharedlib_distribution.sh +++ /dev/null @@ -1,136 +0,0 @@ -#!/bin/sh -# Copyright (C) 2003-2004, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# The default path should be /usr/local - -# Get some info from configure -# chmod +x ./scripts/setsomevars - -machine=@MACHINE_TYPE@ -system=@SYSTEM_TYPE@ -version=@VERSION@ -export machine system version -SOURCE=`pwd` -CP="cp -p" -MV="mv" - -STRIP=1 -DEBUG=0 -SILENT=0 -TMP=/tmp -SUFFIX="" - -parse_arguments() { - for arg do - case "$arg" in - --debug) DEBUG=1;; - --tmp=*) TMP=`echo "$arg" | sed -e "s;--tmp=;;"` ;; - --suffix=*) SUFFIX=`echo "$arg" | sed -e "s;--suffix=;;"` ;; - --no-strip) STRIP=0 ;; - --silent) SILENT=1 ;; - *) - echo "Unknown argument '$arg'" - exit 1 - ;; - esac - done -} - -parse_arguments "$@" - -BASE=$TMP/my_dist$SUFFIX - -if [ -d $BASE ] ; then - rm -r -f $BASE -fi - -mkdir -p $BASE/lib - -for i in \ - libmysql/.libs/libmysqlclient.so* \ - libmysql/.libs/libmysqlclient.sl* \ - libmysql/.libs/libmysqlclient*.dylib \ - libmysql_r/.libs/libmysqlclient_r.so* \ - libmysql_r/.libs/libmysqlclient_r.sl* \ - libmysql_r/.libs/libmysqlclient_r*.dylib -do - if [ -f $i ] - then - $CP $i $BASE/lib - fi -done - -# Change the distribution to a long descriptive name -NEW_NAME=mysql-shared-$version-$system-$machine$SUFFIX -BASE2=$TMP/$NEW_NAME -rm -r -f $BASE2 -mv $BASE $BASE2 -BASE=$BASE2 - -#if we are debugging, do not do tar/gz -if [ x$DEBUG = x1 ] ; then - exit -fi - -# This is needed to prefer GNU tar instead of tar because tar can't -# always handle long filenames - -PATH_DIRS=`echo $PATH | sed -e 's/^:/. /' -e 's/:$/ ./' -e 's/::/ . /g' -e 's/:/ /g' ` -which_1 () -{ - for cmd - do - for d in $PATH_DIRS - do - for file in $d/$cmd - do - if test -x $file -a ! -d $file - then - echo $file - exit 0 - fi - done - done - done - exit 1 -} - -# -# Create the result tar file -# - -tar=`which_1 gnutar gtar` -if test "$?" = "1" -o "$tar" = "" -then - tar=tar -fi - -echo "Using $tar to create archive" -cd $TMP - -OPT=cvf -if [ x$SILENT = x1 ] ; then - OPT=cf -fi - -$tar $OPT $SOURCE/$NEW_NAME.tar $NEW_NAME -cd $SOURCE -echo "Compressing archive" -gzip -9 $NEW_NAME.tar -echo "Removing temporary directory" -rm -r -f $BASE - -echo "$NEW_NAME.tar.gz created" diff --git a/scripts/make_win_bin_dist b/scripts/make_win_bin_dist index aa106a3dfc4..3174d61792a 100755 --- a/scripts/make_win_bin_dist +++ b/scripts/make_win_bin_dist @@ -183,8 +183,8 @@ cp ChangeLog $DESTDIR/Docs/ || /bin/true cp support-files/my-*.ini $DESTDIR/ if [ -f COPYING ] ; then - cp COPYING EXCEPTIONS-CLIENT $DESTDIR/ - cp COPYING $DESTDIR/Docs/ + cp COPYING $DESTDIR/ + cp COPYING $DESTDIR/Docs/ fi # ---------------------------------------------------------------------- diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql index b51e4c6f549..399c42b1b2d 100644 --- a/scripts/mysql_system_tables_fix.sql +++ b/scripts/mysql_system_tables_fix.sql @@ -643,7 +643,14 @@ drop procedure mysql.die; ALTER TABLE user ADD plugin char(60) DEFAULT '' NOT NULL, ADD authentication_string TEXT NOT NULL; ALTER TABLE user MODIFY plugin char(60) DEFAULT '' NOT NULL; -CREATE TABLE IF NOT EXISTS proxies_priv (Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Proxied_host char(60) binary DEFAULT '' NOT NULL, Proxied_user char(16) binary DEFAULT '' NOT NULL, With_grant BOOL DEFAULT 0 NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp, PRIMARY KEY Host (Host,User,Proxied_host,Proxied_user), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User proxy privileges'; +-- Need to pre-fill mysql.proxies_priv with access for root even when upgrading from +-- older versions + +CREATE TEMPORARY TABLE tmp_proxies_priv LIKE proxies_priv; +INSERT INTO tmp_proxies_priv VALUES ('localhost', 'root', '', '', TRUE, '', now()); +INSERT INTO proxies_priv SELECT * FROM tmp_proxies_priv WHERE @had_proxies_priv_table=0; +DROP TABLE tmp_proxies_priv; + # Activate the new, possible modified privilege tables # This should not be needed, but gives us some extra testing that the above diff --git a/sql-bench/Makefile.am b/sql-bench/Makefile.am deleted file mode 100644 index a7a2975ea87..00000000000 --- a/sql-bench/Makefile.am +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright (C) 2000-2003, 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 - -benchdir_root= $(prefix) -benchdir = $(benchdir_root)/sql-bench -bench_SCRIPTS = test-ATIS test-connect test-create test-insert \ - test-big-tables test-select test-wisconsin \ - test-alter-table test-transactions \ - graph-compare-results \ - bench-init.pl compare-results run-all-tests \ - server-cfg crash-me copy-db innotest1 innotest1a \ - innotest1b innotest2 innotest2a innotest2b \ - bench-count-distinct -CLEANFILES = $(bench_SCRIPTS) -EXTRA_SCRIPTS = test-ATIS.sh test-connect.sh test-create.sh \ - test-insert.sh test-big-tables.sh test-select.sh \ - test-alter-table.sh test-wisconsin.sh \ - test-transactions.sh \ - bench-init.pl.sh compare-results.sh server-cfg.sh \ - run-all-tests.sh crash-me.sh copy-db.sh \ - graph-compare-results.sh innotest1.sh innotest1a.sh \ - innotest1b.sh innotest2.sh innotest2a.sh innotest2b.sh \ - bench-count-distinct.sh -EXTRA_DIST = $(EXTRA_SCRIPTS) CMakeLists.txt - -dist-hook: - mkdir -p $(distdir)/Data/ATIS $(distdir)/Data/Wisconsin \ - $(distdir)/limits $(distdir)/Comments - for i in $(srcdir)/Data/ATIS/*.* ; do $(INSTALL_DATA) $$i $(distdir)/Data/ATIS ; done - for i in $(srcdir)/Data/Wisconsin/*.* ; do $(INSTALL_DATA) $$i $(distdir)/Data/Wisconsin ; done - for i in $(srcdir)/limits/*.* ; do $(INSTALL_DATA) $$i $(distdir)/limits; done - for i in $(srcdir)/Comments/*.* ; do $(INSTALL_DATA) $$i $(distdir)/Comments; done - -install-data-local: - $(mkinstalldirs) \ - $(DESTDIR)$(benchdir)/Data \ - $(DESTDIR)$(benchdir)/Data/ATIS \ - $(DESTDIR)$(benchdir)/Data/Wisconsin \ - $(DESTDIR)$(benchdir)/limits \ - $(DESTDIR)$(benchdir)/Comments - $(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(benchdir) - for i in $(srcdir)/Data/ATIS/*.* ; do $(INSTALL_DATA) $$i $(DESTDIR)$(benchdir)/Data/ATIS ; done - for i in $(srcdir)/Data/Wisconsin/*.* ; do $(INSTALL_DATA) $$i $(DESTDIR)$(benchdir)/Data/Wisconsin ; done - for i in $(srcdir)/limits/*.* ; do $(INSTALL_DATA) $$i $(DESTDIR)$(benchdir)/limits; done - for i in $(srcdir)/Comments/*.* ; do $(INSTALL_DATA) $$i $(DESTDIR)$(benchdir)/Comments; done - -uninstall-local: - @RM@ -f -r $(DESTDIR)$(benchdir) - -SUFFIXES = .sh - -.sh: - @RM@ -f $@ $@-t - @SED@ \ - -e 's!@''benchdir''@!$(benchdir)!g' \ - -e 's!@''bindir''@!$(bindir)!g' \ - -e 's!@''scriptdir''@!$(bindir)!g' \ - -e 's!@''prefix''@!$(prefix)!g' \ - -e 's!@''datadir''@!$(datadir)!g' \ - -e 's!@''localstatedir''@!$(localstatedir)!g' \ - -e 's!@''libexecdir''@!$(libexecdir)!g' \ - -e 's!@''PERL''@!@PERL@!' \ - -e 's!@''VERSION''@!@VERSION@!' \ - -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \ - $< > $@-t - @CHMOD@ +x $@-t - @MV@ $@-t $@ diff --git a/sql-common/Makefile.am b/sql-common/Makefile.am deleted file mode 100644 index 2f5a049085f..00000000000 --- a/sql-common/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) 2003-2004, 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 - -## Process this file with automake to create Makefile.in -EXTRA_DIST = client.c pack.c my_time.c my_user.c client_plugin.c diff --git a/sql-common/client_plugin.c b/sql-common/client_plugin.c index bfeea40b401..6114d95cd73 100644 --- a/sql-common/client_plugin.c +++ b/sql-common/client_plugin.c @@ -176,11 +176,11 @@ err2: if (plugin->deinit) plugin->deinit(); err1: - if (dlhandle) - dlclose(dlhandle); set_mysql_extended_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD, unknown_sqlstate, ER(CR_AUTH_PLUGIN_CANNOT_LOAD), plugin->name, errmsg); + if (dlhandle) + dlclose(dlhandle); return NULL; } diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 2c782380baf..1bec2d7b082 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -287,3 +287,7 @@ ELSE() ENDIF() ENDIF() +ADD_CUSTOM_TARGET(show-dist-name + COMMAND ${CMAKE_COMMAND} -E echo "${CPACK_PACKAGE_FILE_NAME}" +) + diff --git a/sql/Makefile.am b/sql/Makefile.am deleted file mode 100644 index 16161798078..00000000000 --- a/sql/Makefile.am +++ /dev/null @@ -1,280 +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 - -#called from the top level Makefile - -MYSQLDATAdir = $(localstatedir) -MYSQLSHAREdir = $(pkgdatadir) -MYSQLBASEdir= $(prefix) -MYSQLLIBdir= $(pkglibdir) -pkgplugindir = $(pkglibdir)/plugin -INCLUDES = @ZLIB_INCLUDES@ \ - -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_srcdir)/regex -I$(srcdir) $(openssl_includes) -WRAPLIBS= @WRAPLIBS@ -SUBDIRS = share -libexec_PROGRAMS = mysqld -EXTRA_PROGRAMS = gen_lex_hash -bin_PROGRAMS = mysql_tzinfo_to_sql -DTRACEFILES = filesort.o \ - .libs/libndb_la-ha_ndbcluster.o \ - handler.o \ - mysqld.o \ - net_serv.o \ - scheduler.o \ - sp_head.o \ - sql_cache.o \ - sql_connect.o \ - sql_cursor.o \ - sql_delete.o \ - sql_truncate.o \ - sql_reload.o \ - sql_insert.o \ - datadict.o \ - sql_parse.o \ - sql_prepare.o \ - sql_select.o \ - sql_update.o - -DTRACEFILES_DEPEND = filesort.o \ - libndb_la-ha_ndbcluster.lo \ - handler.o \ - mysqld.o \ - net_serv.o \ - scheduler.o \ - sp_head.o \ - sql_cache.o \ - sql_connect.o \ - sql_cursor.o \ - sql_delete.o \ - sql_truncate.o \ - sql_reload.o \ - sql_insert.o \ - datadict.o \ - sql_parse.o \ - sql_prepare.o \ - sql_select.o \ - sql_update.o - - -noinst_LTLIBRARIES= libndb.la \ - udf_example.la - -SUPPORTING_LIBS = $(top_builddir)/vio/libvio.a \ - $(top_builddir)/mysys/libmysys.a \ - $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/regex/libregex.a \ - $(top_builddir)/strings/libmystrings.a -mysqld_DEPENDENCIES= @mysql_plugin_libs@ $(SUPPORTING_LIBS) libndb.la -LDADD = $(SUPPORTING_LIBS) @ZLIB_LIBS@ @NDB_SCI_LIBS@ -mysqld_LDADD = libndb.la \ - @MYSQLD_EXTRA_LDFLAGS@ \ - @mysql_plugin_libs@ \ - $(LDADD) $(CXXLDFLAGS) $(WRAPLIBS) @LIBDL@ \ - $(yassl_libs) $(openssl_libs) @MYSQLD_EXTRA_LIBS@ - -noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \ - item_strfunc.h item_timefunc.h \ - item_xmlfunc.h sql_plugin_services.h \ - item_create.h item_subselect.h item_row.h \ - sql_priv.h item_geofunc.h sql_bitmap.h \ - procedure.h sql_class.h sql_lex.h sql_list.h \ - sql_string.h unireg.h \ - sql_error.h field.h handler.h mysqld_suffix.h \ - sql_profile.h mysqld.h sql_help.h frm_crypt.h \ - ha_ndbcluster.h ha_ndbcluster_cond.h \ - ha_ndbcluster_binlog.h ha_ndbcluster_tables.h \ - ha_partition.h rpl_constants.h \ - debug_sync.h \ - opt_range.h protocol.h rpl_tblmap.h rpl_utility.h \ - rpl_reporting.h sql_locale.h sql_parse.h \ - log.h sql_show.h rpl_rli.h rpl_mi.h \ - sql_select.h structs.h table.h sql_udf.h hash_filo.h \ - lex.h lex_symbol.h sql_acl.h sql_crypt.h sql_base.h \ - sql_table.h key.h lock.h thr_malloc.h strfunc.h \ - sql_delete.h sql_insert.h sql_update.h sql_db.h \ - sql_connect.h sql_rename.h sql_time.h sql_tablespace.h \ - hostname.h sql_test.h records.h filesort.h \ - sql_derived.h sql_load.h sql_handler.h init.h \ - derror.h sql_union.h des_key_file.h sql_binlog.h \ - discover.h sql_manager.h sql_do.h \ - sql_repl.h slave.h rpl_filter.h rpl_injector.h \ - log_event.h rpl_record.h sql_const.h \ - log_event_old.h rpl_record_old.h \ - sql_sort.h sql_cache.h set_var.h sys_vars_shared.h \ - spatial.h gstream.h client_settings.h tzfile.h \ - tztime.h my_decimal.h keycaches.h \ - sp_head.h sp_pcontext.h sp_rcontext.h sp.h sp_cache.h \ - parse_file.h sql_view.h sql_trigger.h \ - sql_array.h sql_cursor.h events.h scheduler.h \ - event_db_repository.h event_queue.h \ - sql_plugin.h authors.h event_parse_data.h \ - event_data_objects.h event_scheduler.h \ - sql_partition.h partition_info.h partition_element.h \ - sql_audit.h sql_alter.h sql_partition_admin.h \ - contributors.h sql_servers.h sql_signal.h records.h \ - sql_prepare.h rpl_handler.h replication.h mdl.h \ - sql_plist.h transaction.h sys_vars.h sql_truncate.h \ - sql_admin.h sql_reload.h datadict.h - -mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \ - item.cc item_sum.cc item_buff.cc item_func.cc \ - item_cmpfunc.cc item_strfunc.cc item_timefunc.cc \ - thr_malloc.cc item_create.cc item_subselect.cc \ - item_row.cc item_geofunc.cc item_xmlfunc.cc \ - field.cc strfunc.cc key.cc sql_class.cc sql_list.cc \ - net_serv.cc protocol.cc sql_state.c \ - lock.cc sql_string.cc sql_manager.cc \ - main.cc mysqld.cc password.c hash_filo.cc hostname.cc \ - sql_connect.cc scheduler.cc sql_parse.cc \ - keycaches.cc set_var.cc sql_yacc.yy sys_vars.cc \ - sql_base.cc table.cc sql_select.cc sql_insert.cc \ - sql_reload.cc datadict.cc sql_profile.cc \ - sql_prepare.cc sql_error.cc sql_locale.cc \ - sql_update.cc sql_delete.cc uniques.cc sql_do.cc \ - procedure.cc sql_test.cc sql_admin.cc \ - sql_truncate.cc \ - log.cc init.cc derror.cc sql_acl.cc \ - unireg.cc des_key_file.cc \ - log_event.cc rpl_record.cc \ - log_event_old.cc rpl_record_old.cc \ - discover.cc sql_time.cc opt_range.cc opt_sum.cc \ - records.cc filesort.cc handler.cc \ - ha_partition.cc \ - debug_sync.cc \ - sql_db.cc sql_table.cc sql_rename.cc sql_crypt.cc \ - sql_load.cc mf_iocache.cc field_conv.cc sql_show.cc \ - sql_udf.cc sql_analyse.cc sql_analyse.h sql_cache.cc \ - slave.cc sql_repl.cc rpl_filter.cc rpl_tblmap.cc \ - rpl_utility.cc rpl_injector.cc rpl_rli.cc rpl_mi.cc \ - rpl_reporting.cc \ - sql_union.cc sql_derived.cc \ - sql_client.cc \ - repl_failsafe.h repl_failsafe.cc sql_view.cc \ - gstream.cc spatial.cc sql_help.cc sql_cursor.cc \ - tztime.cc my_decimal.cc\ - sp_head.cc sp_pcontext.cc sp_rcontext.cc sp.cc \ - sp_cache.cc parse_file.cc sql_trigger.cc \ - event_scheduler.cc event_data_objects.cc \ - event_queue.cc event_db_repository.cc events.cc \ - sql_plugin.cc sql_binlog.cc \ - sql_builtin.cc sql_tablespace.cc partition_info.cc \ - sql_servers.cc event_parse_data.cc sql_signal.cc \ - rpl_handler.cc mdl.cc transaction.cc sql_audit.cc \ - sql_alter.cc sql_partition_admin.cc sha2.cc - -nodist_mysqld_SOURCES = mini_client_errors.c pack.c client.c my_time.c my_user.c client_plugin.c - -libndb_la_CPPFLAGS= @ndbcluster_includes@ -libndb_la_SOURCES= ha_ndbcluster.cc \ - ha_ndbcluster_binlog.cc \ - ha_ndbcluster_cond.cc - -gen_lex_hash_SOURCES = gen_lex_hash.cc -gen_lex_hash_LDFLAGS = @NOINST_LDFLAGS@ - -mysql_tzinfo_to_sql_SOURCES = tztime.cc -mysql_tzinfo_to_sql_CXXFLAGS= -DTZINFO2SQL - -DEFS = -DMYSQL_SERVER \ - -DDEFAULT_MYSQL_HOME='"$(MYSQLBASEdir)"' \ - -DMYSQL_DATADIR='"$(MYSQLDATAdir)"' \ - -DSHAREDIR='"$(MYSQLSHAREdir)"' \ - -DPLUGINDIR='"$(pkgplugindir)"' \ - -DHAVE_EVENT_SCHEDULER \ - @DEFS@ - -BUILT_MAINT_SRC = sql_yacc.cc sql_yacc.h -BUILT_SOURCES = $(BUILT_MAINT_SRC) lex_hash.h link_sources -EXTRA_DIST = udf_example.c udf_example.def $(BUILT_MAINT_SRC) \ - nt_servc.cc nt_servc.h \ - message.mc message.h message.rc MSG00001.bin \ - CMakeLists.txt - -CLEANFILES = lex_hash.h sql_yacc.output link_sources -DISTCLEANFILES = $(EXTRA_PROGRAMS) -MAINTAINERCLEANFILES = $(BUILT_MAINT_SRC) -AM_YFLAGS = -d --verbose - -# These are listed in 'nodist_mysqld_SOURCES' -link_sources: - rm -f mini_client_errors.c - @LN_CP_F@ $(top_srcdir)/libmysql/errmsg.c mini_client_errors.c - rm -f pack.c - @LN_CP_F@ $(top_srcdir)/sql-common/pack.c pack.c - rm -f client.c - @LN_CP_F@ $(top_srcdir)/sql-common/client.c client.c - rm -f client_plugin.c - @LN_CP_F@ $(top_srcdir)/sql-common/client_plugin.c client_plugin.c - rm -f my_time.c - @LN_CP_F@ $(top_srcdir)/sql-common/my_time.c my_time.c - rm -f my_user.c - @LN_CP_F@ $(top_srcdir)/sql-common/my_user.c my_user.c - echo timestamp > link_sources - -# This generates lex_hash.h -# NOTE Built sources should depend on their sources not the tool -# this avoid the rebuild of the built files in a source dist -lex_hash.h: gen_lex_hash.cc lex.h - $(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT) - ./gen_lex_hash$(EXEEXT) > $@-t - $(MV) $@-t $@ - -# For testing of udf_example.so -udf_example_la_SOURCES= udf_example.c -udf_example_la_LDFLAGS= -module -rpath $(pkglibdir) - -# We might have some stuff not built in this build, but that we want to install -install-exec-hook: - $(mkinstalldirs) $(DESTDIR)$(libexecdir) $(DESTDIR)$(pkglibdir) - test ! -x mysqld-debug$(EXEEXT) || $(INSTALL_PROGRAM) mysqld-debug$(EXEEXT) $(DESTDIR)$(libexecdir) - test ! -f mysqld-debug.sym.gz || $(INSTALL_DATA) mysqld-debug.sym.gz $(DESTDIR)$(pkglibdir) - test ! -f mysqld.sym.gz || $(INSTALL_DATA) mysqld.sym.gz $(DESTDIR)$(pkglibdir) - -if HAVE_DTRACE_DASH_G -libndb_la_LIBADD = probes_libndb.o -libndb_la_DEPENDENCIES = dtrace_files dtrace_providers probes_libndb.o -mysqld_LDADD += probes_all.o -mysqld_DEPENDENCIES += dtrace_files dtrace_providers probes_all.o -CLEANFILES += dtrace_files dtrace_providers probes_all.o -DTRACEPROVIDER = probes_mysql.d -CLEANFILES += $(DTRACEPROVIDER) - -dtrace_files: - echo $(DTRACEFILES) > $@ -dtrace_providers: probes_mysql.d - echo $(DTRACEPROVIDER) > $@ -probes_mysql.d: - -$(RM) -f probes_mysql.d - $(CP) $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d - -DTRACEDIRS = . ../mysys $(patsubst %,$(top_builddir)/storage/%,@mysql_se_dirs@) - -probes_all.o: probes_mysql.d $(DTRACEFILES_DEPEND) - providers=`(for i in $(DTRACEDIRS); do cat $$i/dtrace_providers 2>/dev/null; done) | tr " " "\n" | sort | uniq | sed -e '/^$$/d' -e 's/^/-s /'`; \ - objects=`for i in $(DTRACEDIRS); do f=\`cat $$i/dtrace_files 2>/dev/null\`; for j in $$f; do test -f $$i/$$j && echo "$$i/$$j "; done; done`; \ - $(DTRACE) $(DTRACEFLAGS) -G $$providers $$objects -o $@ - -# Can't depend directly on .libs/*.o, because there is no generated rule for -# that in the Makefile; it is a byproduct of *.lo -probes_libndb.o: probes_mysql.d libndb_la-ha_ndbcluster.lo - if test -f .libs/libndb_la-ha_ndbcluster.o ; then \ - $(DTRACE) $(DTRACEFLAGS) -G -s probes_mysql.d .libs/libndb_la-ha_ndbcluster.o -o $@; \ - fi; \ - if test -f libndb_la-ha_ndbcluster.o ; then \ - $(DTRACE) $(DTRACEFLAGS) -G -s probes_mysql.d libndb_la-ha_ndbcluster.o -o $@; \ - fi - -endif diff --git a/sql/field.h b/sql/field.h index d854b78f9a3..e3db95260c3 100644 --- a/sql/field.h +++ b/sql/field.h @@ -746,6 +746,17 @@ public: uchar null_bit_arg, utype unireg_check_arg, const char *field_name_arg, CHARSET_INFO *charset); Item_result result_type () const { return STRING_RESULT; } + /* + match_collation_to_optimize_range() is to distinguish in + range optimizer (see opt_range.cc) between real string types: + CHAR, VARCHAR, TEXT + and the other string-alike types with result_type() == STRING_RESULT: + DATE, TIME, DATETIME, TIMESTAMP + We need it to decide whether to test if collation of the operation + matches collation of the field (needed only for real string types). + QQ: shouldn't DATE/TIME types have their own XXX_RESULT types eventually? + */ + virtual bool match_collation_to_optimize_range() const=0; uint decimals() const { return NOT_FIXED_DEC; } int store(double nr); int store(longlong nr, bool unsigned_val)=0; @@ -1227,6 +1238,7 @@ public: unireg_check_arg, field_name_arg, cs) {} enum_field_types type() const { return MYSQL_TYPE_NULL;} + bool match_collation_to_optimize_range() const { return FALSE; } int store(const char *to, uint length, CHARSET_INFO *cs) { null[0]=1; return 0; } int store(double nr) { null[0]=1; return 0; } @@ -1256,6 +1268,7 @@ public: Field_timestamp(bool maybe_null_arg, const char *field_name_arg, CHARSET_INFO *cs); enum_field_types type() const { return MYSQL_TYPE_TIMESTAMP;} + bool match_collation_to_optimize_range() const { return FALSE; } enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; } enum Item_result cmp_type () const { return INT_RESULT; } enum Derivation derivation(void) const { return DERIVATION_NUMERIC; } @@ -1360,6 +1373,7 @@ public: :Field_str((uchar*) 0, MAX_DATE_WIDTH, maybe_null_arg ? (uchar*) "": 0,0, NONE, field_name_arg, cs) { flags|= BINARY_FLAG; } enum_field_types type() const { return MYSQL_TYPE_DATE;} + bool match_collation_to_optimize_range() const { return FALSE; } enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; } enum Item_result cmp_type () const { return INT_RESULT; } enum Derivation derivation(void) const { return DERIVATION_NUMERIC; } @@ -1409,6 +1423,7 @@ public: NONE, field_name_arg, cs) { flags|= BINARY_FLAG; } enum_field_types type() const { return MYSQL_TYPE_DATE;} enum_field_types real_type() const { return MYSQL_TYPE_NEWDATE; } + bool match_collation_to_optimize_range() const { return FALSE; } enum ha_base_keytype key_type() const { return HA_KEYTYPE_UINT24; } enum Item_result cmp_type () const { return INT_RESULT; } enum Derivation derivation(void) const { return DERIVATION_NUMERIC; } @@ -1448,6 +1463,7 @@ public: :Field_str((uchar*) 0,8, maybe_null_arg ? (uchar*) "": 0,0, NONE, field_name_arg, cs) { flags|= BINARY_FLAG; } enum_field_types type() const { return MYSQL_TYPE_TIME;} + bool match_collation_to_optimize_range() const { return FALSE; } enum ha_base_keytype key_type() const { return HA_KEYTYPE_INT24; } enum Item_result cmp_type () const { return INT_RESULT; } enum Derivation derivation(void) const { return DERIVATION_NUMERIC; } @@ -1487,6 +1503,7 @@ public: :Field_str((uchar*) 0, MAX_DATETIME_WIDTH, maybe_null_arg ? (uchar*) "": 0,0, NONE, field_name_arg, cs) { flags|= BINARY_FLAG; } enum_field_types type() const { return MYSQL_TYPE_DATETIME;} + bool match_collation_to_optimize_range() const { return FALSE; } #ifdef HAVE_LONG_LONG enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONGLONG; } #endif @@ -1555,6 +1572,7 @@ public: orig_table->s->frm_version < FRM_VER_TRUE_VARCHAR ? MYSQL_TYPE_VAR_STRING : MYSQL_TYPE_STRING); } + bool match_collation_to_optimize_range() const { return TRUE; } enum ha_base_keytype key_type() const { return binary() ? HA_KEYTYPE_BINARY : HA_KEYTYPE_TEXT; } bool zero_pack() const { return 0; } @@ -1635,6 +1653,7 @@ public: } enum_field_types type() const { return MYSQL_TYPE_VARCHAR; } + bool match_collation_to_optimize_range() const { return TRUE; } enum ha_base_keytype key_type() const; uint row_pack_length() { return field_length; } bool zero_pack() const { return 0; } @@ -1730,6 +1749,7 @@ public: :Field_longstr((uchar*) 0, 0, (uchar*) "", 0, NONE, "temp", system_charset_info), packlength(packlength_arg) {} enum_field_types type() const { return MYSQL_TYPE_BLOB;} + bool match_collation_to_optimize_range() const { return TRUE; } enum ha_base_keytype key_type() const { return binary() ? HA_KEYTYPE_VARBINARY2 : HA_KEYTYPE_VARTEXT2; } int store(const char *to,uint length,CHARSET_INFO *charset); @@ -1879,6 +1899,7 @@ public: { geom_type= geom_type_arg; } enum ha_base_keytype key_type() const { return HA_KEYTYPE_VARBINARY2; } enum_field_types type() const { return MYSQL_TYPE_GEOMETRY; } + bool match_collation_to_optimize_range() const { return FALSE; } void sql_type(String &str) const; int store(const char *to, uint length, CHARSET_INFO *charset); int store(double nr); @@ -1910,6 +1931,7 @@ public: } Field *new_field(MEM_ROOT *root, TABLE *new_table, bool keep_type); enum_field_types type() const { return MYSQL_TYPE_STRING; } + bool match_collation_to_optimize_range() const { return FALSE; } enum Item_result cmp_type () const { return INT_RESULT; } enum Item_result cast_to_int_type () const { return INT_RESULT; } enum ha_base_keytype key_type() const; diff --git a/sql/field_conv.cc b/sql/field_conv.cc index ea6ff82e0aa..20c647ccc00 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -787,11 +787,8 @@ int field_conv(Field *to,Field *from) ((Field_varstring*)from)->length_bytes == ((Field_varstring*)to)->length_bytes)) { // Identical fields -#ifdef HAVE_purify - /* This may happen if one does 'UPDATE ... SET x=x' */ - if (to->ptr != from->ptr) -#endif - memcpy(to->ptr,from->ptr,to->pack_length()); + // to->ptr==from->ptr may happen if one does 'UPDATE ... SET x=x' + memmove(to->ptr, from->ptr, to->pack_length()); return 0; } } diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 3958cbf4387..f4e240e5cc1 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -4425,8 +4425,12 @@ int ha_partition::index_read_idx_map(uchar *buf, uint index, get_partition_set(table, buf, index, &m_start_key, &m_part_spec); - /* How can it be more than one partition with the current use? */ - DBUG_ASSERT(m_part_spec.start_part == m_part_spec.end_part); + /* + We have either found exactly 1 partition + (in which case start_part == end_part) + or no matching partitions (start_part > end_part) + */ + DBUG_ASSERT(m_part_spec.start_part >= m_part_spec.end_part); for (part= m_part_spec.start_part; part <= m_part_spec.end_part; part++) { @@ -4661,6 +4665,7 @@ int ha_partition::partition_scan_set_up(uchar * buf, bool idx_read_flag) key not found. */ DBUG_PRINT("info", ("scan with no partition to scan")); + table->status= STATUS_NOT_FOUND; DBUG_RETURN(HA_ERR_END_OF_FILE); } if (m_part_spec.start_part == m_part_spec.end_part) @@ -4685,6 +4690,7 @@ int ha_partition::partition_scan_set_up(uchar * buf, bool idx_read_flag) if (start_part == MY_BIT_NONE) { DBUG_PRINT("info", ("scan with no partition to scan")); + table->status= STATUS_NOT_FOUND; DBUG_RETURN(HA_ERR_END_OF_FILE); } if (start_part > m_part_spec.start_part) diff --git a/sql/item.cc b/sql/item.cc index 5433693b513..e14c3c95934 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -5527,10 +5527,27 @@ static uint nr_of_decimals(const char *str, const char *end) break; } decimal_point= str; - for (; my_isdigit(system_charset_info, *str) ; str++) + for ( ; str < end && my_isdigit(system_charset_info, *str) ; str++) ; - if (*str == 'e' || *str == 'E') + if (str < end && (*str == 'e' || *str == 'E')) return NOT_FIXED_DEC; + /* + QQ: + The number of decimal digist in fact should be (str - decimal_point - 1). + But it seems the result of nr_of_decimals() is never used! + + In case of 'e' and 'E' nr_of_decimals returns NOT_FIXED_DEC. + In case if there is no 'e' or 'E' parser code in sql_yacc.yy + never calls Item_float::Item_float() - it creates Item_decimal instead. + + The only piece of code where we call Item_float::Item_float(str, len) + without having 'e' or 'E' is item_xmlfunc.cc, but this Item_float + never appears in metadata itself. Changing the code to return + (str - decimal_point - 1) does not make any changes in the test results. + + This should be addressed somehow. + Looks like a reminder from before real DECIMAL times. + */ return (uint) (str - decimal_point); } diff --git a/sql/item_create.cc b/sql/item_create.cc index 672e59986d5..1ae65926013 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -1330,6 +1330,34 @@ protected: }; +#ifndef DBUG_OFF +class Create_func_like_range_min : public Create_func_arg2 +{ +public: + virtual Item *create(THD *thd, Item *arg1, Item *arg2); + + static Create_func_like_range_min s_singleton; + +protected: + Create_func_like_range_min() {} + virtual ~Create_func_like_range_min() {} +}; + + +class Create_func_like_range_max : public Create_func_arg2 +{ +public: + virtual Item *create(THD *thd, Item *arg1, Item *arg2); + + static Create_func_like_range_max s_singleton; + +protected: + Create_func_like_range_max() {} + virtual ~Create_func_like_range_max() {} +}; +#endif + + class Create_func_ln : public Create_func_arg1 { public: @@ -3836,6 +3864,26 @@ Create_func_length::create(THD *thd, Item *arg1) } +#ifndef DBUG_OFF +Create_func_like_range_min Create_func_like_range_min::s_singleton; + +Item* +Create_func_like_range_min::create(THD *thd, Item *arg1, Item *arg2) +{ + return new (thd->mem_root) Item_func_like_range_min(arg1, arg2); +} + + +Create_func_like_range_max Create_func_like_range_max::s_singleton; + +Item* +Create_func_like_range_max::create(THD *thd, Item *arg1, Item *arg2) +{ + return new (thd->mem_root) Item_func_like_range_max(arg1, arg2); +} +#endif + + Create_func_ln Create_func_ln::s_singleton; Item* @@ -4924,6 +4972,10 @@ static Native_func_registry func_array[] = { { C_STRING_WITH_LEN("LCASE") }, BUILDER(Create_func_lcase)}, { { C_STRING_WITH_LEN("LEAST") }, BUILDER(Create_func_least)}, { { C_STRING_WITH_LEN("LENGTH") }, BUILDER(Create_func_length)}, +#ifndef DBUG_OFF + { { C_STRING_WITH_LEN("LIKE_RANGE_MIN") }, BUILDER(Create_func_like_range_min)}, + { { C_STRING_WITH_LEN("LIKE_RANGE_MAX") }, BUILDER(Create_func_like_range_max)}, +#endif { { C_STRING_WITH_LEN("LINEFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)}, { { C_STRING_WITH_LEN("LINEFROMWKB") }, GEOM_BUILDER(Create_func_geometry_from_wkb)}, { { C_STRING_WITH_LEN("LINESTRINGFROMTEXT") }, GEOM_BUILDER(Create_func_geometry_from_text)}, diff --git a/sql/item_func.cc b/sql/item_func.cc index bef0e461a1f..92b80e274f4 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -4331,7 +4331,7 @@ update_hash(user_var_entry *entry, bool set_null, void *ptr, uint length, length--; // Fix length change above entry->value[length]= 0; // Store end \0 } - memcpy(entry->value,ptr,length); + memmove(entry->value, ptr, length); if (type == DECIMAL_RESULT) ((my_decimal*)entry->value)->fix_buffer_pointer(); entry->length= length; @@ -5734,7 +5734,17 @@ void Item_func_match::init_search(bool no_order) /* Check if init_search() has been called before */ if (ft_handler) + { + /* + We should reset ft_handler as it is cleaned up + on destruction of FT_SELECT object + (necessary in case of re-execution of subquery). + TODO: FT_SELECT should not clean up ft_handler. + */ + if (join_key) + table->file->ft_handler= ft_handler; DBUG_VOID_RETURN; + } if (key == NO_SUCH_KEY) { diff --git a/sql/item_func.h b/sql/item_func.h index 15730516c71..63662d97019 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1595,7 +1595,7 @@ public: join_key(0), ft_handler(0), table(0), master(0), concat_ws(0) { } void cleanup() { - DBUG_ENTER("Item_func_match"); + DBUG_ENTER("Item_func_match::cleanup"); Item_real_func::cleanup(); if (!master && ft_handler) ft_handler->please->close_search(ft_handler); diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 89c1e785c71..3c92c829144 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1184,6 +1184,20 @@ String *Item_func_insert::val_str(String *str) if ((length < 0) || (length > res->length())) length= res->length(); + /* + There is one exception not handled (intentionaly) by the character set + aggregation code. If one string is strong side and is binary, and + another one is weak side and is a multi-byte character string, + then we need to operate on the second string in terms on bytes when + calling ::numchars() and ::charpos(), rather than in terms of characters. + Lets substitute its character set to binary. + */ + if (collation.collation == &my_charset_bin) + { + res->set_charset(&my_charset_bin); + res2->set_charset(&my_charset_bin); + } + /* start and length are now sufficiently valid to pass to charpos function */ start= res->charpos((int) start); length= res->charpos((int) length, (uint32) start); @@ -2725,6 +2739,20 @@ String *Item_func_rpad::val_str(String *str) /* Set here so that rest of code sees out-of-bound value as such. */ if ((ulonglong) count > INT_MAX32) count= INT_MAX32; + /* + There is one exception not handled (intentionaly) by the character set + aggregation code. If one string is strong side and is binary, and + another one is weak side and is a multi-byte character string, + then we need to operate on the second string in terms on bytes when + calling ::numchars() and ::charpos(), rather than in terms of characters. + Lets substitute its character set to binary. + */ + if (collation.collation == &my_charset_bin) + { + res->set_charset(&my_charset_bin); + rpad->set_charset(&my_charset_bin); + } + if (count <= (res_char_length= res->numchars())) { // String to pad is big enough res->length(res->charpos((int) count)); // Shorten result if longer @@ -2814,6 +2842,20 @@ String *Item_func_lpad::val_str(String *str) if ((ulonglong) count > INT_MAX32) count= INT_MAX32; + /* + There is one exception not handled (intentionaly) by the character set + aggregation code. If one string is strong side and is binary, and + another one is weak side and is a multi-byte character string, + then we need to operate on the second string in terms on bytes when + calling ::numchars() and ::charpos(), rather than in terms of characters. + Lets substitute its character set to binary. + */ + if (collation.collation == &my_charset_bin) + { + res->set_charset(&my_charset_bin); + pad->set_charset(&my_charset_bin); + } + res_char_length= res->numchars(); if (count <= res_char_length) @@ -3128,6 +3170,41 @@ String *Item_func_unhex::val_str(String *str) } +#ifndef DBUG_OFF +String *Item_func_like_range::val_str(String *str) +{ + DBUG_ASSERT(fixed == 1); + longlong nbytes= args[1]->val_int(); + String *res= args[0]->val_str(str); + size_t min_len, max_len; + CHARSET_INFO *cs= collation.collation; + + if (!res || args[0]->null_value || args[1]->null_value || + nbytes < 0 || nbytes > MAX_BLOB_WIDTH || + min_str.alloc(nbytes) || max_str.alloc(nbytes)) + goto err; + null_value=0; + + if (cs->coll->like_range(cs, res->ptr(), res->length(), + '\\', '_', '%', nbytes, + (char*) min_str.ptr(), (char*) max_str.ptr(), + &min_len, &max_len)) + goto err; + + min_str.set_charset(collation.collation); + max_str.set_charset(collation.collation); + min_str.length(min_len); + max_str.length(max_len); + + return is_min ? &min_str : &max_str; + +err: + null_value= 1; + return 0; +} +#endif + + void Item_func_binary::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("cast(")); diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 5dcef2e671f..d76e139883c 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -657,6 +657,46 @@ public: }; +#ifndef DBUG_OFF +class Item_func_like_range :public Item_str_func +{ +protected: + String min_str; + String max_str; + const bool is_min; +public: + Item_func_like_range(Item *a, Item *b, bool is_min_arg) + :Item_str_func(a, b), is_min(is_min_arg) + { maybe_null= 1; } + String *val_str(String *); + void fix_length_and_dec() + { + collation.set(args[0]->collation); + decimals=0; + max_length= MAX_BLOB_WIDTH; + } +}; + + +class Item_func_like_range_min :public Item_func_like_range +{ +public: + Item_func_like_range_min(Item *a, Item *b) + :Item_func_like_range(a, b, true) { } + const char *func_name() const { return "like_range_min"; } +}; + + +class Item_func_like_range_max :public Item_func_like_range +{ +public: + Item_func_like_range_max(Item *a, Item *b) + :Item_func_like_range(a, b, false) { } + const char *func_name() const { return "like_range_max"; } +}; +#endif + + class Item_func_binary :public Item_str_func { public: diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 5cf585e1a56..c1b1f47e5e9 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -1910,21 +1910,26 @@ int subselect_single_select_engine::exec() DBUG_RETURN(join->error ? join->error : 1); } if (!select_lex->uncacheable && thd->lex->describe && - !(join->select_options & SELECT_DESCRIBE) && - join->need_tmp) + !(join->select_options & SELECT_DESCRIBE)) { item->update_used_tables(); if (item->const_item()) { + /* + It's necessary to keep original JOIN table because + create_sort_index() function may overwrite original + JOIN_TAB::type and wrong optimization method can be + selected on re-execution. + */ + select_lex->uncacheable|= UNCACHEABLE_EXPLAIN; + select_lex->master_unit()->uncacheable|= UNCACHEABLE_EXPLAIN; /* Force join->join_tmp creation, because this subquery will be replaced by a simple select from the materialization temp table by optimize() called by EXPLAIN and we need to preserve the initial query structure so we can display it. */ - select_lex->uncacheable|= UNCACHEABLE_EXPLAIN; - select_lex->master_unit()->uncacheable|= UNCACHEABLE_EXPLAIN; - if (join->init_save_join_tab()) + if (join->need_tmp && join->init_save_join_tab()) DBUG_RETURN(1); /* purecov: inspected */ } } diff --git a/sql/item_sum.cc b/sql/item_sum.cc index b6e5d6d3182..8cd8e1bb222 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -3395,8 +3395,6 @@ String* Item_func_group_concat::val_str(String* str) void Item_func_group_concat::print(String *str, enum_query_type query_type) { - /* orig_args is not filled with valid values until fix_fields() */ - Item **pargs= fixed ? orig_args : args; str->append(STRING_WITH_LEN("group_concat(")); if (distinct) str->append(STRING_WITH_LEN("distinct ")); @@ -3404,7 +3402,7 @@ void Item_func_group_concat::print(String *str, enum_query_type query_type) { if (i) str->append(','); - pargs[i]->print(str, query_type); + orig_args[i]->print(str, query_type); } if (arg_count_order) { @@ -3413,7 +3411,7 @@ void Item_func_group_concat::print(String *str, enum_query_type query_type) { if (i) str->append(','); - pargs[i + arg_count_field]->print(str, query_type); + orig_args[i + arg_count_field]->print(str, query_type); if (order[i]->asc) str->append(STRING_WITH_LEN(" ASC")); else diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 49336b04e16..3771706fb63 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -3465,7 +3465,7 @@ bool Item_func_str_to_date::get_date(MYSQL_TIME *ltime, uint fuzzy_date) return 0; null_date: - if (fuzzy_date & TIME_NO_ZERO_DATE) + if (val && (fuzzy_date & TIME_NO_ZERO_DATE)) { char buff[128]; strmake(buff, val->ptr(), min(val->length(), sizeof(buff)-1)); diff --git a/sql/mdl.h b/sql/mdl.h index ff30746e739..4a9397fe215 100644 --- a/sql/mdl.h +++ b/sql/mdl.h @@ -252,7 +252,7 @@ public: character set is utf-8, we can safely assume that no character starts with a zero byte. */ - return memcmp(m_ptr, rhs->m_ptr, min(m_length, rhs->m_length)+1); + return memcmp(m_ptr, rhs->m_ptr, min(m_length, rhs->m_length)); } MDL_key(const MDL_key *rhs) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 9932fa49ab3..7fec30520d0 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -324,7 +324,8 @@ static PSI_rwlock_key key_rwlock_openssl; /* the default log output is log tables */ static bool lower_case_table_names_used= 0; static bool volatile select_thread_in_use, signal_thread_in_use; -static bool volatile ready_to_exit; +/* See Bug#56666 and Bug#56760 */; +volatile bool ready_to_exit; static my_bool opt_debugging= 0, opt_external_locking= 0, opt_console= 0; static my_bool opt_short_log_format= 0; static uint kill_cached_threads, wake_thread; diff --git a/sql/opt_range.cc b/sql/opt_range.cc index ffff9e3f6c8..2ac860d25e3 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -5796,6 +5796,7 @@ get_mm_leaf(RANGE_OPT_PARAM *param, COND *conf_func, Field *field, */ if (field->result_type() == STRING_RESULT && + ((Field_str*) field)->match_collation_to_optimize_range() && value->result_type() == STRING_RESULT && key_part->image_type == Field::itRAW && ((Field_str*)field)->charset() != conf_func->compare_collation() && diff --git a/sql/opt_range.h b/sql/opt_range.h index 33b3d561ad8..6da4d1c2776 100644 --- a/sql/opt_range.h +++ b/sql/opt_range.h @@ -279,6 +279,7 @@ public: virtual bool reverse_sorted() = 0; virtual bool unique_key_range() { return false; } + virtual bool clustered_pk_range() { return false; } enum { QS_TYPE_RANGE = 0, @@ -553,6 +554,8 @@ public: THD *thd; int read_keys_and_merge(); + bool clustered_pk_range() { return test(pk_quick_select); } + /* used to get rows collected in Unique */ READ_RECORD read_record; }; diff --git a/sql/records.cc b/sql/records.cc index ccacdc33b36..d713c34dffe 100644 --- a/sql/records.cc +++ b/sql/records.cc @@ -206,6 +206,15 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table, if (select && my_b_inited(&select->file)) tempfile= &select->file; + else if (select && select->quick && select->quick->clustered_pk_range()) + { + /* + In case of QUICK_INDEX_MERGE_SELECT with clustered pk range we have to + use its own access method(i.e QUICK_INDEX_MERGE_SELECT::get_next()) as + sort file does not contain rowids which satisfy clustered pk range. + */ + tempfile= 0; + } else tempfile= table->sort.io_cache; if (tempfile && my_b_inited(tempfile)) // Test if ref-records was used diff --git a/sql/share/Makefile.am b/sql/share/Makefile.am deleted file mode 100644 index 73f2ca13bb6..00000000000 --- a/sql/share/Makefile.am +++ /dev/null @@ -1,60 +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 - -## Process this file with automake to create Makefile.in - -EXTRA_DIST= errmsg-utf8.txt \ - CMakeLists.txt - -dist-hook: - for dir in charsets @AVAILABLE_LANGUAGES@; do \ - test -d $(distdir)/$$dir || mkdir $(distdir)/$$dir; \ - $(INSTALL_DATA) $(srcdir)/$$dir/*.* $(distdir)/$$dir; \ - done; \ - sleep 1 ; touch $(srcdir)/*/errmsg.sys - $(INSTALL_DATA) $(srcdir)/charsets/README $(distdir)/charsets - $(INSTALL_DATA) $(srcdir)/charsets/Index.xml $(distdir)/charsets - -all-local: english/errmsg.sys - -# Use the english errmsg.sys as a flag that all errmsg.sys needs to be -# created. Normally these are created by extra/Makefile - -english/errmsg.sys: errmsg-utf8.txt - rm -f $(top_builddir)/include/mysqld_error.h - (cd $(top_builddir)/extra && $(MAKE)) - -install-data-local: - for lang in @AVAILABLE_LANGUAGES@; \ - do \ - $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/$$lang; \ - $(INSTALL_DATA) $(srcdir)/$$lang/errmsg.sys \ - $(DESTDIR)$(pkgdatadir)/$$lang/errmsg.sys; \ - done - $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/charsets - $(INSTALL_DATA) $(srcdir)/errmsg-utf8.txt \ - $(DESTDIR)$(pkgdatadir)/errmsg-utf8.txt; \ - $(INSTALL_DATA) $(srcdir)/charsets/README $(DESTDIR)$(pkgdatadir)/charsets/README - $(INSTALL_DATA) $(srcdir)/charsets/*.xml $(DESTDIR)$(pkgdatadir)/charsets - -# FIXME maybe shouldn't remove, could be needed by other installation? -uninstall-local: - @RM@ -f -r $(DESTDIR)$(pkgdatadir) - -distclean-local: - @RM@ -f */errmsg.sys - -# Do nothing -link_sources: diff --git a/sql/share/charsets/cp1251.xml b/sql/share/charsets/cp1251.xml index b80db9f8ec0..06ba8a5a4b9 100644 --- a/sql/share/charsets/cp1251.xml +++ b/sql/share/charsets/cp1251.xml @@ -98,7 +98,7 @@ 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005A 005B 005C 005D 005E 005F 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006A 006B 006C 006D 006E 006F 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007A 007B 007C 007D 007E 007F - 0402 0403 201A 0453 201E 2026 2020 2021 0000 2030 0409 2039 040A 040C 040B 040F + 0402 0403 201A 0453 201E 2026 2020 2021 20AC 2030 0409 2039 040A 040C 040B 040F 0452 2018 2019 201C 201D 2022 2013 2014 0000 2122 0459 203A 045A 045C 045B 045F 00A0 040E 045E 0408 00A4 0490 00A6 00A7 0401 00A9 0404 00AB 00AC 00AD 00AE 0407 00B0 00B1 0406 0456 0491 00B5 00B6 00B7 0451 2116 0454 00BB 0458 0405 0455 0457 diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index abd8f50cb9f..5ac31d1f578 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -339,7 +339,7 @@ public: (hostname_requires_resolving(host.hostname) || hostname_requires_resolving(proxied_host.hostname))) { - sql_print_warning("'proxes_priv' entry '%s@%s %s@%s' " + sql_print_warning("'proxies_priv' entry '%s@%s %s@%s' " "ignored in --skip-name-resolve mode.", proxied_user ? proxied_user : "", proxied_host.hostname ? proxied_host.hostname : "", @@ -1029,24 +1029,35 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables) end_read_record(&read_record_info); freeze_size(&acl_dbs); - init_read_record(&read_record_info, thd, table= tables[3].table, NULL, 1, - 0, FALSE); - table->use_all_columns(); (void) my_init_dynamic_array(&acl_proxy_users, sizeof(ACL_PROXY_USER), 50, 100); - while (!(read_record_info.read_record(&read_record_info))) + if (tables[3].table) { - ACL_PROXY_USER proxy; - proxy.init(table, &mem); - if (proxy.check_validity(check_no_resolve)) - continue; - if (push_dynamic(&acl_proxy_users, (uchar*) &proxy)) - return TRUE; + init_read_record(&read_record_info, thd, table= tables[3].table, NULL, 1, + 0, FALSE); + table->use_all_columns(); + while (!(read_record_info.read_record(&read_record_info))) + { + ACL_PROXY_USER proxy; + proxy.init(table, &mem); + if (proxy.check_validity(check_no_resolve)) + continue; + if (push_dynamic(&acl_proxy_users, (uchar*) &proxy)) + { + end_read_record(&read_record_info); + goto end; + } + } + my_qsort((uchar*) dynamic_element(&acl_proxy_users, 0, ACL_PROXY_USER*), + acl_proxy_users.elements, + sizeof(ACL_PROXY_USER), (qsort_cmp) acl_compare); + end_read_record(&read_record_info); + } + else + { + sql_print_error("Missing system table mysql.proxies_priv; " + "please run mysql_upgrade to create it"); } - my_qsort((uchar*) dynamic_element(&acl_proxy_users, 0, ACL_PROXY_USER*), - acl_proxy_users.elements, - sizeof(ACL_PROXY_USER), (qsort_cmp) acl_compare); - end_read_record(&read_record_info); freeze_size(&acl_proxy_users); init_check_host(); @@ -1127,6 +1138,7 @@ my_bool acl_reload(THD *thd) tables[2].next_local= tables[2].next_global= tables + 3; tables[0].open_type= tables[1].open_type= tables[2].open_type= tables[3].open_type= OT_BASE_ONLY; + tables[3].open_strategy= TABLE_LIST::OPEN_IF_EXISTS; if (open_and_lock_tables(thd, tables, FALSE, MYSQL_LOCK_IGNORE_TIMEOUT)) { @@ -5703,6 +5715,8 @@ int open_grant_tables(THD *thd, TABLE_LIST *tables) (tables+5)->init_one_table(C_STRING_WITH_LEN("mysql"), C_STRING_WITH_LEN("proxies_priv"), "proxies_priv", TL_WRITE); + tables[5].open_strategy= TABLE_LIST::OPEN_IF_EXISTS; + tables->next_local= tables->next_global= tables + 1; (tables+1)->next_local= (tables+1)->next_global= tables + 2; (tables+2)->next_local= (tables+2)->next_global= tables + 3; @@ -6295,17 +6309,20 @@ static int handle_grant_data(TABLE_LIST *tables, bool drop, } /* Handle proxies_priv table. */ - if ((found= handle_grant_table(tables, 5, drop, user_from, user_to)) < 0) + if (tables[5].table) { - /* Handle of table failed, don't touch the in-memory array. */ - result= -1; - } - else - { - /* Handle proxies_priv array. */ - if ((handle_grant_struct(5, drop, user_from, user_to) && !result) || - found) - result= 1; /* At least one record/element found. */ + if ((found= handle_grant_table(tables, 5, drop, user_from, user_to)) < 0) + { + /* Handle of table failed, don't touch the in-memory array. */ + result= -1; + } + else + { + /* Handle proxies_priv array. */ + if ((handle_grant_struct(5, drop, user_from, user_to) && !result) || + found) + result= 1; /* At least one record/element found. */ + } } end: DBUG_RETURN(result); diff --git a/sql/sql_binlog.cc b/sql/sql_binlog.cc index 6f59c3f51e1..503d830a10e 100644 --- a/sql/sql_binlog.cc +++ b/sql/sql_binlog.cc @@ -60,6 +60,13 @@ void mysql_client_binlog_statement(THD* thd) } size_t decoded_len= base64_needed_decoded_length(coded_len); + /* + option_bits will be changed when applying the event. But we don't expect + it be changed permanently after BINLOG statement, so backup it first. + It will be restored at the end of this function. + */ + ulonglong thd_options= thd->variables.option_bits; + /* Allocation */ @@ -246,6 +253,7 @@ void mysql_client_binlog_statement(THD* thd) my_ok(thd); end: + thd->variables.option_bits= thd_options; rli->slave_close_thread_tables(thd); my_free(buf); DBUG_VOID_RETURN; diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index bd2aa70806a..0b463ff1202 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -420,8 +420,7 @@ void prepare_triggers_for_insert_stmt(TABLE *table) static void upgrade_lock_type(THD *thd, thr_lock_type *lock_type, - enum_duplicates duplic, - bool is_multi_insert) + enum_duplicates duplic) { if (duplic == DUP_UPDATE || (duplic == DUP_REPLACE && *lock_type == TL_WRITE_CONCURRENT_INSERT)) @@ -470,10 +469,9 @@ void upgrade_lock_type(THD *thd, thr_lock_type *lock_type, return; } - bool log_on= (thd->variables.option_bits & OPTION_BIN_LOG || - ! (thd->security_ctx->master_access & SUPER_ACL)); + bool log_on= (thd->variables.option_bits & OPTION_BIN_LOG); if (global_system_variables.binlog_format == BINLOG_FORMAT_STMT && - log_on && mysql_bin_log.is_open() && is_multi_insert) + log_on && mysql_bin_log.is_open()) { /* Statement-based binary logging does not work in this case, because: @@ -677,8 +675,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, By default, both logs are enabled (this won't cause problems if the server runs without --log-bin). */ - bool log_on= ((thd->variables.option_bits & OPTION_BIN_LOG) || - (!(thd->security_ctx->master_access & SUPER_ACL))); + bool log_on= (thd->variables.option_bits & OPTION_BIN_LOG); #endif thr_lock_type lock_type; Item *unused_conds= 0; @@ -688,8 +685,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, Upgrade lock type if the requested lock is incompatible with the current connection mode or table operation. */ - upgrade_lock_type(thd, &table_list->lock_type, duplic, - values_list.elements > 1); + upgrade_lock_type(thd, &table_list->lock_type, duplic); /* We can't write-delayed into a table locked with LOCK TABLES: @@ -1022,7 +1018,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, DBUG_ASSERT(thd->killed != THD::KILL_BAD_DATA || error > 0); if (was_insert_delayed && table_list->lock_type == TL_WRITE) { - /* Binlog multi INSERT DELAYED as INSERT without DELAYED. */ + /* Binlog INSERT DELAYED as INSERT without DELAYED. */ String log_query; if (create_insert_stmt_from_insert_delayed(thd, &log_query)) { @@ -1905,22 +1901,6 @@ public: thd.command=COM_DELAYED_INSERT; thd.lex->current_select= 0; // for my_message_sql thd.lex->sql_command= SQLCOM_INSERT; // For innodb::store_lock() - /* - Statement-based replication of INSERT DELAYED has problems with - RAND() and user variables, so in mixed mode we go to row-based. - For normal commands, the unsafe flag is set at parse time. - However, since the flag is a member of the THD object, of which - the delayed_insert thread has its own copy, we must set the - statement to unsafe here and explicitly set row logging mode. - - @todo set_current_stmt_binlog_format_row_if_mixed should not be - called by anything else than thd->decide_logging_format(). When - we call set_current_blah here, none of the checks in - decide_logging_format is made. We should probably call - thd->decide_logging_format() directly instead. /Sven - */ - thd.lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_INSERT_DELAYED); - thd.set_current_stmt_binlog_format_row_if_mixed(); /* Prevent changes to global.lock_wait_timeout from affecting delayed insert threads as any timeouts in delayed inserts @@ -2650,11 +2630,11 @@ pthread_handler_t handle_delayed_insert(void *arg) } thd->lex->sql_command= SQLCOM_INSERT; // For innodb::store_lock() + /* - Statement-based replication of INSERT DELAYED has problems with RAND() - and user vars, so in mixed mode we go to row-based. + INSERT DELAYED has to go to row-based format because the time + at which rows are inserted cannot be determined in mixed mode. */ - thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_INSERT_DELAYED); thd->set_current_stmt_binlog_format_row_if_mixed(); /* @@ -2921,6 +2901,13 @@ bool Delayed_insert::handle_inserts(void) (ulong) row->query.length)); if (log_query) { + /* + Guaranteed that the INSERT DELAYED STMT will not be here + in SBR when mysql binlog is enabled. + */ + DBUG_ASSERT(!(mysql_bin_log.is_open() && + !thd.is_current_stmt_binlog_format_row())); + /* This is the first value of an INSERT statement. It is the right place to clear a forced insert_id. @@ -2988,39 +2975,6 @@ bool Delayed_insert::handle_inserts(void) table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE); } - if (log_query && mysql_bin_log.is_open()) - { - bool backup_time_zone_used = thd.time_zone_used; - Time_zone *backup_time_zone = thd.variables.time_zone; - if (row->time_zone != NULL) - { - thd.time_zone_used = true; - thd.variables.time_zone = row->time_zone; - } - - /* if the delayed insert was killed, the killed status is - ignored while binlogging */ - int errcode= 0; - if (thd.killed == THD::NOT_KILLED) - errcode= query_error_code(&thd, TRUE); - - /* - If the query has several rows to insert, only the first row will come - here. In row-based binlogging, this means that the first row will be - written to binlog as one Table_map event and one Rows event (due to an - event flush done in binlog_query()), then all other rows of this query - will be binlogged together as one single Table_map event and one - single Rows event. - */ - if (thd.binlog_query(THD::ROW_QUERY_TYPE, - row->query.str, row->query.length, - FALSE, FALSE, FALSE, errcode)) - goto err; - - thd.time_zone_used = backup_time_zone_used; - thd.variables.time_zone = backup_time_zone; - } - if (table->s->blob_fields) free_delayed_insert_blobs(table); thread_safe_decrement(delayed_rows_in_use,&LOCK_delayed_status); diff --git a/sql/sql_priv.h b/sql/sql_priv.h index f0f6a1969f5..4e1dac269b7 100644 --- a/sql/sql_priv.h +++ b/sql/sql_priv.h @@ -144,6 +144,12 @@ */ #define OPTION_MASTER_SQL_ERROR (1ULL << 35) +/* + Dont report errors for individual rows, + But just report error on commit (or read ofcourse) + Note! Reserved for use in MySQL Cluster +*/ +#define OPTION_ALLOW_BATCH (ULL(1) << 36) // THD, intern (slave) /* The rest of the file is included in the server only */ #ifndef MYSQL_CLIENT diff --git a/sql/sql_select.cc b/sql/sql_select.cc index e9373bc455f..ef2dd1d76e1 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1756,6 +1756,9 @@ JOIN::reinit() func->clear(); } + if (!(select_options & SELECT_DESCRIBE)) + init_ftfuncs(thd, select_lex, test(order)); + DBUG_RETURN(0); } @@ -2513,6 +2516,13 @@ mysql_select(THD *thd, Item ***rref_pointer_array, { DBUG_RETURN(TRUE); } + /* + Original join tabs might be overwritten at first + subselect execution. So we need to restore them. + */ + Item_subselect *subselect= select_lex->master_unit()->item; + if (subselect && subselect->is_uncacheable() && join->reinit()) + DBUG_RETURN(TRUE); } else { @@ -4050,8 +4060,12 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab, continue; } -#ifdef HAVE_purify - /* Valgrind complains about overlapped memcpy when save_pos==use. */ +#if defined(__GNUC__) && !MY_GNUC_PREREQ(4,4) + /* + Old gcc used a memcpy(), which is undefined if save_pos==use: + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19410 + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39480 + */ if (save_pos != use) #endif *save_pos= *use; @@ -13431,6 +13445,8 @@ static bool list_contains_unique_index(TABLE *table, bool (*find_func) (Field *, void *), void *data) { + if (table->pos_in_table_list->outer_join) + return 0; for (uint keynr= 0; keynr < table->s->keys; keynr++) { if (keynr == table->s->primary_key || @@ -13444,7 +13460,7 @@ list_contains_unique_index(TABLE *table, key_part < key_part_end; key_part++) { - if (key_part->field->maybe_null() || + if (key_part->field->real_maybe_null() || !find_func(key_part->field, data)) break; } diff --git a/sql/sql_show.cc b/sql/sql_show.cc index ec147a99553..f8853611b39 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -596,11 +596,11 @@ public: return m_view_access_denied_message_ptr; } - bool handle_condition(THD *thd, uint sql_errno, const char */* sqlstate */, + bool handle_condition(THD *thd, uint sql_errno, const char * /* sqlstate */, MYSQL_ERROR::enum_warning_level level, - const char *message, MYSQL_ERROR **/* cond_hdl */) + const char *message, MYSQL_ERROR ** /* cond_hdl */) { - /* + /* The handler does not handle the errors raised by itself. At this point we know if top_view is really a view. */ @@ -610,7 +610,7 @@ public: m_handling= TRUE; bool is_handled; - + switch (sql_errno) { case ER_TABLEACCESS_DENIED_ERROR: diff --git a/storage/Makefile.am b/storage/Makefile.am deleted file mode 100644 index a188d8967be..00000000000 --- a/storage/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2005-2006 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU 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 - -# Process this file with automake to create Makefile.in - -AUTOMAKE_OPTIONS = foreign - -# These are built from source in the Docs directory -SUBDIRS = @mysql_se_dirs@ -DIST_SUBDIRS = @mysql_se_distdirs@ diff --git a/storage/archive/Makefile.am b/storage/archive/Makefile.am deleted file mode 100644 index 8b08105cef3..00000000000 --- a/storage/archive/Makefile.am +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright (C) 2005-2006 MySQL AB -# Copyright (C) 2009 SUN Microsystems -# -# 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 - -#called from the top level Makefile - -MYSQLDATAdir = $(localstatedir) -MYSQLSHAREdir = $(pkgdatadir) -MYSQLBASEdir= $(prefix) -MYSQLLIBdir= $(pkglibdir) -pkgplugindir = $(pkglibdir)/plugin -INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ - -I$(top_srcdir)/regex \ - -I$(top_srcdir)/sql \ - -I$(srcdir) @ZLIB_INCLUDES@ -WRAPLIBS= - -LDADD = - -DEFS = @DEFS@ - -noinst_HEADERS = ha_archive.h azlib.h -noinst_PROGRAMS = archive_test archive_reader - -EXTRA_LTLIBRARIES = ha_archive.la -pkgplugin_LTLIBRARIES = @plugin_archive_shared_target@ -ha_archive_la_LDFLAGS = -module -rpath $(pkgplugindir) -ha_archive_la_CXXFLAGS= $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN -ha_archive_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN -ha_archive_la_SOURCES = ha_archive.cc azio.c - - -EXTRA_LIBRARIES = libarchive.a -noinst_LIBRARIES = @plugin_archive_static_target@ -libarchive_a_CXXFLAGS = $(AM_CXXFLAGS) -libarchive_a_CFLAGS = $(AM_CFLAGS) -libarchive_a_SOURCES = ha_archive.cc azio.c - - -archive_test_SOURCES = archive_test.c azio.c -archive_test_CFLAGS = $(AM_CFLAGS) -archive_test_LDADD = $(top_builddir)/mysys/libmysys.a \ - $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/strings/libmystrings.a \ - @ZLIB_LIBS@ -archive_test_LDFLAGS = @NOINST_LDFLAGS@ - -archive_reader_SOURCES = archive_reader.c azio.c -archive_reader_CFLAGS = $(AM_CFLAGS) -archive_reader_LDADD = $(top_builddir)/mysys/libmysys.a \ - $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/strings/libmystrings.a \ - @ZLIB_LIBS@ -archive_reader_LDFLAGS = @NOINST_LDFLAGS@ - - -EXTRA_DIST = CMakeLists.txt plug.in - -if HAVE_DTRACE_DASH_G -# The object for static and dynamic linking of archive differ -# For static linkage of archive to mysqld - -libarchive_a_LIBADD = probes_mysql.o -libarchive_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers -# For archive as shared library -ha_archive_la_LIBADD = probes_sh_mysql.o -# Hack: We "depend" on ".libs/" but have no rule for it, -# but it is created as a byproduct of the ".lo" -DTRACESHAREDDEPS = ha_archive_la-ha_archive.lo -DTRACESHAREDFILES = ha_archive_la-ha_archive.o -DTRACEPROVIDER = probes_mysql.d -ha_archive_la_DEPENDENCIES = probes_sh_mysql.o $(DTRACESHAREDDEPS) dtrace_providers - -CLEANFILES = $(DTRACEPROVIDER) dtrace_files dtrace_providers $(DTRACESHAREDFILES) -DTRACEFILES = libarchive_a-ha_archive.o - -dtrace_files: - echo $(DTRACEFILES) > $@ -dtrace_providers: probes_mysql.d - echo $(DTRACEPROVIDER) > $@ -probes_mysql.d: - -$(RM) -f probes_mysql.d - $(CP) $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d - echo timestamp > dtrace_sources - -probes_sh_mysql.o: $(DTRACEPROVIDER) $(DTRACESHAREDDEPS) - $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACESHAREDFILES) -o $@ - $(CP) $(DTRACESHAREDFILES) .libs -probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) - $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ - -endif diff --git a/storage/archive/plug.in b/storage/archive/plug.in deleted file mode 100644 index 52131b12e6b..00000000000 --- a/storage/archive/plug.in +++ /dev/null @@ -1,4 +0,0 @@ -MYSQL_STORAGE_ENGINE(archive,, [Archive Storage Engine], - [Archive Storage Engine], [max,max-no-ndb]) -MYSQL_PLUGIN_STATIC(archive, [libarchive.a]) -MYSQL_PLUGIN_DYNAMIC(archive, [ha_archive.la]) diff --git a/storage/blackhole/Makefile.am b/storage/blackhole/Makefile.am deleted file mode 100644 index 38c2f354844..00000000000 --- a/storage/blackhole/Makefile.am +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright (C) 2005-2006 MySQL AB, 2009 Sun Microsystems, Inc. -# 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 - -#called from the top level Makefile - -MYSQLDATAdir = $(localstatedir) -MYSQLSHAREdir = $(pkgdatadir) -MYSQLBASEdir= $(prefix) -MYSQLLIBdir= $(pkglibdir) -pkgplugindir = $(pkglibdir)/plugin -INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ - -I$(top_srcdir)/regex \ - -I$(top_srcdir)/sql \ - -I$(srcdir) -WRAPLIBS= - -LDADD = - -DEFS = @DEFS@ - -noinst_HEADERS = ha_blackhole.h - -EXTRA_LTLIBRARIES = ha_blackhole.la -pkgplugin_LTLIBRARIES = @plugin_blackhole_shared_target@ -ha_blackhole_la_LDFLAGS=-module -rpath $(pkgplugindir) -ha_blackhole_la_CXXFLAGS=$(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN -ha_blackhole_la_CFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN -ha_blackhole_la_SOURCES=ha_blackhole.cc - - -EXTRA_LIBRARIES = libblackhole.a -noinst_LIBRARIES = @plugin_blackhole_static_target@ -libblackhole_a_CXXFLAGS=$(AM_CXXFLAGS) -libblackhole_a_CFLAGS = $(AM_CFLAGS) -libblackhole_a_SOURCES= ha_blackhole.cc - - -EXTRA_DIST = CMakeLists.txt plug.in - -if HAVE_DTRACE_DASH_G -# The object for static and dynamic linking of blackhole differ -# For static linkage of blackhole to mysqld - -libblackhole_a_LIBADD = probes_mysql.o -libblackhole_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers -# For blackhole as shared library -ha_blackhole_la_LIBADD = probes_sh_mysql.o -# Hack: We "depend" on ".libs/" but have no rule for it, -# but it is created as a byproduct of the ".lo" -DTRACESHAREDDEPS = ha_blackhole_la-ha_blackhole.lo -DTRACESHAREDFILES = ha_blackhole_la-ha_blackhole.o -DTRACEPROVIDER = probes_mysql.d -ha_blackhole_la_DEPENDENCIES = probes_sh_mysql.o $(DTRACESHAREDDEPS) dtrace_providers - -CLEANFILES = $(DTRACEPROVIDERS) dtrace_files dtrace_providers $(DTRACESHAREDDEPS) -DTRACEFILES = libblackhole_a-ha_blackhole.o - -dtrace_files: - echo $(DTRACEFILES) > $@ -dtrace_providers: probes_mysql.d - echo $(DTRACEPROVIDER) > $@ -probes_mysql.d: - -$(RM) -f probes_mysql.d - $(CP) $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d - echo timestamp > dtrace_sources - -probes_sh_mysql.o: $(DTRACEPROVIDER) $(DTRACESHAREDDEPS) - $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACESHAREDFILES) -o $@ - $(CP) $(DTRACESHAREDFILES) .libs -probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) - $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ - -endif diff --git a/storage/blackhole/plug.in b/storage/blackhole/plug.in deleted file mode 100644 index 725db0facba..00000000000 --- a/storage/blackhole/plug.in +++ /dev/null @@ -1,6 +0,0 @@ -MYSQL_STORAGE_ENGINE(blackhole,,[Blackhole Storage Engine], - [Basic Write-only Read-never tables], [max,max-no-ndb]) -MYSQL_PLUGIN_DIRECTORY(blackhole, [storage/blackhole]) -MYSQL_PLUGIN_STATIC(blackhole, [libblackhole.a]) -MYSQL_PLUGIN_DYNAMIC(blackhole, [ha_blackhole.la]) - diff --git a/storage/csv/Makefile.am b/storage/csv/Makefile.am deleted file mode 100644 index 5e3587c893f..00000000000 --- a/storage/csv/Makefile.am +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright (C) 2005-2006 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU 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 - -#called from the top level Makefile - -MYSQLDATAdir = $(localstatedir) -MYSQLSHAREdir = $(pkgdatadir) -MYSQLBASEdir= $(prefix) -MYSQLLIBdir= $(pkglibdir) -INCLUDES = -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/regex \ - -I$(top_srcdir)/sql \ - -I$(srcdir) -LDADD = - -DEFS = @DEFS@ -noinst_HEADERS = ha_tina.h transparent_file.h - -EXTRA_LTLIBRARIES = ha_csv.la -pkglib_LTLIBRARIES = @plugin_csv_shared_target@ -ha_csv_la_LDFLAGS = -module -rpath $(MYSQLLIBdir) -ha_csv_la_CXXFLAGS = $(AM_CXXFLAGS) -DMYSQL_PLUGIN -ha_csv_la_SOURCES = transparent_file.cc ha_tina.cc - -EXTRA_LIBRARIES = libcsv.a -noinst_LIBRARIES = @plugin_csv_static_target@ -libcsv_a_CXXFLAGS = $(AM_CXXFLAGS) -libcsv_a_SOURCES = transparent_file.cc ha_tina.cc - -EXTRA_DIST = CMakeLists.txt plug.in - -if HAVE_DTRACE_DASH_G -libcsv_a_LIBADD = probes_mysql.o -libcsv_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers -CLEANFILES = probes_mysql.o dtrace_files dtrace_providers -DTRACEFILES = libcsv_a-ha_tina.o -DTRACEPROVIDER = probes_mysql.d -CLEANFILES += $(DTRACEPROVIDER) dtrace_sources - -dtrace_files: - echo $(DTRACEFILES) > $@ -dtrace_providers: probes_mysql.d - echo $(DTRACEPROVIDER) > $@ -probes_mysql.d: - -$(RM) -f probes_mysql.d - $(CP) $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d - echo timestamp > dtrace_sources - -probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) - $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ -endif diff --git a/storage/csv/plug.in b/storage/csv/plug.in deleted file mode 100644 index bbc69680fcd..00000000000 --- a/storage/csv/plug.in +++ /dev/null @@ -1,5 +0,0 @@ -MYSQL_STORAGE_ENGINE(csv,, [CSV Storage Engine], - [Stores tables in text CSV format]) -MYSQL_PLUGIN_DIRECTORY(csv, [storage/csv]) -MYSQL_PLUGIN_STATIC(csv, [libcsv.a]) -MYSQL_PLUGIN_MANDATORY(csv) dnl Used for logging diff --git a/storage/example/Makefile.am b/storage/example/Makefile.am deleted file mode 100644 index c79fbe97cc3..00000000000 --- a/storage/example/Makefile.am +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright (C) 2005-2006 MySQL AB, 2009 Sun Microsystems, Inc. -# 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 - -#called from the top level Makefile - -MYSQLDATAdir = $(localstatedir) -MYSQLSHAREdir = $(pkgdatadir) -MYSQLBASEdir= $(prefix) -MYSQLLIBdir= $(pkglibdir) -pkgplugindir = $(pkglibdir)/plugin -INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ - -I$(top_srcdir)/regex \ - -I$(top_srcdir)/sql \ - -I$(srcdir) -WRAPLIBS= - -LDADD = - -DEFS = @DEFS@ - -noinst_HEADERS = ha_example.h - -EXTRA_LTLIBRARIES = ha_example.la -pkgplugin_LTLIBRARIES = @plugin_example_shared_target@ -ha_example_la_LDFLAGS = -module -rpath $(pkgplugindir) -L$(top_builddir)/libservices -lmysqlservices -ha_example_la_CXXFLAGS= $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN -ha_example_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN -ha_example_la_SOURCES = ha_example.cc - - -EXTRA_LIBRARIES = libexample.a -noinst_LIBRARIES = @plugin_example_static_target@ -libexample_a_CXXFLAGS = $(AM_CXXFLAGS) -libexample_a_CFLAGS = $(AM_CFLAGS) -libexample_a_SOURCES= ha_example.cc - - -EXTRA_DIST = CMakeLists.txt plug.in - -if HAVE_DTRACE_DASH_G -# The object for static and dynamic linking of example differ -# For static linkage of example to mysqld -# That's actually not needed as example is only dynamic loadable, but for completion -libexample_a_LIBADD = probes_mysql.o -libexample_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers -# For example as shared library -ha_example_la_LIBADD = probes_sh_mysql.o -# Hack: We "depend" on ".libs/" but have no rule for it, -# but it is created as a byproduct of the ".lo" -DTRACESHAREDDEPS = ha_example_la-ha_example.lo -DTRACESHAREDFILES = ha_example_la-ha_example.o -DTRACEPROVIDER = probes_mysql.d -ha_example_la_DEPENDENCIES = probes_sh_mysql.o $(DTRACESHAREDDEPS) dtrace_providers - -CLEANFILES = $(DTRACEPROVIDER) dtrace_files dtrace_providers $(DTRACESHAREDFILES) -DTRACEFILES = libexample_a-ha_example.o - -dtrace_files: - echo $(DTRACEFILES) > $@ -dtrace_providers: probes_mysql.d - echo $(DTRACEPROVIDER) > $@ -probes_mysql.d: - -$(RM) -f probes_mysql.d - $(CP) $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d - echo timestamp > dtrace_sources - -probes_sh_mysql.o: $(DTRACEPROVIDER) $(DTRACESHAREDDEPS) - $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACESHAREDFILES) -o $@ - $(CP) $(DTRACESHAREDFILES) .libs -probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) - $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ - -endif diff --git a/storage/example/plug.in b/storage/example/plug.in deleted file mode 100644 index ee6beaac64f..00000000000 --- a/storage/example/plug.in +++ /dev/null @@ -1,3 +0,0 @@ -MYSQL_STORAGE_ENGINE(example,, [Example Storage Engine], - [Example for Storage Engines for developers], [max,max-no-ndb]) -MYSQL_PLUGIN_DYNAMIC(example, [ha_example.la]) diff --git a/storage/federated/Makefile.am b/storage/federated/Makefile.am deleted file mode 100644 index e07b0d95b97..00000000000 --- a/storage/federated/Makefile.am +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright (C) 2005-2006 MySQL AB, 2009 Sun Microsystems, Inc. -# 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 - -#called from the top level Makefile - -MYSQLDATAdir = $(localstatedir) -MYSQLSHAREdir = $(pkgdatadir) -MYSQLBASEdir= $(prefix) -MYSQLLIBdir= $(pkglibdir) -pkgplugindir = $(pkglibdir)/plugin -INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ - -I$(top_srcdir)/regex \ - -I$(top_srcdir)/sql \ - -I$(srcdir) - -WRAPLIBS= - -LDADD = - -DEFS = @DEFS@ - -noinst_HEADERS = ha_federated.h - -EXTRA_LTLIBRARIES = ha_federated.la -pkgplugin_LTLIBRARIES = @plugin_federated_shared_target@ -ha_federated_la_LDFLAGS = -module -rpath $(pkgplugindir) -ha_federated_la_CXXFLAGS= $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN -ha_federated_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN -ha_federated_la_SOURCES = ha_federated.cc - - -EXTRA_LIBRARIES = libfederated.a -noinst_LIBRARIES = @plugin_federated_static_target@ -libfederated_a_CXXFLAGS = $(AM_CXXFLAGS) -libfederated_a_CFLAGS = $(AM_CFLAGS) -libfederated_a_SOURCES= ha_federated.cc - - -EXTRA_DIST = CMakeLists.txt plug.in - -if HAVE_DTRACE_DASH_G -# The object for static and dynamic linking of federated differ -# For static linkage of federated to mysqld - -libfederated_a_LIBADD = probes_mysql.o -libfederated_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers -# For federated as shared library -ha_federated_la_LIBADD = probes_sh_mysql.o -# Hack: We "depend" on ".libs/" but have no rule for it, -# but it is created as a byproduct of the ".lo" -DTRACESHAREDDEPS = ha_federated_la-ha_federated.lo -DTRACESHAREDFILES = ha_federated_la-ha_federated.o -DTRACEPROVIDER = probes_mysql.d -ha_federated_la_DEPENDENCIES = probes_sh_mysql.o $(DTRACESHAREDDEPS) dtrace_providers - -CLEANFILES = $(DTRACEPROVIDER) dtrace_files dtrace_providers $(DTRACESHAREDFILES) -DTRACEFILES = libfederated_a-ha_federated.o - -dtrace_files: - echo $(DTRACEFILES) > $@ -dtrace_providers: probes_mysql.d - echo $(DTRACEPROVIDER) > $@ -probes_mysql.d: - -$(RM) -f probes_mysql.d - $(CP) $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d - echo timestamp > dtrace_sources - -probes_sh_mysql.o: $(DTRACEPROVIDER) $(DTRACESHAREDDEPS) - $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACESHAREDFILES) -o $@ - $(CP) $(DTRACESHAREDFILES) .libs -probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) - $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ - -endif diff --git a/storage/federated/plug.in b/storage/federated/plug.in deleted file mode 100644 index 23b607d699b..00000000000 --- a/storage/federated/plug.in +++ /dev/null @@ -1,5 +0,0 @@ -MYSQL_STORAGE_ENGINE(federated,,[Federated Storage Engine], - [Connects to tables on remote MySQL servers], [max,max-no-ndb]) -MYSQL_PLUGIN_STATIC(federated, [libfederated.a]) -MYSQL_PLUGIN_DYNAMIC(federated, [ha_federated.la]) -MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(federated, [ha_federated.cc]) diff --git a/storage/heap/Makefile.am b/storage/heap/Makefile.am deleted file mode 100644 index 677b2d60269..00000000000 --- a/storage/heap/Makefile.am +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright (C) 2000-2002, 2005-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 - -MYSQLDATAdir = $(localstatedir) -MYSQLSHAREdir = $(pkgdatadir) -MYSQLBASEdir= $(prefix) -MYSQLLIBdir= $(pkglibdir) -INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ - -I$(top_srcdir)/regex \ - -I$(top_srcdir)/sql \ - -I$(srcdir) -WRAPLIBS= - -LDADD = - -DEFS = @DEFS@ -pkglib_LIBRARIES = libheap.a -noinst_PROGRAMS = hp_test1 hp_test2 -noinst_LIBRARIES = libheap.a -hp_test1_LDFLAGS = @NOINST_LDFLAGS@ -hp_test1_LDADD = libheap.a \ - $(top_builddir)/mysys/libmysys.a \ - $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/strings/libmystrings.a -hp_test2_LDFLAGS = @NOINST_LDFLAGS@ -hp_test2_LDADD = libheap.a \ - $(top_builddir)/mysys/libmysys.a \ - $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/strings/libmystrings.a -noinst_HEADERS = heapdef.h ha_heap.h -libheap_a_SOURCES = hp_open.c hp_extra.c hp_close.c hp_panic.c hp_info.c \ - hp_rrnd.c hp_scan.c hp_update.c hp_write.c hp_delete.c \ - hp_rsame.c hp_create.c hp_rename.c hp_rfirst.c \ - hp_rnext.c hp_rlast.c hp_rprev.c hp_clear.c \ - hp_rkey.c hp_block.c \ - ha_heap.cc \ - hp_hash.c _check.c _rectest.c hp_static.c - - -EXTRA_DIST = CMakeLists.txt plug.in - -if HAVE_DTRACE_DASH_G -libheap_a_LIBADD = probes_mysql.o -libheap_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers -CLEANFILES = probes_mysql.o dtrace_files dtrace_providers -DTRACEFILES = ha_heap.o -DTRACEPROVIDER = probes_mysql.d -CLEANFILES += $(DTRACEPROVIDER) dtrace_sources - -dtrace_files: - echo $(DTRACEFILES) > $@ -dtrace_providers: probes_mysql.d - echo $(DTRACEPROVIDER) > $@ -probes_mysql.d: - -$(RM) -f probes_mysql.d - $(CP) $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d - echo timestamp > dtrace_sources - -probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) - $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ -endif diff --git a/storage/heap/plug.in b/storage/heap/plug.in deleted file mode 100644 index 50f31c60f2b..00000000000 --- a/storage/heap/plug.in +++ /dev/null @@ -1,7 +0,0 @@ -MYSQL_STORAGE_ENGINE(heap,no, [Memory Storage Engine], - [Volatile memory based tables]) -MYSQL_PLUGIN_DIRECTORY(heap, [storage/heap]) -MYSQL_PLUGIN_STATIC(heap, [libheap.a]) -MYSQL_PLUGIN_MANDATORY(heap) dnl Memory tables -MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(heap, [ha_heap.cc]) - diff --git a/storage/innobase/Makefile.am b/storage/innobase/Makefile.am deleted file mode 100644 index 8e8e3300d35..00000000000 --- a/storage/innobase/Makefile.am +++ /dev/null @@ -1,336 +0,0 @@ -# Copyright (C) 2001, 2004, 2006 MySQL AB & Innobase Oy -# -# 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 - -MYSQLDATAdir= $(localstatedir) -MYSQLSHAREdir= $(pkgdatadir) -MYSQLBASEdir= $(prefix) -MYSQLLIBdir= $(pkglibdir) -pkgplugindir= $(pkglibdir)/plugin -INCLUDES= -I$(top_srcdir)/include -I$(top_builddir)/include \ - -I$(top_srcdir)/regex \ - -I$(srcdir)/include \ - -I$(top_srcdir)/sql \ - -I$(srcdir) @ZLIB_INCLUDES@ - -DEFS= @DEFS@ - -noinst_HEADERS= \ - handler/ha_innodb.h \ - handler/i_s.h \ - include/btr0btr.h \ - include/btr0btr.ic \ - include/btr0cur.h \ - include/btr0cur.ic \ - include/btr0pcur.h \ - include/btr0pcur.ic \ - include/btr0sea.h \ - include/btr0sea.ic \ - include/btr0types.h \ - include/buf0buddy.h \ - include/buf0buddy.ic \ - include/buf0buf.h \ - include/buf0buf.ic \ - include/buf0flu.h \ - include/buf0flu.ic \ - include/buf0lru.h \ - include/buf0lru.ic \ - include/buf0rea.h \ - include/buf0types.h \ - include/data0data.h \ - include/data0data.ic \ - include/data0type.h \ - include/data0type.ic \ - include/data0types.h \ - include/db0err.h \ - include/dict0boot.h \ - include/dict0boot.ic \ - include/dict0crea.h \ - include/dict0crea.ic \ - include/dict0dict.h \ - include/dict0dict.ic \ - include/dict0load.h \ - include/dict0load.ic \ - include/dict0mem.h \ - include/dict0mem.ic \ - include/dict0types.h \ - include/dyn0dyn.h \ - include/dyn0dyn.ic \ - include/eval0eval.h \ - include/eval0eval.ic \ - include/eval0proc.h \ - include/eval0proc.ic \ - include/fil0fil.h \ - include/fsp0fsp.h \ - include/fsp0fsp.ic \ - include/fsp0types.h \ - include/fut0fut.h \ - include/fut0fut.ic \ - include/fut0lst.h \ - include/fut0lst.ic \ - include/ha0ha.h \ - include/ha0ha.ic \ - include/ha0storage.h \ - include/ha0storage.ic \ - include/ha_prototypes.h \ - include/handler0alter.h \ - include/hash0hash.h \ - include/hash0hash.ic \ - include/ibuf0ibuf.h \ - include/ibuf0ibuf.ic \ - include/ibuf0types.h \ - include/lock0iter.h \ - include/lock0lock.h \ - include/lock0lock.ic \ - include/lock0priv.h \ - include/lock0priv.ic \ - include/lock0types.h \ - include/log0log.h \ - include/log0log.ic \ - include/log0recv.h \ - include/log0recv.ic \ - include/mach0data.h \ - include/mach0data.ic \ - include/mem0dbg.h \ - include/mem0dbg.ic \ - include/mem0mem.h \ - include/mem0mem.ic \ - include/mem0pool.h \ - include/mem0pool.ic \ - include/mtr0log.h \ - include/mtr0log.ic \ - include/mtr0mtr.h \ - include/mtr0mtr.ic \ - include/mtr0types.h \ - include/os0file.h \ - include/os0file.ic \ - include/os0proc.h \ - include/os0proc.ic \ - include/os0sync.h \ - include/os0sync.ic \ - include/os0thread.h \ - include/os0thread.ic \ - include/page0cur.h \ - include/page0cur.ic \ - include/page0page.h \ - include/page0page.ic \ - include/page0types.h \ - include/page0zip.h \ - include/page0zip.ic \ - include/pars0grm.h \ - include/pars0opt.h \ - include/pars0opt.ic \ - include/pars0pars.h \ - include/pars0pars.ic \ - include/pars0sym.h \ - include/pars0sym.ic \ - include/pars0types.h \ - include/que0que.h \ - include/que0que.ic \ - include/que0types.h \ - include/read0read.h \ - include/read0read.ic \ - include/read0types.h \ - include/rem0cmp.h \ - include/rem0cmp.ic \ - include/rem0rec.h \ - include/rem0rec.ic \ - include/rem0types.h \ - include/row0ext.h \ - include/row0ext.ic \ - include/row0ins.h \ - include/row0ins.ic \ - include/row0merge.h \ - include/row0mysql.h \ - include/row0mysql.ic \ - include/row0purge.h \ - include/row0purge.ic \ - include/row0row.h \ - include/row0row.ic \ - include/row0sel.h \ - include/row0sel.ic \ - include/row0types.h \ - include/row0uins.h \ - include/row0uins.ic \ - include/row0umod.h \ - include/row0umod.ic \ - include/row0undo.h \ - include/row0undo.ic \ - include/row0upd.h \ - include/row0upd.ic \ - include/row0vers.h \ - include/row0vers.ic \ - include/srv0srv.h \ - include/srv0srv.ic \ - include/srv0start.h \ - include/sync0arr.h \ - include/sync0arr.ic \ - include/sync0rw.h \ - include/sync0rw.ic \ - include/sync0sync.h \ - include/sync0sync.ic \ - include/sync0types.h \ - include/thr0loc.h \ - include/thr0loc.ic \ - include/trx0i_s.h \ - include/trx0purge.h \ - include/trx0purge.ic \ - include/trx0rec.h \ - include/trx0rec.ic \ - include/trx0roll.h \ - include/trx0roll.ic \ - include/trx0rseg.h \ - include/trx0rseg.ic \ - include/trx0sys.h \ - include/trx0sys.ic \ - include/trx0trx.h \ - include/trx0trx.ic \ - include/trx0types.h \ - include/trx0undo.h \ - include/trx0undo.ic \ - include/trx0xa.h \ - include/univ.i \ - include/usr0sess.h \ - include/usr0sess.ic \ - include/usr0types.h \ - include/ut0byte.h \ - include/ut0byte.ic \ - include/ut0dbg.h \ - include/ut0list.h \ - include/ut0list.ic \ - include/ut0lst.h \ - include/ut0mem.h \ - include/ut0mem.ic \ - include/ut0rbt.h \ - include/ut0rnd.h \ - include/ut0rnd.ic \ - include/ut0sort.h \ - include/ut0ut.h \ - include/ut0ut.ic \ - include/ut0vec.h \ - include/ut0vec.ic \ - include/ut0wqueue.h \ - mem/mem0dbg.c - -EXTRA_LIBRARIES= libinnobase.a -noinst_LIBRARIES= @plugin_innobase_static_target@ -libinnobase_a_SOURCES= \ - btr/btr0btr.c \ - btr/btr0cur.c \ - btr/btr0pcur.c \ - btr/btr0sea.c \ - buf/buf0buddy.c \ - buf/buf0buf.c \ - buf/buf0flu.c \ - buf/buf0lru.c \ - buf/buf0rea.c \ - data/data0data.c \ - data/data0type.c \ - dict/dict0boot.c \ - dict/dict0crea.c \ - dict/dict0dict.c \ - dict/dict0load.c \ - dict/dict0mem.c \ - dyn/dyn0dyn.c \ - eval/eval0eval.c \ - eval/eval0proc.c \ - fil/fil0fil.c \ - fsp/fsp0fsp.c \ - fut/fut0fut.c \ - fut/fut0lst.c \ - ha/ha0ha.c \ - ha/ha0storage.c \ - ha/hash0hash.c \ - handler/ha_innodb.cc \ - handler/handler0alter.cc \ - handler/i_s.cc \ - ibuf/ibuf0ibuf.c \ - lock/lock0iter.c \ - lock/lock0lock.c \ - log/log0log.c \ - log/log0recv.c \ - mach/mach0data.c \ - mem/mem0mem.c \ - mem/mem0pool.c \ - mtr/mtr0log.c \ - mtr/mtr0mtr.c \ - os/os0file.c \ - os/os0proc.c \ - os/os0sync.c \ - os/os0thread.c \ - page/page0cur.c \ - page/page0page.c \ - page/page0zip.c \ - pars/lexyy.c \ - pars/pars0grm.c \ - pars/pars0opt.c \ - pars/pars0pars.c \ - pars/pars0sym.c \ - que/que0que.c \ - read/read0read.c \ - rem/rem0cmp.c \ - rem/rem0rec.c \ - row/row0ext.c \ - row/row0ins.c \ - row/row0merge.c \ - row/row0mysql.c \ - row/row0purge.c \ - row/row0row.c \ - row/row0sel.c \ - row/row0uins.c \ - row/row0umod.c \ - row/row0undo.c \ - row/row0upd.c \ - row/row0vers.c \ - srv/srv0srv.c \ - srv/srv0start.c \ - sync/sync0arr.c \ - sync/sync0rw.c \ - sync/sync0sync.c \ - thr/thr0loc.c \ - trx/trx0i_s.c \ - trx/trx0purge.c \ - trx/trx0rec.c \ - trx/trx0roll.c \ - trx/trx0rseg.c \ - trx/trx0sys.c \ - trx/trx0trx.c \ - trx/trx0undo.c \ - usr/usr0sess.c \ - ut/ut0byte.c \ - ut/ut0dbg.c \ - ut/ut0list.c \ - ut/ut0mem.c \ - ut/ut0rbt.c \ - ut/ut0rnd.c \ - ut/ut0ut.c \ - ut/ut0vec.c \ - ut/ut0wqueue.c - -libinnobase_a_CXXFLAGS= $(AM_CXXFLAGS) -libinnobase_a_CFLAGS= $(AM_CFLAGS) - -EXTRA_LTLIBRARIES= ha_innodb.la -pkgplugin_LTLIBRARIES= @plugin_innobase_shared_target@ - -ha_innodb_la_LDFLAGS= -module -rpath $(pkgplugindir) -ha_innodb_la_CXXFLAGS= $(AM_CXXFLAGS) $(INNODB_DYNAMIC_CFLAGS) -ha_innodb_la_CFLAGS= $(AM_CFLAGS) $(INNODB_DYNAMIC_CFLAGS) -ha_innodb_la_SOURCES= $(libinnobase_a_SOURCES) - -EXTRA_DIST= CMakeLists.txt plug.in \ - pars/make_bison.sh pars/make_flex.sh \ - pars/pars0grm.y pars/pars0lex.l diff --git a/storage/innobase/plug.in b/storage/innobase/plug.in deleted file mode 100644 index 5fa82e585a4..00000000000 --- a/storage/innobase/plug.in +++ /dev/null @@ -1,234 +0,0 @@ -# -# Copyright (c) 2006, 2010, Innobase Oy. 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., 59 Temple -# Place, Suite 330, Boston, MA 02111-1307 USA -# - -MYSQL_STORAGE_ENGINE(innobase, innodb, [InnoDB Storage Engine], - [Transactional Tables using InnoDB], [default,max,max-no-ndb]) -MYSQL_PLUGIN_DIRECTORY(innobase, [storage/innobase]) -MYSQL_PLUGIN_STATIC(innobase, [libinnobase.a]) -MYSQL_PLUGIN_DYNAMIC(innobase, [ha_innodb.la]) -MYSQL_PLUGIN_ACTIONS(innobase, [ - AC_CHECK_HEADERS(sched.h) - AC_CHECK_SIZEOF(int, 4) - AC_CHECK_SIZEOF(long, 4) - AC_CHECK_SIZEOF(void*, 4) - AC_CHECK_FUNCS(sched_yield fdatasync localtime_r) - AC_C_BIGENDIAN - case "$target_os" in - lin*) - AC_CHECK_HEADER(libaio.h, - AC_CHECK_LIB(aio, io_setup, - LIBS="$LIBS -laio" - AC_DEFINE(LINUX_NATIVE_AIO, [1], - [Linux native async I/O support]), - AC_MSG_WARN([No Linux native async I/O])), - AC_MSG_WARN([No Linux native async I/O])) - - CFLAGS="$CFLAGS -DUNIV_LINUX";; - hpux10*) - CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX -DUNIV_HPUX10";; - hp*) - CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX";; - aix*) - CFLAGS="$CFLAGS -DUNIV_AIX";; - irix*|osf*|sysv5uw7*|openbsd*) - CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";; - *solaris*|*SunOS*) - CFLAGS="$CFLAGS -DUNIV_SOLARIS";; - esac - - INNODB_DYNAMIC_CFLAGS="-DMYSQL_DYNAMIC_PLUGIN" - - case "$target_cpu" in - x86_64) - # The AMD64 ABI forbids absolute addresses in shared libraries - ;; - *86) - # Use absolute addresses on IA-32 - INNODB_DYNAMIC_CFLAGS="$INNODB_DYNAMIC_CFLAGS -prefer-non-pic" - ;; - esac - AC_SUBST(INNODB_DYNAMIC_CFLAGS) - - AC_MSG_CHECKING(whether GCC atomic builtins are available) - # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not - AC_TRY_RUN( - [ - int main() - { - long x; - long y; - long res; - char c; - - x = 10; - y = 123; - res = __sync_bool_compare_and_swap(&x, x, y); - if (!res || x != y) { - return(1); - } - - x = 10; - y = 123; - res = __sync_bool_compare_and_swap(&x, x + 1, y); - if (res || x != 10) { - return(1); - } - - x = 10; - y = 123; - res = __sync_add_and_fetch(&x, y); - if (res != 123 + 10 || x != 123 + 10) { - return(1); - } - - c = 10; - res = __sync_lock_test_and_set(&c, 123); - if (res != 10 || c != 123) { - return(1); - } - - return(0); - } - ], - [ - AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1], - [GCC atomic builtins are available]) - AC_MSG_RESULT(yes) - ], - [ - AC_MSG_RESULT(no) - ] - ) - - AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins) - # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not - AC_TRY_RUN( - [ - #include <pthread.h> - #include <string.h> - - int main(int argc, char** argv) { - pthread_t x1; - pthread_t x2; - pthread_t x3; - - memset(&x1, 0x0, sizeof(x1)); - memset(&x2, 0x0, sizeof(x2)); - memset(&x3, 0x0, sizeof(x3)); - - __sync_bool_compare_and_swap(&x1, x2, x3); - - return(0); - } - ], - [ - AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1], - [pthread_t can be used by GCC atomic builtins]) - AC_MSG_RESULT(yes) - ], - [ - AC_MSG_RESULT(no) - ] - ) - - AC_MSG_CHECKING(whether Solaris libc atomic functions are available) - # either define HAVE_IB_SOLARIS_ATOMICS or not - AC_CHECK_FUNCS(atomic_cas_ulong \ - atomic_cas_32 \ - atomic_cas_64 \ - atomic_add_long_nv \ - atomic_swap_uchar, - - AC_DEFINE([HAVE_IB_SOLARIS_ATOMICS], [1], - [Define to 1 if Solaris libc atomic functions \ - are available]) - ) - - AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions) - # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not - AC_TRY_RUN( - [ - #include <pthread.h> - #include <string.h> - - int main(int argc, char** argv) { - pthread_t x1; - pthread_t x2; - pthread_t x3; - - memset(&x1, 0x0, sizeof(x1)); - memset(&x2, 0x0, sizeof(x2)); - memset(&x3, 0x0, sizeof(x3)); - - if (sizeof(pthread_t) == 4) { - - atomic_cas_32(&x1, x2, x3); - - } else if (sizeof(pthread_t) == 8) { - - atomic_cas_64(&x1, x2, x3); - - } else { - - return(1); - } - - return(0); - } - ], - [ - AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1], - [pthread_t can be used by solaris atomics]) - AC_MSG_RESULT(yes) - ], - [ - AC_MSG_RESULT(no) - ] - ) - - # this is needed to know which one of atomic_cas_32() or atomic_cas_64() - # to use in the source - AC_CHECK_SIZEOF([pthread_t], [], [#include <pthread.h>]) - - # Check for x86 PAUSE instruction - AC_MSG_CHECKING(for x86 PAUSE instruction) - # We have to actually try running the test program, because of a bug - # in Solaris on x86_64, where it wrongly reports that PAUSE is not - # supported when trying to run an application. See - # http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684 - # We use ib_ prefix to avoid collisoins if this code is added to - # mysql's configure.in. - AC_TRY_RUN( - [ - int main() { - __asm__ __volatile__ ("pause"); - return(0); - } - ], - [ - AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist]) - AC_MSG_RESULT(yes) - ], - [ - AC_MSG_RESULT(no) - ], - [ - AC_MSG_RESULT(no) - ] - ) - ]) - -# vim: set ft=config: diff --git a/storage/myisam/Makefile.am b/storage/myisam/Makefile.am deleted file mode 100644 index 5c3370ac6c5..00000000000 --- a/storage/myisam/Makefile.am +++ /dev/null @@ -1,169 +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 - -MYSQLDATAdir = $(localstatedir) -MYSQLSHAREdir = $(pkgdatadir) -MYSQLBASEdir= $(prefix) -MYSQLLIBdir= $(pkglibdir) -INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ - -I$(top_srcdir)/regex \ - -I$(top_srcdir)/sql \ - -I$(srcdir) -WRAPLIBS= - -LDADD = - -DEFS = @DEFS@ - -EXTRA_DIST = mi_test_all.sh mi_test_all.res CMakeLists.txt plug.in -pkgdata_DATA = mi_test_all mi_test_all.res - -pkglib_LIBRARIES = libmyisam.a -bin_PROGRAMS = myisamchk myisamlog myisampack myisam_ftdump -myisamchk_DEPENDENCIES= $(LIBRARIES) -myisamchk_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \ - $(top_builddir)/mysys/libmysys.a \ - $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@ -myisamlog_DEPENDENCIES= $(LIBRARIES) -myisamlog_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \ - $(top_builddir)/mysys/libmysys.a \ - $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@ -myisampack_DEPENDENCIES=$(LIBRARIES) -myisampack_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \ - $(top_builddir)/mysys/libmysys.a \ - $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@ -noinst_PROGRAMS = mi_test1 mi_test2 mi_test3 rt_test sp_test -noinst_HEADERS = myisamdef.h rt_index.h rt_key.h rt_mbr.h sp_defs.h \ - fulltext.h ftdefs.h ha_myisam.h mi_extrafunc.h -mi_test1_DEPENDENCIES= $(LIBRARIES) -mi_test1_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \ - $(top_builddir)/mysys/libmysys.a \ - $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@ -mi_test2_DEPENDENCIES= $(LIBRARIES) -mi_test2_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \ - $(top_builddir)/mysys/libmysys.a \ - $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@ -mi_test3_DEPENDENCIES= $(LIBRARIES) -mi_test3_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \ - $(top_builddir)/mysys/libmysys.a \ - $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@ -myisam_ftdump_DEPENDENCIES= $(LIBRARIES) -myisam_ftdump_LDADD = @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \ - $(top_builddir)/mysys/libmysys.a \ - $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@ -rt_test_DEPENDENCIES= $(LIBRARIES) -rt_test_LDADD = @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \ - $(top_builddir)/mysys/libmysys.a \ - $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@ -sp_test_DEPENDENCIES= $(LIBRARIES) -sp_test_LDADD = @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \ - $(top_builddir)/mysys/libmysys.a \ - $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/strings/libmystrings.a @ZLIB_LIBS@ -libmyisam_a_SOURCES = mi_open.c mi_extra.c mi_info.c mi_rkey.c \ - mi_rnext.c mi_rnext_same.c \ - mi_search.c mi_page.c mi_key.c mi_locking.c \ - mi_rrnd.c mi_scan.c mi_cache.c \ - mi_statrec.c mi_packrec.c mi_dynrec.c \ - mi_update.c mi_write.c mi_unique.c \ - mi_delete.c \ - mi_rprev.c mi_rfirst.c mi_rlast.c mi_rsame.c \ - mi_rsamepos.c mi_panic.c mi_close.c mi_create.c\ - mi_range.c mi_dbug.c mi_checksum.c mi_log.c \ - mi_changed.c mi_static.c mi_delete_all.c \ - mi_delete_table.c mi_rename.c mi_check.c \ - mi_keycache.c mi_preload.c \ - ft_parser.c ft_stopwords.c ft_static.c \ - ft_update.c ft_boolean_search.c ft_nlq_search.c sort.c \ - ha_myisam.cc \ - rt_index.c rt_key.c rt_mbr.c rt_split.c sp_key.c -CLEANFILES = test?.MY? FT?.MY? isam.log mi_test_all rt_test.MY? sp_test.MY? - -# Move to automake rules ? -prolint:; plparse -b -u -hF1 "-width(0,0)" "-format=%f:%l:\s%t:%n\s%m" \ - "-elib(????)" "+elib(?3??)" my.lnt $(nisam_SOURCES) - -SUFFIXES = .sh - -.sh: - @RM@ -f $@ $@-t - @SED@ \ - -e 's!@''bindir''@!$(bindir)!g' \ - -e 's!@''scriptdir''@!$(bindir)!g' \ - -e 's!@''prefix''@!$(prefix)!g' \ - -e 's!@''datadir''@!$(datadir)!g' \ - -e 's!@''localstatedir''@!$(localstatedir)!g' \ - -e 's!@''libexecdir''@!$(libexecdir)!g' \ - -e 's!@''CC''@!@CC@!'\ - -e 's!@''CXX''@!@CXX@!'\ - -e 's!@''GXX''@!@GXX@!'\ - -e 's!@''PERL''@!@PERL@!' \ - -e 's!@''CFLAGS''@!@SAVE_CFLAGS@!'\ - -e 's!@''CXXFLAGS''@!@SAVE_CXXFLAGS@!'\ - -e 's!@''LDFLAGS''@!@SAVE_LDFLAGS@!'\ - -e 's!@''VERSION''@!@VERSION@!' \ - -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \ - -e 's!@''COMPILATION_COMMENT''@!@COMPILATION_COMMENT@!' \ - -e 's!@''MACHINE_TYPE''@!@MACHINE_TYPE@!' \ - -e 's!@''HOSTNAME''@!@HOSTNAME@!' \ - -e 's!@''SYSTEM_TYPE''@!@SYSTEM_TYPE@!' \ - -e 's!@''CHECK_PID''@!@CHECK_PID@!' \ - -e 's!@''FIND_PROC''@!@FIND_PROC@!' \ - -e 's!@''MYSQLD_DEFAULT_SWITCHES''@!@MYSQLD_DEFAULT_SWITCHES@!' \ - -e 's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!' \ - -e 's!@''TARGET_LINUX''@!@TARGET_LINUX@!' \ - -e "s!@""CONF_COMMAND""@!@CONF_COMMAND@!" \ - -e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \ - -e 's!@''sysconfdir''@!@sysconfdir@!' \ - -e 's!@''SHORT_MYSQL_INTRO''@!@SHORT_MYSQL_INTRO@!' \ - -e 's!@''SHARED_LIB_VERSION''@!@SHARED_LIB_VERSION@!' \ - -e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \ - -e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \ - -e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \ - -e 's!@''PERL_DBI_VERSION''@!@PERL_DBI_VERSION@!' \ - -e 's!@''PERL_DBD_VERSION''@!@PERL_DBD_VERSION@!' \ - -e 's!@''PERL_DATA_DUMPER''@!@PERL_DATA_DUMPER@!' \ - $< > $@-t - @CHMOD@ +x $@-t - @MV@ $@-t $@ - -if HAVE_DTRACE_DASH_G -libmyisam_a_LIBADD = probes_mysql.o -libmyisam_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers -CLEANFILES += probes_mysql.o dtrace_files dtrace_providers -DTRACEFILES = ha_myisam.o -DTRACEPROVIDER = probes_mysql.d -CLEANFILES += $(DTRACEPROVIDER) dtrace_sources - -dtrace_files: - echo $(DTRACEFILES) > $@ -dtrace_providers: probes_mysql.d - echo $(DTRACEPROVIDER) > $@ -probes_mysql.d: - -$(RM) -f probes_mysql.d - $(CP) $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d - echo timestamp > dtrace_sources - -probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) - $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ -endif diff --git a/storage/myisam/plug.in b/storage/myisam/plug.in deleted file mode 100644 index 051ec2d54aa..00000000000 --- a/storage/myisam/plug.in +++ /dev/null @@ -1,7 +0,0 @@ -MYSQL_STORAGE_ENGINE(myisam,no, [MyISAM Storage Engine], - [Traditional non-transactional MySQL tables]) -MYSQL_PLUGIN_DIRECTORY(myisam, [storage/myisam]) -MYSQL_PLUGIN_STATIC(myisam, [libmyisam.a]) -MYSQL_PLUGIN_MANDATORY(myisam) dnl Default -MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(myisam, [ha_myisam.cc]) - diff --git a/storage/myisammrg/Makefile.am b/storage/myisammrg/Makefile.am deleted file mode 100644 index 43dec3ae3d9..00000000000 --- a/storage/myisammrg/Makefile.am +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright (C) 2000-2002, 2005-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 - -MYSQLDATAdir = $(localstatedir) -MYSQLSHAREdir = $(pkgdatadir) -MYSQLBASEdir= $(prefix) -MYSQLLIBdir= $(pkglibdir) -INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ - -I$(top_srcdir)/regex \ - -I$(top_srcdir)/sql \ - -I$(srcdir) -WRAPLIBS= - -LDADD = - -DEFS = @DEFS@ -pkglib_LIBRARIES = libmyisammrg.a -noinst_HEADERS = myrg_def.h ha_myisammrg.h -noinst_LIBRARIES = libmyisammrg.a -libmyisammrg_a_SOURCES = myrg_open.c myrg_extra.c myrg_info.c myrg_locking.c \ - myrg_rrnd.c myrg_update.c myrg_delete.c myrg_rsame.c \ - myrg_panic.c myrg_close.c myrg_create.c myrg_static.c \ - myrg_rkey.c myrg_rfirst.c myrg_rlast.c myrg_rnext.c \ - myrg_rprev.c myrg_queue.c myrg_write.c myrg_range.c \ - ha_myisammrg.cc \ - myrg_rnext_same.c myrg_records.c - - -EXTRA_DIST = CMakeLists.txt plug.in - -if HAVE_DTRACE_DASH_G -libmyisammrg_a_LIBADD = probes_mysql.o -libmyisammrg_a_DEPENDENCIES = probes_mysql.o dtrace_files dtrace_providers -CLEANFILES = probes_mysql.o dtrace_files dtrace_providers -DTRACEFILES = ha_myisammrg.o -DTRACEPROVIDER = probes_mysql.d -CLEANFILES += $(DTRACEPROVIDER) dtrace_sources - -dtrace_files: - echo $(DTRACEFILES) > $@ -dtrace_providers: probes_mysql.d - echo $(DTRACEPROVIDER) > $@ -probes_mysql.d: - -$(RM) -f probes_mysql.d - $(CP) $(top_srcdir)/include/probes_mysql.d.base probes_mysql.d - echo timestamp > dtrace_sources - -probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES) - $(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@ -endif diff --git a/storage/myisammrg/plug.in b/storage/myisammrg/plug.in deleted file mode 100644 index 1f94e07d881..00000000000 --- a/storage/myisammrg/plug.in +++ /dev/null @@ -1,6 +0,0 @@ -MYSQL_STORAGE_ENGINE(myisammrg,no,[MyISAM MERGE Engine], - [Merge multiple MySQL tables into one]) -MYSQL_PLUGIN_DIRECTORY(myisammrg,[storage/myisammrg]) -MYSQL_PLUGIN_STATIC(myisammrg, [libmyisammrg.a]) -MYSQL_PLUGIN_MANDATORY(myisammrg) -MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(myisammrg, [ha_myisammrg.cc]) diff --git a/storage/perfschema/Makefile.am b/storage/perfschema/Makefile.am deleted file mode 100644 index 762f5b85790..00000000000 --- a/storage/perfschema/Makefile.am +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU 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, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - -#called from the top level Makefile - -SUBDIRS = . unittest - -MYSQLDATAdir = $(localstatedir) -MYSQLSHAREdir = $(pkgdatadir) -MYSQLBASEdir= $(prefix) -MYSQLLIBdir= $(pkglibdir) -pkgplugindir = $(pkglibdir)/plugin -INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ - -I$(top_srcdir)/regex \ - -I$(top_srcdir)/sql \ - -I$(srcdir) -WRAPLIBS= - -LDADD = - -DEFS = -DMYSQL_SERVER @DEFS@ - - -noinst_HEADERS = ha_perfschema.h pfs_engine_table.h pfs.h pfs_server.h \ - pfs_global.h pfs_instr_class.h pfs_instr.h \ - pfs_column_types.h pfs_column_values.h \ - table_setup_instruments.h table_performance_timers.h \ - table_setup_timers.h \ - table_setup_consumers.h table_events_waits.h \ - pfs_events_waits.h pfs_timer.h table_threads.h \ - table_sync_instances.h \ - table_events_waits_summary.h pfs_stat.h \ - table_ews_global_by_event_name.h table_all_instr.h \ - table_file_instances.h table_file_summary.h \ - pfs_lock.h pfs_atomic.h - -PSE_SOURCES = ha_perfschema.cc pfs_engine_table.cc pfs.cc pfs_server.cc \ - pfs_global.cc pfs_instr_class.cc pfs_instr.cc \ - pfs_column_values.cc \ - table_setup_instruments.cc table_performance_timers.cc \ - table_setup_timers.cc \ - table_setup_consumers.cc table_events_waits.cc \ - pfs_events_waits.cc pfs_timer.cc table_threads.cc \ - table_sync_instances.cc \ - table_events_waits_summary.cc \ - table_ews_global_by_event_name.cc table_all_instr.cc \ - table_file_instances.cc table_file_summary.cc \ - pfs_atomic.cc pfs_check.cc - -EXTRA_LIBRARIES = libperfschema.a -noinst_LIBRARIES = @plugin_perfschema_static_target@ - -libperfschema_a_SOURCES= $(PSE_SOURCES) - -EXTRA_DIST = plug.in CMakeLists.txt - -unittests = unittest - -test: - perl $(top_srcdir)/unittest/unit.pl run $(unittests) - -test-verbose: - HARNESS_VERBOSE=1 perl $(top_srcdir)/unittest/unit.pl run $(unittests) - diff --git a/storage/perfschema/pfs_lock.h b/storage/perfschema/pfs_lock.h index 5c74d3944ba..d253cfa4366 100644 --- a/storage/perfschema/pfs_lock.h +++ b/storage/perfschema/pfs_lock.h @@ -135,7 +135,25 @@ struct pfs_lock */ void allocated_to_free(void) { - DBUG_ASSERT(m_state == PFS_LOCK_ALLOCATED); +#ifndef DBUG_OFF + extern volatile bool ready_to_exit; +#endif + + /* + If this record is not in the ALLOCATED state and the caller is trying + to free it, this is a bug: the caller is confused, + and potentially damaging data owned by another thread or object. + The correct assert to use here to guarantee data integrity is simply: + DBUG_ASSERT(m_state == PFS_LOCK_ALLOCATED); + Now, because of Bug#56666 (Race condition between the server main thread + and the kill server thread), this assert actually fails during shutdown, + and the failure is legitimate, on concurrent calls to mysql_*_destroy(), + when destroying the instrumentation of an object ... twice. + During shutdown this has no consequences for the performance schema, + so the assert is relaxed with the "|| ready_to_exit" condition as a work + around until Bug#56666 is fixed. + */ + DBUG_ASSERT((m_state == PFS_LOCK_ALLOCATED) || ready_to_exit); PFS_atomic::store_32(&m_state, PFS_LOCK_FREE); } diff --git a/storage/perfschema/plug.in b/storage/perfschema/plug.in deleted file mode 100644 index 36a1c1e8bda..00000000000 --- a/storage/perfschema/plug.in +++ /dev/null @@ -1,26 +0,0 @@ -dnl -*- ksh -*- - -# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU 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, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - -dnl This file is part of the configure scripts used by autoconf. - -MYSQL_STORAGE_ENGINE(perfschema, - perfschema, - [Performance Schema], - [Performance Schema], - [default,max,max-no-ndb]) -MYSQL_PLUGIN_DIRECTORY(perfschema, [storage/perfschema]) -MYSQL_PLUGIN_STATIC(perfschema, [libperfschema.a]) diff --git a/storage/perfschema/unittest/Makefile.am b/storage/perfschema/unittest/Makefile.am deleted file mode 100644 index 7d82753c9e5..00000000000 --- a/storage/perfschema/unittest/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (C) 2008-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 - -INCLUDES = -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/include/mysql \ - -I$(top_srcdir)/regex \ - -I$(top_srcdir)/unittest/mytap \ - -I$(top_srcdir)/sql \ - -I$(top_srcdir)/storage/perfschema - -DEFS = -DMYSQL_SERVER @DEFS@ - -TEST_CODE = $(top_builddir)/unittest/mytap/libmytap.a - -$(TEST_CODE) : - (cd $(top_builddir)/unittest/mytap; $(MAKE)) - -PROD_CODE = $(top_builddir)/storage/perfschema/libperfschema.a \ - $(top_builddir)/mysys/libmysys.a \ - $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/strings/libmystrings.a - -noinst_PROGRAMS = pfs_instr_class-t pfs_instr_class-oom-t \ - pfs_instr-t pfs_instr-oom-t pfs_timer-t pfs-t - -pfs_t_SOURCES = pfs-t.cc stub_print_error.h -pfs_t_LDADD = $(TEST_CODE) $(PROD_CODE) - -pfs_instr_class_t_SOURCES = pfs_instr_class-t.cc -pfs_instr_class_t_LDADD = $(TEST_CODE) $(PROD_CODE) - -pfs_instr_class_oom_t_SOURCES = pfs_instr_class-oom-t.cc stub_pfs_global.h -pfs_instr_class_oom_t_LDADD = $(TEST_CODE) $(PROD_CODE) - -pfs_instr_t_SOURCES = pfs_instr-t.cc -pfs_instr_t_LDADD = $(TEST_CODE) $(PROD_CODE) - -pfs_instr_oom_t_SOURCES = pfs_instr-oom-t.cc stub_pfs_global.h -pfs_instr_oom_t_LDADD = $(TEST_CODE) $(PROD_CODE) - -pfs_timer_t_SOURCES = pfs_timer-t.cc -pfs_timer_t_LDADD = $(TEST_CODE) $(PROD_CODE) - -EXTRA_DIST = conf.txt CMakeLists.txt - diff --git a/storage/perfschema/unittest/pfs-t.cc b/storage/perfschema/unittest/pfs-t.cc index c51f358c4d8..20e736a546f 100644 --- a/storage/perfschema/unittest/pfs-t.cc +++ b/storage/perfschema/unittest/pfs-t.cc @@ -25,6 +25,7 @@ #include <memory.h> #include "stub_print_error.h" +#include "stub_server_misc.h" /* test helpers, to simulate the setup */ diff --git a/storage/perfschema/unittest/pfs_instr-oom-t.cc b/storage/perfschema/unittest/pfs_instr-oom-t.cc index 9a3b179aa56..13335326932 100644 --- a/storage/perfschema/unittest/pfs_instr-oom-t.cc +++ b/storage/perfschema/unittest/pfs_instr-oom-t.cc @@ -21,6 +21,7 @@ #include <tap.h> #include "stub_pfs_global.h" +#include "stub_server_misc.h" void test_oom() { diff --git a/storage/perfschema/unittest/pfs_instr-t.cc b/storage/perfschema/unittest/pfs_instr-t.cc index 7dcc8cec7f8..2ef9a5769ca 100644 --- a/storage/perfschema/unittest/pfs_instr-t.cc +++ b/storage/perfschema/unittest/pfs_instr-t.cc @@ -22,6 +22,8 @@ #include <memory.h> +#include "stub_server_misc.h" + void test_no_instruments() { int rc; diff --git a/storage/perfschema/unittest/pfs_instr_class-oom-t.cc b/storage/perfschema/unittest/pfs_instr_class-oom-t.cc index 20fa0f3e6ff..9ccaf432ba2 100644 --- a/storage/perfschema/unittest/pfs_instr_class-oom-t.cc +++ b/storage/perfschema/unittest/pfs_instr_class-oom-t.cc @@ -20,6 +20,7 @@ #include <tap.h> #include "stub_pfs_global.h" +#include "stub_server_misc.h" void test_oom() { diff --git a/storage/perfschema/unittest/pfs_instr_class-t.cc b/storage/perfschema/unittest/pfs_instr_class-t.cc index c5a199727d5..f9a1ee510b1 100644 --- a/storage/perfschema/unittest/pfs_instr_class-t.cc +++ b/storage/perfschema/unittest/pfs_instr_class-t.cc @@ -21,6 +21,8 @@ #include <pfs_global.h> #include <tap.h> +#include "stub_server_misc.h" + void test_no_registration() { int rc; diff --git a/storage/perfschema/unittest/stub_server_misc.h b/storage/perfschema/unittest/stub_server_misc.h new file mode 100644 index 00000000000..17beadbb104 --- /dev/null +++ b/storage/perfschema/unittest/stub_server_misc.h @@ -0,0 +1,21 @@ +/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/* + Minimal code to be able to link a unit test. +*/ + +volatile bool ready_to_exit= false; + diff --git a/strings/CHARSET_INFO.txt b/strings/CHARSET_INFO.txt index bb8e40025c7..6f0a810be37 100644 --- a/strings/CHARSET_INFO.txt +++ b/strings/CHARSET_INFO.txt @@ -208,14 +208,11 @@ charpos() - calculates the offset of the given position in the string. Used in SQL functions LEFT(), RIGHT(), SUBSTRING(), INSERT() -well_formed_length() - - finds the length of correctly formed multi-byte beginning. - Used in INSERTs to cut a beginning of the given string - which is - a) "well formed" according to the given character set. +well_formed_len() + - returns length of a given multi-byte string in bytes + Used in INSERTs to shorten the given string so it + a) is "well formed" according to the given character set b) can fit into the given data type - Terminates the string in the good position, taking in account - multi-byte character boundaries. lengthsp() - returns the length of the given string without trailing spaces. diff --git a/strings/Makefile.am b/strings/Makefile.am deleted file mode 100644 index 3a051e38899..00000000000 --- a/strings/Makefile.am +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright (C) 2000-2006 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 - -# This file is public domain and comes with NO WARRANTY of any kind - -# -# Note that the string library is built with #define THREAD, -# which by default cause all the thread related code (my_pthread.h) -# and therefore the associated instrumentation (mysql/psi/mysql_thread.h) -# to be used. -# Since the string code itself is not instrumented, we use -# #define DISABLE_MYSQL_THREAD_H here to avoid unneeded dependencies. -# - -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -DDISABLE_MYSQL_THREAD_H -pkglib_LIBRARIES = libmystrings.a - -# Exact one of ASSEMBLER_X -if ASSEMBLER_x86 -ASRCS = strings-x86.s longlong2str-x86.s my_strtoll10-x86.s -CSRCS = bfill.c bmove.c bchange.c strxnmov.c int2str.c str2int.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c str_alloc.c longlong2str_asm.c my_strchr.c dtoa.c strmov.c -else -#no assembler -ASRCS = -# These file MUST all be on the same line!! Otherwise automake -# generats a very broken makefile -CSRCS = strxmov.c bmove_upp.c strappend.c strcont.c strend.c strfill.c strcend.c is_prefix.c strstr.c strmake.c strnmov.c strmov.c longlong2str.c bfill.c bmove.c bchange.c strxnmov.c int2str.c str2int.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c strnlen.c ctype.c ctype-simple.c ctype-mb.c ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-tis620.c ctype-ujis.c ctype-utf8.c ctype-ucs2.c ctype-uca.c ctype-win1250ch.c ctype-bin.c ctype-latin1.c my_vsnprintf.c xml.c decimal.c ctype-extra.c my_strtoll10.c str_alloc.c my_strchr.c dtoa.c -endif - -libmystrings_a_SOURCES = $(ASRCS) $(CSRCS) -noinst_PROGRAMS = conf_to_src -CLEANFILES = str_test uctypedump test_decimal -# Default charset definitions -EXTRA_DIST = ctype-big5.c ctype-cp932.c ctype-czech.c ctype-eucjpms.c ctype-euc_kr.c ctype-win1250ch.c \ - ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-utf8.c \ - ctype-ucs2.c ctype-uca.c ctype-tis620.c ctype-ujis.c \ - xml.c decimal.c strto.c strings-x86.s \ - longlong2str.c longlong2str-x86.s longlong2str_asm.c \ - my_strtoll10.c my_strtoll10-x86.s \ - strxmov.c bmove_upp.c strappend.c strcont.c strend.c \ - strfill.c strcend.c is_prefix.c strstr.c \ - strmake.c strnmov.c strmov.c strnlen.c \ - t_ctype.h my_strchr.c CMakeLists.txt \ - CHARSET_INFO.txt - -libmystrings_a_LIBADD= -conf_to_src_SOURCES = conf_to_src.c xml.c ctype.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@ - -# This is because the dependency tracking misses @FOO@ vars in sources. -#strtoull.o: @CHARSET_OBJS@ - - -FLAGS=$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) @NOINST_LDFLAGS@ - -str_test: str_test.c $(pkglib_LIBRARIES) - $(LINK) $(FLAGS) -DMAIN $(INCLUDES) $(srcdir)/str_test.c $(LDADD) $(pkglib_LIBRARIES) - -uctypedump: uctypedump.c - $(LINK) $(INCLUDES) $(srcdir)/uctypedump.c - -test_decimal$(EXEEXT): decimal.c $(pkglib_LIBRARIES) - $(CP) $(srcdir)/decimal.c ./test_decimal.c - $(LINK) $(FLAGS) -DMAIN ./test_decimal.c $(LDADD) $(pkglib_LIBRARIES) - $(RM) -f ./test_decimal.c diff --git a/strings/bfill.c b/strings/bfill.c deleted file mode 100644 index ccc063f59e3..00000000000 --- a/strings/bfill.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 2002 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 */ - -/* File : bfill.c - Author : Richard A. O'Keefe. - Michael Widenius; ifdef MC68000 - Updated: 23 April 1984 - Defines: bfill() - - bfill(dst, len, fill) moves "len" fill characters to "dst". - Thus to set a buffer to 80 spaces, do bfill(buff, 80, ' '). -*/ - -#include <my_global.h> -#include "m_string.h" - -#if !defined(bfill) && !defined(HAVE_BFILL) - -void bfill(dst, len, fill) -register byte *dst; -register uint len; -register pchar fill; -{ - while (len-- != 0) *dst++ = fill; -} - -#endif diff --git a/strings/bmove.c b/strings/bmove.c deleted file mode 100644 index 0aa825558ca..00000000000 --- a/strings/bmove.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 2002 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 */ - -/* File : bmove.c - Author : Richard A. O'Keefe. - Michael Widenius; ifdef MC68000 - Updated: 23 April 1984 - Defines: bmove() - - bmove(dst, src, len) moves exactly "len" bytes from the source "src" - to the destination "dst". It does not check for NUL characters as - strncpy() and strnmov() do. Thus if your C compiler doesn't support - structure assignment, you can simulate it with - bmove(&to, &from, sizeof from); - The standard 4.2bsd routine for this purpose is bcopy. But as bcopy - has its first two arguments the other way around you may find this a - bit easier to get right. - No value is returned. -*/ - -#include <my_global.h> -#include "m_string.h" - -#if !defined(HAVE_BMOVE) && !defined(bmove) - -void bmove(dst, src, len) -register char *dst; -register const char *src; -register uint len; -{ - while (len-- != 0) *dst++ = *src++; -} - -#endif diff --git a/strings/ctype-extra.c b/strings/ctype-extra.c index ba12f3f4267..f89a45d6ed8 100644 --- a/strings/ctype-extra.c +++ b/strings/ctype-extra.c @@ -1040,7 +1040,7 @@ uint16 to_uni_cp1251_bulgarian_ci[] = { 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, 0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F, +0x20AC,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F, 0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, 0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F, 0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7, @@ -1730,7 +1730,7 @@ uint16 to_uni_cp1251_ukrainian_ci[] = { 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, 0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F, +0x20AC,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F, 0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, 0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F, 0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7, @@ -3762,7 +3762,7 @@ uint16 to_uni_cp1251_bin[] = { 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, 0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F, +0x20AC,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F, 0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, 0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F, 0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7, @@ -3877,7 +3877,7 @@ uint16 to_uni_cp1251_general_ci[] = { 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, 0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F, +0x20AC,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F, 0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, 0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F, 0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7, @@ -3992,7 +3992,7 @@ uint16 to_uni_cp1251_general_cs[] = { 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077, 0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F, 0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021, -0x0000,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F, +0x20AC,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F, 0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014, 0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F, 0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7, diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c index b2f2e3cd22e..8b985b7405b 100644 --- a/strings/ctype-mb.c +++ b/strings/ctype-mb.c @@ -636,7 +636,7 @@ static void pad_max_char(CHARSET_INFO *cs, char *str, char *end) DBUG_ASSERT(buflen > 0); do { - if ((str + buflen) < end) + if ((str + buflen) <= end) { /* Enough space for the characer */ memcpy(str, buf, buflen); @@ -802,6 +802,192 @@ fill_max_and_min: } +/** + Calculate min_str and max_str that ranges a LIKE string. + Generic function, currently used for ucs2, utf16, utf32, + but should be suitable for any other character sets with + cs->min_sort_char and cs->max_sort_char represented in + Unicode code points. + + @param cs Character set and collation pointer + @param ptr Pointer to LIKE pattern. + @param ptr_length Length of LIKE pattern. + @param escape Escape character pattern, typically '\'. + @param w_one 'One character' pattern, typically '_'. + @param w_many 'Many characters' pattern, typically '%'. + @param res_length Length of min_str and max_str. + + @param[out] min_str Smallest string that ranges LIKE. + @param[out] max_str Largest string that ranges LIKE. + @param[out] min_len Length of min_str + @param[out] max_len Length of max_str + + @return Optimization status. + @retval FALSE if LIKE pattern can be optimized + @rerval TRUE if LIKE can't be optimized. +*/ +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) +{ + const char *end= ptr + ptr_length; + const char *min_org= min_str; + const char *max_org= max_str; + char *min_end= min_str + res_length; + char *max_end= max_str + res_length; + size_t charlen= res_length / cs->mbmaxlen; + size_t res_length_diff; + my_bool have_contractions= my_cs_have_contractions(cs); + + for ( ; charlen > 0; charlen--) + { + my_wc_t wc, wc2; + int res; + if ((res= cs->cset->mb_wc(cs, &wc, (uchar*) ptr, (uchar*) end)) <= 0) + { + if (res == MY_CS_ILSEQ) /* Bad sequence */ + return TRUE; /* min_length and max_length are not important */ + break; /* End of the string */ + } + ptr+= res; + + if (wc == (my_wc_t) escape) + { + if ((res= cs->cset->mb_wc(cs, &wc, (uchar*) ptr, (uchar*) end)) <= 0) + { + if (res == MY_CS_ILSEQ) + return TRUE; /* min_length and max_length are not important */ + /* + End of the string: Escape is the last character. + Put escape as a normal character. + We'll will leave the loop on the next iteration. + */ + } + else + ptr+= res; + + /* Put escape character to min_str and max_str */ + if ((res= cs->cset->wc_mb(cs, wc, + (uchar*) min_str, (uchar*) min_end)) <= 0) + goto pad_set_lengths; /* No space */ + min_str+= res; + + if ((res= cs->cset->wc_mb(cs, wc, + (uchar*) max_str, (uchar*) max_end)) <= 0) + goto pad_set_lengths; /* No space */ + max_str+= res; + continue; + } + else if (wc == (my_wc_t) w_one) + { + if ((res= cs->cset->wc_mb(cs, cs->min_sort_char, + (uchar*) min_str, (uchar*) min_end)) <= 0) + goto pad_set_lengths; + min_str+= res; + + if ((res= cs->cset->wc_mb(cs, cs->max_sort_char, + (uchar*) max_str, (uchar*) max_end)) <= 0) + goto pad_set_lengths; + max_str+= res; + continue; + } + else if (wc == (my_wc_t) w_many) + { + /* + Calculate length of keys: + a\min\min... is the smallest possible string + a\max\max... is the biggest possible string + */ + *min_length= ((cs->state & MY_CS_BINSORT) ? + (size_t) (min_str - min_org) : + res_length); + *max_length= res_length; + goto pad_min_max; + } + + if (have_contractions && + my_cs_can_be_contraction_head(cs, wc) && + (res= cs->cset->mb_wc(cs, &wc2, (uchar*) ptr, (uchar*) end)) > 0) + { + uint16 *weight; + if ((wc2 == (my_wc_t) w_one || wc2 == (my_wc_t) w_many)) + { + /* Contraction head followed by a wildcard */ + *min_length= *max_length= res_length; + goto pad_min_max; + } + + if (my_cs_can_be_contraction_tail(cs, wc2) && + (weight= my_cs_contraction2_weight(cs, wc, wc2)) && weight[0]) + { + /* Contraction found */ + if (charlen == 1) + { + /* contraction does not fit to result */ + *min_length= *max_length= res_length; + goto pad_min_max; + } + + ptr+= res; + charlen--; + + /* Put contraction head */ + if ((res= cs->cset->wc_mb(cs, wc, + (uchar*) min_str, (uchar*) min_end)) <= 0) + goto pad_set_lengths; + min_str+= res; + + if ((res= cs->cset->wc_mb(cs, wc, + (uchar*) max_str, (uchar*) max_end)) <= 0) + goto pad_set_lengths; + max_str+= res; + wc= wc2; /* Prepare to put contraction tail */ + } + } + + /* Normal character, or contraction tail */ + if ((res= cs->cset->wc_mb(cs, wc, + (uchar*) min_str, (uchar*) min_end)) <= 0) + goto pad_set_lengths; + min_str+= res; + if ((res= cs->cset->wc_mb(cs, wc, + (uchar*) max_str, (uchar*) max_end)) <= 0) + goto pad_set_lengths; + max_str+= res; + } + +pad_set_lengths: + *min_length= (size_t) (min_str - min_org); + *max_length= (size_t) (max_str - max_org); + +pad_min_max: + /* + Fill up max_str and min_str to res_length. + fill() cannot set incomplete characters and + requires that "length" argument is divisible to mbminlen. + Make sure to call fill() with proper "length" argument. + */ + res_length_diff= res_length % cs->mbminlen; + cs->cset->fill(cs, min_str, min_end - min_str - res_length_diff, + cs->min_sort_char); + cs->cset->fill(cs, max_str, max_end - max_str - res_length_diff, + cs->max_sort_char); + + /* In case of incomplete characters set the remainder to 0x00's */ + if (res_length_diff) + { + /* Example: odd res_length for ucs2 */ + memset(min_end - res_length_diff, 0, res_length_diff); + memset(max_end - res_length_diff, 0, res_length_diff); + } + return FALSE; +} + + int my_wildcmp_mb_bin(CHARSET_INFO *cs, const char *str,const char *str_end, diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c index 3cf61b213eb..2f7bf030d90 100644 --- a/strings/ctype-uca.c +++ b/strings/ctype-uca.c @@ -8127,7 +8127,7 @@ MY_COLLATION_HANDLER my_collation_ucs2_uca_handler = my_strnncollsp_ucs2_uca, my_strnxfrm_ucs2_uca, my_strnxfrmlen_simple, - my_like_range_ucs2, + my_like_range_generic, my_wildcmp_uca, NULL, my_instr_mb, @@ -10134,7 +10134,7 @@ MY_COLLATION_HANDLER my_collation_utf32_uca_handler = my_strnncollsp_any_uca, my_strnxfrm_any_uca, my_strnxfrmlen_simple, - my_like_range_utf32, + my_like_range_generic, my_wildcmp_uca, NULL, my_instr_mb, @@ -10801,7 +10801,7 @@ MY_COLLATION_HANDLER my_collation_utf16_uca_handler = my_strnncollsp_any_uca, my_strnxfrm_any_uca, my_strnxfrmlen_simple, - my_like_range_utf16, + my_like_range_generic, my_wildcmp_uca, NULL, my_instr_mb, diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c index 09652c5884e..d9f546d435e 100644 --- a/strings/ctype-ucs2.c +++ b/strings/ctype-ucs2.c @@ -903,7 +903,8 @@ static void my_fill_mb2(CHARSET_INFO *cs __attribute__((unused)), char *s, size_t l, int fill) { - for ( ; l >= 2; s[0]= 0, s[1]= fill, s+= 2, l-= 2); + DBUG_ASSERT(fill <= 0xFFFF); + for ( ; l >= 2; s[0]= (fill >> 8), s[1]= (fill & 0xFF), s+= 2, l-= 2); } @@ -1563,98 +1564,6 @@ my_hash_sort_utf16_bin(CHARSET_INFO *cs __attribute__((unused)), } -/** - Calculate min_str and max_str that ranges a LIKE string. - - @param ptr Pointer to LIKE pattern. - @param ptr_length Length of LIKE pattern. - @param escape Escape character in LIKE. (Normally '\'). - All escape characters should be removed - from min_str and max_str. - @param res_length Length of min_str and max_str. - @param min_str Smallest case sensitive string that ranges LIKE. - Should be space padded to res_length. - @param max_str Largest case sensitive string that ranges LIKE. - Normally padded with the biggest character sort value. - - @return Optimization status. - @retval FALSE if LIKE pattern can be optimized - @rerval TRUE if LIKE can't be optimized. -*/ - -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) -{ - const char *end=ptr+ptr_length; - char *min_org=min_str; - char *min_end=min_str+res_length; - size_t charlen= res_length / cs->mbmaxlen; - - for ( ; ptr + 1 < end && min_str + 1 < min_end && charlen > 0 - ; ptr+=2, charlen--) - { - if (ptr[0] == '\0' && ptr[1] == escape && ptr + 1 < end) - { - ptr+=2; /* Skip escape */ - *min_str++= *max_str++ = ptr[0]; - *min_str++= *max_str++ = ptr[1]; - continue; - } - if (ptr[0] == '\0' && ptr[1] == w_one) /* '_' in SQL */ - { - *min_str++= (char) (cs->min_sort_char >> 8); - *min_str++= (char) (cs->min_sort_char & 255); - *max_str++= (char) (cs->max_sort_char >> 8); - *max_str++= (char) (cs->max_sort_char & 255); - continue; - } - if (ptr[0] == '\0' && ptr[1] == w_many) /* '%' in SQL */ - { - /* - Calculate length of keys: - 'a\0\0... is the smallest possible string when we have space expand - a\ff\ff... is the biggest possible string - */ - *min_length= ((cs->state & MY_CS_BINSORT) ? (size_t) (min_str - min_org) : - res_length); - *max_length= res_length; - do { - *min_str++ = 0; - *min_str++ = 0; - *max_str++ = (char) (cs->max_sort_char >> 8); - *max_str++ = (char) (cs->max_sort_char & 255); - } while (min_str + 1 < min_end); - return FALSE; - } - *min_str++= *max_str++ = ptr[0]; - *min_str++= *max_str++ = ptr[1]; - } - - /* Temporary fix for handling w_one at end of string (key compression) */ - { - char *tmp; - for (tmp= min_str ; tmp-1 > min_org && tmp[-1] == '\0' && tmp[-2]=='\0';) - { - *--tmp=' '; - *--tmp='\0'; - } - } - - *min_length= *max_length = (size_t) (min_str - min_org); - while (min_str + 1 < min_end) - { - *min_str++ = *max_str++ = '\0'; - *min_str++ = *max_str++ = ' '; /* Because if key compression */ - } - return FALSE; -} - - static MY_COLLATION_HANDLER my_collation_utf16_general_ci_handler = { NULL, /* init */ @@ -1662,7 +1571,7 @@ static MY_COLLATION_HANDLER my_collation_utf16_general_ci_handler = my_strnncollsp_utf16, my_strnxfrm_unicode, my_strnxfrmlen_simple, - my_like_range_utf16, + my_like_range_generic, my_wildcmp_utf16_ci, my_strcasecmp_mb2_or_mb4, my_instr_mb, @@ -1678,7 +1587,7 @@ static MY_COLLATION_HANDLER my_collation_utf16_bin_handler = my_strnncollsp_utf16_bin, my_strnxfrm_unicode_full_bin, my_strnxfrmlen_unicode_full_bin, - my_like_range_utf16, + my_like_range_generic, my_wildcmp_utf16_bin, my_strcasecmp_mb2_or_mb4, my_instr_mb, @@ -2551,113 +2460,6 @@ my_strnncollsp_utf32_bin(CHARSET_INFO *cs __attribute__((unused)), } -/** - Calculate min_str and max_str that ranges a LIKE string. - - @param ptr Pointer to LIKE pattern. - @param ptr_length Length of LIKE pattern. - @param escape Escape character in LIKE. (Normally '\'). - All escape characters should be removed - from min_str and max_str. - @param res_length Length of min_str and max_str. - @param min_str Smallest case sensitive string that ranges LIKE. - Should be space padded to res_length. - @param max_str Largest case sensitive string that ranges LIKE. - Normally padded with the biggest character sort value. - - @return Optimization status. - @retval FALSE if LIKE pattern can be optimized - @rerval TRUE if LIKE can't be optimized. -*/ - -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) -{ - const char *end= ptr + ptr_length; - char *min_org= min_str; - char *min_end= min_str + res_length; - char *max_end= max_str + res_length; - size_t charlen= res_length / cs->mbmaxlen; - - DBUG_ASSERT((res_length % 4) == 0); - - for ( ; charlen > 0; ptr+= 4, charlen--) - { - my_wc_t wc; - int res; - if ((res= my_utf32_uni(cs, &wc, (uchar*) ptr, (uchar*) end)) < 0) - { - my_fill_utf32(cs, min_str, min_end - min_str, cs->min_sort_char); - my_fill_utf32(cs, max_str, min_end - min_str, cs->max_sort_char); - /* min_length and max_legnth are not important */ - return TRUE; - } - - if (wc == (my_wc_t) escape) - { - ptr+= 4; /* Skip escape */ - if ((res= my_utf32_uni(cs, &wc, (uchar*) ptr, (uchar*) end)) < 0) - { - my_fill_utf32(cs, min_str, min_end - min_str, cs->min_sort_char); - my_fill_utf32(cs, max_str, max_end - min_str, cs->max_sort_char); - /* min_length and max_length are not important */ - return TRUE; - } - if (my_uni_utf32(cs, wc, (uchar*) min_str, (uchar*) min_end) != 4 || - my_uni_utf32(cs, wc, (uchar*) max_str, (uchar*) max_end) != 4) - goto pad_set_lengths; - *min_str++= 4; - *max_str++= 4; - continue; - } - - if (wc == (my_wc_t) w_one) - { - if (my_uni_utf32(cs, cs->min_sort_char, (uchar*) min_str, (uchar*) min_end) != 4 || - my_uni_utf32(cs, cs->max_sort_char, (uchar*) max_str, (uchar*) max_end) != 4) - goto pad_set_lengths; - min_str+= 4; - max_str+= 4; - continue; - } - - if (wc == (my_wc_t) w_many) - { - /* - Calculate length of keys: - 'a\0\0... is the smallest possible string when we have space expand - a\ff\ff... is the biggest possible string - */ - *min_length= ((cs->state & MY_CS_BINSORT) ? - (size_t) (min_str - min_org) : - res_length); - *max_length= res_length; - goto pad_min_max; - } - - /* Normal character */ - if (my_uni_utf32(cs, wc, (uchar*) min_str, (uchar*) min_end) != 4 || - my_uni_utf32(cs, wc, (uchar*) max_str, (uchar*) max_end) != 4) - goto pad_set_lengths; - min_str+= 4; - max_str+= 4; - } - -pad_set_lengths: - *min_length= *max_length= (size_t) (min_str - min_org); - -pad_min_max: - my_fill_utf32(cs, min_str, min_end - min_str, cs->min_sort_char); - my_fill_utf32(cs, max_str, max_end - max_str, cs->max_sort_char); - return FALSE; -} - - static size_t my_scan_utf32(CHARSET_INFO *cs, const char *str, const char *end, int sequence_type) @@ -2689,7 +2491,7 @@ static MY_COLLATION_HANDLER my_collation_utf32_general_ci_handler = my_strnncollsp_utf32, my_strnxfrm_unicode, my_strnxfrmlen_utf32, - my_like_range_utf32, + my_like_range_generic, my_wildcmp_utf32_ci, my_strcasecmp_mb2_or_mb4, my_instr_mb, @@ -2705,7 +2507,7 @@ static MY_COLLATION_HANDLER my_collation_utf32_bin_handler = my_strnncollsp_utf32_bin, my_strnxfrm_unicode_full_bin, my_strnxfrmlen_unicode_full_bin, - my_like_range_utf32, + my_like_range_generic, my_wildcmp_utf32_bin, my_strcasecmp_mb2_or_mb4, my_instr_mb, @@ -3252,120 +3054,6 @@ void my_hash_sort_ucs2_bin(CHARSET_INFO *cs __attribute__((unused)), } } -/* -** Calculate min_str and max_str that ranges a LIKE string. -** Arguments: -** ptr Pointer to LIKE string. -** ptr_length Length of LIKE string. -** escape Escape character in LIKE. (Normally '\'). -** All escape characters should be removed from min_str and max_str -** res_length Length of min_str and max_str. -** min_str Smallest case sensitive string that ranges LIKE. -** Should be space padded to res_length. -** max_str Largest case sensitive string that ranges LIKE. -** Normally padded with the biggest character sort value. -** -** The function should return 0 if ok and 1 if the LIKE string can't be -** optimized ! -*/ - -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) -{ - const char *end=ptr+ptr_length; - char *min_org=min_str; - char *min_end=min_str+res_length; - size_t charlen= res_length / cs->mbmaxlen; - const char *contraction_flags= cs->contractions ? - ((const char*) cs->contractions) + 0x40*0x40 : NULL; - - for ( ; ptr + 1 < end && min_str + 1 < min_end && charlen > 0 - ; ptr+=2, charlen--) - { - if (ptr[0] == '\0' && ptr[1] == escape && ptr + 1 < end) - { - ptr+=2; /* Skip escape */ - *min_str++= *max_str++ = ptr[0]; - *min_str++= *max_str++ = ptr[1]; - continue; - } - if (ptr[0] == '\0' && ptr[1] == w_one) /* '_' in SQL */ - { - *min_str++= (char) (cs->min_sort_char >> 8); - *min_str++= (char) (cs->min_sort_char & 255); - *max_str++= (char) (cs->max_sort_char >> 8); - *max_str++= (char) (cs->max_sort_char & 255); - continue; - } - if (ptr[0] == '\0' && ptr[1] == w_many) /* '%' in SQL */ - { -fill_max_and_min: - /* - Calculate length of keys: - 'a\0\0... is the smallest possible string when we have space expand - a\ff\ff... is the biggest possible string - */ - *min_length= ((cs->state & MY_CS_BINSORT) ? (size_t) (min_str - min_org) : - res_length); - *max_length= res_length; - do { - *min_str++ = 0; - *min_str++ = 0; - *max_str++ = (char) (cs->max_sort_char >> 8); - *max_str++ = (char) (cs->max_sort_char & 255); - } while (min_str + 1 < min_end); - return 0; - } - - if (contraction_flags && ptr + 3 < end && - ptr[0] == '\0' && contraction_flags[(uchar) ptr[1]]) - { - /* Contraction head found */ - if (ptr[2] == '\0' && (ptr[3] == w_one || ptr[3] == w_many)) - { - /* Contraction head followed by a wildcard, quit */ - goto fill_max_and_min; - } - - /* - Check if the second letter can be contraction part, - and if two letters really produce a contraction. - */ - if (ptr[2] == '\0' && contraction_flags[(uchar) ptr[3]] && - cs->contractions[(ptr[1]-0x40)*0x40 + ptr[3] - 0x40]) - { - /* Contraction found */ - if (charlen == 1 || min_str + 2 >= min_end) - { - /* Full contraction doesn't fit, quit */ - goto fill_max_and_min; - } - - /* Put contraction head */ - *min_str++= *max_str++= *ptr++; - *min_str++= *max_str++= *ptr++; - charlen--; - } - } - /* Put contraction tail, or a single character */ - *min_str++= *max_str++ = ptr[0]; - *min_str++= *max_str++ = ptr[1]; - } - - *min_length= *max_length = (size_t) (min_str - min_org); - while (min_str + 1 < min_end) - { - *min_str++ = *max_str++ = '\0'; - *min_str++ = *max_str++ = ' '; /* Because if key compression */ - } - return 0; -} - - static MY_COLLATION_HANDLER my_collation_ucs2_general_ci_handler = { @@ -3374,7 +3062,7 @@ static MY_COLLATION_HANDLER my_collation_ucs2_general_ci_handler = my_strnncollsp_ucs2, my_strnxfrm_unicode, my_strnxfrmlen_simple, - my_like_range_ucs2, + my_like_range_generic, my_wildcmp_ucs2_ci, my_strcasecmp_mb2_or_mb4, my_instr_mb, @@ -3390,7 +3078,7 @@ static MY_COLLATION_HANDLER my_collation_ucs2_bin_handler = my_strnncollsp_ucs2_bin, my_strnxfrm_unicode, my_strnxfrmlen_simple, - my_like_range_ucs2, + my_like_range_generic, my_wildcmp_ucs2_bin, my_strcasecmp_mb2_or_mb4, my_instr_mb, diff --git a/strings/longlong2str-x86.s b/strings/longlong2str-x86.s deleted file mode 100644 index 3de43a96e78..00000000000 --- a/strings/longlong2str-x86.s +++ /dev/null @@ -1,216 +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 - -# Optimized longlong2str function for Intel 80x86 (gcc/gas syntax) -# Some set sequences are optimized for pentuimpro II - - .file "longlong2str-x86.s" - .version "1.02" - -.text - .align 4 - -.globl longlong2str_with_dig_vector - .type longlong2str_with_dig_vector,@function - -longlong2str_with_dig_vector: - subl $80,%esp # Temporary buffer for up to 64 radix-2 digits - pushl %ebp - pushl %esi - pushl %edi - pushl %ebx - movl 100(%esp),%esi # esi = Lower part of val - movl 112(%esp),%ebx # ebx = Radix - movl 104(%esp),%ebp # ebp = Higher part of val - movl 108(%esp),%edi # edi = dst - - testl %ebx,%ebx - jge .L144 # Radix was positive - negl %ebx # Change radix to positive - testl %ebp,%ebp # Test if given value is negative - jge .L144 - movb $45,(%edi) # Add sign - incl %edi # Change sign of val - negl %esi - adcl $0,%ebp - negl %ebp - -.L144: # Test that radix is between 2 and 36 - movl %ebx, %eax - addl $-2,%eax # Test that radix is between 2 and 36 - cmpl $34,%eax - ja .Lerror # Radix was not in range - - leal 92(%esp),%ecx # End of buffer - movl %edi, 108(%esp) # Store possible modified dest - movl 116(%esp), %edi # dig_vec_upper - testl %ebp,%ebp # Test if value > 0xFFFFFFFF - jne .Llongdiv - cmpl %ebx, %esi # Test if <= radix, for easy loop - movl %esi, %eax # Value in eax (for Llow) - jae .Llow - - # Value is one digit (negative or positive) - movb (%eax,%edi),%bl - movl 108(%esp),%edi # get dst - movb %bl,(%edi) - incl %edi # End null here - jmp .L10_end - -.Llongdiv: - # Value in ebp:esi. div the high part by the radix, - # then div remainder + low part by the radix. - movl %ebp,%eax # edx=0,eax=high(from ebp) - xorl %edx,%edx - decl %ecx - divl %ebx - movl %eax,%ebp # edx=result of last, eax=low(from esi) - movl %esi,%eax - divl %ebx - movl %eax,%esi # ebp:esi = quotient - movb (%edx,%edi),%dl # Store result number in temporary buffer - testl %ebp,%ebp - movb %dl,(%ecx) # store value in buff - ja .Llongdiv # (Higher part of val still > 0) - - .align 4 -.Llow: # Do rest with integer precision - # Value in 0:eax. div 0 + low part by the radix. - xorl %edx,%edx - decl %ecx - divl %ebx - movb (%edx,%edi),%dl # bh is always zero as ebx=radix < 36 - testl %eax,%eax - movb %dl,(%ecx) - jne .Llow - -.L160: - movl 108(%esp),%edi # get dst - -.Lcopy_end: - leal 92(%esp),%esi # End of buffer -.Lmov: # mov temporary buffer to result (%ecx -> %edi) - movb (%ecx), %al - movb %al, (%edi) - incl %ecx - incl %edi - cmpl %ecx,%esi - jne .Lmov - -.L10_end: - movl %edi,%eax # Pointer to end null - movb $0,(%edi) # Store the end null - -.L165: - popl %ebx - popl %edi - popl %esi - popl %ebp - addl $80,%esp - ret - -.Lerror: - xorl %eax,%eax # Wrong radix - jmp .L165 - -.Lfe3: - .size longlong2str_with_dig_vector,.Lfe3-longlong2str_with_dig_vector - -# -# This is almost equal to the above, except that we can do the final -# loop much more efficient -# - - .align 4 - -.globl longlong10_to_str - .type longlong10_to_str,@function -longlong10_to_str: - subl $80,%esp - pushl %ebp - pushl %esi - pushl %edi - pushl %ebx - movl 100(%esp),%esi # Lower part of val - movl 104(%esp),%ebp # Higher part of val - movl 108(%esp),%edi # get dst - movl 112(%esp),%ebx # Radix (10 or -10) - testl %ebx,%ebx - jge .L10_10 # Positive radix - - negl %ebx # Change radix to positive (= 10) - - testl %ebp,%ebp # Test if negative value - jge .L10_10 - movb $45,(%edi) # Add sign - incl %edi - negl %esi # Change sign of val (ebp:esi) - adcl $0,%ebp - negl %ebp - -.L10_10: - leal 92(%esp),%ecx # End of buffer - testl %ebp,%ebp # Test if value > 0xFFFFFFFF - jne .L10_longdiv - cmpl $10, %esi # Test if <= radix, for easy loop - movl %esi, %ebx # Value in eax (for L10_low) - jae .L10_low - - # Value is one digit (negative or positive) - addb $48, %bl - movb %bl,(%edi) - incl %edi - jmp .L10_end - .align 4 - -.L10_longdiv: - # val is stored in in ebp:esi - movl %ebp,%eax # High part of value - xorl %edx,%edx - divl %ebx # Divide by 10 - movl %eax,%ebp - movl %esi,%eax - divl %ebx # Divide by 10 - decl %ecx - movl %eax,%esi # quotent in ebp:esi - addl $48,%edx # Convert to ascii - movb %dl,(%ecx) # store value in buff - -.L10_30: - testl %ebp,%ebp - ja .L10_longdiv - movl %esi,%ebx # Move val to %ebx - -.L10_low: - # The following code uses some tricks to change division by 10 to - # multiplication and shifts - movl $0xcccccccd,%esi - -.L10_40: # Divide %ebx with 10 - movl %ebx,%eax - mull %esi - decl %ecx - shrl $3,%edx - leal (%edx,%edx,4),%eax - addl %eax,%eax - subb %al,%bl # %bl now contains val % 10 - addb $48,%bl - movb %bl,(%ecx) - movl %edx,%ebx - testl %ebx,%ebx - jne .L10_40 - jmp .Lcopy_end # Shared end with longlong2str - -.L10end: - .size longlong10_to_str,.L10end-longlong10_to_str diff --git a/strings/longlong2str_asm.c b/strings/longlong2str_asm.c deleted file mode 100644 index e5628043da6..00000000000 --- a/strings/longlong2str_asm.c +++ /dev/null @@ -1,33 +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 */ - -/* - Wrapper for longlong2str.s - - We need this because the assembler code can't access the local variable - _dig_vector in a portable manner. -*/ - -#include <my_global.h> -#include "m_string.h" - -extern char *longlong2str_with_dig_vector(longlong val,char *dst,int radix, - const char *dig_vector); - -char *ll2str(longlong val,char *dst,int radix, int upcase) -{ - return longlong2str_with_dig_vector(val, dst, radix, - upcase ? _dig_vec_upper : _dig_vec_lower); -} diff --git a/strings/my_strtoll10-x86.s b/strings/my_strtoll10-x86.s deleted file mode 100644 index f73428de7de..00000000000 --- a/strings/my_strtoll10-x86.s +++ /dev/null @@ -1,418 +0,0 @@ -# Copyright (C) 2003 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -# Implemention of my_strtoll(): Converting a string to a 64 bit integer. -# For documentation, check my_strtoll.c - - .file "my_strtoll10-x86.s" - .version "01.02" - -.text - .align 4 - -.globl my_strtoll10 - .type my_strtoll10,@function - - - # Used stack variables - # ebp-4 dummy for storing endptr if endptr = 0 - # ebp-8 First 9 digits of return values - # ebp-12 Pointer to first digit of second part - # ebp-16 Store lowest 2 digits - # ebp-20 != 0 if value was negative - # ebp-24 High max value - # ebp-28 Middle max value - # ebp-32 Low max value - # ebp-36 Temp value - - # esi Pointer to input string - # ebx End of string - -my_strtoll10: - pushl %ebp - movl %esp,%ebp - subl $48,%esp - pushl %esi - pushl %edi - pushl %ebx - movl 8(%ebp),%esi # esi= nptr - movl 16(%ebp),%ecx # ecx= error (Will be overwritten later) - movl 12(%ebp),%eax # eax= endptr - cmpl $0,%eax # if (endptr) - je .L110 - -# Fixed length string - movl (%eax),%ebx # bx= end-of-string - .p2align 4,,7 -.L100: - cmpl %ebx,%esi - je .Lno_conv - movb (%esi), %al # al= next byte - incl %esi - cmpb $32,%al # Skip space - je .L100 - cmpb $9,%al # Skip tab - je .L100 - jmp .L130 - -# String that ends with \0 - -.L110: - leal -4(%ebp),%edi - movl %edi,12(%ebp) # endptr= &dummy, for easier end check - .p2align 4,,7 -.L120: - movb (%esi), %al # al= next byte - incl %esi - cmpb $32,%al - je .L120 - cmpb $9,%al - je .L120 - testb %al,%al # Test if we found end \0 - je .Lno_conv - leal 65535(%esi),%ebx # ebx = end-of-string - -.L130: - cmpb $45,%al # Test if '-' - jne .Lpositive - - # negative number - movl $-1,(%ecx) # error = -1 (mark that number is negative) - movl $1,-20(%ebp) # negative= 1 - movl $92233720,-24(%ebp) - movl $368547758,-28(%ebp) - movl $8,-32(%ebp) - jmp .L460 - - .p2align 4,,7 -.Lpositive: - movl $0,(%ecx) # error=0 - movl $0,-20(%ebp) # negative= 0 - movl $184467440,-24(%ebp) - movl $737095516,-28(%ebp) - movl $15,-32(%ebp) - cmpb $43,%al # Check if '+' - jne .L462 - -.L460: - cmpl %ebx,%esi # Check if overflow - je .Lno_conv - movb (%esi), %al # al= next byte after sign - incl %esi - - # Remove pre zero to be able to handle a lot of pre-zero -.L462: - cmpb $48,%al - jne .L475 # Number doesn't start with 0 - decl %esi - .p2align 4,,7 - - # Skip pre zeros -.L481: - incl %esi # Skip processed byte - cmpl %ebx,%esi - je .Lms_return_zero - cmpb (%esi),%al # Test if next byte is also zero - je .L481 - leal 9(%esi),%ecx # ecx = end-of-current-part - xorl %edi,%edi # Store first 9 digits in edi - jmp .L482 - .p2align 4,,7 - - # Check if first char is a valid number -.L475: - addb $-48,%al - cmpb $9,%al - ja .Lno_conv -.L477: - movzbl %al,%edi # edi = first digit - leal 8(%esi),%ecx # ecx = end-of-current-part - - # Handle first 8/9 digits and store them in edi -.L482: - cmpl %ebx,%ecx - jbe .L522 - movl %ebx,%ecx # ecx = min(end-of-current-part, end-of-string) - jmp .L522 - - .p2align 4,,7 -.L488: - movb (%esi), %al # al= next byte - incl %esi - addb $-48,%al - cmpb $9,%al - ja .Lend_i_dec_esi - - # Calculate edi= edi*10 + al - leal (%edi,%edi,4),%edx - movzbl %al,%eax - leal (%eax,%edx,2),%edi -.L522: - cmpl %ecx,%esi # If more digits at this level - jne .L488 - cmpl %ebx,%esi # If end of string - je .Lend_i - - movl %edi,-8(%ebp) # Store first 9 digits - movl %esi,-12(%ebp) # store pos to first digit of second part - - # Calculate next 9 digits and store them in edi - - xorl %edi,%edi - leal 9(%esi),%ecx # ecx= end-of-current-part - movl %ecx,-36(%ebp) # Store max length - cmpl %ebx,%ecx - jbe .L498 - movl %ebx,%ecx # ecx = min(end-of-current-part, end-of-string) - - .p2align 4,,7 -.L498: - movb (%esi), %al # al= next byte - incl %esi - addb $-48,%al - cmpb $9,%al - ja .Lend_i_and_j_decl_esi - - # Calculate edi= edi*10 + al - leal (%edi,%edi,4),%edx - movzbl %al,%eax - leal (%eax,%edx,2),%edi - - cmpl %ecx,%esi # If end of current part - jne .L498 - cmpl %ebx,%esi # If end of string - jne .L500 - cmpl -36(%ebp),%esi # Test if string is less than 18 digits - jne .Lend_i_and_j -.L499: - movl $1000000000,%eax - jmp .Lgot_factor # 18 digit string - - # Handle the possible next to last digit and store in ecx -.L500: - movb (%esi),%al - addb $-48,%al - cmpb $9,%al - ja .L499 # 18 digit string - - incl %esi - movzbl %al,%ecx - cmpl %ebx,%esi # If end of string - je .Lend4 - - movb (%esi),%al # Read last digit - addb $-48,%al - cmpb $9,%al - ja .Lend4 - - # ecx= ecx*10 + al - leal (%ecx,%ecx,4),%edx - movzbl %al,%eax - leal (%eax,%edx,2),%ecx - - movl 12(%ebp),%eax # eax = endptr - incl %esi - movl %esi,(%eax) # *endptr = end-of-string - cmpl %ebx,%esi - je .L505 # At end of string - - movb (%esi),%al # check if extra digits - addb $-48,%al - cmpb $9,%al - jbe .Loverflow - - # At this point we have: - # -8(%ebp) First 9 digits - # edi Next 9 digits - # ecx Last 2 digits - # *endpos end-of-string - -.L505: # Check that we are not going to get overflow for unsigned long long - movl -8(%ebp),%eax # First 9 digits - cmpl -24(%ebp),%eax - ja .Loverflow - jne .L507 - cmpl -28(%ebp),%edi - ja .Loverflow - jne .L507 - cmpl -32(%ebp),%ecx - ja .Loverflow - -.L507: - movl %edi,-4(%ebp) # Save middle bytes - movl %ecx,%esi # esi = 2 last digits - movl $1215752192,%ecx # %ecx= lower_32_bits(100000000000) - mull %ecx - imull $23,-8(%ebp),%ecx - movl $0,-36(%ebp) - movl %eax,%ebx - imull $1215752192,-36(%ebp),%eax - movl %edx,%edi - addl %ecx,%edi - addl %eax,%edi # Temp in edi:ebx - - movl $100,%eax # j= j*100 - mull -4(%ebp) - addl %ebx,%eax # edx:eax+= edi:ebx - adcl %edi,%edx - addl %esi,%eax - adcl $0,%edx - jmp .Lms_return - -.Loverflow: - # When we come here, *endptr is already updated - - movl 16(%ebp),%edx # edx= error - movl $34,(%edx) # *error = 34 - movl $-1,%eax - movl %eax,%edx - cmpl $0,-20(%ebp) # If negative - je .Lms_return - xor %eax,%eax # edx:eax = LONGLONG_LMIN - movl $-2147483648,%edx - jmp .Lms_return - - # Return value that is in %edi as long long - .p2align 4,,7 -.Lend_i_dec_esi: - decl %esi # Fix so that it points at last digit -.Lend_i: - xorl %edx,%edx - movl %edi,%eax - cmpl $0,-20(%ebp) - je .Lreturn_save_endptr # Positive number - negl %eax - cltd # Neg result in edx:eax - jmp .Lreturn_save_endptr - - # Return value (%ebp-8) * lfactor[(uint) (edx-start)] + edi - .p2align 4,,7 -.Lend_i_and_j_decl_esi: - decl %esi # Fix so that it points at last digit -.Lend_i_and_j: - movl %esi,%ecx - subl -12(%ebp),%ecx # ecx= number of digits in second part - - # Calculate %eax= 10 ** %cl, where %cl <= 8 - # With an array one could do this with: - # movl 10_factor_table(,%ecx,4),%eax - # We calculate the table here to avoid problems in - # position independent code (gcc -pic) - - cmpb $3,%cl - ja .L4_to_8 - movl $1000, %eax - je .Lgot_factor # %cl=3, eax= 1000 - movl $10, %eax - cmpb $1,%cl # %cl is here 0 - 2 - je .Lgot_factor # %cl=1, eax= 10 - movl $100, %eax - ja .Lgot_factor # %cl=2, eax=100 - movl $1, %eax - jmp .Lgot_factor # %cl=0, eax=1 - -.L4_to_8: # %cl is here 4-8 - cmpb $5,%cl - movl $100000, %eax - je .Lgot_factor # %cl=5, eax=100000 - movl $10000, %eax - jbe .Lgot_factor # %cl=4, eax=10000 - movl $10000000, %eax - cmpb $7,%cl - je .Lgot_factor # %cl=7, eax=10000000 - movl $100000000, %eax - ja .Lgot_factor # %cl=8, eax=100000000 - movl $1000000, %eax # %cl=6, eax=1000000 - - # Return -8(%ebp) * %eax + edi - .p2align 4,,7 -.Lgot_factor: - mull -8(%ebp) - addl %edi,%eax - adcl $0,%edx - cmpl $0,-20(%ebp) # if negative - je .Lreturn_save_endptr - negl %eax # Neg edx:%eax - adcl $0,%edx - negl %edx - jmp .Lreturn_save_endptr - - # Return -8(%ebp) * $10000000000 + edi*10 + ecx - .p2align 4,,7 -.Lend4: - movl %ecx,-16(%ebp) # store lowest digits - movl 12(%ebp),%ebx - movl %esi,(%ebx) # *endpos = end-of-string - movl -8(%ebp),%eax # First 9 digits - movl $1410065408,%ecx # ecx= lower_32_bits(10000000000) - mull %ecx - movl $0,-36(%ebp) - movl %eax,%ebx # Store lowest 32 byte from multiplication - imull $1410065408,-36(%ebp),%eax - movl -8(%ebp),%ecx # First 9 digits - movl %edx,%esi - addl %ecx,%ecx - addl %ecx,%esi - addl %eax,%esi # %esi:%ebx now has -8(%ebp) * $10000000000 - - movl $10,%eax # Calc edi*10 - mull %edi - addl %ebx,%eax # And add to result - adcl %esi,%edx - addl -16(%ebp),%eax # Add lowest digit - adcl $0,%edx - cmpl $0,-20(%ebp) # if negative - je .Lms_return - - cmpl $-2147483648,%edx # Test if too big signed integer - ja .Loverflow - jne .L516 - testl %eax,%eax - ja .Loverflow - -.L516: - negl %eax - adcl $0,%edx - negl %edx - jmp .Lms_return - - .p2align 4,,7 -.Lno_conv: # Not a legal number - movl 16(%ebp),%eax - movl $33,(%eax) # error= edom - -.Lms_return_zero: - xorl %eax,%eax # Return zero - xorl %edx,%edx - - .p2align 4,,7 -.Lreturn_save_endptr: - movl 12(%ebp),%ecx # endptr= end-of-string - movl %esi,(%ecx) # *endptr= end-of-string - -.Lms_return: - popl %ebx - popl %edi - popl %esi - movl %ebp,%esp - popl %ebp - ret - -.my_strtoll10_end: - .size my_strtoll10,.my_strtoll10_end-my_strtoll10 - .comm res,240,32 - .comm end_ptr,120,32 - .comm error,120,32 - .ident "Monty" diff --git a/strings/str_test.c b/strings/str_test.c deleted file mode 100644 index 7e304fbd10a..00000000000 --- a/strings/str_test.c +++ /dev/null @@ -1,275 +0,0 @@ -/* Copyright (C) 2000-2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Test of all stringfunktions that is coded in assembler */ - -#include <my_global.h> -#include <stdarg.h> -#include "m_string.h" - -#define F_LEN 8 -#define F_CHAR 'A' -#define F_FILL 'B' -#define T_LEN 15 -#define T_CHAR 'D' -#define T_FILL 'E' -#define F_PREFILL '0' -#define T_PREFILL '1' - -static char from_buff[100],to_buff[100]; -static char * from, *to; -static int errors,tests; -static int test_strarg(const char *name,...); -static void init_strings (void); /* Init from and to */ -void test_arg (const char *message,long func_value,long value); -int compare_buff(const char *message,char * b1,char * b2,int length, - pchar fill, pchar prefill); - -static int my_test(int a) -{ - return a ? 1 : 0; -} - -int main(void) -{ - static char v1[]="Monty",v2[]="on",v3[]="Montys",v4[]="ty",v5[]="gr", - v6[]="hohohoo",v7[]="hohoo",v8[]="hohooo",v9[]="t", - cont[]="qwet"; - errors=tests=0; - init_strings(); - - test_arg("memcmp(from,to,5)",(long) my_test(memcmp(from,to,5)),1L); - test_arg("memcmp(from,from,5)",(long) memcmp(from,from,5),0L); - - test_arg("memcmp(from,to,0)",(long) memcmp(from,to,0),0L); - test_arg("strend(from)",(long) strend(from),(long) from+F_LEN); - test_arg("strchr(v1,'M')",(long) strchr(v1,'M'),(long) v1); - test_arg("strchr(v1,'y')",(long) strchr(v1,'y'),(long) v1+4); - test_arg("strchr(v1,'x')",(long) strchr(v1,'x'),0L); - test_arg("strcont(v1,cont)",(long) strcont(v1,cont),(long) v1+3); - test_arg("strcont(v1,v2)",(long) strcont(v1,v2),(long) v1+1); - test_arg("strcont(v1,v5)",(long) strcont(v1,v5),0L); - test_arg("is_prefix(v3,v1)",(long) is_prefix(v3,v1),1L); - test_arg("is_prefix(v1,v3)",(long) is_prefix(v1,v3),0L); - test_arg("is_prefix(v3,v4)",(long) is_prefix(v3,v4),0L); - test_arg("strstr(v1,v1)",(long) strstr(v1,v1),(long) v1); - test_arg("strstr(v1,v2)",(long) strstr(v1,v2),(long) v1+1); - test_arg("strstr(v1,v4)",(long) strstr(v1,v4),(long) v1+3); - test_arg("strstr(v6,v7)",(long) strstr(v6,v7),(long) v6+2); - test_arg("strstr(v1,v9)",(long) strstr(v1,v9),(long) v1+3); - test_arg("strstr(v1,v3)",(long) strstr(v1,v3),0L); - test_arg("strstr(v1,v5)",(long) strstr(v1,v5),0L); - test_arg("strstr(v6,v8)",(long) strstr(v6,v8),0L); - - test_arg("strlen(from)",(long) strlen(from),(long) F_LEN); - test_arg("strlen(\"\")",(long) strlen(""),0L); -#ifdef HAVE_STRNLEN - test_arg("strnlen(from,3)",(long) strnlen(from,3),3L); - test_arg("strnlen(from,0)",(long) strnlen(from,0),0L); - test_arg("strnlen(from,1000)",(long) strnlen(from,1000),(long) F_LEN); -#endif - - test_strarg("bfill(to,4,' ')",(bfill(to,4,' '),0L),INT_MAX32,4,' ',0,0); - test_strarg("bfill(from,0,' ')",(bfill(from,0,' '),0L),INT_MAX32,0,0); - test_strarg("bzero(to,3)",(bzero(to,3),0L),INT_MAX32,3,0,0,0); - test_strarg("bzero(to,0)",(bzero(to,0),0L),INT_MAX32,0,0); - test_strarg("bmove(to,from,4)",(bmove(to,from,4),0L),INT_MAX32,4,F_CHAR, - 0,0); - test_strarg("bmove(to,from,0)",(bmove(to,from,0),0L),INT_MAX32,0,0); - test_strarg("bmove_upp(to+6,from+6,3)",(bmove_upp(to+6,from+6,3),0L),INT_MAX32, - 3,T_CHAR,3,F_CHAR,0,0); - test_strarg("bmove_upp(to,from,0)",(bmove_upp(to,from,0),0L),INT_MAX32,0,0); - test_strarg("memcpy(to,from,8)",(memcpy(to,from,8),0L),INT_MAX32, - 8,F_CHAR,0,0); - test_strarg("strappend(to,3,' ')",(strappend(to,3,' '),0L),INT_MAX32, - 3,T_CHAR,1,0,T_LEN-4,T_CHAR,1,0,0,0); - test_strarg("strappend(to,T_LEN+5,' ')",(strappend(to,T_LEN+5,' '),0L),INT_MAX32, - T_LEN,T_CHAR,5,' ',1,0,0,0); - test_strarg("strcat(to,from)",strcat(to,from),to,T_LEN,T_CHAR, - F_LEN,F_CHAR,1,0,0,0); - test_strarg("strcat(to,\"\")",strcat(to,""),INT_MAX32,0,0); - test_strarg("strfill(to,4,' ')",strfill(to,4,' '),to+4,4,' ',1,0,0,0); - test_strarg("strfill(from,0,' ')",strfill(from,0,' '),from,0,1,0,0); - test_strarg("strmake(to,from,4)",strmake(to,from,4),to+4,4,F_CHAR, - 1,0,0,0); - test_strarg("strmake(to,from,0)",strmake(to,from,0),to+0,1,0,0,0); - test_strarg("strmov(to,from)",strmov(to,from),to+F_LEN,F_LEN,F_CHAR,0,0); - test_strarg("strmov(to,\"\")",strmov(to,""),to,1,0,0,0); - test_strarg("strnmov(to,from,2)",strnmov(to,from,2),to+2,2,F_CHAR,0,0); - test_strarg("strnmov(to,from,F_LEN+5)",strnmov(to,from,F_LEN+5),to+F_LEN, - F_LEN,F_CHAR,1,0,0,0); - test_strarg("strnmov(to,\"\",2)",strnmov(to,"",2),to,1,0,0,0); - test_strarg("strxmov(to,from,\"!!\",NullS)",strxmov(to,from,"!!",NullS),to+F_LEN+2,F_LEN,F_CHAR,2,'!',0,0,0); - test_strarg("strxmov(to,NullS)",strxmov(to,NullS),to,1,0,0,0); - test_strarg("strxmov(to,from,from,from,from,from,'!!',from,NullS)",strxmov(to,from,from,from,from,from,"!!",from,NullS),to+F_LEN*6+2,F_LEN,F_CHAR,F_LEN,F_CHAR,F_LEN,F_CHAR,F_LEN,F_CHAR,F_LEN,F_CHAR,2,'!',F_LEN,F_CHAR,1,0,0,0); - - test_strarg("strxnmov(to,100,from,\"!!\",NullS)",strxnmov(to,100,from,"!!",NullS),to+F_LEN+2,F_LEN,F_CHAR,2,'!',0,0,0); - test_strarg("strxnmov(to,2,NullS)",strxnmov(to,2,NullS),to,1,0,0,0); - test_strarg("strxnmov(to,100,from,from,from,from,from,'!!',from,NullS)",strxnmov(to,100,from,from,from,from,from,"!!",from,NullS),to+F_LEN*6+2,F_LEN,F_CHAR,F_LEN,F_CHAR,F_LEN,F_CHAR,F_LEN,F_CHAR,F_LEN,F_CHAR,2,'!',F_LEN,F_CHAR,1,0,0,0); - test_strarg("strxnmov(to,2,\"!!!\",NullS)",strxnmov(to,2,"!!!",NullS),to+2,2,'!',0,0,0); - test_strarg("strxnmov(to,2,\"!!\",NullS)",strxnmov(to,2,"!!","xx",NullS),to+2,2,'!',0,0,0); - test_strarg("strxnmov(to,2,\"!\",\"x\",\"y\",NullS)",strxnmov(to,2,"!","x","y",NullS),to+2,1,'!',1,'x',0,0,0); - - test_strarg("bchange(to,2,from,4,6)",(bchange(to,2,from,4,6),0L),INT_MAX32, - 4,F_CHAR,2,T_CHAR,0,0); - - printf("tests: %d errors: %d\n",tests,errors); - if (errors) - fputs("--- Some functions doesn't work!! Fix them\n",stderr); - return(errors > 0); -} /* main */ - - - /* Init strings */ - -void init_strings(void) -{ - reg1 int i; - reg2 char *pos; - - from=from_buff+3; to=to_buff+3; - - pos=from_buff; *pos++= F_FILL; *pos++=F_FILL; *pos++=F_PREFILL; - for (i=0 ; i < F_LEN ; i++) - *pos++=F_CHAR; - *pos++=0; - for (i=0; i<50 ; i++) - *pos++= F_FILL; - - pos=to_buff; *pos++= T_FILL; *pos++=T_FILL; *pos++=T_PREFILL; - for (i=0 ; i < T_LEN ; i++) - *pos++=T_CHAR; - *pos++=0; - for (i=0; i<50 ; i++) - *pos++= T_FILL; -} /* init_strings */ - - - /* Test that function return rigth value */ - -void test_arg(const char *message, long int func_value, long int value) -{ - tests++; - printf("testing '%s'\n",message); - if (func_value != value) - { - printf("func: '%s' = %ld Should be: %ld\n",message,func_value,value); - errors++; - } -} /* test_arg */ - - /* Test function return value and from and to arrays */ - -static int test_strarg(const char *message,...) -{ - long func_value,value; - int error,length; - char chr,cmp_buff[100],*pos,*pos2; - va_list pvar; - - tests++; - va_start(pvar,message); - func_value=va_arg(pvar,long); - value=va_arg(pvar,long); - - printf("testing '%s'\n",message); - if (func_value != value && value != INT_MAX32) - { - printf("func: '%s' = %ld Should be: %ld\n",message,func_value,value); - errors++; - } - pos= cmp_buff; - while ((length = va_arg(pvar, int)) != 0) - { - chr= (char) (va_arg(pvar, int)); - while (length--) - *pos++=chr; - } - pos2=to+ (int)(pos-cmp_buff); - while (pos <= cmp_buff+T_LEN) - *pos++= *pos2++; - if (compare_buff(message,to,cmp_buff,(int) (pos-cmp_buff),T_FILL,T_PREFILL)) - { - init_strings(); - va_end(pvar); - return 1; - } - - pos= cmp_buff; - while ((length = va_arg(pvar, int)) != 0) - { - chr= (char) (va_arg(pvar, int)); - while (length--) - *pos++=chr; - } - pos2=from+ (int)(pos-cmp_buff); - while (pos <= cmp_buff+F_LEN) - *pos++= *pos2++; - error=compare_buff(message,from,cmp_buff,(int) (pos-cmp_buff),F_FILL,F_PREFILL); - init_strings(); - va_end(pvar); - return (error != 0); -} /* test_strarg */ - - - /* test if function made right value */ - -int compare_buff(const char *message, char * b1, char * b2, int length, - pchar fill, pchar prefill) -{ - int i,error=0; - - if (memcmp(b1,b2,length)) - { - errors++; - printf("func: '%s' Buffers differ\nIs: ",message); - for (i=0 ; i<length ; i++) - printf("%3d ",b1[i]); - printf("\nShould be: "); - for (i=0 ; i<length ; i++) - printf("%3d ",b2[i]); - puts(""); - } - else if (b1[-1] != prefill || b1[-2] != fill || b1[-3] != fill) - { - printf("func: '%s' Chars before buffer is changed\n",message); - errors++; - error=1; - } - else if (b1[length] != fill || b1[length+1] != fill) - { - printf("func: '%s' Chars after buffer is changed\n",message); - errors++; - error=1; - } - return error; -} /* compare_buff */ - - /* These are here to be loaded and examined */ - -extern void dummy_functions(void); - -void dummy_functions(void) -{ - (void) memchr(from,'a',5); - (void) memcmp(from,to,5); - (void) memcpy(from,to,5); - (void) memset(from,' ',5); - (void) strcmp(from,to); - (void) strcpy(from,to); - (void) strstr(from,to); - (void) strrchr(from,'a'); - return; -} diff --git a/strings/strings-x86.s b/strings/strings-x86.s deleted file mode 100644 index 4872c566685..00000000000 --- a/strings/strings-x86.s +++ /dev/null @@ -1,393 +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 - -# Optimized string functions Intel 80x86 (gcc/gas syntax) - - .file "strings.s" - .version "1.00" - -.text - -# Move a alligned, not overlapped, by (long) divided memory area -# Args: to,from,length - -.globl bmove_align - .type bmove_align,@function -bmove_align: - movl %edi,%edx - push %esi - movl 4(%esp),%edi # to - movl 8(%esp),%esi # from - movl 12(%esp),%ecx # length - addw $3,%cx # fix if not divisible with long - shrw $2,%cx - jz .ba_20 - .p2align 4,,7 -.ba_10: - movl -4(%esi,%ecx),%eax - movl %eax,-4(%edi,%ecx) - decl %ecx - jnz .ba_10 -.ba_20: pop %esi - movl %edx,%edi - ret - -.bmove_align_end: - .size bmove_align,.bmove_align_end-bmove_align - - # Move a string from higher to lower - # Arg from_end+1,to_end+1,length - -.globl bmove_upp - .type bmove_upp,@function -bmove_upp: - movl %edi,%edx # Remember %edi - push %esi - movl 8(%esp),%edi # dst - movl 16(%esp),%ecx # length - movl 12(%esp),%esi # source - test %ecx,%ecx - jz .bu_20 - subl %ecx,%esi # To start of strings - subl %ecx,%edi - - .p2align 4,,7 -.bu_10: movb -1(%esi,%ecx),%al - movb %al,-1(%edi,%ecx) - decl %ecx - jnz .bu_10 -.bu_20: pop %esi - movl %edx,%edi - ret - -.bmove_upp_end: - .size bmove_upp,.bmove_upp_end-bmove_upp - - # Append fillchars to string - # Args: dest,len,fill - -.globl strappend - .type strappend,@function -strappend: - pushl %edi - movl 8(%esp),%edi # Memory pointer - movl 12(%esp),%ecx # Length - clrl %eax # Find end of string - repne - scasb - jnz sa_99 # String to long, shorten it - movzb 16(%esp),%eax # Fillchar - decl %edi # Point at end null - incl %ecx # rep made one dec for null-char - - movb %al,%ah # (2) Set up a 32 bit pattern. - movw %ax,%dx # (2) - shll $16,%eax # (3) - movw %dx,%ax # (2) %eax has the 32 bit pattern. - - movl %ecx,%edx # (2) Save the count of bytes. - shrl $2,%ecx # (2) Number of dwords. - rep - stosl # (5 + 5n) - movb $3,%cl # (2) - and %edx,%ecx # (2) Fill in the odd bytes - rep - stosb # Move last bytes if any - -sa_99: movb $0,(%edi) # End of string - popl %edi - ret -.strappend_end: - .size strappend,.strappend_end-strappend - - # Find if string contains any char in another string - # Arg: str,set - # Ret: Pointer to first found char in str - -.globl strcont - .type strcont,@function -strcont: - movl %edi,%edx - pushl %esi - movl 8(%esp),%esi # str - movl 12(%esp),%ecx # set - clrb %ah # For endtest - jmp sc_60 - -sc_10: scasb - jz sc_fo # Found char -sc_20: cmp (%edi),%ah # Test if null - jnz sc_10 # Not end of set yet - incl %esi # Next char in str -sc_60: movl %ecx,%edi # %edi = Set - movb (%esi),%al # Test if this char exist - andb %al,%al - jnz sc_20 # Not end of string - clrl %esi # Return Null -sc_fo: movl %esi,%eax # Char found here - movl %edx,%edi # Restore - popl %esi - ret -.strcont_end: - .size strcont,.strcont_end-strcont - - # Find end of string - # Arg: str - # ret: Pointer to end null - -.globl strend - .type strend,@function -strend: - movl %edi,%edx # Save - movl 4(%esp),%edi # str - clrl %eax # Find end of string - movl %eax,%ecx - decl %ecx # ECX = -1 - repne - scasb - movl %edi,%eax - decl %eax # End of string - movl %edx,%edi # Restore - ret -.strend_end: - .size strend,.strend_end-strend - - # Make a string with len fill-chars and endnull - # Args: dest,len,fill - # Ret: dest+len - -.globl strfill - .type strfill,@function -strfill: - pushl %edi - movl 8(%esp),%edi # Memory pointer - movl 12(%esp),%ecx # Length - movzb 16(%esp),%eax # Fill - - movb %al,%ah # (2) Set up a 32 bit pattern - movw %ax,%dx # (2) - shll $16,%eax # (3) - movw %dx,%ax # (2) %eax has the 32 bit pattern. - - movl %ecx,%edx # (2) Save the count of bytes. - shrl $2,%ecx # (2) Number of dwords. - rep - stosl # (5 + 5n) - movb $3,%cl # (2) - and %edx,%ecx # (2) Fill in the odd bytes - rep - stosb # Move last bytes if any - - movb %cl,(%edi) # End NULL - movl %edi,%eax # End i %eax - popl %edi - ret -.strfill_end: - .size strfill,.strfill_end-strfill - - - # Find a char in or end of a string - # Arg: str,char - # Ret: pointer to found char or NullS - -.globl strcend - .type strcend,@function -strcend: - movl %edi,%edx - movl 4(%esp),%edi # str - movb 8(%esp),%ah # search - clrb %al # for scasb to find end - -se_10: cmpb (%edi),%ah - jz se_20 # Found char - scasb - jnz se_10 # Not end - dec %edi # Not found, point at end of string -se_20: movl %edi,%eax - movl %edx,%edi # Restore - ret -.strcend_end: - .size strcend,.strcend_end-strcend - - # Test if string has a given suffix - -.globl is_prefix - .type is_prefix,@function -is_prefix: - movl %edi,%edx # Save %edi - pushl %esi # and %esi - movl 12(%esp),%esi # get suffix - movl 8(%esp),%edi # s1 - movl $1,%eax # Ok and zero-test -ip_10: cmpb (%esi),%ah - jz suf_ok # End of string/ found suffix - cmpsb # Compare strings - jz ip_10 # Same, possible prefix - xor %eax,%eax # Not suffix -suf_ok: popl %esi - movl %edx,%edi - ret -.is_prefix_end: - .size is_prefix,.is_prefix_end-is_prefix - - # Find a substring in string - # Arg: str,search - -.globl strstr - .type strstr,@function - -strstr: - pushl %edi - pushl %esi - movl 12(%esp),%esi # str - movl 16(%esp),%edi # search - movl %edi,%ecx - incl %ecx # %ecx = search+1 - movb (%edi),%ah # %ah = First char in search - jmp sf_10 - -sf_00: movl %edx,%esi # si = Current str-pos -sf_10: movb (%esi),%al # Test if this char exist - andb %al,%al - jz sf_90 # End of string, didn't find search - incl %esi - cmpb %al,%ah - jnz sf_10 # Didn't find first char, continue - movl %esi,%edx # Save str-pos in %edx - movl %ecx,%edi -sf_20: cmpb $0,(%edi) - jz sf_fo # Found substring - cmpsb - jz sf_20 # Char ok - jmp sf_00 # Next str-pos - -sf_90: movl $1,%edx # Return Null -sf_fo: movl %edx,%eax # Char found here - decl %eax # Pointed one after - popl %esi - popl %edi - ret -.strstr_end: - .size strstr,.strstr_end-strstr - - # Make a string of len length from another string - # Arg: dst,src,length - # ret: end of dst - -.globl strmake - .type strmake,@function - -strmake: - pushl %edi - pushl %esi - mov 12(%esp),%edi # dst - movl $0,%edx - movl 20(%esp),%ecx # length - movl 16(%esp),%esi # src - cmpl %edx,%ecx - jz sm_90 -sm_00: movb (%esi,%edx),%al - cmpb $0,%al - jz sm_90 - movb %al,(%edi,%edx) - incl %edx - cmpl %edx,%ecx - jnz sm_00 -sm_90: movb $0,(%edi,%edx) -sm_99: lea (%edi,%edx),%eax # Return pointer to end null - pop %esi - pop %edi - ret -.strmake_end: - .size strmake,.strmake_end-strmake - - # Move a string with max len chars - # arg: dst,src,len - # ret: pos to first null or dst+len - -.globl strnmov - .type strnmov,@function -strnmov: - pushl %edi - pushl %esi - movl 12(%esp),%edi # dst - movl 16(%esp),%esi # src - movl 20(%esp),%ecx # Length of memory-area - jecxz snm_99 # Nothing to do - clrb %al # For test of end-null - -snm_10: cmpb (%esi),%al # Next char to move - movsb # move arg - jz snm_20 # last char, fill with null - loop snm_10 # Continue moving - incl %edi # Point two after last -snm_20: decl %edi # Point at first null (or last+1) -snm_99: movl %edi,%eax # Pointer at last char - popl %esi - popl %edi - ret -.strnmov_end: - .size strnmov,.strnmov_end-strnmov - - -.globl strmov - .type strmov,@function -strmov: - movl %esi,%ecx # Save old %esi and %edi - movl %edi,%edx - movl 8(%esp),%esi # get source pointer (s2) - movl 4(%esp),%edi # %edi -> s1 -smo_10: movb (%esi),%al - movsb # move arg - andb %al,%al - jnz smo_10 # Not last - movl %edi,%eax - dec %eax - movl %ecx,%esi # Restore - movl %edx,%edi - ret -.strmov_end: - .size strmov,.strmov_end-strmov - -.globl strxmov - .type strxmov,@function -strxmov: - movl %ebx,%edx # Save %ebx, %esi and %edi - mov %esi,%ecx - push %edi - leal 8(%esp),%ebx # Get destination - movl (%ebx),%edi - xorb %al,%al - jmp next_str # Handle source ebx+4 - -start_str: - movsb - cmpb -1(%edi),%al - jne start_str - decl %edi # Don't copy last null - -next_str: - addl $4,%ebx - movl (%ebx),%esi - orl %esi,%esi - jne start_str - movb %al,0(%edi) # Force last to ASCII 0 - - movl %edi,%eax # Return ptr to ASCII 0 - pop %edi # Restore registers - movl %ecx,%esi - movl %edx,%ebx - ret -.strxmov_end: - .size strxmov,.strxmov_end-strxmov diff --git a/strings/strstr.c b/strings/strstr.c deleted file mode 100644 index a5b50d12043..00000000000 --- a/strings/strstr.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2002 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 */ - -/* File : strstr.c - Author : Monty - Updated: 1986.11.24 - Defines: strstr() - - strstr(src, pat) looks for an instance of pat in src. pat is not a - regex(3) pattern, it is a literal string which must be matched exactly. - The result is a pointer to the first character of the located instance, - or NullS if pat does not occur in src. - -*/ - -#include <my_global.h> -#include "m_string.h" - -#ifndef HAVE_STRSTR - -char *strstr(register const char *str,const char *search) -{ - register char *i,*j; - register char first= *search; - -skip: - while (*str != '\0') { - if (*str++ == first) { - i=(char*) str; j=(char*) search+1; - while (*j) - if (*i++ != *j++) goto skip; - return ((char*) str-1); - } - } - return ((char*) 0); -} /* strstr */ - -#endif diff --git a/strings/strto.c b/strings/strto.c deleted file mode 100644 index fcb0d800b81..00000000000 --- a/strings/strto.c +++ /dev/null @@ -1,209 +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 */ - -/* - strtol,strtoul,strtoll,strtoull - convert string to long, unsigned long, long long or unsigned long long. - strtoxx(char *src,char **ptr,int base) - converts the string pointed to by src to an long of appropriate long and - returnes it. It skips leading spaces and tabs (but not newlines, formfeeds, - backspaces), then it accepts an optional sign and a sequence of digits - in the specified radix. - If the value of ptr is not (char **)NULL, a pointer to the character - terminating the scan is returned in the location pointed to by ptr. - Trailing spaces will NOT be skipped. - - If an error is detected, the result will be LONG_MIN, 0 or LONG_MAX, - (or LONGLONG..) and errno will be set to - EDOM if there are no digits - ERANGE if the result would overflow. - the ptr will be set to src. - This file is based on the strtol from the the GNU C Library. - it can be compiled with the UNSIGNED and/or LONGLONG flag set -*/ - - -#if !defined(_global_h) || !defined(_m_string_h) -# error Calling file must include 'my_global.h' and 'm_string.h' - /* see 'strtoll.c' and 'strtoull.c' for the reasons */ -#endif - -#include "m_ctype.h" -#include "my_sys.h" /* defines errno */ -#include <errno.h> - -#undef strtoull -#undef strtoll -#undef strtoul -#undef strtol -#ifdef USE_LONGLONG -#define UTYPE_MAX (~(ulonglong) 0) -#define TYPE_MIN LONGLONG_MIN -#define TYPE_MAX LONGLONG_MAX -#define longtype longlong -#define ulongtype ulonglong -#ifdef USE_UNSIGNED -#define function ulongtype strtoull -#else -#define function longtype strtoll -#endif -#else -#define UTYPE_MAX (ulong) ~0L -#define TYPE_MIN LONG_MIN -#define TYPE_MAX LONG_MAX -#define longtype long -#define ulongtype unsigned long -#ifdef USE_UNSIGNED -#define function ulongtype strtoul -#else -#define function longtype strtol -#endif -#endif - - -/* Convert NPTR to an `unsigned long int' or `long int' in base BASE. - If BASE is 0 the base is determined by the presence of a leading - zero, indicating octal or a leading "0x" or "0X", indicating hexadecimal. - If BASE is < 2 or > 36, it is reset to 10. - If ENDPTR is not NULL, a pointer to the character after the last - one converted is stored in *ENDPTR. */ - - -function (const char *nptr,char **endptr,int base) -{ - int negative; - register ulongtype cutoff; - register unsigned int cutlim; - register ulongtype i; - register const char *s; - register uchar c; - const char *save; - int overflow; - - if (base < 0 || base == 1 || base > 36) - base = 10; - - s = nptr; - - /* Skip white space. */ - while (my_isspace(&my_charset_latin1, *s)) - ++s; - if (*s == '\0') - { - goto noconv; - } - - /* Check for a sign. */ - negative= 0; - if (*s == '-') - { - negative = 1; - ++s; - } - else if (*s == '+') - { - ++s; - } - - - if (base == 16 && s[0] == '0' && my_toupper (&my_charset_latin1, s[1]) == 'X') - s += 2; - - /* If BASE is zero, figure it out ourselves. */ - if (base == 0) - { - if (*s == '0') - { - if (my_toupper (&my_charset_latin1, s[1]) == 'X') - { - s += 2; - base = 16; - } - else - base = 8; - } - else - base = 10; - } - - /* Save the pointer so we can check later if anything happened. */ - save = s; - - cutoff = UTYPE_MAX / (unsigned long int) base; - cutlim = (uint) (UTYPE_MAX % (unsigned long int) base); - - overflow = 0; - i = 0; - for (c = *s; c != '\0'; c = *++s) - { - if (my_isdigit (&my_charset_latin1, c)) - c -= '0'; - else if (my_isalpha (&my_charset_latin1, c)) - c = my_toupper (&my_charset_latin1, c) - 'A' + 10; - else - break; - if (c >= base) - break; - /* Check for overflow. */ - if (i > cutoff || (i == cutoff && c > cutlim)) - overflow = 1; - else - { - i *= (ulongtype) base; - i += c; - } - } - - /* Check if anything actually happened. */ - if (s == save) - goto noconv; - - /* Store in ENDPTR the address of one character - past the last character we converted. */ - if (endptr != NULL) - *endptr = (char *) s; - -#ifndef USE_UNSIGNED - /* Check for a value that is within the range of - `unsigned long int', but outside the range of `long int'. */ - if (negative) - { - if (i > (ulongtype) TYPE_MIN) - overflow = 1; - } - else if (i > (ulongtype) TYPE_MAX) - overflow = 1; -#endif - - if (overflow) - { - my_errno=ERANGE; -#ifdef USE_UNSIGNED - return UTYPE_MAX; -#else - return negative ? TYPE_MIN : TYPE_MAX; -#endif - } - - /* Return the result of the appropriate sign. */ - return (negative ? -((longtype) i) : (longtype) i); - -noconv: - /* There was no number to convert. */ - my_errno=EDOM; - if (endptr != NULL) - *endptr = (char *) nptr; - return 0L; -} diff --git a/strings/strtol.c b/strings/strtol.c deleted file mode 100644 index 2f0a5286ee9..00000000000 --- a/strings/strtol.c +++ /dev/null @@ -1,28 +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 */ - -/* This implements strtol() if needed */ - -/* - These includes are mandatory because they check for type sizes and - functions, especially they handle tricks for Tru64 where 'long' is - 64 bit already and our 'longlong' is just a 'long'. - */ -#include <my_global.h> -#include <m_string.h> - -#if !defined(HAVE_STRTOL) && !defined(__WIN__) -#include "strto.c" -#endif diff --git a/strings/strtoll.c b/strings/strtoll.c deleted file mode 100644 index cfb6fbd75ee..00000000000 --- a/strings/strtoll.c +++ /dev/null @@ -1,33 +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 */ - -/* This implements strtoll() if needed */ - - -/* - These includes are mandatory because they check for type sizes and - functions, especially they handle tricks for Tru64 where 'long' is - 64 bit already and our 'longlong' is just a 'long'. - This solves a problem on Tru64 where the C99 compiler has a prototype - for 'strtoll()' but no implementation, see "6.1 New C99 library functions" - in file '/usr/share/doclib/cc.dtk/release_notes.txt'. - */ -#include <my_global.h> -#include <m_string.h> - -#if !defined(HAVE_STRTOLL) && defined(HAVE_LONG_LONG) -#define USE_LONGLONG -#include "strto.c" -#endif diff --git a/strings/strtoul.c b/strings/strtoul.c deleted file mode 100644 index df5c46c220f..00000000000 --- a/strings/strtoul.c +++ /dev/null @@ -1,29 +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 */ - -/* This implements strtol() if needed */ - -/* - These includes are mandatory because they check for type sizes and - functions, especially they handle tricks for Tru64 where 'long' is - 64 bit already and our 'longlong' is just a 'long'. - */ -#include <my_global.h> -#include <m_string.h> - -#if !defined(HAVE_STRTOUL) -#define USE_UNSIGNED -#include "strto.c" -#endif diff --git a/strings/strtoull.c b/strings/strtoull.c deleted file mode 100644 index 94bf6904f8d..00000000000 --- a/strings/strtoull.c +++ /dev/null @@ -1,34 +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 */ - -/* This implements strtoull() if needed */ - - -/* - These includes are mandatory because they check for type sizes and - functions, especially they handle tricks for Tru64 where 'long' is - 64 bit already and our 'longlong' is just a 'long'. - This solves a problem on Tru64 where the C99 compiler has a prototype - for 'strtoull()' but no implementation, see "6.1 New C99 library functions" - in file '/usr/share/doclib/cc.dtk/release_notes.txt'. - */ -#include <my_global.h> -#include <m_string.h> - -#if !defined(HAVE_STRTOULL) && defined(HAVE_LONG_LONG) -#define USE_UNSIGNED -#define USE_LONGLONG -#include "strto.c" -#endif diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt index 26aa7ad81ad..2d1d1e83b8b 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -14,7 +14,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA IF(WIN32) - SET(localstatedir "C:\\mysql\\data") + SET(localstatedir "C:\\\\mysql\\\\data\\\\") SET(ini_file_extension "ini") ELSE() SET(localstatedir "${MYSQL_DATADIR}") diff --git a/support-files/MacOSX/Makefile.am b/support-files/MacOSX/Makefile.am deleted file mode 100644 index 7d4384a2a56..00000000000 --- a/support-files/MacOSX/Makefile.am +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (C) 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 - -EXTRA_DIST = Info.plist.sh \ - Description.plist.sh \ - StartupParameters.plist.sh \ - postflight.sh \ - preflight.sh \ - ReadMe.txt \ - MySQLCOM \ - StartupItem.Description.plist \ - StartupItem.Info.plist \ - StartupItem.postinstall - -noinst_DATA = Info.plist \ - Description.plist \ - StartupParameters.plist \ - postflight \ - preflight - -CLEANFILES = Info.plist \ - Description.plist \ - StartupParameters.plist \ - postflight \ - preflight - -SUFFIXES = .sh - -.sh: - @RM@ -f $@ $@-t - @SED@ \ - -e 's!@''prefix''@!$(prefix)!g' \ - -e 's!@''VERSION''@!@VERSION@!' \ - -e 's!@''MYSQL_NUMERIC_VERSION''@!@MYSQL_NUMERIC_VERSION@!' \ - -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \ - -e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \ - $< > $@-t - @MV@ $@-t $@ diff --git a/support-files/Makefile.am b/support-files/Makefile.am deleted file mode 100644 index 7ddb39e1c7c..00000000000 --- a/support-files/Makefile.am +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright (C) 2000-2006 MySQL AB, 2008-2010 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 - -EXTRA_DIST = mysql.spec.sh \ - my-small.cnf.sh \ - my-medium.cnf.sh \ - my-large.cnf.sh \ - my-huge.cnf.sh \ - my-innodb-heavy-4G.cnf.sh \ - mysql-log-rotate.sh \ - mysql.server.sh \ - mysqld_multi.server.sh \ - config.huge.ini.sh \ - config.medium.ini.sh \ - config.small.ini.sh \ - binary-configure.sh \ - magic mysql.m4 \ - MySQL-shared-compat.spec.sh \ - ndb-config-2-node.ini.sh \ - compiler_warnings.supp \ - dtrace \ - CMakeLists.txt - -SUBDIRS = MacOSX RHEL4-SElinux - -# Default same as 'pkgdatadir', but we can override it -pkgsuppdir = $(datadir)/@PACKAGE@ - -pkgsupp_DATA = my-small.cnf \ - my-medium.cnf \ - my-large.cnf \ - my-huge.cnf \ - config.huge.ini \ - config.medium.ini \ - config.small.ini \ - my-innodb-heavy-4G.cnf \ - mysql-log-rotate \ - binary-configure \ - ndb-config-2-node.ini - -pkgsupp_SCRIPTS = mysql.server \ - mysqld_multi.server - -aclocaldir = $(datadir)/aclocal -aclocal_DATA = mysql.m4 - -noinst_DATA = mysql-@VERSION@.spec \ - MySQL-shared-compat.spec - -CLEANFILES = my-small.cnf \ - my-medium.cnf \ - my-large.cnf \ - my-huge.cnf \ - config.huge.ini \ - config.medium.ini \ - config.small.ini \ - my-innodb-heavy-4G.cnf \ - mysql.spec \ - mysql-@VERSION@.spec \ - mysql-log-rotate \ - mysql.server \ - mysqld_multi.server \ - binary-configure \ - MySQL-shared-compat.spec \ - ndb-config-2-node.ini - -mysql-@VERSION@.spec: mysql.spec - rm -f $@ - cp mysql.spec $@ - -SUFFIXES = .sh - -.sh: - @RM@ -f $@ $@-t - @SED@ \ - -e 's!@''bindir''@!$(bindir)!g' \ - -e 's!@''sbindir''@!$(sbindir)!g' \ - -e 's!@''scriptdir''@!$(bindir)!g' \ - -e 's!@''prefix''@!$(prefix)!g' \ - -e 's!@''datadir''@!$(datadir)!g' \ - -e 's!@''localstatedir''@!$(localstatedir)!g' \ - -e 's!@''libexecdir''@!$(libexecdir)!g' \ - -e 's!@''CC''@!@CC@!'\ - -e 's!@''CXX''@!@CXX@!'\ - -e 's!@''GXX''@!@GXX@!'\ - -e 's!@''PERL''@!@PERL@!' \ - -e 's!@''CFLAGS''@!@SAVE_CFLAGS@!'\ - -e 's!@''CXXFLAGS''@!@SAVE_CXXFLAGS@!'\ - -e 's!@''LDFLAGS''@!@SAVE_LDFLAGS@!'\ - -e 's!@''VERSION''@!@VERSION@!' \ - -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \ - -e 's!@''COMPILATION_COMMENT''@!@COMPILATION_COMMENT@!' \ - -e 's!@''MACHINE_TYPE''@!@MACHINE_TYPE@!' \ - -e 's!@''HOSTNAME''@!@HOSTNAME@!' \ - -e 's!@''SYSTEM_TYPE''@!@SYSTEM_TYPE@!' \ - -e 's!@''CHECK_PID''@!@CHECK_PID@!' \ - -e 's!@''FIND_PROC''@!@FIND_PROC@!' \ - -e 's!@''MYSQLD_DEFAULT_SWITCHES''@!@MYSQLD_DEFAULT_SWITCHES@!' \ - -e 's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!' \ - -e 's!@''TARGET_LINUX''@!@TARGET_LINUX@!' \ - -e "s!@""CONF_COMMAND""@!@CONF_COMMAND@!" \ - -e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \ - -e 's!@''sysconfdir''@!@sysconfdir@!' \ - -e 's!@''SHORT_MYSQL_INTRO''@!@SHORT_MYSQL_INTRO@!' \ - -e 's!@''SHARED_LIB_VERSION''@!@SHARED_LIB_VERSION@!' \ - -e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \ - -e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \ - -e 's!@''MYSQL_U_SCORE_VERSION''@!@MYSQL_U_SCORE_VERSION@!' \ - -e 's!@''MYSQL_COPYRIGHT_YEAR''@!@MYSQL_COPYRIGHT_YEAR@!' \ - -e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \ - -e 's!@''PERL_DBI_VERSION''@!@PERL_DBI_VERSION@!' \ - -e 's!@''PERL_DBD_VERSION''@!@PERL_DBD_VERSION@!' \ - -e 's!@''PERL_DATA_DUMPER''@!@PERL_DATA_DUMPER@!' \ - $< > $@-t - @MV@ $@-t $@ diff --git a/support-files/MySQL-shared-compat.spec.sh b/support-files/MySQL-shared-compat.spec.sh index 72654a22d87..b8b27863b3d 100644 --- a/support-files/MySQL-shared-compat.spec.sh +++ b/support-files/MySQL-shared-compat.spec.sh @@ -27,7 +27,7 @@ # # Change this to match the version of the shared libs you want to include # -%define version_cur @MYSQL_U_SCORE_VERSION@ +%define version_cur @MYSQL_RPM_VERSION@ %define version41 4.1.17 %define version40 4.0.26 %define version3 3.23.58 diff --git a/support-files/RHEL4-SElinux/Makefile.am b/support-files/RHEL4-SElinux/Makefile.am deleted file mode 100644 index d2143a5285c..00000000000 --- a/support-files/RHEL4-SElinux/Makefile.am +++ /dev/null @@ -1,20 +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 - -EXTRA_DIST = mysql.fc mysql.te diff --git a/support-files/SCO/INSTALL.sh b/support-files/SCO/INSTALL.sh deleted file mode 100755 index 979f33f3f06..00000000000 --- a/support-files/SCO/INSTALL.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -# search & check GNU patch -PATCH="gpatch" -$PATCH --version || PATCH="patch" -$PATCH --version || exit - - -if /usr/bin/test ! -e PKG/stamp-pre ; then - grep VERSION configure | head -1 | sed 's/VERSION=//' > ./PKG/version - touch PKG/stamp-pre -fi - -if /usr/bin/test ! -e PKG/stamp-patch ; then - ${PATCH} -p0 < ./PKG/patch - touch PKG/stamp-patch -fi - -if /usr/bin/test ! -e PKG/stamp-compile ; then -sh ./PKG/compile.sh ujis -touch PKG/stamp-compile - -sh ./PKG/doc.sh ujis - -fi - - -cd PKG -sh mkpkg.sh ujis diff --git a/support-files/SCO/compile.sh b/support-files/SCO/compile.sh deleted file mode 100644 index 5281ccde02d..00000000000 --- a/support-files/SCO/compile.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -# GNU ncurses - -# search & check GNU make -GMAKE="gmake" -$GMAKE --version || GMAKE="make" -$GMAKE --version || exit - -MAKE=$GMAKE -export MAKE - -CC=gcc -CFLAGS="-O6 -fomit-frame-pointer" -CXX=gcc -CXXFLAGS="-O6 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" -# LDFLAGS="-static" -LD=gcc - -export CC -export CXX -export LD -export CFLAGS -export CXXFLAGS -# export LDFLAGS -# Solaris don't have libpthread.a. - -if [ "x$1" = "x" ]; then - echo " please set character set" - exit -fi - -CHAR="$1" -case "$1" in - [uU]*) - CHAR=ujis - ;; - [sS]*) - CHAR=sjis - ;; -esac - -#--------------- -P=`pwd` - -if [ -f Makefile ] ; then - ${GMAKE} distclean -fi - -for i in bin sbin include man share/doc/mysql mysql-data -do - /usr/bin/mkdir -p PKG/tmp-${CHAR}/usr/local/${i} -done -/usr/bin/mkdir -p PKG/tmp-${CHAR}/etc/init.d - -#---------------------------- -./configure \ - --prefix=/usr/local \ - --libexecdir=/usr/local/sbin \ - --sbindir=/usr/local/sbin \ - --localstatedir=/usr/local/mysql-data \ - --with-charset=${CHAR} \ - --with-extra-charsets=all \ - --with-raid \ - --without-docs \ - --without-bench \ - --without-perl \ - --with-gcc \ - --with-mysqld-ldflags="-static" \ - --with-client-ldflags="-static" \ - --with-named-curses-libs=/usr/local/lib/libncurses.a \ - --with-mysqld-user=mysql - -# --with-berkeley-db-includes=/usr/local/include/db3 \ -# --with-berkeley-db-libs=/usr/local/lib/libdb3.a \ -# --with-low-memory - -${GMAKE} -${GMAKE} install DESTDIR=${P}/PKG/tmp-${CHAR} - -v=`grep '^SHARED_LIB_VERSION' configure.in | sed 's@SHARED_LIB_VERSION@@' | sed -e 's@=@@' -e 's@:@ @g' | awk '{print $1}'` -km="libmysqlclient.so.$v" -export km - -(cd ${P}/PKG/tmp-${CHAR}/usr/local/lib/mysql/ ; \ - for i in libmysqlclient* ; do \ - if /usr/bin/test ! -L $i ; then \ - mv $i ../ ; ln -sf ../$i ; \ - fi ; \ - done ; \ - k=`ls libmysqlclient.so.*.*.*` ; \ - cd .. ; \ - if /usr/bin/test ! -z libmysqlclient.so ; then \ - ln -sf $k libmysqlclient.so ; - fi ; \ - if /usr/bin/test ! -z $km ; then \ - ln -sf $k $km ; - fi ; \ -) - -# -(cd ${P}/PKG/tmp-${CHAR}/usr/local/bin ; strip * ) -(cd ${P}/PKG/tmp-${CHAR}/usr/local/sbin ; strip * ) diff --git a/support-files/SCO/doc.sh b/support-files/SCO/doc.sh deleted file mode 100644 index 9ef17166a6f..00000000000 --- a/support-files/SCO/doc.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -CHAR="$1" -case "$1" in - [uU]*) - CHAR=ujis - ;; - [sS]*) - CHAR=sjis - ;; -esac - -cp -r Docs/* PKG/tmp-${CHAR}/usr/local/share/doc/mysql/ -cp INSTALL-SOURCE* COPYING* MIRRORS README* PKG/tmp-${CHAR}/usr/local/share/doc/mysql/ - -cd PKG/tmp-${CHAR}/usr/local/share/doc/mysql/ -gzip *.txt *.texi *.info *.pdf diff --git a/support-files/SCO/mkpkg.sh b/support-files/SCO/mkpkg.sh deleted file mode 100644 index 5a38113138d..00000000000 --- a/support-files/SCO/mkpkg.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -if [ "x$1" = "x" ]; then - echo " please set charset" - exit -fi - -CHAR="$1" -case "$1" in - [uU]*) - CHAR=ujis ; CH=uj - ;; - [sS]*) - CHAR=sjis ; CH=sj - ;; -esac - -#------------------- -DIR=`pwd` - -VERSION=`cat version` - -T=`uname -p` - -sed -e "s/@CHAR1@/${CH}/" \ - -e "s/@CHAR2@/${CHAR}/" \ - -e "s/@VERSION@/${VERSION}/" \ - -e "s/@TYPE@/${T}/" \ - pkginfo.ini > pkginfo.${CHAR} - -sed -e "s,@DIR@,${DIR},g" \ - -e "s,@PKGINFO@,${DIR}/pkginfo.${CHAR}," \ - prototype.ini > prototype.${CHAR} - -INIT="tmp-${CHAR}/etc/init.d/mysql" -cp ../support-files/mysql.server $INIT -chmod 755 $INIT - -(cd tmp-${CHAR}; \ -chown root etc usr ; \ -chgrp sys etc usr ;\ -chmod 755 usr etc; \ -chgrp sys etc/init.d ; \ -chmod 755 etc/init.d ; \ -find . -print|pkgproto >> ../prototype.${CHAR}) - -pkgmk -o -f prototype.${CHAR} -r ${DIR}/tmp-${CHAR} diff --git a/support-files/SCO/patch b/support-files/SCO/patch deleted file mode 100644 index 373eb8518c6..00000000000 --- a/support-files/SCO/patch +++ /dev/null @@ -1,96 +0,0 @@ ---- scripts/safe_mysqld.sh.orig Sat Sep 2 17:28:26 2000 -+++ scripts/safe_mysqld.sh Sat Sep 2 17:31:19 2000 -@@ -89,10 +89,10 @@ - - - NOHUP_NICENESS=`nohup nice` --if test $? -ne 0 || test x"$NOHUP_NICENESS" = x0 || test ! nice --1 echo foo > /dev/null 2>&1; then -+if test $? -ne 0 || test x"$NOHUP_NICENESS" = x0 || test ! nice -1 echo foo > /dev/null 2>&1; then - NOHUP_NICENESS="nohup" - else -- NOHUP_NICENESS="nice --$NOHUP_NICENESS nohup" -+ NOHUP_NICENESS="nice -$NOHUP_NICENESS nohup" - fi - - export MYSQL_UNIX_PORT -@@ -163,7 +163,8 @@ - # The only thing is ps x => redhat 5 gives warnings when using ps -x. - # kill -9 is used or the process won't react on the kill. - numofproces=`ps xa | grep -v "grep" | grep -c $ledir/mysqld` -- echo -e "\nNumber of processes running now: $numofproces" | tee -a $err_log -+ echo | tee -a $err_log -+ echo "Number of processes running now: $numofproces" | tee -a $err_log - I=1 - while test "$I" -le "$numofproces" - do -@@ -185,4 +186,6 @@ - echo "`date +'%y%m%d %H:%M:%S mysqld restarted'`" | tee -a $err_log - done - --echo -e "`date +'%y%m%d %H:%M:%S mysqld ended\n'`" | tee -a $err_log -+echo | tee -a $err_log -+echo "`date +'%y%m%d %H:%M:%S mysqld ended'`" | tee -a $err_log -+echo | tee -a $err_log ---- support-files/mysql.server.sh.orig Sat Sep 2 17:35:56 2000 -+++ support-files/mysql.server.sh Sat Sep 2 17:36:35 2000 -@@ -23,6 +23,9 @@ - mysql_daemon_user=@MYSQLD_USER@ - export PATH - -+## your options... -+OPT="" -+ - mode=$1 - - if test -w / # determine if we should look at the root config file -@@ -82,8 +85,9 @@ - then - # Give extra arguments to mysqld with the my.cnf file. This script may - # be overwritten at next upgrade. -- $bindir/safe_mysqld \ -- --user=$mysql_daemon_user --datadir=$datadir --pid-file=$pid_file --log=$log_file & -+ $bindir/safe_mysqld $OPT \ -+ --user=$mysql_daemon_user --datadir=$datadir --pid-file=$pid_file & -+# --log=$log_file & - else - echo "Can't execute $bindir/safe_mysqld" - fi ---- configure.orig Sat Sep 2 17:54:03 2000 -+++ configure Sat Sep 2 17:54:18 2000 -@@ -202,7 +202,7 @@ - --with-charset=CHARSET use CHARSET by default (one of: big5 cp1251 cp1257 - croat czech danish dec8 dos estonia euc_kr gb2312 gbk - german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr -- latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr -+ latin1 latin2 swe7 usa7 win1250 win1251ukr - ujis sjis tis620; default is latin1)" - ac_help="$ac_help - --with-extra-charsets=cs1,cs2 -@@ -8843,7 +8843,7 @@ - - # Choose a character set - --CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr ujis sjis tis620" -+CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251ukr ujis sjis tis620" - DEFAULT_CHARSET=latin1 - - # Check whether --with-charset or --without-charset was given. ---- configure.in.orig Sat Sep 2 17:53:57 2000 -+++ configure.in Sat Sep 2 17:54:36 2000 -@@ -1517,14 +1517,14 @@ - dnl or other special handling, you must also create - dnl strings/ctype-$charset_name.c - --CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr ujis sjis tis620" -+CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251ukr ujis sjis tis620" - DEFAULT_CHARSET=latin1 - - AC_ARG_WITH(charset, - [ --with-charset=CHARSET use CHARSET by default (one of: big5 cp1251 cp1257 - croat czech danish dec8 dos estonia euc_kr gb2312 gbk - german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr -- latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr -+ latin1 latin2 swe7 usa7 win1250 win1251ukr - ujis sjis tis620; default is latin1)], - [default_charset="$withval"], - [default_charset="$DEFAULT_CHARSET"]) diff --git a/support-files/SCO/pkginfo.ini b/support-files/SCO/pkginfo.ini deleted file mode 100644 index 13b8b6adb09..00000000000 --- a/support-files/SCO/pkginfo.ini +++ /dev/null @@ -1,8 +0,0 @@ -PKG=MySQL -NAME=MySQL -ARCH=@TYPE@ -VERSION=@VERSION@ -CATEGORY=utility -VENDOR=TcX DataKonsult AB, Detron HB and MySQL AB -BASEDIR=/ -CLASSES=none diff --git a/support-files/SCO/postinstall b/support-files/SCO/postinstall deleted file mode 100644 index 2e199b9af82..00000000000 --- a/support-files/SCO/postinstall +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/ccs/bin -LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib -export PATH -export LD_LIBRARY_PATH - -D0="/usr/local/mysql-data" -D="${D0}/mysql" - -DOFIX=0 - -if /usr/bin/test ! -f ${D}/tables_priv.frm -a -d ${D} ; then - DOFIX=1 -fi - -if [ ! -d ${D} ]; then - DOFIX=2 - /usr/local/bin/mysql_install_db -fi - - chown -R mysql $D0 - chgrp -R mysql $D0 - -if /usr/bin/test $DOFIX -eq 1 ; then - /etc/init.d/mysql start - /usr/local/bin/mysql_fix_privilege_tables -else - /etc/init.d/mysql start || true -fi diff --git a/support-files/SCO/preinstall b/support-files/SCO/preinstall deleted file mode 100644 index c1175561a99..00000000000 --- a/support-files/SCO/preinstall +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/ccs/bin -LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib -export PATH -export LD_LIBRARY_PATH - -if /usr/bin/test -x /etc/init.d/mysql ; then - /etc/init.d/mysql stop || true -fi - -#----- user check -P=`grep mysql /etc/passwd` -G=`grep mysql /etc/group` - -if /usr/bin/test "x$G" = "x" ; then - /usr/sbin/groupadd mysql -fi -if /usr/bin/test "x$P" = "x" ; then - /usr/sbin/useradd -g mysql -d /usr/local/mysql-data -s /bin/false mysql -fi diff --git a/support-files/SCO/preremove b/support-files/SCO/preremove deleted file mode 100644 index a89648431c1..00000000000 --- a/support-files/SCO/preremove +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/ccs/bin -LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib -export PATH -export LD_LIBRARY_PATH - -pid=`/usr/bin/ps -e | /usr/bin/grep mysqld | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'` -[ "$pid" != "" ] && /usr/local/bin/mysqladmin shutdown - -#--- -#/usr/ucb/echo -n "Remove DATA Directory (All data expire) [Y/N]? " -#read I -I=No - -case "$I" in -Y*|y*) - /usr/ucb/echo -n "Removing MySQL DATA ALL..." - rm -rf /usr/local/mysql-data - echo "done." - ;; -*) - echo "not purge DATA directory" - ;; -esac; diff --git a/support-files/SCO/prototype.ini b/support-files/SCO/prototype.ini deleted file mode 100644 index ca88bb67a90..00000000000 --- a/support-files/SCO/prototype.ini +++ /dev/null @@ -1,4 +0,0 @@ -i pkginfo=@PKGINFO@ -i postinstall=@DIR@/postinstall -i preinstall=@DIR@/preinstall -i preremove=@DIR@/preremove diff --git a/support-files/SCO/version b/support-files/SCO/version deleted file mode 100644 index f9dc296b71b..00000000000 --- a/support-files/SCO/version +++ /dev/null @@ -1 +0,0 @@ -3.23.23-beta diff --git a/support-files/my-huge.cnf.sh b/support-files/my-huge.cnf.sh index a6bf70b6f83..378a1df67aa 100644 --- a/support-files/my-huge.cnf.sh +++ b/support-files/my-huge.cnf.sh @@ -3,11 +3,11 @@ # This is for a large system with memory of 1G-2G where the system runs mainly # MySQL. # -# You can copy this file to -# /etc/my.cnf to set global options, -# mysql-data-dir/my.cnf to set server-specific options (in this -# installation this directory is @localstatedir@) or -# ~/.my.cnf to set user-specific options. +# MySQL programs look for option files in a set of +# locations which depend on the deployment platform. +# You can copy this option file to one of those +# locations. For information about these locations, see: +# http://dev.mysql.com/doc/mysql/en/option-files.html # # In this file, you can use all long options that a program supports. # If you want to know which options a program supports, run the program @@ -113,14 +113,10 @@ server-id = 1 # binary logging format - mixed recommended #binlog_format=mixed -# Point the following paths to different dedicated disks -#tmpdir = /tmp/ -#log-bin = /path-to-dedicated-directory/hostname - # Uncomment the following if you are using InnoDB tables -#innodb_data_home_dir = @localstatedir@/ +#innodb_data_home_dir = @localstatedir@ #innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend -#innodb_log_group_home_dir = @localstatedir@/ +#innodb_log_group_home_dir = @localstatedir@ # You can set .._buffer_pool_size up to 50 - 80 % # of RAM but beware of setting memory usage too high #innodb_buffer_pool_size = 384M diff --git a/support-files/my-innodb-heavy-4G.cnf.sh b/support-files/my-innodb-heavy-4G.cnf.sh index 80f1d6fe50b..3fce97cf1d2 100644 --- a/support-files/my-innodb-heavy-4G.cnf.sh +++ b/support-files/my-innodb-heavy-4G.cnf.sh @@ -8,10 +8,11 @@ # running mostly MySQL using InnoDB only tables and performing complex # queries with few connections. # -# You can copy this file to /etc/my.cnf to set global options, -# mysql-data-dir/my.cnf to set server-specific options -# (@localstatedir@ for this installation) or to -# ~/.my.cnf to set user-specific options. +# MySQL programs look for option files in a set of +# locations which depend on the deployment platform. +# You can copy this option file to one of those +# locations. For information about these locations, see: +# http://dev.mysql.com/doc/mysql/en/option-files.html # # In this file, you can use all long options that a program supports. # If you want to know which options a program supports, run the program @@ -232,15 +233,6 @@ slow_query_log # currently measures time with second accuracy only). long_query_time = 2 -# The directory used by MySQL for storing temporary files. For example, -# it is used to perform disk based large sorts, as well as for internal -# and explicit temporary tables. It might be good to put it on a -# swapfs/tmpfs filesystem, if you do not create very large temporary -# files. Alternatively you can put it on dedicated disk. You can -# specify multiple paths here by separating them by ";" - they will then -# be used in a round-robin fashion. -#tmpdir = /tmp - # *** Replication related settings diff --git a/support-files/my-large.cnf.sh b/support-files/my-large.cnf.sh index 92839b8fc2c..79d43407cda 100644 --- a/support-files/my-large.cnf.sh +++ b/support-files/my-large.cnf.sh @@ -3,11 +3,11 @@ # This is for a large system with memory = 512M where the system runs mainly # MySQL. # -# You can copy this file to -# /etc/my.cnf to set global options, -# mysql-data-dir/my.cnf to set server-specific options (in this -# installation this directory is @localstatedir@) or -# ~/.my.cnf to set user-specific options. +# MySQL programs look for option files in a set of +# locations which depend on the deployment platform. +# You can copy this option file to one of those +# locations. For information about these locations, see: +# http://dev.mysql.com/doc/mysql/en/option-files.html # # In this file, you can use all long options that a program supports. # If you want to know which options a program supports, run the program @@ -113,14 +113,10 @@ server-id = 1 # binary logging - not required for slaves, but recommended #log-bin=mysql-bin -# Point the following paths to different dedicated disks -#tmpdir = /tmp/ -#log-bin = /path-to-dedicated-directory/hostname - # Uncomment the following if you are using InnoDB tables -#innodb_data_home_dir = @localstatedir@/ +#innodb_data_home_dir = @localstatedir@ #innodb_data_file_path = ibdata1:10M:autoextend -#innodb_log_group_home_dir = @localstatedir@/ +#innodb_log_group_home_dir = @localstatedir@ # You can set .._buffer_pool_size up to 50 - 80 % # of RAM but beware of setting memory usage too high #innodb_buffer_pool_size = 256M diff --git a/support-files/my-medium.cnf.sh b/support-files/my-medium.cnf.sh index b219d02a7be..4ec245e88b9 100644 --- a/support-files/my-medium.cnf.sh +++ b/support-files/my-medium.cnf.sh @@ -4,11 +4,11 @@ # an important part, or systems up to 128M where MySQL is used together with # other programs (such as a web server) # -# You can copy this file to -# /etc/my.cnf to set global options, -# mysql-data-dir/my.cnf to set server-specific options (in this -# installation this directory is @localstatedir@) or -# ~/.my.cnf to set user-specific options. +# MySQL programs look for option files in a set of +# locations which depend on the deployment platform. +# You can copy this option file to one of those +# locations. For information about these locations, see: +# http://dev.mysql.com/doc/mysql/en/option-files.html # # In this file, you can use all long options that a program supports. # If you want to know which options a program supports, run the program @@ -111,14 +111,10 @@ server-id = 1 # binary logging - not required for slaves, but recommended #log-bin=mysql-bin -# Point the following paths to different dedicated disks -#tmpdir = /tmp/ -#log-bin = /path-to-dedicated-directory/hostname - # Uncomment the following if you are using InnoDB tables -#innodb_data_home_dir = @localstatedir@/ +#innodb_data_home_dir = @localstatedir@ #innodb_data_file_path = ibdata1:10M:autoextend -#innodb_log_group_home_dir = @localstatedir@/ +#innodb_log_group_home_dir = @localstatedir@ # You can set .._buffer_pool_size up to 50 - 80 % # of RAM but beware of setting memory usage too high #innodb_buffer_pool_size = 16M diff --git a/support-files/my-small.cnf.sh b/support-files/my-small.cnf.sh index d789a175603..7b215988572 100644 --- a/support-files/my-small.cnf.sh +++ b/support-files/my-small.cnf.sh @@ -4,11 +4,11 @@ # from time to time and it's important that the mysqld daemon # doesn't use much resources. # -# You can copy this file to -# /etc/my.cnf to set global options, -# mysql-data-dir/my.cnf to set server-specific options (in this -# installation this directory is @localstatedir@) or -# ~/.my.cnf to set user-specific options. +# MySQL programs look for option files in a set of +# locations which depend on the deployment platform. +# You can copy this option file to one of those +# locations. For information about these locations, see: +# http://dev.mysql.com/doc/mysql/en/option-files.html # # In this file, you can use all long options that a program supports. # If you want to know which options a program supports, run the program @@ -59,9 +59,9 @@ server-id = 1 #binlog_direct_non_transactional_updates=TRUE # Uncomment the following if you are using InnoDB tables -#innodb_data_home_dir = @localstatedir@/ +#innodb_data_home_dir = @localstatedir@ #innodb_data_file_path = ibdata1:10M:autoextend -#innodb_log_group_home_dir = @localstatedir@/ +#innodb_log_group_home_dir = @localstatedir@ # You can set .._buffer_pool_size up to 50 - 80 % # of RAM but beware of setting memory usage too high #innodb_buffer_pool_size = 16M diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 595586962ba..09d8219ffe9 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -211,7 +211,6 @@ %define license_files_server %{src_dir}/LICENSE.mysql %define license_type Commercial %else -%define license_files_devel %{src_dir}/EXCEPTIONS-CLIENT %define license_files_server %{src_dir}/COPYING %{src_dir}/README %define license_type GPL %endif @@ -223,7 +222,7 @@ Name: MySQL%{product_suffix} Summary: MySQL: a very fast and reliable SQL database server Group: Applications/Databases -Version: @MYSQL_U_SCORE_VERSION@ +Version: @MYSQL_RPM_VERSION@ Release: %{release}%{?distro_releasetag:.%{distro_releasetag}} Distribution: %{distro_description} License: Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved. Use is subject to license terms. Under %{license_type} license as shown in the Description field. @@ -1037,9 +1036,6 @@ echo "=====" >> $STATUS_HISTORY # ---------------------------------------------------------------------------- %files -n MySQL-devel%{product_suffix} -f optional-files-devel %defattr(-, root, root, 0755) -%if %{defined license_files_devel} -%doc %{license_files_devel} -%endif %doc %attr(644, root, man) %{_mandir}/man1/comp_err.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql_config.1* %attr(755, root, root) %{_bindir}/mysql_config @@ -1099,6 +1095,10 @@ echo "=====" >> $STATUS_HISTORY - Add a "triggerpostun" to handle the uninstall of the "-community" server RPM. - This fixes bug#55015 "MySQL server is not restarted properly after RPM upgrade". +* Wed Nov 24 2010 Alexander Nozdrin <alexander.nozdrin@oracle.com> + +- EXCEPTIONS-CLIENT has been deleted, remove it from here too. + * Tue Jun 15 2010 Joerg Bruehe <joerg.bruehe@sun.com> - Change the behaviour on installation and upgrade: diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index ca4a2a4e986..00000000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright (C) 2000-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 - - -if THREAD_SAFE_CLIENT -LIBMYSQLCLIENT_LA = $(top_builddir)/libmysql_r/libmysqlclient_r.la -else -LIBMYSQLCLIENT_LA = $(top_builddir)/libmysql/libmysqlclient.la -endif - -EXTRA_DIST = auto_increment.res auto_increment.tst \ - function.res function.tst lock_test.pl lock_test.res \ - export.pl big_record.pl \ - fork2_test.pl fork_big.pl \ - insert_and_repair.pl \ - grant.pl grant.res test_delayed_insert.pl \ - pmail.pl mail_to_db.pl table_types.pl \ - myisam-big-rows.tst \ - CMakeLists.txt - -bin_PROGRAMS = mysql_client_test -noinst_PROGRAMS = insert_test select_test thread_test bug25714 - -INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \ - $(openssl_includes) -LIBS = @CLIENT_LIBS@ -LDADD = @CLIENT_EXTRA_LDFLAGS@ \ - $(LIBMYSQLCLIENT_LA) - -mysql_client_test_LDADD= $(LDADD) $(CXXLDFLAGS) -mysql_client_test_SOURCES= mysql_client_test.c\ - $(top_srcdir)/mysys/my_memmem.c - -insert_test_SOURCES= insert_test.c -select_test_SOURCES= select_test.c -insert_test_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) -select_test_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) - -bug25714_SOURCES= bug25714.c -bug25714_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) - -# Fix for mit-threads -DEFS = -DMYSQL_CLIENT_NO_THREADS - -thread_test.o: thread_test.c - $(COMPILE) -c $(INCLUDES) $< diff --git a/unittest/Makefile.am b/unittest/Makefile.am deleted file mode 100644 index da655d1844e..00000000000 --- a/unittest/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (C) 2006 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -SUBDIRS = mytap . mysys examples strings - -EXTRA_DIST = unit.pl -CLEANFILES = unit - -unittests = mytap mysys strings @mysql_se_unittest_dirs@ @mysql_pg_unittest_dirs@ - -test: - perl unit.pl run $(unittests) - -test-verbose: - HARNESS_VERBOSE=1 perl unit.pl run $(unittests) diff --git a/unittest/examples/Makefile.am b/unittest/examples/Makefile.am deleted file mode 100644 index 3e64c7ceddc..00000000000 --- a/unittest/examples/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (C) 2006 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -AM_CPPFLAGS = -I$(srcdir) -I$(top_builddir)/include \ - -I$(top_srcdir)/unittest/mytap -I$(top_srcdir)/include - -AM_LDFLAGS = -L$(top_builddir)/unittest/mytap - -LDADD = -lmytap - -# We omit core-t here, since it will always fail. -noinst_PROGRAMS = simple-t skip-t todo-t skip_all-t no_plan-t diff --git a/unittest/mysys/Makefile.am b/unittest/mysys/Makefile.am deleted file mode 100644 index 64d2749987e..00000000000 --- a/unittest/mysys/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -AM_CPPFLAGS = @ZLIB_INCLUDES@ -I$(top_builddir)/include -AM_CPPFLAGS += -I$(top_srcdir)/include -I$(top_srcdir)/unittest/mytap - -noinst_HEADERS = thr_template.c - -LDADD = $(top_builddir)/unittest/mytap/libmytap.a \ - $(top_builddir)/mysys/libmysys.a \ - $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/strings/libmystrings.a - -noinst_PROGRAMS = bitmap-t base64-t lf-t my_rdtsc-t my_vsnprintf-t my_malloc-t - -if NEED_THREAD -# my_atomic-t is used to check thread functions, so it is safe to -# ignore the file in non-threaded builds. -# In fact, it will not compile without thread support. -noinst_PROGRAMS += my_atomic-t -endif - -EXTRA_DIST = CMakeLists.txt diff --git a/unittest/mytap/Makefile.am b/unittest/mytap/Makefile.am deleted file mode 100644 index d36dc25d0b5..00000000000 --- a/unittest/mytap/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (C) 2006 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -AM_CPPFLAGS = -I$(top_srcdir)/include - -noinst_LIBRARIES = libmytap.a -noinst_HEADERS = tap.h - -libmytap_a_SOURCES = tap.c - -EXTRA_DIST = CMakeLists.txt - -SUBDIRS = . t diff --git a/unittest/mytap/t/Makefile.am b/unittest/mytap/t/Makefile.am deleted file mode 100644 index bce72a88c05..00000000000 --- a/unittest/mytap/t/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2006 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -AM_CPPFLAGS = -I$(srcdir) -I$(top_builddir)/include -I$(srcdir)/.. -I$(top_srcdir)/include - -AM_LDFLAGS = -L$(top_builddir)/unittest/mytap - -LDADD = -lmytap - -noinst_PROGRAMS = basic-t diff --git a/unittest/strings/Makefile.am b/unittest/strings/Makefile.am deleted file mode 100644 index 5b18d89f58e..00000000000 --- a/unittest/strings/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 2000, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -AM_CPPFLAGS = @ZLIB_INCLUDES@ -I$(top_builddir)/include -AM_CPPFLAGS += -I$(top_srcdir)/include -I$(top_srcdir)/unittest/mytap - -LDADD = $(top_builddir)/unittest/mytap/libmytap.a \ - $(top_builddir)/mysys/libmysys.a \ - $(top_builddir)/dbug/libdbug.a \ - $(top_builddir)/strings/libmystrings.a - -noinst_PROGRAMS = strings-t - -# Don't update the files from bitkeeper -%::SCCS/s.% diff --git a/unittest/unit.pl b/unittest/unit.pl index a1aab376fdf..f5f5d21f988 100644 --- a/unittest/unit.pl +++ b/unittest/unit.pl @@ -14,7 +14,6 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -use Test::Harness; use File::Find; use Getopt::Long; @@ -38,9 +37,10 @@ unit - Run unit tests in directory my $big= $ENV{'MYTAP_CONFIG'} eq 'big'; +my $opt_verbose; my $result = GetOptions ( "big!" => \$big, - "verbose!" => \$Test::Harness::verbose, + "verbose!" => \$opt_verbose, ); $ENV{'MYTAP_CONFIG'} = $big ? 'big' : ''; @@ -60,6 +60,19 @@ Run all unit tests in the current directory and all subdirectories. =cut +BEGIN { + # Test::Harness have been extensively rewritten in newer perl + # versions and is now just a backward compatibility wrapper + # (with a bug causing the HARNESS_PERL_SWITCHES to be mangled) + # Prefer to use TAP::Harness directly if available + if (eval "use TAP::Harness; 1") { + eval 'sub NEW_HARNESS { 1 }'; + warn "using TAP::Harness"; + } else { + eval "use Test::Harness; 1" or die "couldn't find Test::Harness!"; + eval 'sub NEW_HARNESS { 0 }'; + } +} sub _find_test_files (@) { my @dirs = @_; @@ -102,8 +115,19 @@ sub run_cmd (@) { if (@files > 0) { # Removing the first './' from the file names foreach (@files) { s!^\./!! } - $ENV{'HARNESS_PERL_SWITCHES'} .= ' -e "exec @ARGV"'; - runtests @files; + + if (NEW_HARNESS()) + { + my %args = ( exec => [ ], verbosity => $opt_verbose ); + my $harness = TAP::Harness->new( \%args ); + $harness->runtests(@files); + } + else + { + $ENV{'HARNESS_VERBOSE'} = $opt_verbose; + $ENV{'HARNESS_PERL_SWITCHES'} .= ' -e "exec @ARGV"'; + runtests(@files); + } } } diff --git a/vio/Makefile.am b/vio/Makefile.am deleted file mode 100644 index c70af1008cd..00000000000 --- a/vio/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (C) 2000-2003, 2005, 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 \ - $(openssl_includes) -LDADD = @CLIENT_EXTRA_LDFLAGS@ $(openssl_libs) $(yassl_libs) -pkglib_LIBRARIES = libvio.a - -noinst_HEADERS = vio_priv.h - -libvio_a_SOURCES = vio.c viosocket.c viossl.c viosslfactories.c - -EXTRA_DIST= CMakeLists.txt diff --git a/win/Makefile.am b/win/Makefile.am deleted file mode 100644 index 5b71b7342a9..00000000000 --- a/win/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2006 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -## Process this file with automake to create Makefile.in -EXTRA_DIST = build-vs71.bat build-vs8.bat build-vs8_x64.bat build-vs9.bat \ - build-vs9_x64.bat configure.js README mysql_manifest.cmake \ - create_manifest.js create_def_file.js diff --git a/win/README b/win/README deleted file mode 100644 index e5363cf8c8d..00000000000 --- a/win/README +++ /dev/null @@ -1,8 +0,0 @@ -Windows building readme -====================================== - -The Windows build system uses a tool named CMake to generate build files for -a variety of project systems. This tool is combined with a set of jscript -files to enable building of MySQL for Windows directly out of a bzr clone. -For relevant information and/or for building binaries from source distribution, -please refer to http://forge.mysql.com/wiki/CMake diff --git a/win/configure.js b/win/configure.js deleted file mode 100644 index 764b33bb976..00000000000 --- a/win/configure.js +++ /dev/null @@ -1,321 +0,0 @@ -// Configure.js -// -// Copyright (C) 2006 MySQL AB -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; version 2 of the License. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -ForReading = 1; -ForWriting = 2; -ForAppending = 8; - -try -{ - var fso = new ActiveXObject("Scripting.FileSystemObject"); - - var args = WScript.Arguments - - // read in the Unix configure.in file - var configureInTS = fso.OpenTextFile("configure.in", ForReading); - var configureIn = configureInTS.ReadAll(); - configureInTS.Close(); - var default_comment = "Source distribution"; - var default_port = GetValue(configureIn, "MYSQL_TCP_PORT_DEFAULT"); - var actual_port = 0; - - var configfile = fso.CreateTextFile("win\\configure.data", true); - for (i=0; i < args.Count(); i++) - { - var parts = args.Item(i).split('='); - switch (parts[0]) - { - case "CYBOZU": - case "EMBED_MANIFESTS": - case "EXTRA_DEBUG": - case "WITH_EMBEDDED_SERVER": - case "WITHOUT_ATOMICS": - configfile.WriteLine("SET (" + args.Item(i) + " TRUE CACHE BOOL \"\")"); - break; - case "MYSQL_SERVER_SUFFIX": - case "MYSQLD_EXE_SUFFIX": - configfile.WriteLine("SET (" + parts[0] + " \"" - + parts[1] + "\" CACHE STRING \"\")"); - break; - case "COMPILATION_COMMENT": - default_comment = parts[1]; - break; - case "MYSQL_TCP_PORT": - actual_port = parts[1]; - break; - } - } - - if (actual_port == 0) - { - // if we actually defaulted (as opposed to the pathological case of - // --with-tcp-port=<MYSQL_TCP_PORT_DEFAULT> which might in theory - // happen if whole batch of servers was built from a script), set - // the default to zero to indicate that; we don't lose information - // that way, because 0 obviously indicates that we can get the - // default value from MYSQL_TCP_PORT. this seems really evil, but - // testing for MYSQL_TCP_PORT==MYSQL_TCP_PORT_DEFAULT would make a - // a port of MYSQL_TCP_PORT_DEFAULT magic even if the builder did not - // intend it to mean "use the default, in fact, look up a good default - // from /etc/services if you can", but really, really meant 3306 when - // they passed in 3306. When they pass in a specific value, let them - // have it; don't second guess user and think we know better, this will - // just make people cross. this makes the the logic work like this - // (which is complicated enough): - // - // - if a port was set during build, use that as a default. - // - // - otherwise, try to look up a port in /etc/services; if that fails, - // use MYSQL_TCP_PORT_DEFAULT (at the time of this writing 3306) - // - // - allow the MYSQL_TCP_PORT environment variable to override that. - // - // - allow command-line parameters to override all of the above. - // - // the top-most MYSQL_TCP_PORT_DEFAULT is read from win/configure.js, - // so don't mess with that. - actual_port = default_port; - default_port = 0; - } - - configfile.WriteLine("SET (COMPILATION_COMMENT \"" + - default_comment + "\" CACHE STRING \"\" )"); - - configfile.WriteLine("SET (PROTOCOL_VERSION \"" + - GetValue(configureIn, "PROTOCOL_VERSION") + "\" CACHE STRING \"\")"); - configfile.WriteLine("SET (DOT_FRM_VERSION \"" + - GetValue(configureIn, "DOT_FRM_VERSION") + "\" CACHE STRING \"\")"); - configfile.WriteLine("SET (MYSQL_TCP_PORT_DEFAULT \"" + default_port + "\" CACHE STRING \"\")"); - configfile.WriteLine("SET (MYSQL_TCP_PORT \"" + actual_port + "\" CACHE STRING \"\")"); - configfile.WriteLine("SET (MYSQL_UNIX_ADDR \"" + - GetValue(configureIn, "MYSQL_UNIX_ADDR_DEFAULT") + "\" CACHE STRING \"\")"); - var version = GetVersion(configureIn); - configfile.WriteLine("SET (VERSION \"" + version + "\" CACHE STRING \"\")"); - configfile.WriteLine("SET (MYSQL_BASE_VERSION \"" + - GetBaseVersion(version) + "\" CACHE STRING \"\")"); - configfile.WriteLine("SET (MYSQL_VERSION_ID \"" + - GetVersionId(version) + "\" CACHE STRING \"\")"); - var engineOptions = ParsePlugins(); - for (option in engineOptions) - { - configfile.WriteLine("SET(" + engineOptions[option] + " TRUE CACHE BOOL \"\")"); - } - configfile.Close(); - - fso = null; - - WScript.Echo("done!"); -} -catch (e) -{ - WScript.Echo("Error: " + e.description); -} - -function GetValue(str, key) -{ - var pos = str.indexOf(key+'='); - if (pos == -1) return null; - pos += key.length + 1; - var end = str.indexOf("\n", pos); - if (str.charAt(pos) == "\"") - pos++; - if (str.charAt(end-1) == "\"") - end--; - return str.substring(pos, end); -} - -function GetVersion(str) -{ - var key = "AC_INIT([MySQL Server], ["; - var pos = str.indexOf(key); - if (pos == -1) return null; - pos += key.length; - var end = str.indexOf("]", pos); - if (end == -1) return null; - return str.substring(pos, end); -} - -function GetBaseVersion(version) -{ - var dot = version.indexOf("."); - if (dot == -1) return null; - dot = version.indexOf(".", dot+1); - if (dot == -1) dot = version.length; - return version.substring(0, dot); -} - -function GetVersionId(version) -{ - var dot = version.indexOf("."); - if (dot == -1) return null; - var major = parseInt(version.substring(0, dot), 10); - - dot++; - var nextdot = version.indexOf(".", dot); - if (nextdot == -1) return null; - var minor = parseInt(version.substring(dot, nextdot), 10); - dot = nextdot+1; - - var stop = version.indexOf("-", dot); - if (stop == -1) stop = version.length; - var build = parseInt(version.substring(dot, stop), 10); - - var id = major; - if (minor < 10) - id += '0'; - id += minor; - if (build < 10) - id += '0'; - id += build; - return id; -} - -function PluginConfig(isGroup, include) -{ - this.isGroup = isGroup; - this.include = include; -} - - -// Parse command line arguments specific to plugins (aka storage engines). -// -// --with-plugin-PLUGIN, --with-plugins=group, --with-plugins=PLUGIN[,PLUGIN...] -// --without-plugin-PLUGIN is supported. -// -// Legacy option WITH_<PLUGIN>_STORAGE_ENGINE is supported as well. -// The function returns string array with elements like WITH_SOME_STORAGE_ENGINE -// or WITHOUT_SOME_STORAGE_ENGINE. -// -// This function handles groups, for example effect of specifying --with-plugins=max -// is the same as --with-plugins==archive,federated,falcon,innobase... - -function ParsePlugins() -{ - - var config = new Array(); - - config["DEFAULT"] = new PluginConfig(true,true); - - // Parse command line parameters - for (i=0; i< WScript.Arguments.length;i++) - { - var option = WScript.Arguments.Item(i); - var match = /WITH_(\w+)_STORAGE_ENGINE/.exec(option); - if (match == null) - match = /--with-plugin-(\w+)/.exec(option); - if (match != null) - { - config[match[1].toUpperCase()] = new PluginConfig(false,true); - continue; - } - - match = /WITHOUT_(\w+)_STORAGE_ENGINE/.exec(option); - if (match == null) - match = /--without-plugin-(\w+)/.exec(option); - - if (match != null) - { - config[match[1].toUpperCase()] = - new PluginConfig(false,false); - continue; - } - - match = /--with-plugins=([\w,\-_]+)/.exec(option); - if(match != null) - { - - var plugins = match[1].split(","); - for(var key in plugins) - { - config[plugins[key].toUpperCase()] = - new PluginConfig(null,true); - } - continue; - } - match = /--without-plugins=([\w,\-_]+)/.exec(option); - if(match != null) - { - var plugins = match[1].split(","); - for(var key in plugins) - config[plugins[key].toUpperCase()] = - new PluginConfig(null, false); - continue; - } - } - - // Read plugin definitions, find out groups plugins belong to. - var fc = new Enumerator(fso.GetFolder("storage").SubFolders); - for (;!fc.atEnd(); fc.moveNext()) - { - var subfolder = fc.item(); - var name = subfolder.name.toUpperCase(); - - // Handle case where storage engine was already specified by name in - // --with-plugins or --without-plugins. - if (config[name] != undefined) - { - config[name].isGroup = false; - continue; - } - config[name] = new PluginConfig(false,null); - - // Handle groups. For each plugin, find out which group it belongs to - // If this group was specified on command line for inclusion/exclusion, - // then include/exclude the plugin. - filename = subfolder +"\\plug.in"; - if (fso.FileExists(filename)) - { - var content = fso.OpenTextFile(filename, ForReading).ReadAll(); - var match = - /MYSQL_STORAGE_ENGINE([ ]*)[\(]([^\)]+)[\)]/.exec(content); - if (match== null) - continue; - match = /\[[\w,\-_]+\][\s]?\)/.exec(match[0]); - if (match == null) - continue; - groups = match[0].split(/[\,\(\)\[\] ]/); - for (var key in groups) - { - var group = groups[key].toUpperCase(); - if (config[group] != undefined) - { - config[group].isGroup = true; - if (config[group].include != null) - { - config[name].include = config[group].include; - break; - } - } - } - } - } - - var arr = new Array(); - for(key in config) - { - var eng = config[key]; - if(eng.isGroup != undefined && !eng.isGroup && eng.include != undefined) - { - if (fso.FolderExists("storage\\"+key) || key=="PARTITION") - { - arr[arr.length] = eng.include? - "WITH_"+key+"_STORAGE_ENGINE":"WITHOUT_"+key+"_STORAGE_ENGINE"; - } - } - } - return arr; -} diff --git a/win/create_manifest.js b/win/create_manifest.js deleted file mode 100755 index dbdd83588c5..00000000000 --- a/win/create_manifest.js +++ /dev/null @@ -1,96 +0,0 @@ -/* - manifest.js - Writes a custom XML manifest for each executable/library - 5 command line options must be supplied: - name - Name of the executable/library into which the mainfest will be - embedded. - version - Version of the executable - arch - Architecture intended. - exe_level - Application execution level. - [asInvoker|highestAvailable|requireAdministrator] - outfile - Final destination where mainfest will be written. - - Example: - cscript manifest.js name=mysql version=5.0.32 arch=X86 type=win32 - exe_level=asInvoker outfile=out.xml -*/ - -try -{ - var args = WScript.Arguments - for (i=0; i < args.Count(); i++) - { - var parts = args.Item(i).split('='); - switch (parts[0]) - { - case "name": - var app_name= parts[1]; - break; - case "version": - var supp_version= parts[1]; - // Clean up the supplied version string. - var end= supp_version.indexOf("-"); - if (end == -1) end= supp_version.length; - var app_version= supp_version.substring(0, end); - var fourth_element= 0; - if(app_version.match(/[a-z]$/)) { - fourth_element+= (1 + app_version.charCodeAt(end-1) - "a".charCodeAt(0)); - app_version= app_version.substring(0,--end); - } - if(app_version.match(/sp[1-9]$/)) { - fourth_element+= 100*(app_version.charCodeAt(end-1) - "0".charCodeAt(0)); - app_version= app_version.substring(0, end-3); - end-= 3; - } - app_version+= "." + fourth_element; - break; - case "arch": - var app_arch= parts[1]; - break; - case "exe_level": - var app_exe_level= parts[1]; - break; - case "outfile": - var manifest_file= parts[1]; - break; - default: - WScript.echo("Invalid argument supplied."); - } - } - if (i != 5) - throw new Error(1, "Incorrect number of arguments."); - - var manifest_xml= "<?xml version=\'1.0\' encoding=\'UTF-8\' standalone=\'yes\'?>\r\n"; - manifest_xml+= "<assembly xmlns=\'urn:schemas-microsoft-com:asm.v1\'"; - manifest_xml+= " manifestVersion=\'1.0\'>\r\n"; - // Application Information - manifest_xml+= "\t<assemblyIdentity name=\'" + app_name + "\'"; - manifest_xml+= " version=\'" + app_version + "\'"; - manifest_xml+= " processorArchitecture=\'" + app_arch + "\'"; - manifest_xml+= " publicKeyToken=\'02ad33b422233ae3\'"; - manifest_xml+= " type=\'win32\' />\r\n"; - // Identify the application security requirements. - manifest_xml+= "\t<trustInfo xmlns=\'urn:schemas-microsoft-com:asm.v2\'>\r\n"; - manifest_xml+= "\t\t<security>\r\n\t\t\t<requestedPrivileges>\r\n\t\t\t\t"; - manifest_xml+= "<requestedExecutionLevel level=\'" + app_exe_level + "\'"; - manifest_xml+= " uiAccess=\'false\'/>\r\n"; - manifest_xml+= "\t\t\t</requestedPrivileges>\r\n\t\t</security>\r\n"; - manifest_xml+= "\t</trustInfo>\r\n</assembly>\r\n"; - - // Write the valid XML to it's final destination. - var outfileXML = WScript.CreateObject("Msxml2.DOMDocument.3.0"); - outfileXML.async = false; - if (!outfileXML.loadXML(manifest_xml)) - { - WScript.Echo(manifest_xml); - throw new Error(2, "Invalid XML"); - } - outfileXML.save(manifest_file); - - WScript.Echo("Success, created custom manifest!"); - WScript.Quit(0); -} -catch (e) -{ - WScript.Echo("Error: " + e.description); - WScript.Quit(1); -} diff --git a/win/mysql_manifest.cmake b/win/mysql_manifest.cmake deleted file mode 100644 index 611553d68ac..00000000000 --- a/win/mysql_manifest.cmake +++ /dev/null @@ -1,21 +0,0 @@ - -# - MYSQL_EMBED_MANIFEST(target_name required_privs) -# Create a manifest for target_name. Set the execution level to require_privs -# -# NOTE. PROCESSOR_ARCH must be defined before this MACRO is called. - -MACRO(MYSQL_EMBED_MANIFEST _target_name _required_privs) - ADD_CUSTOM_COMMAND( - TARGET ${_target_name} - PRE_LINK - COMMAND cscript.exe - ARGS "${PROJECT_SOURCE_DIR}/win/create_manifest.js" name=$(TargetName) version=${VERSION} arch=${PROCESSOR_ARCH} exe_level=${_required_privs} outfile=$(IntDir)\\$(TargetFileName).intermediate.manifest - COMMENT "Generates the contents of the manifest contents.") - ADD_CUSTOM_COMMAND( - TARGET ${_target_name} - POST_BUILD - COMMAND mt.exe ARGS -nologo -hashupdate -makecdfs -manifest $(IntDir)\\$(TargetFileName).intermediate.manifest -outputresource:$(TargetPath) - COMMAND makecat.exe ARGS $(IntDir)\\$(TargetFileName).intermediate.manifest.cdf - COMMAND signtool.exe ARGS sign /a /t http://timestamp.verisign.com/scripts/timstamp.dll $(TargetPath) - COMMENT "Embeds the manifest contents, creates a cryptographic catalog, signs the target with Authenticode certificate.") -ENDMACRO(MYSQL_EMBED_MANIFEST) diff --git a/zlib/Makefile.am b/zlib/Makefile.am deleted file mode 100644 index 277f6445a85..00000000000 --- a/zlib/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2004-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 - -# Process this file with automake to create Makefile.in - -INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include - -LIBS= $(NON_THREADED_LIBS) - -pkglib_LTLIBRARIES = libz.la -noinst_LTLIBRARIES = libzlt.la - -libz_la_LDFLAGS = -static - -noinst_HEADERS = crc32.h deflate.h inffast.h inffixed.h inflate.h \ - inftrees.h trees.h zconf.h zlib.h zutil.h - -libz_la_SOURCES = adler32.c compress.c crc32.c deflate.c gzio.c \ - infback.c inffast.c inflate.c inftrees.c trees.c \ - uncompr.c zutil.c -libzlt_la_SOURCES = $(libz_la_SOURCES) - -EXTRA_DIST= README FAQ INDEX ChangeLog algorithm.txt zlib.3 CMakeLists.txt