summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2010-05-20 16:35:28 +0400
committerAlexander Nozdrin <alik@sun.com>2010-05-20 16:35:28 +0400
commitdabd4a1c55cabbe73350c7c9b4c2bd6ab2db2b5c (patch)
tree2b0d3650bb46050bc0438cfd5228e52e89aa3895
parenta08c47a3ace44229e8683108bd1ce4a45471b491 (diff)
parenta18861e4adab138553da6b55a7b1d7286acbe23d (diff)
downloadmariadb-git-dabd4a1c55cabbe73350c7c9b4c2bd6ab2db2b5c.tar.gz
Manual merge from mysql-trunk.
Conflicts: - mysql-test/r/partition.result - mysql-test/r/variables_debug.result - mysql-test/t/partition.test - mysql-test/t/variables_debug.test
-rw-r--r--BUILD/Makefile.am3
-rwxr-xr-xCMakeLists.txt45
-rw-r--r--Docs/Makefile.am3
-rw-r--r--Makefile.am3
-rw-r--r--client/Makefile.am3
-rw-r--r--cmake/build_configurations/mysql_release.cmake20
-rwxr-xr-xcmake/install_layout.cmake249
-rw-r--r--cmake/install_macros.cmake33
-rw-r--r--cmake/mysql_version.cmake12
-rw-r--r--cmake/plugin.cmake1
-rw-r--r--cmd-line-utils/Makefile.am3
-rw-r--r--cmd-line-utils/readline/Makefile.am3
-rw-r--r--config.h.cmake1
-rw-r--r--extra/Makefile.am3
-rw-r--r--extra/yassl/Makefile.am3
-rw-r--r--extra/yassl/src/Makefile.am4
-rw-r--r--extra/yassl/taocrypt/Makefile.am3
-rw-r--r--extra/yassl/taocrypt/benchmark/Makefile.am3
-rw-r--r--extra/yassl/taocrypt/src/Makefile.am4
-rw-r--r--extra/yassl/taocrypt/test/Makefile.am3
-rw-r--r--extra/yassl/testsuite/Makefile.am4
-rw-r--r--include/Makefile.am3
-rwxr-xr-xlibmysql/CMakeLists.txt34
-rw-r--r--libmysql/Makefile.am3
-rw-r--r--libmysql/Makefile.shared3
-rw-r--r--libmysql_r/Makefile.am3
-rw-r--r--libmysqld/CMakeLists.txt2
-rw-r--r--libmysqld/Makefile.am3
-rw-r--r--libmysqld/examples/CMakeLists.txt4
-rw-r--r--libmysqld/examples/Makefile.am3
-rw-r--r--man/CMakeLists.txt4
-rw-r--r--man/Makefile.am3
-rw-r--r--mysql-test/CMakeLists.txt1
-rw-r--r--mysql-test/Makefile.am3
-rw-r--r--mysql-test/collections/default.experimental2
-rw-r--r--mysql-test/include/ctype_numconv.inc2
-rw-r--r--mysql-test/include/mysqld--help.inc2
-rw-r--r--mysql-test/lib/My/SafeProcess/Makefile.am4
-rw-r--r--mysql-test/r/ctype_binary.result3
-rw-r--r--mysql-test/r/ctype_cp1251.result3
-rw-r--r--mysql-test/r/ctype_latin1.result3
-rw-r--r--mysql-test/r/ctype_ucs.result3
-rw-r--r--mysql-test/r/mysql_client_test.result119
-rw-r--r--mysql-test/r/partition.result20
-rw-r--r--mysql-test/r/sp.result4
-rw-r--r--mysql-test/r/variables_debug.result7
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_storedproc_10.result2
-rw-r--r--mysql-test/suite/funcs_1/r/memory_storedproc_10.result2
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_storedproc_10.result2
-rw-r--r--mysql-test/suite/funcs_1/r/ndb_storedproc_10.result2
-rw-r--r--mysql-test/suite/funcs_1/r/row_count_func.result79
-rw-r--r--mysql-test/suite/funcs_1/t/row_count_func-master.opt1
-rw-r--r--mysql-test/suite/funcs_1/t/row_count_func.test115
-rw-r--r--mysql-test/suite/rpl/t/disabled.def1
-rw-r--r--mysql-test/t/mysql_client_test.test7
-rw-r--r--mysql-test/t/parser_stack.test8
-rw-r--r--mysql-test/t/partition.test44
-rw-r--r--mysql-test/t/variables_debug.test10
-rw-r--r--mysys/Makefile.am3
-rw-r--r--netware/Makefile.am3
-rw-r--r--plugin/Makefile.am3
-rw-r--r--plugin/audit_null/CMakeLists.txt2
-rw-r--r--plugin/daemon_example/Makefile.am3
-rw-r--r--plugin/fulltext/CMakeLists.txt4
-rw-r--r--plugin/fulltext/Makefile.am3
-rw-r--r--pstack/Makefile.am3
-rw-r--r--pstack/aout/Makefile.am3
-rw-r--r--regex/Makefile.am3
-rwxr-xr-xscripts/CMakeLists.txt12
-rw-r--r--scripts/Makefile.am4
-rw-r--r--scripts/mysqld_safe.sh4
-rw-r--r--sql-bench/CMakeLists.txt9
-rw-r--r--sql-bench/Makefile.am3
-rw-r--r--sql-common/Makefile.am3
-rwxr-xr-xsql/CMakeLists.txt3
-rw-r--r--sql/Makefile.am3
-rw-r--r--sql/ha_ndbcluster_binlog.cc6
-rw-r--r--sql/item_func.cc2
-rw-r--r--sql/log_event.cc4
-rw-r--r--sql/protocol.cc2
-rw-r--r--sql/share/Makefile.am3
-rw-r--r--sql/sql_class.cc15
-rw-r--r--sql/sql_class.h49
-rw-r--r--sql/sql_delete.cc13
-rw-r--r--sql/sql_insert.cc22
-rw-r--r--sql/sql_lex.cc79
-rw-r--r--sql/sql_lex.h26
-rw-r--r--sql/sql_parse.cc89
-rw-r--r--sql/sql_parse.h2
-rw-r--r--sql/sql_signal.cc18
-rw-r--r--sql/sql_update.cc10
-rw-r--r--storage/Makefile.am3
-rw-r--r--storage/archive/Makefile.am3
-rw-r--r--storage/blackhole/Makefile.am3
-rw-r--r--storage/csv/Makefile.am3
-rw-r--r--storage/example/Makefile.am3
-rw-r--r--storage/federated/Makefile.am3
-rw-r--r--storage/heap/Makefile.am3
-rw-r--r--storage/ibmdb2i/Makefile.am2
-rw-r--r--storage/innobase/Makefile.am3
-rw-r--r--storage/myisam/Makefile.am3
-rw-r--r--storage/myisammrg/Makefile.am3
-rw-r--r--storage/ndb/Makefile.am3
-rw-r--r--storage/ndb/docs/Makefile.am3
-rw-r--r--storage/ndb/include/Makefile.am3
-rw-r--r--storage/ndb/src/Makefile.am3
-rw-r--r--storage/ndb/src/common/Makefile.am3
-rw-r--r--storage/ndb/src/common/debugger/Makefile.am3
-rw-r--r--storage/ndb/src/common/debugger/signaldata/Makefile.am3
-rw-r--r--storage/ndb/src/common/logger/Makefile.am2
-rw-r--r--storage/ndb/src/common/mgmcommon/Makefile.am3
-rw-r--r--storage/ndb/src/common/portlib/Makefile.am4
-rw-r--r--storage/ndb/src/common/transporter/Makefile.am3
-rw-r--r--storage/ndb/src/common/util/Makefile.am3
-rw-r--r--storage/ndb/src/cw/Makefile.am3
-rw-r--r--storage/ndb/src/cw/cpcd/Makefile.am3
-rw-r--r--storage/ndb/src/kernel/Makefile.am3
-rw-r--r--storage/ndb/src/kernel/blocks/Makefile.am6
-rw-r--r--storage/ndb/src/kernel/blocks/backup/Makefile.am4
-rw-r--r--storage/ndb/src/kernel/blocks/dbdict/Makefile.am3
-rw-r--r--storage/ndb/src/kernel/blocks/dbdih/Makefile.am3
-rw-r--r--storage/ndb/src/kernel/blocks/dblqh/Makefile.am3
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/Makefile.am3
-rw-r--r--storage/ndb/src/kernel/error/Makefile.am3
-rw-r--r--storage/ndb/src/kernel/vm/Makefile.am3
-rw-r--r--storage/ndb/src/mgmapi/Makefile.am3
-rw-r--r--storage/ndb/src/mgmclient/Makefile.am3
-rw-r--r--storage/ndb/src/mgmsrv/Makefile.am3
-rw-r--r--storage/ndb/src/ndbapi/Makefile.am3
-rw-r--r--storage/ndb/test/Makefile.am3
-rw-r--r--storage/ndb/test/ndbapi/Makefile.am5
-rw-r--r--storage/ndb/test/ndbapi/bank/Makefile.am3
-rw-r--r--storage/ndb/test/run-test/Makefile.am3
-rw-r--r--storage/ndb/test/src/Makefile.am3
-rw-r--r--storage/ndb/test/tools/Makefile.am3
-rw-r--r--storage/ndb/tools/Makefile.am3
-rw-r--r--strings/Makefile.am4
-rw-r--r--support-files/CMakeLists.txt14
-rw-r--r--support-files/MacOSX/Makefile.am3
-rw-r--r--support-files/Makefile.am5
-rw-r--r--support-files/RHEL4-SElinux/Makefile.am3
-rw-r--r--support-files/mysql.spec.sh1021
-rw-r--r--tests/Makefile.am3
-rw-r--r--unittest/Makefile.am3
-rw-r--r--unittest/examples/Makefile.am3
-rw-r--r--unittest/mytap/t/Makefile.am3
-rw-r--r--vio/Makefile.am3
-rw-r--r--win/Makefile.am3
-rw-r--r--zlib/Makefile.am3
149 files changed, 1359 insertions, 1183 deletions
diff --git a/BUILD/Makefile.am b/BUILD/Makefile.am
index 312340e7132..496fb302b16 100644
--- a/BUILD/Makefile.am
+++ b/BUILD/Makefile.am
@@ -78,6 +78,3 @@ EXTRA_DIST = FINISH.sh \
compile-solaris-sparc-debug \
compile-solaris-sparc-forte \
compile-solaris-sparc-purify
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d20939f33ac..889dc463769 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -189,8 +189,11 @@ ELSE()
ENDIF()
SET(DEFAULT_BASEDIR "${DEFAULT_MYSQL_HOME}")
-SET(MYSQL_DATADIR "${DEFAULT_MYSQL_HOME}/${INSTALL_MYSQLDATADIR}" CACHE PATH
- "default MySQL data directory")
+IF(INSTALL_MYSQLDATADIR MATCHES "^/.*")
+ SET(MYSQL_DATADIR ${INSTALL_MYSQLDATADIR} CACHE PATH "default MySQL data directory")
+ELSE()
+ SET(MYSQL_DATADIR "${DEFAULT_MYSQL_HOME}/${INSTALL_MYSQLDATADIR}" CACHE PATH "default MySQL data directory")
+ENDIF()
SET(DEFAULT_CHARSET_HOME "${DEFAULT_MYSQL_HOME}")
SET(PLUGINDIR "${DEFAULT_MYSQL_HOME}/${INSTALL_PLUGINDIR}")
IF(SYSCONFDIR)
@@ -274,20 +277,28 @@ ELSE()
SET(CPACK_GENERATOR "TGZ")
ENDIF()
INCLUDE(CPack)
-INSTALL(FILES COPYING EXCEPTIONS-CLIENT LICENSE.mysql DESTINATION ${INSTALL_DOCREADMEDIR} OPTIONAL)
-INSTALL(FILES README DESTINATION ${INSTALL_DOCREADMEDIR})
IF(UNIX)
- INSTALL(FILES Docs/INSTALL-BINARY DESTINATION
- ${INSTALL_DOCREADMEDIR})
+ INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL)
+ENDIF()
+#
+# RPM installs documentation directly from the source tree
+#
+IF(NOT INSTALL_LAYOUT MATCHES "RPM")
+ INSTALL(FILES COPYING EXCEPTIONS-CLIENT LICENSE.mysql DESTINATION ${INSTALL_DOCREADMEDIR} OPTIONAL)
+ INSTALL(FILES README DESTINATION ${INSTALL_DOCREADMEDIR})
+ IF(UNIX)
+ INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR})
+ ENDIF()
+ # MYSQL_DOCS_LOCATON is used in "make dist", points to the documentation directory
+ SET(MYSQL_DOCS_LOCATION "" CACHE PATH "Location from where documentation is copied")
+ MARK_AS_ADVANCED(MYSQL_DOCS_LOCATION)
+ INSTALL(DIRECTORY Docs/ DESTINATION ${INSTALL_DOCDIR}
+ PATTERN "INSTALL-BINARY" EXCLUDE
+ PATTERN "Makefile.*" EXCLUDE
+ PATTERN "glibc*" EXCLUDE
+ PATTERN "linuxthreads.txt" EXCLUDE
+ PATTERN "myisam.txt" EXCLUDE
+ PATTERN "mysql.info" EXCLUDE
+ PATTERN "sp-imp-spec.txt" EXCLUDE
+ )
ENDIF()
-# MYSQL_DOCS_LOCATON is used in "make dist", points to the documentation directory
-SET(MYSQL_DOCS_LOCATION "" CACHE PATH "Location from where documentation is copied")
-MARK_AS_ADVANCED(MYSQL_DOCS_LOCATION)
-INSTALL(DIRECTORY Docs/ DESTINATION ${INSTALL_DOCDIR}
- PATTERN "INSTALL-BINARY" EXCLUDE
- PATTERN "Makefile.*" EXCLUDE
- PATTERN "myisam.txt" EXCLUDE
- PATTERN "glibc*" EXCLUDE
- PATTERN "sp-imp-spec.txt" EXCLUDE
- PATTERN "linuxthreads.txt" EXCLUDE
-)
diff --git a/Docs/Makefile.am b/Docs/Makefile.am
index 24f921a4877..48030153a4e 100644
--- a/Docs/Makefile.am
+++ b/Docs/Makefile.am
@@ -37,6 +37,3 @@ uninstall-local:
@RM@ -f $(DESTDIR)$(infodir)/mysql.info ; \
@RM@ -f $(DESTDIR)$(pkgdatadir)/ChangeLog ; \
fi
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/Makefile.am b/Makefile.am
index 8f472ab0b63..fd7b3ddecc0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -328,6 +328,3 @@ do_abi_check:
@DIFF@ -w $$file.pp $(top_builddir)/abi_check.out; \
@RM@ $(top_builddir)/abi_check.out; \
done
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/client/Makefile.am b/client/Makefile.am
index 5da59296cdf..04f0ac39b0e 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -124,6 +124,3 @@ link_sources:
rm -f $(srcdir)/my_user.c; \
@LN_CP_F@ $(top_srcdir)/sql-common/my_user.c my_user.c;
echo timestamp > link_sources;
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake
index b329a09d56e..97de0965f6b 100644
--- a/cmake/build_configurations/mysql_release.cmake
+++ b/cmake/build_configurations/mysql_release.cmake
@@ -80,9 +80,6 @@ IF(FEATURE_SET)
ENDFOREACH()
ENDIF()
-SET(WITHOUT_AUDIT_NULL ON CACHE BOOL "")
-SET(WITHOUT_DAEMON_EXAMPLE ON CACHE BOOL "")
-
OPTION(ENABLE_LOCAL_INFILE "" ON)
SET(WITH_SSL bundled CACHE STRING "")
SET(WITH_ZLIB bundled CACHE STRING "")
@@ -122,8 +119,12 @@ IF(UNIX)
IF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
IF(CMAKE_C_COMPILER_ID MATCHES "HP")
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ia64")
- SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g +O2 +DD64 +DSitanium2 -mt -AC99")
- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g +O2 +DD64 +DSitanium2 -mt -Aa")
+ SET(CMAKE_C_FLAGS
+ "${CMAKE_C_FLAGS} +DD64 +DSitanium2 -mt -AC99")
+ SET(CMAKE_CXX_FLAGS
+ "${CMAKE_CXX_FLAGS} +DD64 +DSitanium2 -mt -Aa")
+ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} +O2")
+ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS} +O2")
ENDIF()
ENDIF()
SET(WITH_SSL)
@@ -132,15 +133,16 @@ IF(UNIX)
# Linux flags
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
IF(CMAKE_C_COMPILER_ID MATCHES "Intel")
- SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-static-intel -g -O3 -unroll2 -ip -mp -restrict")
- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-static-intel -g -O3 -unroll2 -ip -mp -restrict")
+ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-static-intel -static-libgcc -g -O3 -unroll2 -ip -mp -restrict -no-ftz -no-prefetch")
+ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-static-intel -static-libgcc -g -O3 -unroll2 -ip -mp -restrict -no-ftz -no-prefetch")
+ SET(WITH_SSL no)
ENDIF()
ENDIF()
# OSX flags
IF(APPLE)
- SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Os ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
+ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -Os -fno-common")
+ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -Os -felide-constructors -fno-common")
ENDIF()
# Solaris flags
diff --git a/cmake/install_layout.cmake b/cmake/install_layout.cmake
index 2d8c218a293..ade6cdb747f 100755
--- a/cmake/install_layout.cmake
+++ b/cmake/install_layout.cmake
@@ -14,99 +14,184 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# The purpose of this file is to set the default installation layout.
-# Currently, there are 2 different installation layouts ,
-# one is used in tar.gz packages (Windows zip is about the same), another one
-# in RPMs.
-
-# There are currently 2 layouts defines, named STANDALONE (tar.gz layout)
-# and UNIX (rpm layout). To force a directory layout when invoking cmake use
-# -DINSTALL_LAYOUT=[STANDALONE|UNIX].
-# This wil use a predefined layout. There is a possibility to further fine-tune
-# installation directories. Several variables are can be overwritten
-#
-# - INSTALL_BINDIR (directory with client executables and Unix shell scripts)
-# - INSTALL_SBINDIR (directory with mysqld)
-# - INSTALL_LIBDIR (directory with client end embedded libraries)
-# - INSTALL_PLUGINDIR (directory for plugins)
-# - INSTALL_INCLUDEDIR (directory for MySQL headers)
-# - INSTALL_DOCDIR (documentation)
-# - INSTALL_MANDIR (man pages)
-# - INSTALL_SCRIPTDIR (several scripts, rarely used)
-# - INSTALL_MYSQLSHAREDIR (MySQL character sets and localized error messages)
-# - INSTALL_SHAREDIR (location of aclocal/mysql.m4)
-# - INSTALL_SQLBENCHDIR (sql-bench)
-# - INSTALL_MYSQLTESTDIR (mysql-test)
-# - INSTALL_DOCREADMEDIR (readme and similar)
-# - INSTALL_SUPPORTFILESDIR (used only in standalone installer)
+#
+# The current choices of installation layout are:
+#
+# STANDALONE
+# Build with prefix=/usr/local/mysql, create tarball with install prefix="."
+# and relative links. Windows zip uses the same tarball layout but without
+# the build prefix.
+#
+# RPM
+# Build as per default RPM layout, with prefix=/usr
+#
+# DEB
+# Build as per STANDALONE, prefix=/opt/mysql-$major.$minor
+#
+# SVR4
+# Solaris package layout suitable for pkg* tools, prefix=/opt/mysql/mysql
+#
+# To force a directory layout, use -DINSTALL_LAYOUT=<layout>.
+#
+# The default is STANDALONE.
+#
+# There is the possibility to further fine-tune installation directories.
+# Several variables can be overwritten:
+#
+# - INSTALL_BINDIR (directory with client executables and scripts)
+# - INSTALL_SBINDIR (directory with mysqld)
+# - INSTALL_SCRIPTDIR (several scripts, rarely used)
+#
+# - INSTALL_LIBDIR (directory with client end embedded libraries)
+# - INSTALL_PLUGINDIR (directory for plugins)
+#
+# - INSTALL_INCLUDEDIR (directory for MySQL headers)
+#
+# - INSTALL_DOCDIR (documentation)
+# - INSTALL_DOCREADMEDIR (readme and similar)
+# - INSTALL_MANDIR (man pages)
+# - INSTALL_INFODIR (info pages)
+#
+# - INSTALL_SHAREDIR (location of aclocal/mysql.m4)
+# - INSTALL_MYSQLSHAREDIR (MySQL character sets and localized error messages)
+# - INSTALL_MYSQLTESTDIR (mysql-test)
+# - INSTALL_SQLBENCHDIR (sql-bench)
+# - INSTALL_SUPPORTFILESDIR (various extra support files)
+#
+# - INSTALL_MYSQLDATADIR (data directory)
-# Default installation layout on Unix is UNIX (kent wants it so)
IF(NOT INSTALL_LAYOUT)
- IF(WIN32)
- SET(DEFAULT_INSTALL_LAYOUT "STANDALONE")
- ELSE()
- SET(DEFAULT_INSTALL_LAYOUT "UNIX")
- ENDIF()
+ SET(DEFAULT_INSTALL_LAYOUT "STANDALONE")
ENDIF()
-SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}"
-CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer) or UNIX")
-
-IF(NOT INSTALL_LAYOUT MATCHES "STANDALONE")
- IF(NOT INSTALL_LAYOUT MATCHES "UNIX")
- SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}")
- ENDIF()
-ENDIF()
+SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}"
+CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer) or UNIX")
IF(UNIX)
- IF(INSTALL_LAYOUT MATCHES "UNIX")
+ IF(INSTALL_LAYOUT MATCHES "RPM")
SET(default_prefix "/usr")
+ ELSEIF(INSTALL_LAYOUT MATCHES "DEB")
+ SET(default_prefix "/opt/${MYSQL_BASE_VERSION}")
+ # This is required to avoid "cpack -GDEB" default of prefix=/usr
+ SET(CPACK_SET_DESTDIR ON)
+ ELSEIF(INSTALL_LAYOUT MATCHES "SVR4")
+ SET(default_prefix "/opt/mysql/mysql")
ELSE()
SET(default_prefix "/usr/local/mysql")
ENDIF()
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
- SET(CMAKE_INSTALL_PREFIX ${default_prefix}
+ SET(CMAKE_INSTALL_PREFIX ${default_prefix}
CACHE PATH "install prefix" FORCE)
ENDIF()
- SET(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc"
+ SET(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc"
CACHE PATH "config directory (for my.cnf)")
MARK_AS_ADVANCED(SYSCONFDIR)
ENDIF()
-
-
- # STANDALONE layout
- SET(INSTALL_BINDIR_STANDALONE "bin")
- SET(INSTALL_SBINDIR_STANDALONE "bin")
- SET(INSTALL_LIBDIR_STANDALONE "lib")
- SET(INSTALL_INCLUDEDIR_STANDALONE "include")
- SET(INSTALL_PLUGINDIR_STANDALONE "lib/plugin")
- SET(INSTALL_DOCDIR_STANDALONE "docs")
- SET(INSTALL_MANDIR_STANDALONE "man")
- SET(INSTALL_MYSQLSHAREDIR_STANDALONE "share")
- SET(INSTALL_SHAREDIR_STANDALONE "share")
- SET(INSTALL_SCRIPTDIR_STANDALONE "scripts")
- SET(INSTALL_MYSQLTESTDIR_STANDALONE "mysql-test")
- SET(INSTALL_SQLBENCHROOTDIR_STANDALONE ".")
- SET(INSTALL_DOCREADMEDIR_STANDALONE ".")
- SET(INSTALL_SUPPORTFILESDIR_STANDALONE "support-files")
- SET(INSTALL_MYSQLDATADIR_STANDALONE "data")
-
- # UNIX layout
- SET(INSTALL_BINDIR_UNIX "bin")
- SET(INSTALL_SBINDIR_UNIX "sbin")
- SET(INSTALL_LIBDIR_UNIX "lib/mysql")
- SET(INSTALL_PLUGINDIR_UNIX "lib/mysql/plugin")
- SET(INSTALL_DOCDIR_UNIX "share/mysql/doc/MySQL-server-${MYSQL_NO_DASH_VERSION}")
- SET(INSTALL_MANDIR_UNIX "share/mysql/man")
- SET(INSTALL_INCLUDEDIR_UNIX "include/mysql")
- SET(INSTALL_MYSQLSHAREDIR_UNIX "share/mysql")
- SET(INSTALL_SHAREDIR_UNIX "share")
- SET(INSTALL_SCRIPTDIR_UNIX "bin")
- SET(INSTALL_MYSQLTESTDIR_UNIX "mysql-test")
- SET(INSTALL_SQLBENCHROOTDIR_UNIX "")
- SET(INSTALL_DOCREADMEDIR_UNIX "share/mysql/doc/MySQL-server-${MYSQL_NO_DASH_VERSION}")
- SET(INSTALL_SUPPORTFILESDIR_UNIX "")
- SET(INSTALL_MYSQLDATADIR_UNIX "var")
+#
+# STANDALONE layout
+#
+SET(INSTALL_BINDIR_STANDALONE "bin")
+SET(INSTALL_SBINDIR_STANDALONE "bin")
+SET(INSTALL_SCRIPTDIR_STANDALONE "scripts")
+#
+SET(INSTALL_LIBDIR_STANDALONE "lib")
+SET(INSTALL_PLUGINDIR_STANDALONE "lib/plugin")
+#
+SET(INSTALL_INCLUDEDIR_STANDALONE "include")
+#
+SET(INSTALL_DOCDIR_STANDALONE "docs")
+SET(INSTALL_DOCREADMEDIR_STANDALONE ".")
+SET(INSTALL_MANDIR_STANDALONE "man")
+SET(INSTALL_INFODIR_STANDALONE "docs")
+#
+SET(INSTALL_SHAREDIR_STANDALONE "share")
+SET(INSTALL_MYSQLSHAREDIR_STANDALONE "share")
+SET(INSTALL_MYSQLTESTDIR_STANDALONE "mysql-test")
+SET(INSTALL_SQLBENCHDIR_STANDALONE ".")
+SET(INSTALL_SUPPORTFILESDIR_STANDALONE "support-files")
+#
+SET(INSTALL_MYSQLDATADIR_STANDALONE "data")
+
+#
+# RPM layout
+#
+SET(INSTALL_BINDIR_RPM "bin")
+SET(INSTALL_SBINDIR_RPM "sbin")
+SET(INSTALL_SCRIPTDIR_RPM "bin")
+#
+IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
+ SET(INSTALL_LIBDIR_RPM "lib64")
+ SET(INSTALL_PLUGINDIR_RPM "lib64/mysql/plugin")
+ELSE()
+ SET(INSTALL_LIBDIR_RPM "lib")
+ SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin")
+ENDIF()
+#
+SET(INSTALL_INCLUDEDIR_RPM "include/mysql")
+#
+#SET(INSTALL_DOCDIR_RPM unset - installed directly by RPM)
+#SET(INSTALL_DOCREADMEDIR_RPM unset - installed directly by RPM)
+SET(INSTALL_INFODIR_RPM "share/info")
+SET(INSTALL_MANDIR_RPM "share/man")
+#
+SET(INSTALL_SHAREDIR_RPM "share")
+SET(INSTALL_MYSQLSHAREDIR_RPM "share/mysql")
+SET(INSTALL_MYSQLTESTDIR_RPM "share/mysql-test")
+SET(INSTALL_SQLBENCHDIR_RPM "")
+SET(INSTALL_SUPPORTFILESDIR_RPM "share/mysql")
+#
+SET(INSTALL_MYSQLDATADIR_RPM "/var/lib/mysql")
+
+#
+# DEB layout
+#
+SET(INSTALL_BINDIR_DEB "bin")
+SET(INSTALL_SBINDIR_DEB "bin")
+SET(INSTALL_SCRIPTDIR_DEB "scripts")
+#
+SET(INSTALL_LIBDIR_DEB "lib")
+SET(INSTALL_PLUGINDIR_DEB "lib/plugin")
+#
+SET(INSTALL_INCLUDEDIR_DEB "include")
+#
+SET(INSTALL_DOCDIR_DEB "docs")
+SET(INSTALL_DOCREADMEDIR_DEB ".")
+SET(INSTALL_MANDIR_DEB "man")
+SET(INSTALL_INFODIR_DEB "docs")
+#
+SET(INSTALL_SHAREDIR_DEB "share")
+SET(INSTALL_MYSQLSHAREDIR_DEB "share")
+SET(INSTALL_MYSQLTESTDIR_DEB "mysql-test")
+SET(INSTALL_SQLBENCHDIR_DEB ".")
+SET(INSTALL_SUPPORTFILESDIR_DEB "support-files")
+#
+SET(INSTALL_MYSQLDATADIR_DEB "data")
+
+#
+# SVR4 layout
+#
+SET(INSTALL_BINDIR_SVR4 "bin")
+SET(INSTALL_SBINDIR_SVR4 "bin")
+SET(INSTALL_SCRIPTDIR_SVR4 "scripts")
+#
+SET(INSTALL_LIBDIR_SVR4 "lib")
+SET(INSTALL_PLUGINDIR_SVR4 "lib/plugin")
+#
+SET(INSTALL_INCLUDEDIR_SVR4 "include")
+#
+SET(INSTALL_DOCDIR_SVR4 "docs")
+SET(INSTALL_DOCREADMEDIR_SVR4 ".")
+SET(INSTALL_MANDIR_SVR4 "man")
+SET(INSTALL_INFODIR_SVR4 "docs")
+#
+SET(INSTALL_SHAREDIR_SVR4 "share")
+SET(INSTALL_MYSQLSHAREDIR_SVR4 "share")
+SET(INSTALL_MYSQLTESTDIR_SVR4 "mysql-test")
+SET(INSTALL_SQLBENCHDIR_SVR4 ".")
+SET(INSTALL_SUPPORTFILESDIR_SVR4 "support-files")
+#
+SET(INSTALL_MYSQLDATADIR_SVR4 "/var/lib/mysql")
# Clear cached variables if install layout was changed
@@ -117,12 +202,12 @@ IF(OLD_INSTALL_LAYOUT)
ENDIF()
SET(OLD_INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE INTERNAL "")
-# Set INSTALL_FOODIR variables for chosen layout
-# (for example, INSTALL_BINDIR will be defined as
-# ${INSTALL_BINDIR_STANDALONE} by default if STANDALONE layout is chosen)
-FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN
- MYSQLTEST SQLBENCHROOT DOCREADME SUPPORTFILES MYSQLDATA)
- SET(INSTALL_${var}DIR ${INSTALL_${var}DIR_${INSTALL_LAYOUT}}
+# Set INSTALL_FOODIR variables for chosen layout (for example, INSTALL_BINDIR
+# will be defined as ${INSTALL_BINDIR_STANDALONE} by default if STANDALONE
+# layout is chosen)
+FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN
+ INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA)
+ SET(INSTALL_${var}DIR ${INSTALL_${var}DIR_${INSTALL_LAYOUT}}
CACHE STRING "${var} installation directory" ${FORCE})
MARK_AS_ADVANCED(INSTALL_${var}DIR)
ENDFOREACH()
diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake
index 73da532ecf6..f049776b8f4 100644
--- a/cmake/install_macros.cmake
+++ b/cmake/install_macros.cmake
@@ -173,7 +173,7 @@ FUNCTION(INSTALL_DEBUG_TARGET target)
""
${ARGN}
)
- GET_TARGET_PROPERTY(target_type ${target} TYPE)
+ GET_TARGET_PROPERTY(target_type ${target} TYPE)
IF(ARG_RENAME)
SET(RENAME_PARAM RENAME ${ARG_RENAME}${CMAKE_${target_type}_SUFFIX})
ELSE()
@@ -189,9 +189,40 @@ FUNCTION(INSTALL_DEBUG_TARGET target)
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "Debug" debug_target_location "${target_location}" )
ENDIF()
+ # Define permissions
+ # For executable files
+ SET(PERMISSIONS_EXECUTABLE
+ PERMISSIONS
+ OWNER_READ OWNER_WRITE OWNER_EXECUTE
+ GROUP_READ GROUP_EXECUTE
+ WORLD_READ WORLD_EXECUTE)
+
+ # Permissions for shared library (honors CMAKE_INSTALL_NO_EXE which is
+ # typically set on Debian)
+ IF(CMAKE_INSTALL_SO_NO_EXE)
+ SET(PERMISSIONS_SHARED_LIBRARY
+ PERMISSIONS
+ OWNER_READ OWNER_WRITE
+ GROUP_READ
+ WORLD_READ)
+ ELSE()
+ SET(PERMISSIONS_SHARED_LIBRARY ${PERMISSIONS_EXECUTABLE})
+ ENDIF()
+
+ # Shared modules get the same permissions as shared libraries
+ SET(PERMISSIONS_MODULE_LIBRARY ${PERMISSIONS_SHARED_LIBRARY})
+
+ # Define permissions for static library
+ SET(PERMISSIONS_STATIC_LIBRARY
+ PERMISSIONS
+ OWNER_READ OWNER_WRITE
+ GROUP_READ
+ WORLD_READ)
+
INSTALL(FILES ${debug_target_location}
DESTINATION ${ARG_DESTINATION}
${RENAME_PARAM}
+ ${PERMISSIONS_${target_type}}
CONFIGURATIONS Release RelWithDebInfo
OPTIONAL)
diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake
index 3a61bcf40ab..6adca2ccc2f 100644
--- a/cmake/mysql_version.cmake
+++ b/cmake/mysql_version.cmake
@@ -55,6 +55,7 @@ MACRO(GET_MYSQL_VERSION)
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})
@@ -106,6 +107,7 @@ ENDIF()
IF(NOT CPACK_SOURCE_PACKAGE_FILE_NAME)
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "mysql-${VERSION}")
ENDIF()
+SET(CPACK_PACKAGE_CONTACT "MySQL Build Team <build@mysql.com>")
SET(CPACK_PACKAGE_VENDOR "Sun Microsystems, Inc")
SET(CPACK_SOURCE_GENERATOR "TGZ")
INCLUDE(cpack_source_ignore_files)
@@ -114,6 +116,16 @@ INCLUDE(cpack_source_ignore_files)
SET(PRODUCTNAME "MySQL Server")
SET(COMPANYNAME ${CPACK_PACKAGE_VENDOR})
+# Windows 'date' command has unpredictable output, so cannot rely on it to
+# set MYSQL_COPYRIGHT_YEAR - if someone finds a portable way to do so then
+# it might be useful
+#IF (WIN32)
+# EXECUTE_PROCESS(COMMAND "date" "/T" OUTPUT_VARIABLE TMP_DATE)
+# STRING(REGEX REPLACE "(..)/(..)/..(..).*" "\\3\\2\\1" MYSQL_COPYRIGHT_YEAR ${TMP_DATE})
+IF(UNIX)
+ EXECUTE_PROCESS(COMMAND "date" "+%Y" OUTPUT_VARIABLE MYSQL_COPYRIGHT_YEAR OUTPUT_STRIP_TRAILING_WHITESPACE)
+ENDIF()
+
# Add version information to the exe and dll files
# Refer to http://msdn.microsoft.com/en-us/library/aa381058(VS.85).aspx
# for more info.
diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake
index 30a7932a0d7..896624996d3 100644
--- a/cmake/plugin.cmake
+++ b/cmake/plugin.cmake
@@ -174,6 +174,7 @@ MACRO(MYSQL_ADD_PLUGIN)
OUTPUT_NAME "${ARG_MODULE_OUTPUT_NAME}")
# Install dynamic library
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${INSTALL_PLUGINDIR})
+ INSTALL_DEBUG_TARGET(${target} DESTINATION ${INSTALL_PLUGINDIR}/debug)
ENDIF()
ENDMACRO()
diff --git a/cmd-line-utils/Makefile.am b/cmd-line-utils/Makefile.am
index 1a84ce7af38..622aa72fd43 100644
--- a/cmd-line-utils/Makefile.am
+++ b/cmd-line-utils/Makefile.am
@@ -19,6 +19,3 @@
SUBDIRS= @readline_basedir@
DIST_SUBDIRS= libedit readline
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/cmd-line-utils/readline/Makefile.am b/cmd-line-utils/readline/Makefile.am
index d58ce0f1de1..40e74ccaf55 100644
--- a/cmd-line-utils/readline/Makefile.am
+++ b/cmd-line-utils/readline/Makefile.am
@@ -32,6 +32,3 @@ noinst_HEADERS = readline.h chardefs.h keymaps.h \
EXTRA_DIST= emacs_keymap.c vi_keymap.c CMakeLists.txt
DEFS = -DMYSQL_CLIENT_NO_THREADS -DHAVE_CONFIG_H -DNO_KILL_INTR
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/config.h.cmake b/config.h.cmake
index f0473c83af6..b3b234a153b 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -38,6 +38,7 @@
#cmakedefine HAVE_FPU_CONTROL_H 1
#cmakedefine HAVE_GRP_H 1
#cmakedefine HAVE_EXPLICIT_TEMPLATE_INSTANTIATION 1
+#cmakedefine HAVE_IA64INTRIN_H 1
#cmakedefine HAVE_IEEEFP_H 1
#cmakedefine HAVE_INTTYPES_H 1
#cmakedefine HAVE_LIMITS_H 1
diff --git a/extra/Makefile.am b/extra/Makefile.am
index 1552a5836ed..ff62749ac4c 100644
--- a/extra/Makefile.am
+++ b/extra/Makefile.am
@@ -55,6 +55,3 @@ EXTRA_DIST = CMakeLists.txt
perror.o: perror.c
$(COMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/extra/yassl/Makefile.am b/extra/yassl/Makefile.am
index ddd57d60a99..43cae0514f9 100644
--- a/extra/yassl/Makefile.am
+++ b/extra/yassl/Makefile.am
@@ -1,5 +1,2 @@
SUBDIRS = taocrypt src testsuite
EXTRA_DIST = CMakeLists.txt
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/extra/yassl/src/Makefile.am b/extra/yassl/src/Makefile.am
index bc57e7d05ba..6efd2220c54 100644
--- a/extra/yassl/src/Makefile.am
+++ b/extra/yassl/src/Makefile.am
@@ -6,7 +6,3 @@ libyassl_la_SOURCES = buffer.cpp cert_wrapper.cpp crypto_wrapper.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
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
diff --git a/extra/yassl/taocrypt/Makefile.am b/extra/yassl/taocrypt/Makefile.am
index 11fea2064f0..deab5227f7f 100644
--- a/extra/yassl/taocrypt/Makefile.am
+++ b/extra/yassl/taocrypt/Makefile.am
@@ -1,5 +1,2 @@
SUBDIRS = src test benchmark
EXTRA_DIST = CMakeLists.txt $(wildcard mySTL/*.hpp)
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/extra/yassl/taocrypt/benchmark/Makefile.am b/extra/yassl/taocrypt/benchmark/Makefile.am
index 2fe1c90c90d..f3f71379ff7 100644
--- a/extra/yassl/taocrypt/benchmark/Makefile.am
+++ b/extra/yassl/taocrypt/benchmark/Makefile.am
@@ -4,6 +4,3 @@ benchmark_SOURCES = benchmark.cpp
benchmark_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
benchmark_CXXFLAGS = -DYASSL_PURE_C
EXTRA_DIST = benchmark.dsp rsa1024.der dh1024.der dsa1024.der make.bat
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/extra/yassl/taocrypt/src/Makefile.am b/extra/yassl/taocrypt/src/Makefile.am
index 61032d4c381..c763d670928 100644
--- a/extra/yassl/taocrypt/src/Makefile.am
+++ b/extra/yassl/taocrypt/src/Makefile.am
@@ -11,7 +11,3 @@ libtaocrypt_la_SOURCES = aes.cpp aestables.cpp algebra.cpp arc4.cpp \
libtaocrypt_la_CXXFLAGS = @yassl_taocrypt_extra_cxxflags@ -DYASSL_PURE_C
EXTRA_DIST = $(wildcard ../include/*.hpp)
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
diff --git a/extra/yassl/taocrypt/test/Makefile.am b/extra/yassl/taocrypt/test/Makefile.am
index 73e7f729bdb..06b48cc42d5 100644
--- a/extra/yassl/taocrypt/test/Makefile.am
+++ b/extra/yassl/taocrypt/test/Makefile.am
@@ -4,6 +4,3 @@ test_SOURCES = test.cpp
test_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
test_CXXFLAGS = -DYASSL_PURE_C
EXTRA_DIST = make.bat
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/extra/yassl/testsuite/Makefile.am b/extra/yassl/testsuite/Makefile.am
index cae34e7bbc0..9c9ba9b375c 100644
--- a/extra/yassl/testsuite/Makefile.am
+++ b/extra/yassl/testsuite/Makefile.am
@@ -8,7 +8,3 @@ testsuite_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX -DNO_MAIN_DRIVER
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
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
diff --git a/include/Makefile.am b/include/Makefile.am
index da50ecf2178..e610a8e325c 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -96,6 +96,3 @@ endif
probes_mysql_nodtrace.h: $(DTRACEPROVIDER)
@PERL@ $(top_srcdir)/scripts/dheadgen.pl -f $(DTRACEPROVIDER) > $@
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt
index 26af9c80a2b..cd23f825b9e 100755
--- a/libmysql/CMakeLists.txt
+++ b/libmysql/CMakeLists.txt
@@ -171,15 +171,24 @@ IF(UNIX)
SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION})
ENDIF()
ENDMACRO()
+ INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR})
ENDIF()
IF(NOT DISABLE_SHARED)
MERGE_LIBRARIES(libmysql SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS})
IF(UNIX)
+ # libtool compatability
+ IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE)
+ SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}")
+ ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
+ SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0")
+ ELSE()
+ SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0")
+ ENDIF()
# Name of shared library is mysqlclient on Unix
SET_TARGET_PROPERTIES(libmysql PROPERTIES
OUTPUT_NAME mysqlclient
- VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0"
+ VERSION "${OS_SHARED_LIB_VERSION}"
SOVERSION "${SHARED_LIB_MAJOR_VERSION}")
IF(LINK_FLAG_NO_UNDEFINED)
GET_TARGET_PROPERTY(libmysql_link_flags libmysql LINK_FLAGS)
@@ -194,14 +203,21 @@ IF(NOT DISABLE_SHARED)
SET_TARGET_PROPERTIES(mysqlclient PROPERTIES CLEAN_DIRECT_OUTPUT 1)
SET_TARGET_PROPERTIES(libmysql PROPERTIES CLEAN_DIRECT_OUTPUT 1)
- # Install 3 links to libmysqlclient.so (client_r)
- FOREACH(ver "" "${SHARED_LIB_MAJOR_VERSION}"
- "${SHARED_LIB_MAJOR_VERSION}.0.0")
- GET_VERSIONED_LIBNAME(
- "${CMAKE_SHARED_LIBRARY_PREFIX}mysqlclient_r"
- "${CMAKE_SHARED_LIBRARY_SUFFIX}"
- "${ver}"
- linkname)
+ # Install links to libmysqlclient.so (client_r)
+ GET_VERSIONED_LIBNAME(
+ "${CMAKE_SHARED_LIBRARY_PREFIX}mysqlclient_r"
+ "${CMAKE_SHARED_LIBRARY_SUFFIX}"
+ ""
+ linkname)
+ INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR})
+ SET(OS_SHARED_LIB_SYMLINKS "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}")
+ LIST(REMOVE_DUPLICATES OS_SHARED_LIB_SYMLINKS)
+ FOREACH(ver ${OS_SHARED_LIB_SYMLINKS})
+ GET_VERSIONED_LIBNAME(
+ "${CMAKE_SHARED_LIBRARY_PREFIX}mysqlclient_r"
+ "${CMAKE_SHARED_LIBRARY_SUFFIX}"
+ "${ver}"
+ linkname)
INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR})
ENDFOREACH()
ENDIF()
diff --git a/libmysql/Makefile.am b/libmysql/Makefile.am
index c8dd0d3061c..b1d23a175d4 100644
--- a/libmysql/Makefile.am
+++ b/libmysql/Makefile.am
@@ -113,6 +113,3 @@ do-lib-dist:
echo ' $$(AR) r $$@ $$?' >>$$dir/Makefile; \
gtar cvzf $$dir.tar.gz $$dir; \
cd $$dir; gmake
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/libmysql/Makefile.shared b/libmysql/Makefile.shared
index dbe801ecd17..71649b83991 100644
--- a/libmysql/Makefile.shared
+++ b/libmysql/Makefile.shared
@@ -116,6 +116,3 @@ 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@
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/libmysql_r/Makefile.am b/libmysql_r/Makefile.am
index 94b66f29419..dab45d93673 100644
--- a/libmysql_r/Makefile.am
+++ b/libmysql_r/Makefile.am
@@ -44,6 +44,3 @@ link_sources:
done; \
done
echo timestamp > link_sources
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt
index af48932a434..fa5088f288b 100644
--- a/libmysqld/CMakeLists.txt
+++ b/libmysqld/CMakeLists.txt
@@ -133,7 +133,7 @@ ENDIF()
IF(UNIX)
INSTALL_DEBUG_TARGET(mysqlserver DESTINATION ${INSTALL_LIBDIR} RENAME
- ${CMAKE_STATIC_LIBRARY_PREFIX}/mysqld-debug)
+ ${CMAKE_STATIC_LIBRARY_PREFIX}mysqld-debug)
ENDIF()
IF(MSVC AND NOT DISABLE_SHARED)
diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am
index 68c31fbf79c..5ff23be42ba 100644
--- a/libmysqld/Makefile.am
+++ b/libmysqld/Makefile.am
@@ -234,6 +234,3 @@ link_sources:
clean-local:
rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlstoragesources) $(storagesources) | sed "s;\.lo;.c;g"`; \
rm -f client_settings.h
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/libmysqld/examples/CMakeLists.txt b/libmysqld/examples/CMakeLists.txt
index f8adae9c931..f98470a2047 100644
--- a/libmysqld/examples/CMakeLists.txt
+++ b/libmysqld/examples/CMakeLists.txt
@@ -23,7 +23,9 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
ADD_DEFINITIONS(-DEMBEDDED_LIBRARY -UMYSQL_CLIENT)
-MYSQL_ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc
+# We never use "mysql_embedded", is more of a linktest, so we don't
+# use MYSQL_ADD_EXECUTABLE as that would install it and package it
+ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc
../../client/mysql.cc ../../client/readline.cc)
TARGET_LINK_LIBRARIES(mysql_embedded mysqlserver)
IF(UNIX)
diff --git a/libmysqld/examples/Makefile.am b/libmysqld/examples/Makefile.am
index abae608550e..e7b053d9766 100644
--- a/libmysqld/examples/Makefile.am
+++ b/libmysqld/examples/Makefile.am
@@ -50,6 +50,3 @@ mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD)
mysql_client_test_embedded_LINK = $(CXXLINK)
nodist_mysql_client_test_embedded_SOURCES = mysql_client_test.c
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt
index 29de4432c0c..1113b73fd8d 100644
--- a/man/CMakeLists.txt
+++ b/man/CMakeLists.txt
@@ -15,8 +15,12 @@
# Copy man pages
FILE(GLOB MAN1_FILES *.1)
+FILE(GLOB MAN1_EXCLUDE make_win_bin_dist.1)
FILE(GLOB MAN8_FILES *.8)
IF(MAN1_FILES)
+ IF(MAN1_EXCLUDE)
+ LIST(REMOVE_ITEM MAN1_FILES ${MAN1_EXCLUDE})
+ ENDIF()
INSTALL(FILES ${MAN1_FILES} DESTINATION ${INSTALL_MANDIR}/man1)
ENDIF()
IF(MAN8_FILES)
diff --git a/man/Makefile.am b/man/Makefile.am
index 8ccada67828..027edccc249 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -24,6 +24,3 @@ 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_*
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/mysql-test/CMakeLists.txt b/mysql-test/CMakeLists.txt
index b8b7d08135f..b309db292da 100644
--- a/mysql-test/CMakeLists.txt
+++ b/mysql-test/CMakeLists.txt
@@ -18,6 +18,7 @@ INSTALL(
DESTINATION ${INSTALL_MYSQLTESTDIR}
PATTERN "var/" EXCLUDE
PATTERN "lib/My/SafeProcess" EXCLUDE
+ PATTERN "lib/t*" EXCLUDE
PATTERN "CPack" EXCLUDE
PATTERN "CMake*" EXCLUDE
PATTERN "mtr.out*" EXCLUDE
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am
index 59db0d9f537..030a4823b36 100644
--- a/mysql-test/Makefile.am
+++ b/mysql-test/Makefile.am
@@ -148,6 +148,3 @@ mtr:
mysql-test-run:
$(RM) -f mysql-test-run
$(LN_S) mysql-test-run.pl mysql-test-run
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental
index 4726c85b821..9fa352a6412 100644
--- a/mysql-test/collections/default.experimental
+++ b/mysql-test/collections/default.experimental
@@ -6,6 +6,8 @@ binlog.binlog_multi_engine # joro : NDB tests marked as experiment
funcs_1.charset_collation_1 # depends on compile-time decisions
funcs_1.myisam_views @solaris # Bug#50595 2010-03-05 alik funcs_1.myisam_views takes longer time on 6.0 branch than 5.1 branch
+innodb.innodb_information_schema # Bug#48883 2010-05-11 alik Test "innodb_information_schema" takes fewer locks than expected
+
main.func_math @freebsd # Bug#43020 2010-05-04 alik main.func_math fails on FreeBSD in PB2
main.gis @solaris # Bug#52208 2010-04-26 alik gis fails on some platforms (Solaris, HP-UX, Linux)
main.gis-rtree @freebsd # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
diff --git a/mysql-test/include/ctype_numconv.inc b/mysql-test/include/ctype_numconv.inc
index 959ca7dfeea..be82f67b9f8 100644
--- a/mysql-test/include/ctype_numconv.inc
+++ b/mysql-test/include/ctype_numconv.inc
@@ -457,6 +457,8 @@ select * from t1;
show create table t1;
drop table t1;
+# Ensure that row_count() value is reset after drop table.
+select 1;
select hex(concat(row_count()));
create table t1 as select concat(row_count()) as c1;
show create table t1;
diff --git a/mysql-test/include/mysqld--help.inc b/mysql-test/include/mysqld--help.inc
index e318823d8af..f21f8b20aa4 100644
--- a/mysql-test/include/mysqld--help.inc
+++ b/mysql-test/include/mysqld--help.inc
@@ -23,7 +23,7 @@ perl;
while (<F>) {
next if 1../The following groups are read/;
# formatting, skip line consisting entirely of dashes and blanks
- next if /^[\- ]+$/;
+ next if /^[\- ]+\s?$/;
next if /Value \(after reading options\)/; # skip table header
next if /^($re1) /;
next if /^($re2)-/;
diff --git a/mysql-test/lib/My/SafeProcess/Makefile.am b/mysql-test/lib/My/SafeProcess/Makefile.am
index 722331453fe..33cab066611 100644
--- a/mysql-test/lib/My/SafeProcess/Makefile.am
+++ b/mysql-test/lib/My/SafeProcess/Makefile.am
@@ -23,7 +23,3 @@ my_safe_process_SOURCES = safe_process.cc
EXTRA_DIST = safe_kill_win.cc \
safe_process_win.cc \
CMakeLists.txt
-
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/mysql-test/r/ctype_binary.result b/mysql-test/r/ctype_binary.result
index 55faa72c6ab..3ffb087c1d3 100644
--- a/mysql-test/r/ctype_binary.result
+++ b/mysql-test/r/ctype_binary.result
@@ -772,6 +772,9 @@ t1 CREATE TABLE `t1` (
`c1` varbinary(31) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+select 1;
+1
+1
select hex(concat(row_count()));
hex(concat(row_count()))
2D31
diff --git a/mysql-test/r/ctype_cp1251.result b/mysql-test/r/ctype_cp1251.result
index cb932c38a27..e0339ee2109 100644
--- a/mysql-test/r/ctype_cp1251.result
+++ b/mysql-test/r/ctype_cp1251.result
@@ -854,6 +854,9 @@ t1 CREATE TABLE `t1` (
`c1` varchar(31) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+select 1;
+1
+1
select hex(concat(row_count()));
hex(concat(row_count()))
2D31
diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result
index 4944db677a6..4f0e863bfca 100644
--- a/mysql-test/r/ctype_latin1.result
+++ b/mysql-test/r/ctype_latin1.result
@@ -1182,6 +1182,9 @@ t1 CREATE TABLE `t1` (
`c1` varchar(31) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+select 1;
+1
+1
select hex(concat(row_count()));
hex(concat(row_count()))
2D31
diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result
index c5b3e5802de..4f033d54043 100644
--- a/mysql-test/r/ctype_ucs.result
+++ b/mysql-test/r/ctype_ucs.result
@@ -2014,6 +2014,9 @@ t1 CREATE TABLE `t1` (
`c1` varchar(31) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+select 1;
+1
+1
select hex(concat(row_count()));
hex(concat(row_count()))
002D0031
diff --git a/mysql-test/r/mysql_client_test.result b/mysql-test/r/mysql_client_test.result
index 08d982c85e3..f30c64f6bef 100644
--- a/mysql-test/r/mysql_client_test.result
+++ b/mysql-test/r/mysql_client_test.result
@@ -1,3 +1,122 @@
SET @old_general_log= @@global.general_log;
ok
+
+# cat MYSQL_TMP_DIR/test_wl4435.out.log
+# ------------------------------------
+
+exec_counter: 0
+num_fields: 4
+ - 0: name: 'a1'/'a1'; table: 't1'/'t1'; db: 'client_test_db'; catalog: 'def'; length: 11; max_length: 0; type: 3; decimals: 0
+ - 1: name: 'a2'/'a2'; table: 't1'/'t1'; db: 'client_test_db'; catalog: 'def'; length: 32; max_length: 0; type: 254; decimals: 0
+ - 2: name: 'a3'/'a3'; table: 't1'/'t1'; db: 'client_test_db'; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
+ - 3: name: 'a4'/'a4'; table: 't1'/'t1'; db: 'client_test_db'; catalog: 'def'; length: 5; max_length: 0; type: 246; decimals: 1
+Data:
+ int: 1; str: '11'; dbl: 12.340000; dec: '56.7';
+ int: 2; str: '12'; dbl: 56.780000; dec: '90.1';
+ int: 3; str: '13'; dbl: 23.450000; dec: '67.8';
+EOF
+mysql_stmt_next_result(): 0; field_count: 5
+num_fields: 5
+ - 0: name: 'b0'/'b0'; table: 't2'/'t2'; db: 'client_test_db'; catalog: 'def'; length: 11; max_length: 0; type: 3; decimals: 0
+ - 1: name: 'b1'/'b1'; table: 't2'/'t2'; db: 'client_test_db'; catalog: 'def'; length: 11; max_length: 0; type: 3; decimals: 0
+ - 2: name: 'b2'/'b2'; table: 't2'/'t2'; db: 'client_test_db'; catalog: 'def'; length: 32; max_length: 0; type: 254; decimals: 0
+ - 3: name: 'b3'/'b3'; table: 't2'/'t2'; db: 'client_test_db'; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
+ - 4: name: 'b4'/'b4'; table: 't2'/'t2'; db: 'client_test_db'; catalog: 'def'; length: 5; max_length: 0; type: 246; decimals: 1
+Data:
+ int: 100; int: 10; str: '110'; dbl: 70.700000; dec: '10.1';
+ int: 200; int: 20; str: '120'; dbl: 80.800000; dec: '20.2';
+ int: 300; int: 30; str: '130'; dbl: 90.900000; dec: '30.3';
+EOF
+mysql_stmt_next_result(): 0; field_count: 8
+num_fields: 8
+ - 0: name: 'v_str_1'/'v_str_1'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 32; max_length: 0; type: 254; decimals: 0
+ - 1: name: 'v_dbl_1'/'v_dbl_1'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
+ - 2: name: 'v_dec_1'/'v_dec_1'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 8; max_length: 0; type: 246; decimals: 3
+ - 3: name: 'v_int_1'/'v_int_1'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 11; max_length: 0; type: 3; decimals: 0
+ - 4: name: 'v_str_2'/'v_str_2'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 64; max_length: 0; type: 254; decimals: 0
+ - 5: name: 'v_dbl_2'/'v_dbl_2'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 5; max_length: 0; type: 5; decimals: 3
+ - 6: name: 'v_dec_2'/'v_dec_2'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 9; max_length: 0; type: 246; decimals: 4
+ - 7: name: 'v_int_2'/'v_int_2'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 11; max_length: 0; type: 3; decimals: 0
+Data:
+ str: 'test_1'; dbl: 12.340000; dec: '567.891'; int: 2345; str: 'test_2'; dbl: 67.891000; dec: '234.6789'; int: 6789;
+EOF
+mysql_stmt_next_result(): 0; field_count: 0
+
+exec_counter: 1
+num_fields: 4
+ - 0: name: 'a1'/'a1'; table: 't1'/'t1'; db: 'client_test_db'; catalog: 'def'; length: 11; max_length: 0; type: 3; decimals: 0
+ - 1: name: 'a2'/'a2'; table: 't1'/'t1'; db: 'client_test_db'; catalog: 'def'; length: 32; max_length: 0; type: 254; decimals: 0
+ - 2: name: 'a3'/'a3'; table: 't1'/'t1'; db: 'client_test_db'; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
+ - 3: name: 'a4'/'a4'; table: 't1'/'t1'; db: 'client_test_db'; catalog: 'def'; length: 5; max_length: 0; type: 246; decimals: 1
+Data:
+ int: 1; str: '11'; dbl: 12.340000; dec: '56.7';
+ int: 2; str: '12'; dbl: 56.780000; dec: '90.1';
+ int: 3; str: '13'; dbl: 23.450000; dec: '67.8';
+EOF
+mysql_stmt_next_result(): 0; field_count: 5
+num_fields: 5
+ - 0: name: 'b0'/'b0'; table: 't2'/'t2'; db: 'client_test_db'; catalog: 'def'; length: 11; max_length: 0; type: 3; decimals: 0
+ - 1: name: 'b1'/'b1'; table: 't2'/'t2'; db: 'client_test_db'; catalog: 'def'; length: 11; max_length: 0; type: 3; decimals: 0
+ - 2: name: 'b2'/'b2'; table: 't2'/'t2'; db: 'client_test_db'; catalog: 'def'; length: 32; max_length: 0; type: 254; decimals: 0
+ - 3: name: 'b3'/'b3'; table: 't2'/'t2'; db: 'client_test_db'; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
+ - 4: name: 'b4'/'b4'; table: 't2'/'t2'; db: 'client_test_db'; catalog: 'def'; length: 5; max_length: 0; type: 246; decimals: 1
+Data:
+ int: 100; int: 10; str: '110'; dbl: 70.700000; dec: '10.1';
+ int: 200; int: 20; str: '120'; dbl: 80.800000; dec: '20.2';
+ int: 300; int: 30; str: '130'; dbl: 90.900000; dec: '30.3';
+EOF
+mysql_stmt_next_result(): 0; field_count: 8
+num_fields: 8
+ - 0: name: 'v_str_1'/'v_str_1'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 32; max_length: 0; type: 254; decimals: 0
+ - 1: name: 'v_dbl_1'/'v_dbl_1'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
+ - 2: name: 'v_dec_1'/'v_dec_1'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 8; max_length: 0; type: 246; decimals: 3
+ - 3: name: 'v_int_1'/'v_int_1'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 11; max_length: 0; type: 3; decimals: 0
+ - 4: name: 'v_str_2'/'v_str_2'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 64; max_length: 0; type: 254; decimals: 0
+ - 5: name: 'v_dbl_2'/'v_dbl_2'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 5; max_length: 0; type: 5; decimals: 3
+ - 6: name: 'v_dec_2'/'v_dec_2'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 9; max_length: 0; type: 246; decimals: 4
+ - 7: name: 'v_int_2'/'v_int_2'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 11; max_length: 0; type: 3; decimals: 0
+Data:
+ str: 'test_1'; dbl: 12.340000; dec: '567.891'; int: 2345; str: 'test_2'; dbl: 67.891000; dec: '234.6789'; int: 6789;
+EOF
+mysql_stmt_next_result(): 0; field_count: 0
+
+exec_counter: 2
+num_fields: 4
+ - 0: name: 'a1'/'a1'; table: 't1'/'t1'; db: 'client_test_db'; catalog: 'def'; length: 11; max_length: 0; type: 3; decimals: 0
+ - 1: name: 'a2'/'a2'; table: 't1'/'t1'; db: 'client_test_db'; catalog: 'def'; length: 32; max_length: 0; type: 254; decimals: 0
+ - 2: name: 'a3'/'a3'; table: 't1'/'t1'; db: 'client_test_db'; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
+ - 3: name: 'a4'/'a4'; table: 't1'/'t1'; db: 'client_test_db'; catalog: 'def'; length: 5; max_length: 0; type: 246; decimals: 1
+Data:
+ int: 1; str: '11'; dbl: 12.340000; dec: '56.7';
+ int: 2; str: '12'; dbl: 56.780000; dec: '90.1';
+ int: 3; str: '13'; dbl: 23.450000; dec: '67.8';
+EOF
+mysql_stmt_next_result(): 0; field_count: 5
+num_fields: 5
+ - 0: name: 'b0'/'b0'; table: 't2'/'t2'; db: 'client_test_db'; catalog: 'def'; length: 11; max_length: 0; type: 3; decimals: 0
+ - 1: name: 'b1'/'b1'; table: 't2'/'t2'; db: 'client_test_db'; catalog: 'def'; length: 11; max_length: 0; type: 3; decimals: 0
+ - 2: name: 'b2'/'b2'; table: 't2'/'t2'; db: 'client_test_db'; catalog: 'def'; length: 32; max_length: 0; type: 254; decimals: 0
+ - 3: name: 'b3'/'b3'; table: 't2'/'t2'; db: 'client_test_db'; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
+ - 4: name: 'b4'/'b4'; table: 't2'/'t2'; db: 'client_test_db'; catalog: 'def'; length: 5; max_length: 0; type: 246; decimals: 1
+Data:
+ int: 100; int: 10; str: '110'; dbl: 70.700000; dec: '10.1';
+ int: 200; int: 20; str: '120'; dbl: 80.800000; dec: '20.2';
+ int: 300; int: 30; str: '130'; dbl: 90.900000; dec: '30.3';
+EOF
+mysql_stmt_next_result(): 0; field_count: 8
+num_fields: 8
+ - 0: name: 'v_str_1'/'v_str_1'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 32; max_length: 0; type: 254; decimals: 0
+ - 1: name: 'v_dbl_1'/'v_dbl_1'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 4; max_length: 0; type: 5; decimals: 2
+ - 2: name: 'v_dec_1'/'v_dec_1'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 8; max_length: 0; type: 246; decimals: 3
+ - 3: name: 'v_int_1'/'v_int_1'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 11; max_length: 0; type: 3; decimals: 0
+ - 4: name: 'v_str_2'/'v_str_2'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 64; max_length: 0; type: 254; decimals: 0
+ - 5: name: 'v_dbl_2'/'v_dbl_2'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 5; max_length: 0; type: 5; decimals: 3
+ - 6: name: 'v_dec_2'/'v_dec_2'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 9; max_length: 0; type: 246; decimals: 4
+ - 7: name: 'v_int_2'/'v_int_2'; table: 'p1'/'p1'; db: 'client_test_db'; catalog: 'def'; length: 11; max_length: 0; type: 3; decimals: 0
+Data:
+ str: 'test_1'; dbl: 12.340000; dec: '567.891'; int: 2345; str: 'test_2'; dbl: 67.891000; dec: '234.6789'; int: 6789;
+EOF
+mysql_stmt_next_result(): 0; field_count: 0
+# ------------------------------------
+
SET @@global.general_log= @old_general_log;
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result
index 05754f251a8..80d520007a4 100644
--- a/mysql-test/r/partition.result
+++ b/mysql-test/r/partition.result
@@ -2112,6 +2112,26 @@ COUNT(*)
DROP TABLE t1;
SET SESSION SQL_MODE=DEFAULT;
#
+# Bug#46198: Hang after failed ALTER TABLE on partitioned table.
+#
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (s1 INT PRIMARY KEY) PARTITION BY HASH(s1);
+LOCK TABLES t1 WRITE, t1 b READ;
+UNLOCK TABLES;
+ALTER TABLE t1 DROP PARTITION p1;
+ERROR HY000: DROP PARTITION can only be used on RANGE/LIST partitions
+SELECT * FROM t1;
+s1
+DROP TABLE t1;
+CREATE TABLE t1 (s1 VARCHAR(5) PRIMARY KEY) PARTITION BY KEY(s1);
+LOCK TABLES t1 WRITE, t1 b READ;
+UNLOCK TABLES;
+ALTER TABLE t1 ADD COLUMN (s3 VARCHAR(5) UNIQUE);
+ERROR HY000: A UNIQUE INDEX must include all columns in the table's partitioning function
+SELECT * FROM t1;
+s1
+DROP TABLE t1;
+#
# BUG#51868 - crash with myisam_use_mmap and partitioned myisam tables
#
SET GLOBAL myisam_use_mmap=1;
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 7d24e6db920..76d4bf2dea0 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -2590,11 +2590,11 @@ row_count()
call bug4905()|
select row_count()|
row_count()
--1
+0
call bug4905()|
select row_count()|
row_count()
--1
+0
select * from t3|
s1
1
diff --git a/mysql-test/r/variables_debug.result b/mysql-test/r/variables_debug.result
index 85eaf34b033..11cbef7fa5b 100644
--- a/mysql-test/r/variables_debug.result
+++ b/mysql-test/r/variables_debug.result
@@ -10,6 +10,13 @@ set debug= '-P';
select @@debug;
@@debug
T
+SELECT @@session.debug, @@global.debug;
+@@session.debug @@global.debug
+T
+SET SESSION debug = '';
+SELECT @@session.debug, @@global.debug;
+@@session.debug @@global.debug
+
#
# Bug #52629: memory leak from sys_var_thd_dbug in
# binlog.binlog_write_error
diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result
index 24ebd38e403..a084630a305 100644
--- a/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result
+++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result
@@ -375,7 +375,7 @@ row_count() after delete
2
SELECT row_count();
row_count()
--1
+0
SELECT * FROM temp;
f1 f2 f3 f4 f5 f6
qwe xyz 1998-03-26 100 uvw 1000
diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_10.result b/mysql-test/suite/funcs_1/r/memory_storedproc_10.result
index f5e34b0063c..b03f7445fb4 100644
--- a/mysql-test/suite/funcs_1/r/memory_storedproc_10.result
+++ b/mysql-test/suite/funcs_1/r/memory_storedproc_10.result
@@ -376,7 +376,7 @@ row_count() after delete
2
SELECT row_count();
row_count()
--1
+0
SELECT * FROM temp;
f1 f2 f3 f4 f5 f6
qwe xyz 1998-03-26 100 uvw 1000
diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result
index f5e34b0063c..b03f7445fb4 100644
--- a/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result
+++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result
@@ -376,7 +376,7 @@ row_count() after delete
2
SELECT row_count();
row_count()
--1
+0
SELECT * FROM temp;
f1 f2 f3 f4 f5 f6
qwe xyz 1998-03-26 100 uvw 1000
diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_10.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_10.result
index 24ebd38e403..a084630a305 100644
--- a/mysql-test/suite/funcs_1/r/ndb_storedproc_10.result
+++ b/mysql-test/suite/funcs_1/r/ndb_storedproc_10.result
@@ -375,7 +375,7 @@ row_count() after delete
2
SELECT row_count();
row_count()
--1
+0
SELECT * FROM temp;
f1 f2 f3 f4 f5 f6
qwe xyz 1998-03-26 100 uvw 1000
diff --git a/mysql-test/suite/funcs_1/r/row_count_func.result b/mysql-test/suite/funcs_1/r/row_count_func.result
new file mode 100644
index 00000000000..ffc0e8e3b77
--- /dev/null
+++ b/mysql-test/suite/funcs_1/r/row_count_func.result
@@ -0,0 +1,79 @@
+
+# --
+# -- Test case for Bug#21818.
+# --
+
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES (1), (2), (3);
+
+# -- Check 1.
+SELECT * FROM t1 INTO OUTFILE "MYSQL_TMP_DIR/bug21818.txt";
+affected rows: 3
+
+SELECT ROW_COUNT();
+ROW_COUNT()
+3
+
+# -- Check 2.
+SELECT a FROM t1 LIMIT 1 INTO @a;
+affected rows: 1
+
+SELECT ROW_COUNT();
+ROW_COUNT()
+1
+
+# -- Check 3.
+DROP DATABASE IF EXISTS mysqltest1;
+CREATE DATABASE mysqltest1;
+affected rows: 1
+
+SELECT ROW_COUNT();
+ROW_COUNT()
+1
+DROP DATABASE mysqltest1;
+
+# -- Check 4.
+DELETE FROM t1;
+LOAD DATA INFILE 'MYSQL_TMP_DIR/bug21818.txt' INTO TABLE t1(a);
+affected rows: 3
+info: Records: 3 Deleted: 0 Skipped: 0 Warnings: 0
+
+SELECT ROW_COUNT();
+ROW_COUNT()
+3
+
+# -- Check 5.
+ALTER TABLE t1 ADD COLUMN b VARCHAR(255);
+affected rows: 3
+info: Records: 3 Duplicates: 0 Warnings: 0
+
+SELECT ROW_COUNT();
+ROW_COUNT()
+3
+
+DROP TABLE t1;
+
+# -- Check 6.
+DROP TABLE IF EXISTS t2;
+CREATE TABLE t1(a INT);
+CREATE TABLE t2(a INT);
+INSERT INTO t1 VALUES (1), (2), (3);
+INSERT INTO t2 VALUES (ROW_COUNT());
+SELECT * FROM t2;
+a
+3
+DROP TABLE t1;
+DROP TABLE t2;
+
+# -- Check 7 (check that SQL errors reset row_count to -1).
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES (1), (2), (3);
+SELECT f1();
+ERROR 42000: FUNCTION test.f1 does not exist
+SELECT ROW_COUNT();
+ROW_COUNT()
+-1
+DROP TABLE t1;
+
+# -- End of test case for Bug#21818.
diff --git a/mysql-test/suite/funcs_1/t/row_count_func-master.opt b/mysql-test/suite/funcs_1/t/row_count_func-master.opt
new file mode 100644
index 00000000000..c189eede9e4
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/row_count_func-master.opt
@@ -0,0 +1 @@
+--secure-file-priv=$MYSQL_TMP_DIR
diff --git a/mysql-test/suite/funcs_1/t/row_count_func.test b/mysql-test/suite/funcs_1/t/row_count_func.test
new file mode 100644
index 00000000000..1694928b26c
--- /dev/null
+++ b/mysql-test/suite/funcs_1/t/row_count_func.test
@@ -0,0 +1,115 @@
+--echo
+--echo # --
+--echo # -- Test case for Bug#21818.
+--echo # --
+--echo
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES (1), (2), (3);
+
+--echo
+--echo # -- Check 1.
+
+--enable_info
+--echo SELECT * FROM t1 INTO OUTFILE "MYSQL_TMP_DIR/bug21818.txt";
+--disable_query_log # to avoid $MYSQL_TMP_DIR in query log
+--eval SELECT * FROM t1 INTO OUTFILE "$MYSQL_TMP_DIR/bug21818.txt"
+--enable_query_log
+--disable_info
+
+--echo
+SELECT ROW_COUNT();
+
+--echo
+--echo # -- Check 2.
+
+--enable_info
+SELECT a FROM t1 LIMIT 1 INTO @a;
+--disable_info
+
+--echo
+SELECT ROW_COUNT();
+
+--echo
+--echo # -- Check 3.
+
+--disable_warnings
+DROP DATABASE IF EXISTS mysqltest1;
+--enable_warnings
+
+--enable_info
+CREATE DATABASE mysqltest1;
+--disable_info
+
+--echo
+SELECT ROW_COUNT();
+
+DROP DATABASE mysqltest1;
+
+--echo
+--echo # -- Check 4.
+
+DELETE FROM t1;
+
+--enable_info
+--echo LOAD DATA INFILE 'MYSQL_TMP_DIR/bug21818.txt' INTO TABLE t1(a);
+--disable_query_log # to avoid $MYSQL_TMP_DIR in query log
+--eval LOAD DATA INFILE '$MYSQL_TMP_DIR/bug21818.txt' INTO TABLE t1(a)
+--enable_query_log
+--disable_info
+
+--echo
+SELECT ROW_COUNT();
+
+--remove_file $MYSQL_TMP_DIR/bug21818.txt
+
+--echo
+--echo # -- Check 5.
+
+--enable_info
+ALTER TABLE t1 ADD COLUMN b VARCHAR(255);
+--disable_info
+
+--echo
+SELECT ROW_COUNT();
+
+--echo
+DROP TABLE t1;
+
+--echo
+--echo # -- Check 6.
+
+--disable_warnings
+DROP TABLE IF EXISTS t2;
+--enable_warnings
+
+CREATE TABLE t1(a INT);
+CREATE TABLE t2(a INT);
+
+INSERT INTO t1 VALUES (1), (2), (3);
+INSERT INTO t2 VALUES (ROW_COUNT());
+
+SELECT * FROM t2;
+
+DROP TABLE t1;
+DROP TABLE t2;
+
+--echo
+--echo # -- Check 7 (check that SQL errors reset row_count to -1).
+
+CREATE TABLE t1(a INT);
+
+INSERT INTO t1 VALUES (1), (2), (3);
+--error ER_SP_DOES_NOT_EXIST
+SELECT f1();
+
+SELECT ROW_COUNT();
+
+DROP TABLE t1;
+
+--echo
+--echo # -- End of test case for Bug#21818.
diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def
index 8a9344824d9..00c1193ec49 100644
--- a/mysql-test/suite/rpl/t/disabled.def
+++ b/mysql-test/suite/rpl/t/disabled.def
@@ -10,7 +10,6 @@
#
##############################################################################
-rpl_row_create_table : Bug#45576 2009-12-01 joro rpl_row_create_table fails on PB2
rpl_row_create_table : Bug#51574 Feb 27 2010 andrei failed different way than earlier with bug#45576
rpl_spec_variables : BUG#47661 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux
rpl_failed_optimize : WL#4284: Can't optimize table used by a pending transaction (there is metadata lock on the table).
diff --git a/mysql-test/t/mysql_client_test.test b/mysql-test/t/mysql_client_test.test
index 15c0cd4ac84..c8c1fba04e1 100644
--- a/mysql-test/t/mysql_client_test.test
+++ b/mysql-test/t/mysql_client_test.test
@@ -16,4 +16,11 @@ SET @old_general_log= @@global.general_log;
# End of 4.1 tests
echo ok;
+--echo
+--echo # cat MYSQL_TMP_DIR/test_wl4435.out.log
+--echo # ------------------------------------
+--cat_file $MYSQL_TMP_DIR/test_wl4435.out.log
+--echo # ------------------------------------
+--echo
+
SET @@global.general_log= @old_general_log;
diff --git a/mysql-test/t/parser_stack.test b/mysql-test/t/parser_stack.test
index 3330ef41833..bdcad5aa1b4 100644
--- a/mysql-test/t/parser_stack.test
+++ b/mysql-test/t/parser_stack.test
@@ -399,4 +399,12 @@ delimiter ;$$
drop procedure p_37228;
+#
+# Bug#27863 (excessive memory usage for many small queries in a multiquery
+# packet).
+#
+let $i=`select repeat("set @a=1;", 65535)`;
+--disable_query_log
+eval $i;
+--enable_query_log
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index f85f65e0072..a2e3e43cdb9 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -2120,6 +2120,50 @@ SET SESSION SQL_MODE=DEFAULT;
#DROP TABLE t1;
--echo #
+--echo # Bug#46198: Hang after failed ALTER TABLE on partitioned table.
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+#
+# Case 1.
+#
+
+CREATE TABLE t1 (s1 INT PRIMARY KEY) PARTITION BY HASH(s1);
+
+LOCK TABLES t1 WRITE, t1 b READ;
+
+UNLOCK TABLES;
+
+--error ER_ONLY_ON_RANGE_LIST_PARTITION
+ALTER TABLE t1 DROP PARTITION p1;
+
+# The SELECT below used to hang in tdc_wait_for_old_versions().
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
+#
+# Case 2.
+#
+
+CREATE TABLE t1 (s1 VARCHAR(5) PRIMARY KEY) PARTITION BY KEY(s1);
+
+LOCK TABLES t1 WRITE, t1 b READ;
+
+UNLOCK TABLES;
+
+--error ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF
+ALTER TABLE t1 ADD COLUMN (s3 VARCHAR(5) UNIQUE);
+
+# The SELECT below used to hang in tdc_wait_for_old_versions().
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
+--echo #
--echo # BUG#51868 - crash with myisam_use_mmap and partitioned myisam tables
--echo #
SET GLOBAL myisam_use_mmap=1;
diff --git a/mysql-test/t/variables_debug.test b/mysql-test/t/variables_debug.test
index 8f2bde7ae42..0d6ee43cd75 100644
--- a/mysql-test/t/variables_debug.test
+++ b/mysql-test/t/variables_debug.test
@@ -11,6 +11,16 @@ select @@debug;
set debug= '-P';
select @@debug;
+#
+# Bug#38054: "SET SESSION debug" modifies @@global.debug variable
+#
+
+SELECT @@session.debug, @@global.debug;
+
+SET SESSION debug = '';
+
+SELECT @@session.debug, @@global.debug;
+
--echo #
--echo # Bug #52629: memory leak from sys_var_thd_dbug in
--echo # binlog.binlog_write_error
diff --git a/mysys/Makefile.am b/mysys/Makefile.am
index 476b63d3ad5..ad7f244e0fb 100644
--- a/mysys/Makefile.am
+++ b/mysys/Makefile.am
@@ -159,6 +159,3 @@ probes_mysql.d:
probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES)
$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
endif
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/netware/Makefile.am b/netware/Makefile.am
index 3d0402ce714..f537022495b 100644
--- a/netware/Makefile.am
+++ b/netware/Makefile.am
@@ -115,6 +115,3 @@ test_db.sql: init_db.sql $(top_srcdir)/scripts/mysql_test_data_timezone.sql
@echo "Building $@";
@cat init_db.sql \
$(top_srcdir)/scripts/mysql_test_data_timezone.sql > $@;
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/plugin/Makefile.am b/plugin/Makefile.am
index 30ccd1236dd..4a84ce4915a 100644
--- a/plugin/Makefile.am
+++ b/plugin/Makefile.am
@@ -28,6 +28,3 @@ DIST_SUBDIRS = @mysql_pg_distdirs@
install-exec-hook:
$(mkinstalldirs) $(DESTDIR)$(pkglibdir) $(DESTDIR)$(pkglibdir)/plugin
test ! -d debug || $(TAR) cf - debug | ( cd $(DESTDIR)$(pkglibdir)/plugin && $(TAR) xvf - )
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/plugin/audit_null/CMakeLists.txt b/plugin/audit_null/CMakeLists.txt
index 9f32181a163..4e27ae7e0d9 100644
--- a/plugin/audit_null/CMakeLists.txt
+++ b/plugin/audit_null/CMakeLists.txt
@@ -13,4 +13,4 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-MYSQL_ADD_PLUGIN(audit_null audit_null.c)
+MYSQL_ADD_PLUGIN(audit_null audit_null.c MODULE_ONLY)
diff --git a/plugin/daemon_example/Makefile.am b/plugin/daemon_example/Makefile.am
index d1f2555594c..75151bdd4d9 100644
--- a/plugin/daemon_example/Makefile.am
+++ b/plugin/daemon_example/Makefile.am
@@ -39,6 +39,3 @@ libdaemon_example_a_CXXFLAGS = $(AM_CFLAGS)
libdaemon_example_a_CFLAGS = $(AM_CFLAGS)
libdaemon_example_a_SOURCES= daemon_example.cc
EXTRA_DIST = CMakeLists.txt
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/plugin/fulltext/CMakeLists.txt b/plugin/fulltext/CMakeLists.txt
index ea71552a37a..394cb8dc51d 100644
--- a/plugin/fulltext/CMakeLists.txt
+++ b/plugin/fulltext/CMakeLists.txt
@@ -13,5 +13,5 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-MYSQL_ADD_PLUGIN(ftexample plugin_example.c MODULE_ONLY MODULE_OUTPUT_NAME mypluglib)
+MYSQL_ADD_PLUGIN(ftexample plugin_example.c
+ MODULE_ONLY MODULE_OUTPUT_NAME "mypluglib")
diff --git a/plugin/fulltext/Makefile.am b/plugin/fulltext/Makefile.am
index 0747e6d0193..80a8753b332 100644
--- a/plugin/fulltext/Makefile.am
+++ b/plugin/fulltext/Makefile.am
@@ -23,6 +23,3 @@ mypluglib_la_SOURCES= plugin_example.c
mypluglib_la_LDFLAGS= -module -rpath $(pkgplugindir)
mypluglib_la_CFLAGS= -DMYSQL_DYNAMIC_PLUGIN
EXTRA_DIST= CMakeLists.txt
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/pstack/Makefile.am b/pstack/Makefile.am
index 870fed6ceeb..25feadf9d06 100644
--- a/pstack/Makefile.am
+++ b/pstack/Makefile.am
@@ -27,6 +27,3 @@ libpstack_a_SOURCES = bucomm.c filemode.c linuxthreads.c rddbg.c \
debug.c ieee.c pstack.c stabs.c
noinst_HEADERS = bucomm.h debug.h ieee.h budbg.h demangle.h \
linuxthreads.h pstack.h pstacktrace.h
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/pstack/aout/Makefile.am b/pstack/aout/Makefile.am
index 2e61555db87..0b02cb7b643 100644
--- a/pstack/aout/Makefile.am
+++ b/pstack/aout/Makefile.am
@@ -1,4 +1 @@
noinst_HEADERS = aout64.h stab.def stab_gnu.h
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/regex/Makefile.am b/regex/Makefile.am
index e2304ff7309..0fd62a777f6 100644
--- a/regex/Makefile.am
+++ b/regex/Makefile.am
@@ -31,6 +31,3 @@ test: re tests
./re < tests
./re -el < tests
./re -er < tests
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index f39224b9457..fc55a2923f2 100755
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -93,6 +93,10 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles")
# No multiconfig build - use CMAKE_C_FLAGS
SET(CFLAGS "@CMAKE_C_FLAGS@")
SET(CXXFLAGS "@CMAKE_CXX_FLAGS@")
+ FOREACH(ARCH ${CMAKE_OSX_ARCHITECTURES})
+ SET(CFLAGS "${CFLAGS} -arch ${ARCH}")
+ SET(CXXFLAGS "${CXXFLAGS} -arch ${ARCH}")
+ ENDFOREACH()
ELSE()
# Multiconfig build - use CMAKE_C_FLAGS_RELWITHDEBINFO
SET(CFLAGS "@CMAKE_C_FLAGS_RELWITHDEBINFO@")
@@ -134,10 +138,9 @@ ELSE()
SET(CHECK_PID "kill -s SIGCONT $PID > /dev/null 2> /dev/null")
ENDIF()
-ENDIF(UNIX)
-
-
+SET(HOSTNAME "hostname")
+ENDIF(UNIX)
# Really ugly, one script, "mysql_install_db", needs prefix set to ".",
# i.e. makes access relative the current directory. This matches
@@ -298,14 +301,13 @@ ELSE()
mysql_secure_installation
mysql_zap
mysqlaccess
+ mysqlaccess.conf
mysqlbug
mysql_convert_table_format
mysql_find_rows
mysqlhotcopy
mysqldumpslow
mysqld_multi
- mysqlaccess
- mysqlaccess.conf
mysqld_safe
)
FOREACH(file ${BIN_SCRIPTS})
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 4d89718f9f0..0200410fd8f 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -190,7 +190,3 @@ SUFFIXES = .sh
$< > $@-t
@CHMOD@ +x $@-t
@MV@ $@-t $@
-
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 248503905c1..5d7f0760b82 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -307,7 +307,7 @@ set_malloc_lib() {
malloc_lib=
# This list is kept intentionally simple. Simply set --malloc-lib
# to a full path if another location is desired.
- for libdir in /usr/lib "$pkglibdir"; do
+ for libdir in /usr/lib "$pkglibdir" "$pkglibdir/mysql"; do
for flavor in _minimal '' _and_profiler _debug; do
tmp="$libdir/libtcmalloc$flavor.so"
#log_notice "DEBUG: Checking for malloc lib '$tmp'"
@@ -704,7 +704,7 @@ fi
cmd="`mysqld_ld_preload_text`$NOHUP_NICENESS"
-plugin_dir="${PLUGIN_DIR:-@pkgplugindir@}${PLUGIN_VARIANT}"
+plugin_dir="${PLUGIN_DIR:-$MY_BASEDIR_VERSION/lib/plugin}${PLUGIN_VARIANT}"
for i in "$ledir/$MYSQLD" "$defaults" "--basedir=$MY_BASEDIR_VERSION" \
"--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION"
diff --git a/sql-bench/CMakeLists.txt b/sql-bench/CMakeLists.txt
index 59dca2e84cc..be0aeca70b0 100644
--- a/sql-bench/CMakeLists.txt
+++ b/sql-bench/CMakeLists.txt
@@ -18,23 +18,22 @@ FILE(GLOB all_files
${CMAKE_SOURCE_DIR}/sql-bench/*
${CMAKE_SOURCE_DIR}/sql-bench/Data/ATIS/*
${CMAKE_SOURCE_DIR}/sql-bench/Data/Wisconsin/*
-${CMAKE_SOURCE_DIR}/sql-bench/Comments/*
${CMAKE_SOURCE_DIR}/sql-bench/limits/*
)
-IF(NOT INSTALL_SQLBENCHROOTDIR)
+IF(NOT INSTALL_SQLBENCHDIR)
RETURN()
ENDIF()
-IF(INSTALL_SQLBENCHROOTDIR STREQUAL ".")
+IF(INSTALL_SQLBENCHDIR STREQUAL ".")
SET(prefix)
ELSE()
- SET(prefix ${INSTALL_SQLBENCHROOTDIR}/)
+ SET(prefix ${INSTALL_SQLBENCHDIR}/)
ENDIF()
GET_FILENAME_COMPONENT(basedir ${CMAKE_SOURCE_DIR} ABSOLUTE)
FOREACH(file ${all_files})
- IF(NOT IS_DIRECTORY ${file} AND NOT ${file} MATCHES "Make" )
+ IF(NOT IS_DIRECTORY ${file} AND NOT ${file} MATCHES "Make|as3ap|/example$" )
FILE(RELATIVE_PATH relpath ${basedir} ${file})
SET(target_relpath ${relpath})
GET_FILENAME_COMPONENT(ext ${file} EXT)
diff --git a/sql-bench/Makefile.am b/sql-bench/Makefile.am
index ff726ff561e..a7a2975ea87 100644
--- a/sql-bench/Makefile.am
+++ b/sql-bench/Makefile.am
@@ -81,6 +81,3 @@ SUFFIXES = .sh
$< > $@-t
@CHMOD@ +x $@-t
@MV@ $@-t $@
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/sql-common/Makefile.am b/sql-common/Makefile.am
index 614ccffde9d..3193efee754 100644
--- a/sql-common/Makefile.am
+++ b/sql-common/Makefile.am
@@ -15,6 +15,3 @@
## Process this file with automake to create Makefile.in
EXTRA_DIST = client.c pack.c my_time.c my_user.c
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index 47aa4892cbb..a0e157b7806 100755
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -280,7 +280,8 @@ IF(WIN32 AND MYSQLD_EXECUTABLE)
ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/data/mysql/user.frm
)
- INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data/mysql DESTINATION data)
+ INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data DESTINATION .
+ PATTERN "bootstrap.sql" EXCLUDE)
ELSE()
# Not windows or cross compiling, just install an empty directory
INSTALL(FILES ${DUMMY_FILE} DESTINATION data/mysql)
diff --git a/sql/Makefile.am b/sql/Makefile.am
index 93595a964eb..f57d1f3bc34 100644
--- a/sql/Makefile.am
+++ b/sql/Makefile.am
@@ -271,6 +271,3 @@ probes_libndb.o: probes_mysql.d libndb_la-ha_ndbcluster.lo
fi
endif
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc
index edb6aeebb5c..d38544f9b9f 100644
--- a/sql/ha_ndbcluster_binlog.cc
+++ b/sql/ha_ndbcluster_binlog.cc
@@ -263,7 +263,6 @@ static void run_query(THD *thd, char *buf, char *end,
ulonglong save_thd_options= thd->variables.option_bits;
DBUG_ASSERT(sizeof(save_thd_options) == sizeof(thd->variables.option_bits));
NET save_thd_net= thd->net;
- const char* found_semicolon= NULL;
bzero((char*) &thd->net, sizeof(NET));
thd->set_query(buf, (uint) (end - buf));
@@ -277,7 +276,10 @@ static void run_query(THD *thd, char *buf, char *end,
DBUG_ASSERT(!thd->in_sub_stmt);
DBUG_ASSERT(!thd->locked_tables_mode);
- mysql_parse(thd, thd->query(), thd->query_length(), &found_semicolon);
+ {
+ Parser_state parser_state(thd, thd->query(), thd->query_length());
+ mysql_parse(thd, thd->query(), thd->query_length(), &parser_state);
+ }
if (no_print_error && thd->is_slave_error)
{
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 4d0dec25e64..26c802b8057 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -6030,7 +6030,7 @@ longlong Item_func_row_count::val_int()
DBUG_ASSERT(fixed == 1);
THD *thd= current_thd;
- return thd->row_count_func;
+ return thd->get_row_count_func();
}
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 5a1ab7cdc94..7d60328381d 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -3287,8 +3287,8 @@ int Query_log_event::do_apply_event(Relay_log_info const *rli,
thd->table_map_for_update= (table_map)table_map_for_update;
/* Execute the query (note that we bypass dispatch_command()) */
- const char* found_semicolon= NULL;
- mysql_parse(thd, thd->query(), thd->query_length(), &found_semicolon);
+ Parser_state parser_state(thd, thd->query(), thd->query_length());
+ mysql_parse(thd, thd->query(), thd->query_length(), &parser_state);
log_slow_statement(thd);
/*
diff --git a/sql/protocol.cc b/sql/protocol.cc
index 1903ab0c864..eeb248012ab 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -210,7 +210,7 @@ net_send_ok(THD *thd,
NET *net= &thd->net;
uchar buff[MYSQL_ERRMSG_SIZE+10],*pos;
bool error= FALSE;
- DBUG_ENTER("my_ok");
+ DBUG_ENTER("net_send_ok");
if (! net->vio) // hack for re-parsing queries
{
diff --git a/sql/share/Makefile.am b/sql/share/Makefile.am
index 03f9a1652b7..73f2ca13bb6 100644
--- a/sql/share/Makefile.am
+++ b/sql/share/Makefile.am
@@ -58,6 +58,3 @@ distclean-local:
# Do nothing
link_sources:
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 5859b6e5fd7..049975bccd9 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -543,7 +543,7 @@ THD::THD()
cuted_fields= 0L;
sent_row_count= 0L;
limit_found_rows= 0;
- row_count_func= -1;
+ m_row_count_func= -1;
statement_id_counter= 0UL;
// Must be reset to handle error with THD's created for init of mysqld
lex->current_select= 0;
@@ -835,7 +835,10 @@ MYSQL_ERROR* THD::raise_condition(uint sql_errno,
else
{
if (! stmt_da->is_error())
+ {
+ set_row_count_func(-1);
stmt_da->set_error_status(this, sql_errno, msg, sqlstate);
+ }
}
}
@@ -1836,11 +1839,6 @@ bool select_to_file::send_eof()
error= 1;
if (!error)
{
- /*
- In order to remember the value of affected rows for ROW_COUNT()
- function, SELECT INTO has to have an own SQLCOM.
- TODO: split from SQLCOM_SELECT
- */
::my_ok(thd,row_count);
}
file= -1;
@@ -2881,11 +2879,6 @@ bool select_dumpvar::send_eof()
if (! row_count)
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_SP_FETCH_NO_DATA, ER(ER_SP_FETCH_NO_DATA));
- /*
- In order to remember the value of affected rows for ROW_COUNT()
- function, SELECT INTO has to have an own SQLCOM.
- TODO: split from SQLCOM_SELECT
- */
::my_ok(thd,row_count);
return 0;
}
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 3a1f83fc9e5..950ef83b237 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -1999,7 +1999,50 @@ public:
}
ulonglong limit_found_rows;
- longlong row_count_func; /* For the ROW_COUNT() function */
+
+private:
+ /**
+ Stores the result of ROW_COUNT() function.
+
+ ROW_COUNT() function is a MySQL extention, but we try to keep it
+ similar to ROW_COUNT member of the GET DIAGNOSTICS stack of the SQL
+ standard (see SQL99, part 2, search for ROW_COUNT). It's value is
+ implementation defined for anything except INSERT, DELETE, UPDATE.
+
+ ROW_COUNT is assigned according to the following rules:
+
+ - In my_ok():
+ - for DML statements: to the number of affected rows;
+ - for DDL statements: to 0.
+
+ - In my_eof(): to -1 to indicate that there was a result set.
+
+ We derive this semantics from the JDBC specification, where int
+ java.sql.Statement.getUpdateCount() is defined to (sic) "return the
+ current result as an update count; if the result is a ResultSet
+ object or there are no more results, -1 is returned".
+
+ - In my_error(): to -1 to be compatible with the MySQL C API and
+ MySQL ODBC driver.
+
+ - For SIGNAL statements: to 0 per WL#2110 specification (see also
+ sql_signal.cc comment). Zero is used since that's the "default"
+ value of ROW_COUNT in the diagnostics area.
+ */
+
+ longlong m_row_count_func; /* For the ROW_COUNT() function */
+
+public:
+ inline longlong get_row_count_func() const
+ {
+ return m_row_count_func;
+ }
+
+ inline void set_row_count_func(longlong row_count_func)
+ {
+ m_row_count_func= row_count_func;
+ }
+
ha_rows cuted_fields;
/*
@@ -2786,6 +2829,7 @@ inline void
my_ok(THD *thd, ulonglong affected_rows= 0, ulonglong id= 0,
const char *message= NULL)
{
+ thd->set_row_count_func(affected_rows);
thd->stmt_da->set_ok_status(thd, affected_rows, id, message);
}
@@ -2795,6 +2839,7 @@ my_ok(THD *thd, ulonglong affected_rows= 0, ulonglong id= 0,
inline void
my_eof(THD *thd)
{
+ thd->set_row_count_func(-1);
thd->stmt_da->set_eof_status(thd);
}
@@ -3456,7 +3501,7 @@ public:
/* Bits in sql_command_flags */
#define CF_CHANGES_DATA (1U << 0)
-#define CF_HAS_ROW_COUNT (1U << 1)
+/* The 2nd bit is unused -- it used to be CF_HAS_ROW_COUNT. */
#define CF_STATUS_COMMAND (1U << 2)
#define CF_SHOW_TABLE_COMMAND (1U << 3)
#define CF_WRITE_LOGS_COMMAND (1U << 4)
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 2a8503077aa..10bdb8a22a6 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -187,8 +187,8 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
if (prune_partitions(thd, table, conds))
{
free_underlaid_joins(thd, select_lex);
- thd->row_count_func= 0;
- my_ok(thd, (ha_rows) thd->row_count_func); // No matching records
+ // No matching record
+ my_ok(thd, 0);
DBUG_RETURN(0);
}
#endif
@@ -204,7 +204,6 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
{
delete select;
free_underlaid_joins(thd, select_lex);
- thd->row_count_func= 0;
/*
Error was already created by quick select evaluation (check_quick()).
TODO: Add error code output parameter to Item::val_xxx() methods.
@@ -213,7 +212,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
*/
if (thd->is_error())
DBUG_RETURN(TRUE);
- my_ok(thd, (ha_rows) thd->row_count_func);
+ my_ok(thd, 0);
/*
We don't need to call reset_auto_increment in this case, because
mysql_truncate always gives a NULL conds argument, hence we never
@@ -460,8 +459,7 @@ cleanup:
If a TRUNCATE TABLE was issued, the number of rows should be reported as
zero since the exact number is unknown.
*/
- thd->row_count_func= reset_auto_increment ? 0 : deleted;
- my_ok(thd, (ha_rows) thd->row_count_func);
+ my_ok(thd, reset_auto_increment ? 0 : deleted);
DBUG_PRINT("info",("%ld records deleted",(long) deleted));
}
DBUG_RETURN(error >= 0 || thd->is_error());
@@ -1058,8 +1056,7 @@ bool multi_delete::send_eof()
if (!local_error)
{
- thd->row_count_func= deleted;
- ::my_ok(thd, (ha_rows) thd->row_count_func);
+ ::my_ok(thd, deleted);
}
return 0;
}
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 2d2564a515c..d40f0dcb410 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -1005,10 +1005,10 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
if (values_list.elements == 1 && (!(thd->variables.option_bits & OPTION_WARNINGS) ||
!thd->cuted_fields))
{
- thd->row_count_func= info.copied + info.deleted +
- ((thd->client_capabilities & CLIENT_FOUND_ROWS) ?
- info.touched : info.updated);
- my_ok(thd, (ulong) thd->row_count_func, id);
+ my_ok(thd, info.copied + info.deleted +
+ ((thd->client_capabilities & CLIENT_FOUND_ROWS) ?
+ info.touched : info.updated),
+ id);
}
else
{
@@ -1024,8 +1024,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records,
(ulong) (info.deleted + updated),
(ulong) thd->warning_info->statement_warn_count());
- thd->row_count_func= info.copied + info.deleted + updated;
- ::my_ok(thd, (ulong) thd->row_count_func, id, buff);
+ ::my_ok(thd, info.copied + info.deleted + updated, id, buff);
}
thd->abort_on_warning= 0;
DBUG_RETURN(FALSE);
@@ -3337,7 +3336,7 @@ bool select_insert::send_eof()
{
int error;
bool const trans_table= table->file->has_transactions();
- ulonglong id;
+ ulonglong id, row_count;
bool changed;
THD::killed_state killed_status= thd->killed;
DBUG_ENTER("select_insert::send_eof");
@@ -3403,16 +3402,15 @@ bool select_insert::send_eof()
sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records,
(ulong) (info.deleted+info.updated),
(ulong) thd->warning_info->statement_warn_count());
- thd->row_count_func= info.copied + info.deleted +
- ((thd->client_capabilities & CLIENT_FOUND_ROWS) ?
- info.touched : info.updated);
-
+ row_count= info.copied + info.deleted +
+ ((thd->client_capabilities & CLIENT_FOUND_ROWS) ?
+ info.touched : info.updated);
id= (thd->first_successful_insert_id_in_cur_stmt > 0) ?
thd->first_successful_insert_id_in_cur_stmt :
(thd->arg_of_last_insert_id_function ?
thd->first_successful_insert_id_in_prev_stmt :
(info.copied ? autoinc_value_of_last_inserted_row : 0));
- ::my_ok(thd, (ulong) thd->row_count_func, id, buff);
+ ::my_ok(thd, row_count, id, buff);
DBUG_RETURN(0);
}
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index f44edfdf6fb..b8971811f15 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -142,37 +142,64 @@ st_parsing_options::reset()
allows_derived= TRUE;
}
+
+/**
+ Perform initialization of Lex_input_stream instance.
+
+ Basically, a buffer for pre-processed query. This buffer should be large
+ enough to keep multi-statement query. The allocation is done once in the
+ Lex_input_stream constructor in order to prevent memory pollution when
+ the server is processing large multi-statement queries.
+
+ @todo Check return value of THD::alloc().
+*/
+
Lex_input_stream::Lex_input_stream(THD *thd,
const char* buffer,
unsigned int length)
-: m_thd(thd),
- yylineno(1),
- yytoklen(0),
- yylval(NULL),
- lookahead_token(-1),
- lookahead_yylval(NULL),
- m_ptr(buffer),
- m_tok_start(NULL),
- m_tok_end(NULL),
- m_end_of_query(buffer + length),
- m_tok_start_prev(NULL),
- m_buf(buffer),
- m_buf_length(length),
- m_echo(TRUE),
- m_cpp_tok_start(NULL),
- m_cpp_tok_start_prev(NULL),
- m_cpp_tok_end(NULL),
- m_body_utf8(NULL),
- m_cpp_utf8_processed_ptr(NULL),
- next_state(MY_LEX_START),
- found_semicolon(NULL),
- ignore_space(test(thd->variables.sql_mode & MODE_IGNORE_SPACE)),
- stmt_prepare_mode(FALSE),
- multi_statements(TRUE),
- in_comment(NO_COMMENT),
- m_underscore_cs(NULL)
+ :m_thd(thd)
{
m_cpp_buf= (char*) thd->alloc(length + 1);
+ reset(buffer, length);
+}
+
+
+/**
+ Prepare Lex_input_stream instance state for use for handling next SQL statement.
+
+ It should be called between two statements in a multi-statement query.
+ The operation resets the input stream to the beginning-of-parse state,
+ but does not reallocate m_cpp_buf.
+*/
+
+void
+Lex_input_stream::reset(const char *buffer, unsigned int length)
+{
+ yylineno= 1;
+ yytoklen= 0;
+ yylval= NULL;
+ lookahead_token= -1;
+ lookahead_yylval= NULL;
+ m_ptr= buffer;
+ m_tok_start= NULL;
+ m_tok_end= NULL;
+ m_end_of_query= buffer + length;
+ m_tok_start_prev= NULL;
+ m_buf= buffer;
+ m_buf_length= length;
+ m_echo= TRUE;
+ m_cpp_tok_start= NULL;
+ m_cpp_tok_start_prev= NULL;
+ m_cpp_tok_end= NULL;
+ m_body_utf8= NULL;
+ m_cpp_utf8_processed_ptr= NULL;
+ next_state= MY_LEX_START;
+ found_semicolon= NULL;
+ ignore_space= test(m_thd->variables.sql_mode & MODE_IGNORE_SPACE);
+ stmt_prepare_mode= FALSE;
+ multi_statements= TRUE;
+ in_comment=NO_COMMENT;
+ m_underscore_cs= NULL;
m_cpp_ptr= m_cpp_buf;
}
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index a65c4da9962..e9b5ca00953 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -1377,6 +1377,8 @@ public:
Lex_input_stream(THD *thd, const char* buff, unsigned int length);
~Lex_input_stream();
+ void reset(const char *buff, unsigned int length);
+
/**
Set the echo mode.
@@ -2207,8 +2209,8 @@ struct LEX: public Query_tables_list
class Set_signal_information
{
public:
- /** Constructor. */
- Set_signal_information();
+ /** Empty default constructor, use clear() */
+ Set_signal_information() {}
/** Copy constructor. */
Set_signal_information(const Set_signal_information& set);
@@ -2221,7 +2223,7 @@ public:
void clear();
/**
- For each contition item assignment, m_item[] contains the parsed tree
+ For each condition item assignment, m_item[] contains the parsed tree
that represents the expression assigned, if any.
m_item[] is an array indexed by Diag_condition_item_name.
*/
@@ -2238,8 +2240,16 @@ class Yacc_state
{
public:
Yacc_state()
- : yacc_yyss(NULL), yacc_yyvs(NULL)
- {}
+ {
+ reset();
+ }
+
+ void reset()
+ {
+ yacc_yyss= NULL;
+ yacc_yyvs= NULL;
+ m_set_signal_info.clear();
+ }
~Yacc_state();
@@ -2284,6 +2294,12 @@ public:
Lex_input_stream m_lip;
Yacc_state m_yacc;
+
+ void reset(const char *found_semicolon, unsigned int length)
+ {
+ m_lip.reset(found_semicolon, length);
+ m_yacc.reset();
+ }
};
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 33688e3bfb1..b4ad5e2c2f9 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -274,22 +274,20 @@ void init_update_queries(void)
sql_command_flags[SQLCOM_CREATE_TRIGGER]= CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_DROP_TRIGGER]= CF_AUTO_COMMIT_TRANS;
- sql_command_flags[SQLCOM_UPDATE]= CF_CHANGES_DATA | CF_HAS_ROW_COUNT |
- CF_REEXECUTION_FRAGILE | CF_PROTECT_AGAINST_GRL;
- sql_command_flags[SQLCOM_UPDATE_MULTI]= CF_CHANGES_DATA | CF_HAS_ROW_COUNT |
- CF_REEXECUTION_FRAGILE | CF_PROTECT_AGAINST_GRL;
- sql_command_flags[SQLCOM_INSERT]= CF_CHANGES_DATA | CF_HAS_ROW_COUNT |
- CF_REEXECUTION_FRAGILE | CF_PROTECT_AGAINST_GRL;
- sql_command_flags[SQLCOM_INSERT_SELECT]= CF_CHANGES_DATA | CF_HAS_ROW_COUNT |
- CF_REEXECUTION_FRAGILE | CF_PROTECT_AGAINST_GRL;
- sql_command_flags[SQLCOM_DELETE]= CF_CHANGES_DATA | CF_HAS_ROW_COUNT |
- CF_REEXECUTION_FRAGILE | CF_PROTECT_AGAINST_GRL;
- sql_command_flags[SQLCOM_DELETE_MULTI]= CF_CHANGES_DATA | CF_HAS_ROW_COUNT |
- CF_REEXECUTION_FRAGILE | CF_PROTECT_AGAINST_GRL;
- sql_command_flags[SQLCOM_REPLACE]= CF_CHANGES_DATA | CF_HAS_ROW_COUNT |
- CF_REEXECUTION_FRAGILE;
- sql_command_flags[SQLCOM_REPLACE_SELECT]= CF_CHANGES_DATA | CF_HAS_ROW_COUNT |
- CF_REEXECUTION_FRAGILE;
+ sql_command_flags[SQLCOM_UPDATE]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE |
+ CF_PROTECT_AGAINST_GRL;
+ sql_command_flags[SQLCOM_UPDATE_MULTI]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE |
+ CF_PROTECT_AGAINST_GRL;
+ sql_command_flags[SQLCOM_INSERT]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE |
+ CF_PROTECT_AGAINST_GRL;
+ sql_command_flags[SQLCOM_INSERT_SELECT]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE |
+ CF_PROTECT_AGAINST_GRL;
+ sql_command_flags[SQLCOM_DELETE]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE |
+ CF_PROTECT_AGAINST_GRL;
+ sql_command_flags[SQLCOM_DELETE_MULTI]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE |
+ CF_PROTECT_AGAINST_GRL;
+ sql_command_flags[SQLCOM_REPLACE]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE;
+ sql_command_flags[SQLCOM_REPLACE_SELECT]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE;
sql_command_flags[SQLCOM_SELECT]= CF_REEXECUTION_FRAGILE;
sql_command_flags[SQLCOM_SET_OPTION]= CF_REEXECUTION_FRAGILE | CF_AUTO_COMMIT_TRANS;
sql_command_flags[SQLCOM_DO]= CF_REEXECUTION_FRAGILE;
@@ -367,8 +365,7 @@ void init_update_queries(void)
last called (or executed) statement is preserved.
See mysql_execute_command() for how CF_ROW_COUNT is used.
*/
- sql_command_flags[SQLCOM_CALL]= CF_HAS_ROW_COUNT | CF_REEXECUTION_FRAGILE;
- sql_command_flags[SQLCOM_EXECUTE]= CF_HAS_ROW_COUNT;
+ sql_command_flags[SQLCOM_CALL]= CF_REEXECUTION_FRAGILE;
/*
The following admin table operations are allowed
@@ -461,7 +458,6 @@ static void handle_bootstrap_impl(THD *thd)
{
MYSQL_FILE *file= bootstrap_file;
char *buff;
- const char* found_semicolon= NULL;
DBUG_ENTER("handle_bootstrap");
@@ -534,7 +530,8 @@ static void handle_bootstrap_impl(THD *thd)
mode we have only one thread.
*/
thd->set_time();
- mysql_parse(thd, thd->query(), length, & found_semicolon);
+ Parser_state parser_state(thd, thd->query(), length);
+ mysql_parse(thd, thd->query(), length, &parser_state);
close_thread_tables(thd); // Free tables
bootstrap_error= thd->is_error();
@@ -1077,19 +1074,21 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
(char *) thd->security_ctx->host_or_ip);
char *packet_end= thd->query() + thd->query_length();
/* 'b' stands for 'buffer' parameter', special for 'my_snprintf' */
- const char* end_of_stmt= NULL;
general_log_write(thd, command, thd->query(), thd->query_length());
DBUG_PRINT("query",("%-.4096s",thd->query()));
#if defined(ENABLED_PROFILING)
thd->profiling.set_query_source(thd->query(), thd->query_length());
#endif
+ Parser_state parser_state(thd, thd->query(), thd->query_length());
- mysql_parse(thd, thd->query(), thd->query_length(), &end_of_stmt);
+ mysql_parse(thd, thd->query(), thd->query_length(), &parser_state);
- while (!thd->killed && (end_of_stmt != NULL) && ! thd->is_error())
+ while (!thd->killed && (parser_state.m_lip.found_semicolon != NULL) &&
+ ! thd->is_error())
{
- char *beginning_of_next_stmt= (char*) end_of_stmt;
+ char *beginning_of_next_stmt= (char*)
+ parser_state.m_lip.found_semicolon;
thd->protocol->end_statement();
query_cache_end_of_result(thd);
@@ -1130,8 +1129,9 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
*/
statistic_increment(thd->status_var.questions, &LOCK_status);
thd->set_time(); /* Reset the query start time. */
+ parser_state.reset(beginning_of_next_stmt, length);
/* TODO: set thd->lex->sql_command to SQLCOM_END here */
- mysql_parse(thd, beginning_of_next_stmt, length, &end_of_stmt);
+ mysql_parse(thd, beginning_of_next_stmt, length, &parser_state);
}
DBUG_PRINT("info",("query ready"));
@@ -3199,7 +3199,7 @@ end_with_restore_list:
res= mysql_insert(thd, all_tables, lex->field_list, lex->many_values,
lex->update_list, lex->value_list,
lex->duplicates, lex->ignore);
- MYSQL_INSERT_DONE(res, (ulong) thd->row_count_func);
+ MYSQL_INSERT_DONE(res, (ulong) thd->get_row_count_func());
/*
If we have inserted into a VIEW, and the base table has
AUTO_INCREMENT column, but this column is not accessible through
@@ -3265,7 +3265,7 @@ end_with_restore_list:
delete sel_result;
}
/* revert changes for SP */
- MYSQL_INSERT_SELECT_DONE(res, (ulong) thd->row_count_func);
+ MYSQL_INSERT_SELECT_DONE(res, (ulong) thd->get_row_count_func());
select_lex->table_list.first= (uchar*) first_table;
}
/*
@@ -3311,7 +3311,7 @@ end_with_restore_list:
&select_lex->order_list,
unit->select_limit_cnt, select_lex->options,
FALSE);
- MYSQL_DELETE_DONE(res, (ulong) thd->row_count_func);
+ MYSQL_DELETE_DONE(res, (ulong) thd->get_row_count_func());
break;
}
case SQLCOM_DELETE_MULTI:
@@ -4314,8 +4314,9 @@ create_sp_error:
thd->server_status&= ~bits_to_be_cleared;
if (!res)
- my_ok(thd, (ulong) (thd->row_count_func < 0 ? 0 :
- thd->row_count_func));
+ {
+ my_ok(thd, (thd->get_row_count_func() < 0) ? 0 : thd->get_row_count_func());
+ }
else
{
DBUG_ASSERT(thd->is_error() || thd->killed);
@@ -4702,15 +4703,6 @@ create_sp_error:
if (thd->one_shot_set && lex->sql_command != SQLCOM_SET_OPTION)
reset_one_shot_variables(thd);
- /*
- The return value for ROW_COUNT() is "implementation dependent" if the
- statement is not DELETE, INSERT or UPDATE, but -1 is what JDBC and ODBC
- wants. We also keep the last value in case of SQLCOM_CALL or
- SQLCOM_EXECUTE.
- */
- if (!(sql_command_flags[lex->sql_command] & CF_HAS_ROW_COUNT))
- thd->row_count_func= -1;
-
goto finish;
error:
@@ -5747,7 +5739,7 @@ void mysql_init_multi_delete(LEX *lex)
*/
void mysql_parse(THD *thd, const char *inBuf, uint length,
- const char ** found_semicolon)
+ Parser_state *parser_state)
{
int error;
DBUG_ENTER("mysql_parse");
@@ -5777,10 +5769,7 @@ void mysql_parse(THD *thd, const char *inBuf, uint length,
{
LEX *lex= thd->lex;
- Parser_state parser_state(thd, inBuf, length);
-
- bool err= parse_sql(thd, & parser_state, NULL);
- *found_semicolon= parser_state.m_lip.found_semicolon;
+ bool err= parse_sql(thd, parser_state, NULL);
if (!err)
{
@@ -5795,6 +5784,7 @@ void mysql_parse(THD *thd, const char *inBuf, uint length,
{
if (! thd->is_error())
{
+ const char *found_semicolon= parser_state->m_lip.found_semicolon;
/*
Binlog logs a string starting from thd->query and having length
thd->query_length; so we set thd->query_length correctly (to not
@@ -5805,12 +5795,12 @@ void mysql_parse(THD *thd, const char *inBuf, uint length,
PROCESSLIST.
Note that we don't need LOCK_thread_count to modify query_length.
*/
- if (*found_semicolon && (ulong) (*found_semicolon - thd->query()))
+ if (found_semicolon && (ulong) (found_semicolon - thd->query()))
thd->set_query_inner(thd->query(),
- (uint32) (*found_semicolon -
+ (uint32) (found_semicolon -
thd->query() - 1));
/* Actually execute the query */
- if (*found_semicolon)
+ if (found_semicolon)
{
lex->safe_to_cache_query= 0;
thd->server_status|= SERVER_MORE_RESULTS_EXISTS;
@@ -5847,11 +5837,6 @@ void mysql_parse(THD *thd, const char *inBuf, uint length,
thd->cleanup_after_query();
DBUG_ASSERT(thd->change_list.is_empty());
}
- else
- {
- /* There are no multi queries in the cache. */
- *found_semicolon= NULL;
- }
DBUG_VOID_RETURN;
}
diff --git a/sql/sql_parse.h b/sql/sql_parse.h
index 3c34b063d91..e1543a09549 100644
--- a/sql/sql_parse.h
+++ b/sql/sql_parse.h
@@ -84,7 +84,7 @@ bool is_log_table_write_query(enum enum_sql_command command);
bool alloc_query(THD *thd, const char *packet, uint packet_length);
void mysql_init_select(LEX *lex);
void mysql_parse(THD *thd, const char *inBuf, uint length,
- const char ** semicolon);
+ Parser_state *parser_state);
void mysql_reset_thd_for_next_command(THD *thd);
bool mysql_new_select(LEX *lex, bool move_down);
void create_select_for_variable(const char *var_name);
diff --git a/sql/sql_signal.cc b/sql/sql_signal.cc
index 8ae77f3645b..f340da373e8 100644
--- a/sql/sql_signal.cc
+++ b/sql/sql_signal.cc
@@ -75,10 +75,6 @@ const LEX_STRING Diag_statement_item_names[]=
{ C_STRING_WITH_LEN("TRANSACTION_ACTIVE") }
};
-Set_signal_information::Set_signal_information()
-{
- clear();
-}
Set_signal_information::Set_signal_information(
const Set_signal_information& set)
@@ -458,8 +454,20 @@ bool Signal_statement::execute(THD *thd)
DBUG_ENTER("Signal_statement::execute");
+ /*
+ WL#2110 SIGNAL specification says:
+
+ When SIGNAL is executed, it has five effects, in the following order:
+
+ (1) First, the diagnostics area is completely cleared. So if the
+ SIGNAL is in a DECLARE HANDLER then any pending errors or warnings
+ are gone. So is 'row count'.
+
+ This has roots in the SQL standard specification for SIGNAL.
+ */
+
thd->stmt_da->reset_diagnostics_area();
- thd->row_count_func= 0;
+ thd->set_row_count_func(0);
thd->warning_info->clear_warning_info(thd->query_id);
result= raise_condition(thd, &cond);
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index a4c7d665b8a..2abd307deba 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -843,9 +843,8 @@ int mysql_update(THD *thd,
my_snprintf(buff, sizeof(buff), ER(ER_UPDATE_INFO), (ulong) found,
(ulong) updated,
(ulong) thd->warning_info->statement_warn_count());
- thd->row_count_func=
- (thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated;
- my_ok(thd, (ulong) thd->row_count_func, id, buff);
+ my_ok(thd, (thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated,
+ id, buff);
DBUG_PRINT("info",("%ld records updated", (long) updated));
}
thd->count_cuted_fields= CHECK_FIELD_IGNORE; /* calc cuted fields */
@@ -2160,8 +2159,7 @@ bool multi_update::send_eof()
thd->first_successful_insert_id_in_prev_stmt : 0;
my_snprintf(buff, sizeof(buff), ER(ER_UPDATE_INFO),
(ulong) found, (ulong) updated, (ulong) thd->cuted_fields);
- thd->row_count_func=
- (thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated;
- ::my_ok(thd, (ulong) thd->row_count_func, id, buff);
+ ::my_ok(thd, (thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated,
+ id, buff);
DBUG_RETURN(FALSE);
}
diff --git a/storage/Makefile.am b/storage/Makefile.am
index 5b4e32374ae..a188d8967be 100644
--- a/storage/Makefile.am
+++ b/storage/Makefile.am
@@ -20,6 +20,3 @@ AUTOMAKE_OPTIONS = foreign
# These are built from source in the Docs directory
SUBDIRS = @mysql_se_dirs@
DIST_SUBDIRS = @mysql_se_distdirs@
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/archive/Makefile.am b/storage/archive/Makefile.am
index ca7942c082d..adc11358df6 100644
--- a/storage/archive/Makefile.am
+++ b/storage/archive/Makefile.am
@@ -102,6 +102,3 @@ probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES)
$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
endif
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/blackhole/Makefile.am b/storage/blackhole/Makefile.am
index 04ec7a64aa9..f3bdbdbd070 100644
--- a/storage/blackhole/Makefile.am
+++ b/storage/blackhole/Makefile.am
@@ -83,6 +83,3 @@ probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES)
$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
endif
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/csv/Makefile.am b/storage/csv/Makefile.am
index 96fc26bed07..36d6b464fcc 100644
--- a/storage/csv/Makefile.am
+++ b/storage/csv/Makefile.am
@@ -62,6 +62,3 @@ probes_mysql.d:
probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES)
$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
endif
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/example/Makefile.am b/storage/example/Makefile.am
index 14787f082c8..47d95d4663c 100644
--- a/storage/example/Makefile.am
+++ b/storage/example/Makefile.am
@@ -83,6 +83,3 @@ probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES)
$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
endif
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/federated/Makefile.am b/storage/federated/Makefile.am
index aa275b909ea..f4cd634567d 100644
--- a/storage/federated/Makefile.am
+++ b/storage/federated/Makefile.am
@@ -84,6 +84,3 @@ probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES)
$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
endif
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/heap/Makefile.am b/storage/heap/Makefile.am
index c30fd1590f0..677b2d60269 100644
--- a/storage/heap/Makefile.am
+++ b/storage/heap/Makefile.am
@@ -71,6 +71,3 @@ probes_mysql.d:
probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES)
$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
endif
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/ibmdb2i/Makefile.am b/storage/ibmdb2i/Makefile.am
index 768ca15f4cf..041bdc270e4 100644
--- a/storage/ibmdb2i/Makefile.am
+++ b/storage/ibmdb2i/Makefile.am
@@ -50,5 +50,3 @@ libibmdb2i_a_SOURCES= $(ha_ibmdb2i_la_SOURCES)
EXTRA_DIST = CMakeLists.txt plug.in
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/innobase/Makefile.am b/storage/innobase/Makefile.am
index 6051fe9ef96..0caf623bcc2 100644
--- a/storage/innobase/Makefile.am
+++ b/storage/innobase/Makefile.am
@@ -337,6 +337,3 @@ 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
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/myisam/Makefile.am b/storage/myisam/Makefile.am
index c659d05be40..d0f7f5b86dc 100644
--- a/storage/myisam/Makefile.am
+++ b/storage/myisam/Makefile.am
@@ -170,6 +170,3 @@ probes_mysql.d:
probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES)
$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
endif
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/myisammrg/Makefile.am b/storage/myisammrg/Makefile.am
index b7eab6bfdb7..43dec3ae3d9 100644
--- a/storage/myisammrg/Makefile.am
+++ b/storage/myisammrg/Makefile.am
@@ -60,6 +60,3 @@ probes_mysql.d:
probes_mysql.o: $(DTRACEPROVIDER) $(DTRACEFILES)
$(DTRACE) $(DTRACEFLAGS) -G -s $(DTRACEPROVIDER) $(DTRACEFILES) -o $@
endif
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/ndb/Makefile.am b/storage/ndb/Makefile.am
index 5e519ec1c98..0da8ec136c9 100644
--- a/storage/ndb/Makefile.am
+++ b/storage/ndb/Makefile.am
@@ -44,6 +44,3 @@ all-windoze-dsp: windoze
find . -name '*.dsp' | grep -v SCCS | xargs unix2dos
$(top_srcdir)/storage/ndb/config/make-win-dsw.sh | unix2dos > ndb.dsw
tar cvfz ndb-win-dsp.tar.gz ndb.dsw `find . -name '*.dsp' | grep -v SCCS`
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/ndb/docs/Makefile.am b/storage/ndb/docs/Makefile.am
index 66d116c02b7..b0166d40779 100644
--- a/storage/ndb/docs/Makefile.am
+++ b/storage/ndb/docs/Makefile.am
@@ -127,6 +127,3 @@ testdoc: DUMMY
cd $(top_srcdir)/storage/ndb ; $(DOXYGEN) $(DOXYDIR)/Doxyfile.test
windoze-dsp:
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/ndb/include/Makefile.am b/storage/ndb/include/Makefile.am
index 9e6ad016d75..34a243d82a1 100644
--- a/storage/ndb/include/Makefile.am
+++ b/storage/ndb/include/Makefile.am
@@ -63,6 +63,3 @@ dist-hook:
-rm -rf `find $(distdir) -type d -name SCCS`
windoze-dsp:
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/ndb/src/Makefile.am b/storage/ndb/src/Makefile.am
index 627347daf02..e879249bed6 100644
--- a/storage/ndb/src/Makefile.am
+++ b/storage/ndb/src/Makefile.am
@@ -48,6 +48,3 @@ libndbclient.dsp: Makefile \
@$(top_srcdir)/storage/ndb/config/win-sources $@ dummy.cpp
@$(top_srcdir)/storage/ndb/config/win-libraries $@ LIB $(libndbclient_la_LIBADD)
@touch dummy.cpp
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/ndb/src/common/Makefile.am b/storage/ndb/src/common/Makefile.am
index 9d601c7a18a..34e9871da55 100644
--- a/storage/ndb/src/common/Makefile.am
+++ b/storage/ndb/src/common/Makefile.am
@@ -28,6 +28,3 @@ libcommon_la_LIBADD = \
util/libgeneral.la
windoze-dsp:
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/ndb/src/common/debugger/Makefile.am b/storage/ndb/src/common/debugger/Makefile.am
index 56910ee8ea4..30b8563af6d 100644
--- a/storage/ndb/src/common/debugger/Makefile.am
+++ b/storage/ndb/src/common/debugger/Makefile.am
@@ -22,9 +22,6 @@ libtrace_la_SOURCES = SignalLoggerManager.cpp DebuggerNames.cpp BlockNames.cpp E
include $(top_srcdir)/storage/ndb/config/common.mk.am
include $(top_srcdir)/storage/ndb/config/type_kernel.mk.am
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
windoze-dsp: libtrace.dsp
libtrace.dsp: Makefile \
diff --git a/storage/ndb/src/common/debugger/signaldata/Makefile.am b/storage/ndb/src/common/debugger/signaldata/Makefile.am
index 280cd6a5a39..028049cf67b 100644
--- a/storage/ndb/src/common/debugger/signaldata/Makefile.am
+++ b/storage/ndb/src/common/debugger/signaldata/Makefile.am
@@ -43,9 +43,6 @@ libsignaldataprint_la_SOURCES = \
include $(top_srcdir)/storage/ndb/config/common.mk.am
include $(top_srcdir)/storage/ndb/config/type_ndbapi.mk.am
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
windoze-dsp: libsignaldataprint.dsp
libsignaldataprint.dsp: Makefile \
diff --git a/storage/ndb/src/common/logger/Makefile.am b/storage/ndb/src/common/logger/Makefile.am
index 77615212e0d..870946c1e9d 100644
--- a/storage/ndb/src/common/logger/Makefile.am
+++ b/storage/ndb/src/common/logger/Makefile.am
@@ -22,8 +22,6 @@ liblogger_la_SOURCES = $(SOURCE_WIN) SysLogHandler.cpp
include $(top_srcdir)/storage/ndb/config/common.mk.am
include $(top_srcdir)/storage/ndb/config/type_ndbapi.mk.am
-# Don't update the files from bitkeeper
-%::SCCS/s.%
windoze-dsp: liblogger.dsp
liblogger.dsp: Makefile \
diff --git a/storage/ndb/src/common/mgmcommon/Makefile.am b/storage/ndb/src/common/mgmcommon/Makefile.am
index ad56e8c1459..2b41c2bfdd9 100644
--- a/storage/ndb/src/common/mgmcommon/Makefile.am
+++ b/storage/ndb/src/common/mgmcommon/Makefile.am
@@ -25,9 +25,6 @@ include $(top_srcdir)/storage/ndb/config/common.mk.am
include $(top_srcdir)/storage/ndb/config/type_ndbapi.mk.am
include $(top_srcdir)/storage/ndb/config/type_mgmapiclient.mk.am
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
windoze-dsp: libmgmsrvcommon.dsp
libmgmsrvcommon.dsp: Makefile \
diff --git a/storage/ndb/src/common/portlib/Makefile.am b/storage/ndb/src/common/portlib/Makefile.am
index f427b2170b4..b0c5d5cf619 100644
--- a/storage/ndb/src/common/portlib/Makefile.am
+++ b/storage/ndb/src/common/portlib/Makefile.am
@@ -29,7 +29,6 @@ EXTRA_PROGRAMS = memtest PortLibTest munmaptest
PortLibTest_SOURCES = NdbPortLibTest.cpp
munmaptest_SOURCES = munmaptest.cpp
-# Don't update the files from bitkeeper
WIN_src = win32/NdbCondition.c \
win32/NdbDaemon.c \
win32/NdbEnv.c \
@@ -54,6 +53,3 @@ libportlib.dsp: Makefile \
@$(top_srcdir)/storage/ndb/config/win-includes $@ $(INCLUDES)
@$(top_srcdir)/storage/ndb/config/win-sources $@ $(WIN_src)
@$(top_srcdir)/storage/ndb/config/win-libraries $@ LIB $(LDADD)
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/ndb/src/common/transporter/Makefile.am b/storage/ndb/src/common/transporter/Makefile.am
index 83ac3b6121d..ccf51b352b1 100644
--- a/storage/ndb/src/common/transporter/Makefile.am
+++ b/storage/ndb/src/common/transporter/Makefile.am
@@ -32,9 +32,6 @@ INCLUDES_LOC = -I$(top_srcdir)/storage/ndb/include/mgmapi -I$(top_srcdir)/storag
include $(top_srcdir)/storage/ndb/config/common.mk.am
include $(top_srcdir)/storage/ndb/config/type_util.mk.am
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
windoze-dsp: libtransporter.dsp
libtransporter.dsp: Makefile \
diff --git a/storage/ndb/src/common/util/Makefile.am b/storage/ndb/src/common/util/Makefile.am
index 5379a425c49..4a69924192e 100644
--- a/storage/ndb/src/common/util/Makefile.am
+++ b/storage/ndb/src/common/util/Makefile.am
@@ -46,9 +46,6 @@ testBitmask.o: $(testBitmask_SOURCES)
include $(top_srcdir)/storage/ndb/config/common.mk.am
include $(top_srcdir)/storage/ndb/config/type_util.mk.am
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
windoze-dsp: libgeneral.dsp
libgeneral.dsp: Makefile \
diff --git a/storage/ndb/src/cw/Makefile.am b/storage/ndb/src/cw/Makefile.am
index d9a40002062..3695e197cfb 100644
--- a/storage/ndb/src/cw/Makefile.am
+++ b/storage/ndb/src/cw/Makefile.am
@@ -16,6 +16,3 @@
SUBDIRS = cpcd
windoze-dsp:
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/ndb/src/cw/cpcd/Makefile.am b/storage/ndb/src/cw/cpcd/Makefile.am
index efc828e21a9..722ceaf22e8 100644
--- a/storage/ndb/src/cw/cpcd/Makefile.am
+++ b/storage/ndb/src/cw/cpcd/Makefile.am
@@ -28,7 +28,4 @@ include $(top_srcdir)/storage/ndb/config/type_util.mk.am
ndb_cpcd_LDFLAGS = -static @ndb_bin_am_ldflags@
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
windoze-dsp:
diff --git a/storage/ndb/src/kernel/Makefile.am b/storage/ndb/src/kernel/Makefile.am
index 343d5eeab6d..9596c53da37 100644
--- a/storage/ndb/src/kernel/Makefile.am
+++ b/storage/ndb/src/kernel/Makefile.am
@@ -70,6 +70,3 @@ storage/ndbd.dsp: Makefile \
@$(top_srcdir)/storage/ndb/config/win-includes $@ $(INCLUDES)
@$(top_srcdir)/storage/ndb/config/win-sources $@ $(ndbd_SOURCES)
@$(top_srcdir)/storage/ndb/config/win-libraries $@ LINK $(LDADD)
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/ndb/src/kernel/blocks/Makefile.am b/storage/ndb/src/kernel/blocks/Makefile.am
index ebb2e48ad14..f17f274defb 100644
--- a/storage/ndb/src/kernel/blocks/Makefile.am
+++ b/storage/ndb/src/kernel/blocks/Makefile.am
@@ -64,10 +64,4 @@ ndb_print_file_LDFLAGS = @ndb_bin_am_ldflags@ \
include $(top_srcdir)/storage/ndb/config/common.mk.am
include $(top_srcdir)/storage/ndb/config/type_kernel.mk.am
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
windoze-dsp:
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/ndb/src/kernel/blocks/backup/Makefile.am b/storage/ndb/src/kernel/blocks/backup/Makefile.am
index 4594e0fe717..085b4c9ff65 100644
--- a/storage/ndb/src/kernel/blocks/backup/Makefile.am
+++ b/storage/ndb/src/kernel/blocks/backup/Makefile.am
@@ -23,7 +23,3 @@ ndb_print_backup_file_LDFLAGS = @ndb_bin_am_ldflags@ \
include $(top_srcdir)/storage/ndb/config/common.mk.am
include $(top_srcdir)/storage/ndb/config/type_kernel.mk.am
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
diff --git a/storage/ndb/src/kernel/blocks/dbdict/Makefile.am b/storage/ndb/src/kernel/blocks/dbdict/Makefile.am
index 0ee3df7036d..678aa54684e 100644
--- a/storage/ndb/src/kernel/blocks/dbdict/Makefile.am
+++ b/storage/ndb/src/kernel/blocks/dbdict/Makefile.am
@@ -30,6 +30,3 @@ ndb_print_schema_file_LDFLAGS = @ndb_bin_am_ldflags@ \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/ndb/src/kernel/blocks/dbdih/Makefile.am b/storage/ndb/src/kernel/blocks/dbdih/Makefile.am
index 1c84714289d..651c966cad1 100644
--- a/storage/ndb/src/kernel/blocks/dbdih/Makefile.am
+++ b/storage/ndb/src/kernel/blocks/dbdih/Makefile.am
@@ -24,6 +24,3 @@ ndb_print_sys_file_LDFLAGS = @ndb_bin_am_ldflags@ \
include $(top_srcdir)/storage/ndb/config/common.mk.am
include $(top_srcdir)/storage/ndb/config/type_kernel.mk.am
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/ndb/src/kernel/blocks/dblqh/Makefile.am b/storage/ndb/src/kernel/blocks/dblqh/Makefile.am
index b545096dc83..74ac3fd3a17 100644
--- a/storage/ndb/src/kernel/blocks/dblqh/Makefile.am
+++ b/storage/ndb/src/kernel/blocks/dblqh/Makefile.am
@@ -26,6 +26,3 @@ ndbd_redo_log_reader_LDFLAGS = @ndb_bin_am_ldflags@ \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/ndb/src/kernel/blocks/dbtup/Makefile.am b/storage/ndb/src/kernel/blocks/dbtup/Makefile.am
index 7feda3d8ac5..9fe51d30fab 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/Makefile.am
+++ b/storage/ndb/src/kernel/blocks/dbtup/Makefile.am
@@ -23,6 +23,3 @@ test_varpage_LDFLAGS = @ndb_bin_am_ldflags@ \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/dbug/libdbug.a \
$(top_builddir)/strings/libmystrings.a
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/ndb/src/kernel/error/Makefile.am b/storage/ndb/src/kernel/error/Makefile.am
index 6db5c0e4ede..9d3c460eae8 100644
--- a/storage/ndb/src/kernel/error/Makefile.am
+++ b/storage/ndb/src/kernel/error/Makefile.am
@@ -22,9 +22,6 @@ liberror_a_SOURCES = TimeModule.cpp \
include $(top_srcdir)/storage/ndb/config/common.mk.am
include $(top_srcdir)/storage/ndb/config/type_kernel.mk.am
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
windoze-dsp: liberror.dsp
liberror.dsp: Makefile \
diff --git a/storage/ndb/src/kernel/vm/Makefile.am b/storage/ndb/src/kernel/vm/Makefile.am
index 4964b4ea85a..fdc7854e822 100644
--- a/storage/ndb/src/kernel/vm/Makefile.am
+++ b/storage/ndb/src/kernel/vm/Makefile.am
@@ -43,9 +43,6 @@ INCLUDES_LOC = -I$(top_srcdir)/storage/ndb/src/mgmapi
include $(top_srcdir)/storage/ndb/config/common.mk.am
include $(top_srcdir)/storage/ndb/config/type_kernel.mk.am
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
windoze-dsp: libkernel.dsp
libkernel.dsp: Makefile \
diff --git a/storage/ndb/src/mgmapi/Makefile.am b/storage/ndb/src/mgmapi/Makefile.am
index 96ee65d7d9e..ed4404245b7 100644
--- a/storage/ndb/src/mgmapi/Makefile.am
+++ b/storage/ndb/src/mgmapi/Makefile.am
@@ -29,9 +29,6 @@ include $(top_srcdir)/storage/ndb/config/type_util.mk.am
#ndbtest_PROGRAMS = ndb_test_mgmapi
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
windoze-dsp: libmgmapi.dsp
libmgmapi.dsp: Makefile \
diff --git a/storage/ndb/src/mgmclient/Makefile.am b/storage/ndb/src/mgmclient/Makefile.am
index 41f659cf68d..4cb5990e75f 100644
--- a/storage/ndb/src/mgmclient/Makefile.am
+++ b/storage/ndb/src/mgmclient/Makefile.am
@@ -44,9 +44,6 @@ LDADD_LOC = $(noinst_LTLIBRARIES) \
ndb_mgm_LDFLAGS = @ndb_bin_am_ldflags@
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
windoze-dsp: ndb_mgm.dsp libndbmgmclient.dsp
ndb_mgm.dsp: Makefile \
diff --git a/storage/ndb/src/mgmsrv/Makefile.am b/storage/ndb/src/mgmsrv/Makefile.am
index 3f37280d7a5..3ae70155554 100644
--- a/storage/ndb/src/mgmsrv/Makefile.am
+++ b/storage/ndb/src/mgmsrv/Makefile.am
@@ -57,9 +57,6 @@ include $(top_srcdir)/storage/ndb/config/type_ndbapi.mk.am
ndb_mgmd_LDFLAGS = @ndb_bin_am_ldflags@
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
windoze-dsp: ndb_mgmd.dsp
ndb_mgmd.dsp: Makefile \
diff --git a/storage/ndb/src/ndbapi/Makefile.am b/storage/ndb/src/ndbapi/Makefile.am
index 8ff427772b0..6a18649039d 100644
--- a/storage/ndb/src/ndbapi/Makefile.am
+++ b/storage/ndb/src/ndbapi/Makefile.am
@@ -71,9 +71,6 @@ ndberror_check_LDFLAGS = \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
windoze-dsp: libndbapi.dsp
libndbapi.dsp: Makefile \
diff --git a/storage/ndb/test/Makefile.am b/storage/ndb/test/Makefile.am
index c746f526769..57e9db7b543 100644
--- a/storage/ndb/test/Makefile.am
+++ b/storage/ndb/test/Makefile.am
@@ -21,6 +21,3 @@ dist-hook:
-rm -rf `find $(distdir) -type d -name SCCS`
windoze-dsp:
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/storage/ndb/test/ndbapi/Makefile.am b/storage/ndb/test/ndbapi/Makefile.am
index 81bb346417f..84b1105913c 100644
--- a/storage/ndb/test/ndbapi/Makefile.am
+++ b/storage/ndb/test/ndbapi/Makefile.am
@@ -125,11 +125,6 @@ testBackup_LDADD = $(LDADD) bank/libbank.a
testSRBank_LDADD = bank/libbank.a $(LDADD)
NdbRepStress_LDADD = $(LDADD) $(top_builddir)/libmysql_r/libmysqlclient_r.la
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
-
-
windoze-dsp: flexBench.dsp testBasic.dsp testBlobs.dsp \
testScan.dsp
diff --git a/storage/ndb/test/ndbapi/bank/Makefile.am b/storage/ndb/test/ndbapi/bank/Makefile.am
index 8e6c0f23eea..aee3ec57449 100644
--- a/storage/ndb/test/ndbapi/bank/Makefile.am
+++ b/storage/ndb/test/ndbapi/bank/Makefile.am
@@ -32,7 +32,4 @@ LDADD_LOC = $(noinst_LIBRARIES)
include $(top_srcdir)/storage/ndb/config/common.mk.am
include $(top_srcdir)/storage/ndb/config/type_ndbapitest.mk.am
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
windoze-dsp:
diff --git a/storage/ndb/test/run-test/Makefile.am b/storage/ndb/test/run-test/Makefile.am
index 54ca0c009b2..e1bc71fb4a9 100644
--- a/storage/ndb/test/run-test/Makefile.am
+++ b/storage/ndb/test/run-test/Makefile.am
@@ -51,7 +51,4 @@ wrappers_SCRIPTS=atrt-testBackup atrt-mysql-test-run
EXTRA_DIST = $(test_DATA) $(test_SCRIPTS) $(wrappers_SCRIPTS) README.ATRT atrt.hpp
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
windoze-dsp:
diff --git a/storage/ndb/test/src/Makefile.am b/storage/ndb/test/src/Makefile.am
index 1e4f30c3f39..148304adc47 100644
--- a/storage/ndb/test/src/Makefile.am
+++ b/storage/ndb/test/src/Makefile.am
@@ -31,9 +31,6 @@ INCLUDES_LOC = -I$(top_srcdir)/storage/ndb/src/common/mgmcommon -I$(top_srcdir)/
include $(top_srcdir)/storage/ndb/config/common.mk.am
include $(top_srcdir)/storage/ndb/config/type_ndbapitest.mk.am
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
windoze-dsp: libNDBT.dsp
libNDBT.dsp: Makefile \
diff --git a/storage/ndb/test/tools/Makefile.am b/storage/ndb/test/tools/Makefile.am
index da715caa1cb..6a93b1a36ba 100644
--- a/storage/ndb/test/tools/Makefile.am
+++ b/storage/ndb/test/tools/Makefile.am
@@ -43,7 +43,4 @@ include $(top_srcdir)/storage/ndb/config/type_ndbapitest.mk.am
ndb_cpcc_LDADD = $(LDADD)
ndb_cpcc_LDFLAGS = -static
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
windoze-dsp:
diff --git a/storage/ndb/tools/Makefile.am b/storage/ndb/tools/Makefile.am
index de0f36963bf..ef74198e2bd 100644
--- a/storage/ndb/tools/Makefile.am
+++ b/storage/ndb/tools/Makefile.am
@@ -75,9 +75,6 @@ ndb_select_count_LDFLAGS = @ndb_bin_am_ldflags@
ndb_restore_LDFLAGS = @ndb_bin_am_ldflags@
ndb_config_LDFLAGS = @ndb_bin_am_ldflags@
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
windoze-dsp: \
ndb_waiter.dsp \
ndb_drop_table.dsp \
diff --git a/strings/Makefile.am b/strings/Makefile.am
index ff4436ddbcb..9b32f42c49a 100644
--- a/strings/Makefile.am
+++ b/strings/Makefile.am
@@ -88,7 +88,3 @@ 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
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
-
diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt
index 85be470e21b..ff522ac1d35 100644
--- a/support-files/CMakeLists.txt
+++ b/support-files/CMakeLists.txt
@@ -29,16 +29,13 @@ ELSE()
SET(CXXFLAGS ${CMAKE_CXX_FLAGS})
SET(MYSQLD_USER "mysql")
SET(ini_file_extension "cnf")
+ SET(HOSTNAME "hostname")
ENDIF()
-IF(UNIX)
- IF(INSTALL_LAYOUT MATCHES "STANDALONE")
- SET(inst_location ${INSTALL_SUPPORTFILESDIR})
- ELSE()
- SET(inst_location ${INSTALL_DOCREADMEDIR})
- ENDIF()
-ELSE()
+IF(WIN32)
SET(inst_location ${INSTALL_DOCREADMEDIR})
+ELSE()
+ SET(inst_location ${INSTALL_SUPPORTFILESDIR})
ENDIF()
FOREACH(inifile my-huge my-innodb-heavy-4G my-large my-medium my-small)
@@ -50,12 +47,9 @@ ENDFOREACH()
IF(UNIX)
IF(INSTALL_LAYOUT MATCHES "STANDALONE")
SET(prefix ".")
- SET(inst_location ${INSTALL_SUPPORTFILESDIR})
ELSE()
SET(prefix ${CMAKE_INSTALL_PREFIX})
- SET(inst_location ${INSTALL_MYSQLSHAREDIR})
ENDIF()
-
FOREACH(script mysqld_multi.server mysql-log-rotate binary-configure
config.medium.ini config.small.ini config.huge.ini ndb-config-2-node.ini)
diff --git a/support-files/MacOSX/Makefile.am b/support-files/MacOSX/Makefile.am
index 3f11107d714..7d4384a2a56 100644
--- a/support-files/MacOSX/Makefile.am
+++ b/support-files/MacOSX/Makefile.am
@@ -52,6 +52,3 @@ SUFFIXES = .sh
-e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \
$< > $@-t
@MV@ $@-t $@
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/support-files/Makefile.am b/support-files/Makefile.am
index 42e7ecb1797..7ddb39e1c7c 100644
--- a/support-files/Makefile.am
+++ b/support-files/Makefile.am
@@ -33,7 +33,7 @@ EXTRA_DIST = mysql.spec.sh \
magic mysql.m4 \
MySQL-shared-compat.spec.sh \
ndb-config-2-node.ini.sh \
- compiler_warnings.supp \
+ compiler_warnings.supp \
dtrace \
CMakeLists.txt
@@ -129,6 +129,3 @@ SUFFIXES = .sh
-e 's!@''PERL_DATA_DUMPER''@!@PERL_DATA_DUMPER@!' \
$< > $@-t
@MV@ $@-t $@
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/support-files/RHEL4-SElinux/Makefile.am b/support-files/RHEL4-SElinux/Makefile.am
index 52292136877..d2143a5285c 100644
--- a/support-files/RHEL4-SElinux/Makefile.am
+++ b/support-files/RHEL4-SElinux/Makefile.am
@@ -18,6 +18,3 @@
## Process this file with automake to create Makefile.in
EXTRA_DIST = mysql.fc mysql.te
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index ed0015c436f..657dd3fbbdf 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc.
+# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,125 +20,200 @@
# NOTE: "vendor" is used in upgrade/downgrade check, so you can't
# change these, has to be exactly as is.
-%define mysql_old_vendor MySQL AB
-%define mysql_vendor_2 Sun Microsystems, Inc.
-%define mysql_vendor Oracle and/or its affiliates
-
-%define mysql_version @VERSION@
-
-%define mysqld_user mysql
-%define mysqld_group mysql
-%define mysqldatadir /var/lib/mysql
-%define see_base For a description of MySQL see the base MySQL RPM or http://www.mysql.com
-
-# ------------------------------------------------------------------------------
-# On SuSE 9 no separate "debuginfo" package is built. To enable basic
-# debugging on that platform, we don't strip binaries on SuSE 9. We
-# disable the strip of binaries by redefining the RPM macro
-# "__os_install_post" leaving out the script calls that normally does
-# this. We do this in all cases, as on platforms where "debuginfo" is
-# created, a script "find-debuginfo.sh" will be called that will do
-# the strip anyway, part of separating the executable and debug
-# information into separate files put into separate packages.
+%define mysql_old_vendor MySQL AB
+%define mysql_vendor_2 Sun Microsystems, Inc.
+%define mysql_vendor Oracle and/or its affiliates
+
+%define mysql_version @VERSION@
+
+%define mysqld_user mysql
+%define mysqld_group mysql
+%define mysqldatadir /var/lib/mysql
+
+%define release 1
+
+#
+# Macros we use which are not available in all supported versions of RPM
+#
+# - defined/undefined are missing on RHEL4
#
-# Some references (shows more advanced conditional usage):
-# http://www.redhat.com/archives/rpm-list/2001-November/msg00257.html
-# http://www.redhat.com/archives/rpm-list/2003-February/msg00275.html
-# http://www.redhat.com/archives/rhl-devel-list/2004-January/msg01546.html
-# http://lists.opensuse.org/archive/opensuse-commit/2006-May/1171.html
-# ------------------------------------------------------------------------------
-%define __os_install_post /usr/lib/rpm/brp-compress
-
-# ------------------------------------------------------------------------------
-# We don't package all files installed into the build root by intention -
-# See BUG#998 for details.
-# ------------------------------------------------------------------------------
-%define _unpackaged_files_terminate_build 0
-
-# ------------------------------------------------------------------------------
-# RPM build tools now automatically detects Perl module dependencies. This
-# detection gives problems as it is broken in some versions, and it also
-# give unwanted dependencies from mandatory scripts in our package.
-# Might not be possible to disable in all RPM tool versions, but here we
-# try. We keep the "AutoReqProv: no" for the "test" sub package, as disabling
-# here might fail, and that package has the most problems.
-# See http://fedoraproject.org/wiki/Packaging/Perl#Filtering_Requires:_and_Provides
-# http://www.wideopen.com/archives/rpm-list/2002-October/msg00343.html
-# ------------------------------------------------------------------------------
+%if %{expand:%{?defined:0}%{!?defined:1}}
+%define defined() %{expand:%%{?%{1}:1}%%{!?%{1}:0}}
+%endif
+%if %{expand:%{?undefined:0}%{!?undefined:1}}
+%define undefined() %{expand:%%{?%{1}:0}%%{!?%{1}:1}}
+%endif
+
+# ----------------------------------------------------------------------------
+# RPM build tools now automatically detect Perl module dependencies. This
+# detection causes problems as it is broken in some versions, and it also
+# provides unwanted dependencies from mandatory scripts in our package.
+# It might not be possible to disable this in all versions of RPM, but here we
+# try anyway. We keep the "AutoReqProv: no" for the "test" sub package, as
+# disabling here might fail, and that package has the most problems.
+# See:
+# http://fedoraproject.org/wiki/Packaging/Perl#Filtering_Requires:_and_Provides
+# http://www.wideopen.com/archives/rpm-list/2002-October/msg00343.html
+# ----------------------------------------------------------------------------
%undefine __perl_provides
%undefine __perl_requires
##############################################################################
# Command line handling
##############################################################################
+#
+# To set options:
+#
+# $ rpmbuild --define="option <x>" ...
+#
-# ----------------------------------------------------------------------
-# use "rpmbuild --with yassl" or "rpm --define '_with_yassl 1'" (for RPM 3.x)
-# to build with yaSSL support (off by default)
-# ----------------------------------------------------------------------
-%{?_with_yassl:%define YASSL_BUILD 1}
-%{!?_with_yassl:%define YASSL_BUILD 0}
+# ----------------------------------------------------------------------------
+# Commercial builds
+# ----------------------------------------------------------------------------
+%if %{undefined commercial}
+%define commercial 0
+%endif
-# ----------------------------------------------------------------------
-# use "rpmbuild --without bundled_zlib" or "rpm --define '_without_bundled_zlib 1'"
-# (for RPM 3.x) to not build using the bundled zlib (on by default)
-# ----------------------------------------------------------------------
-%{!?_with_bundled_zlib: %{!?_without_bundled_zlib: %define WITH_BUNDLED_ZLIB 1}}
-%{?_with_bundled_zlib:%define WITH_BUNDLED_ZLIB 1}
-%{?_without_bundled_zlib:%define WITH_BUNDLED_ZLIB 0}
+# ----------------------------------------------------------------------------
+# Source name
+# ----------------------------------------------------------------------------
+%if %{undefined src_base}
+%define src_base mysql
+%endif
+%define src_dir %{src_base}-%{mysql_version}
-# ----------------------------------------------------------------------
-# support optional "tcmalloc" stuff (experimental)
-# ----------------------------------------------------------------------
-%{?malloc_lib_target:%define WITH_TCMALLOC 1}
-%{!?malloc_lib_target:%define WITH_TCMALLOC 0}
+# ----------------------------------------------------------------------------
+# Feature set (storage engines, options). Default to community (everything)
+# ----------------------------------------------------------------------------
+%if %{undefined feature_set}
+%define feature_set community
+%endif
-# ----------------------------------------------------------------------
-# use "rpmbuild --with cluster" or "rpm --define '_with_cluster 1'" (for RPM 3.x)
-# to build with cluster support (off by default)
-# ----------------------------------------------------------------------
-%{?_with_cluster:%define CLUSTER_BUILD 1}
-%{!?_with_cluster:%define CLUSTER_BUILD 0}
+# ----------------------------------------------------------------------------
+# Server comment strings
+# ----------------------------------------------------------------------------
+%if %{undefined compilation_comment_debug}
+%define compilation_comment_debug MySQL Community Server - Debug (GPL)
+%endif
+%if %{undefined compilation_comment_release}
+%define compilation_comment_release MySQL Community Server (GPL)
+%endif
-##############################################################################
-# Product definitions - set for a "community" package
-##############################################################################
+# ----------------------------------------------------------------------------
+# Product and server suffixes
+# ----------------------------------------------------------------------------
+%if %{undefined product_suffix}
+ %if %{defined short_product_tag}
+ %define product_suffix -%{short_product_tag}
+ %else
+ %define product_suffix %{nil}
+ %endif
+%endif
-%define server_suffix -community
-%define package_suffix -community
-%define ndbug_comment MySQL Community Server (GPL)
-%define debug_comment MySQL Community Server - Debug (GPL)
-%define commercial 0
-%define EMBEDDED_BUILD 1
-%define PARTITION_BUILD 1
-# Default for CLUSTER_BUILD is "0", but command line option may override it
-%define COMMUNITY_BUILD 1
-%define INNODB_BUILD 1
-%define NORMAL_TEST_MODE test-bt
-%define DEBUG_TEST_MODE test-bt-debug
+%if %{undefined server_suffix}
+%define server_suffix %{nil}
+%endif
+
+# ----------------------------------------------------------------------------
+# Distribution support
+# ----------------------------------------------------------------------------
+%if %{undefined distro_specific}
+%define distro_specific 0
+%endif
+%if %{distro_specific}
+ %if %(test -f /etc/redhat-release && echo 1 || echo 0)
+ %define elver %(rpm -qf --qf '%%{version}\\n' /etc/redhat-release | sed -e 's/^\\([0-9]*\\).*/\\1/g')
+ %if "%elver" == "4"
+ %define distro_description Enterprise Linux 4
+ %define distro_releasetag el4
+ %define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel
+ %define distro_requires chkconfig coreutils grep procps shadow-utils
+ %else
+ %if "%elver" == "5"
+ %define distro_description Enterprise Linux 5
+ %define distro_releasetag el5
+ %define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel
+ %define distro_requires chkconfig coreutils grep procps shadow-utils
+ %else
+ %{error:Enterprise Linux %{elver} is unsupported}
+ %endif
+ %endif
+ %else
+ %if %(test -f /etc/SuSE-release && echo 1 || echo 0)
+ %define susever %(rpm -qf --qf '%%{version}\\n' /etc/SuSE-release)
+ %if "%susever" == "10"
+ %define distro_description SUSE Linux Enterprise Server 10
+ %define distro_releasetag sles10
+ %define distro_buildreq gcc-c++ gdbm-devel gperf ncurses-devel openldap2-client readline-devel zlib-devel
+ %define distro_requires aaa_base coreutils grep procps pwdutils
+ %else
+ %if "%susever" == "11"
+ %define distro_description SUSE Linux Enterprise Server 11
+ %define distro_releasetag sles11
+ %define distro_buildreq gcc-c++ gdbm-devel gperf ncurses-devel openldap2-client procps pwdutils readline-devel zlib-devel
+ %define distro_requires aaa_base coreutils grep procps pwdutils
+ %else
+ %{error:SuSE %{susever} is unsupported}
+ %endif
+ %endif
+ %else
+ %{error:Unsupported distribution}
+ %endif
+ %endif
+%else
+ %define generic_kernel %(uname -r | cut -d. -f1-2)
+ %define distro_description Generic Linux (kernel %{generic_kernel})
+ %define distro_releasetag linux%{generic_kernel}
+ %define distro_buildreq gcc-c++ gperf ncurses-devel perl readline-devel time zlib-devel
+ %define distro_requires coreutils grep procps /sbin/chkconfig /usr/sbin/useradd /usr/sbin/groupadd
+%endif
+
+# Avoid debuginfo RPMs, leaves binaries unstripped
+%define debug_package %{nil}
-%define release 1.glibc23
+# Hack to work around bug in RHEL5 __os_install_post macro, wrong inverted
+# test for __debug_package
+%define __strip /bin/true
-%define mysql_license GPL
-%define src_dir mysql-%{mysql_version}
+# ----------------------------------------------------------------------------
+# Support optional "tcmalloc" library (experimental)
+# ----------------------------------------------------------------------------
+%if %{defined malloc_lib_target}
+%define WITH_TCMALLOC 1
+%else
+%define WITH_TCMALLOC 0
+%endif
+
+##############################################################################
+# Configuration based upon above user input, not to be set directly
+##############################################################################
+
+%if %{commercial}
+%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
##############################################################################
# Main spec file section
##############################################################################
-Name: MySQL
-Summary: MySQL: a very fast and reliable SQL database server
-Group: Applications/Databases
-Version: @MYSQL_U_SCORE_VERSION@
-Release: %{release}
-License: Copyright 2000-2008 MySQL AB, @MYSQL_COPYRIGHT_YEAR@ %{mysql_vendor} All rights reserved. Use is subject to license terms. Under %{mysql_license} license as shown in the Description field.
-Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/%{src_dir}.tar.gz
-URL: http://www.mysql.com/
-Packager: %{mysql_vendor} Product Engineering Team <build@mysql.com>
-Vendor: %{mysql_vendor}
-Provides: msqlormysql MySQL-server mysql
-BuildRequires: ncurses-devel
-Obsoletes: mysql
+Name: MySQL%{product_suffix}
+Summary: MySQL: a very fast and reliable SQL database server
+Group: Applications/Databases
+Version: @MYSQL_U_SCORE_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.
+Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/%{src_dir}.tar.gz
+URL: http://www.mysql.com/
+Packager: MySQL Build Team <build@mysql.com>
+Vendor: %{mysql_vendor}
+Provides: msqlormysql MySQL-server mysql
+BuildRequires: %{distro_buildreq}
# Think about what you use here since the first step is to
# run a rm -rf
@@ -152,11 +227,12 @@ is intended for mission-critical, heavy-load production systems as well
as for embedding into mass-deployed software. MySQL is a trademark of
%{mysql_vendor}
-Copyright 2000-2008 MySQL AB, @MYSQL_COPYRIGHT_YEAR@ %{mysql_vendor} All rights reserved.
-Use is subject to license terms.
-
-This software comes with ABSOLUTELY NO WARRANTY. This is free software,
-and you are welcome to modify and redistribute it under the GPL license.
+The MySQL software has Dual Licensing, which means you can use the MySQL
+software free of charge under the GNU General Public License
+(http://www.gnu.org/licenses/). You can also purchase commercial MySQL
+licenses from %{mysql_vendor} if you do not wish to be bound by the terms of
+the GPL. See the chapter "Licensing and Support" in the manual for
+further info.
The MySQL web site (http://www.mysql.com/) provides the latest
news and information about the MySQL software. Also please see the
@@ -166,436 +242,234 @@ documentation and the manual for more information.
# Sub package definition
##############################################################################
-%package server
-Summary: MySQL: a very fast and reliable SQL database server
-Group: Applications/Databases
-Requires: coreutils grep procps /usr/sbin/useradd /usr/sbin/groupadd /sbin/chkconfig
-Provides: msqlormysql mysql-server mysql MySQL
-Obsoletes: MySQL mysql mysql-server
+%package -n MySQL-server%{product_suffix}
+Summary: MySQL: a very fast and reliable SQL database server
+Group: Applications/Databases
+Requires: %{distro_requires}
+Provides: msqlormysql mysql-server mysql MySQL MySQL-server
+Obsoletes: MySQL mysql mysql-server MySQL-server
-%description server
+%description -n MySQL-server%{product_suffix}
The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
and robust SQL (Structured Query Language) database server. MySQL Server
is intended for mission-critical, heavy-load production systems as well
as for embedding into mass-deployed software. MySQL is a trademark of
%{mysql_vendor}
-Copyright 2000-2008 MySQL AB, @MYSQL_COPYRIGHT_YEAR@ %{mysql_vendor} All rights reserved.
-Use is subject to license terms.
+The MySQL software has Dual Licensing, which means you can use the MySQL
+software free of charge under the GNU General Public License
+(http://www.gnu.org/licenses/). You can also purchase commercial MySQL
+licenses from %{mysql_vendor} if you do not wish to be bound by the terms of
+the GPL. See the chapter "Licensing and Support" in the manual for
+further info.
-This software comes with ABSOLUTELY NO WARRANTY. This is free software,
-and you are welcome to modify and redistribute it under the GPL license.
+The MySQL web site (http://www.mysql.com/) provides the latest news and
+information about the MySQL software. Also please see the documentation
+and the manual for more information.
-The MySQL web site (http://www.mysql.com/) provides the latest
-news and information about the MySQL software. Also please see the
-documentation and the manual for more information.
-
-This package includes the MySQL server binary
-%if %{INNODB_BUILD}
-(configured including InnoDB)
-%endif
-as well as related utilities to run and administer a MySQL server.
+This package includes the MySQL server binary as well as related utilities
+to run and administer a MySQL server.
If you want to access and work with the database, you have to install
-package "MySQL-client" as well!
-
-# ------------------------------------------------------------------------------
+package "MySQL-client%{product_suffix}" as well!
-%package client
-Summary: MySQL - Client
-Group: Applications/Databases
-Obsoletes: mysql-client
-Provides: mysql-client
+# ----------------------------------------------------------------------------
+%package -n MySQL-client%{product_suffix}
+Summary: MySQL - Client
+Group: Applications/Databases
+Obsoletes: mysql-client MySQL-client
+Provides: mysql-client MySQL-client
-%description client
+%description -n MySQL-client%{product_suffix}
This package contains the standard MySQL clients and administration tools.
-%{see_base}
-
-# ------------------------------------------------------------------------------
-
-%if %{CLUSTER_BUILD}
-%package ndb-storage
-Summary: MySQL - ndbcluster storage engine
-Group: Applications/Databases
-
-%description ndb-storage
-This package contains the ndbcluster storage engine.
-It is necessary to have this package installed on all
-computers that should store ndbcluster table data.
-
-%{see_base}
-
-# ------------------------------------------------------------------------------
-
-%package ndb-management
-Summary: MySQL - ndbcluster storage engine management
-Group: Applications/Databases
-
-%description ndb-management
-This package contains ndbcluster storage engine management.
-It is necessary to have this package installed on at least
-one computer in the cluster.
-
-%{see_base}
-
-# ------------------------------------------------------------------------------
-
-%package ndb-tools
-Summary: MySQL - ndbcluster storage engine basic tools
-Group: Applications/Databases
-
-%description ndb-tools
-This package contains ndbcluster storage engine basic tools.
-
-%{see_base}
-
-# ------------------------------------------------------------------------------
-
-%package ndb-extra
-Summary: MySQL - ndbcluster storage engine extra tools
-Group: Applications/Databases
-
-%description ndb-extra
-This package contains some extra ndbcluster storage engine tools for the advanced user.
-They should be used with caution.
-
-%{see_base}
-%endif
+For a description of MySQL see the base MySQL RPM or http://www.mysql.com/
-# ------------------------------------------------------------------------------
+# ----------------------------------------------------------------------------
+%package -n MySQL-test%{product_suffix}
+Requires: MySQL-client%{product_suffix} perl
+Summary: MySQL - Test suite
+Group: Applications/Databases
+Provides: mysql-test
+Obsoletes: mysql-bench mysql-test
+AutoReqProv: no
-%package test
-Requires: %{name}-client perl
-Summary: MySQL - Test suite
-Group: Applications/Databases
-Provides: mysql-test
-Obsoletes: mysql-bench mysql-test
-AutoReqProv: no
-
-%description test
+%description -n MySQL-test%{product_suffix}
This package contains the MySQL regression test suite.
-%{see_base}
-
-# ------------------------------------------------------------------------------
-
-%package devel
-Summary: MySQL - Development header files and libraries
-Group: Applications/Databases
-Provides: mysql-devel
-Obsoletes: mysql-devel
+For a description of MySQL see the base MySQL RPM or http://www.mysql.com/
-%description devel
-This package contains the development header files and libraries
-necessary to develop MySQL client applications.
+# ----------------------------------------------------------------------------
+%package -n MySQL-devel%{product_suffix}
+Summary: MySQL - Development header files and libraries
+Group: Applications/Databases
+Provides: mysql-devel
+Obsoletes: mysql-devel
-%{see_base}
+%description -n MySQL-devel%{product_suffix}
+This package contains the development header files and libraries necessary
+to develop MySQL client applications.
-# ------------------------------------------------------------------------------
+For a description of MySQL see the base MySQL RPM or http://www.mysql.com/
-%package shared
-Summary: MySQL - Shared libraries
-Group: Applications/Databases
+# ----------------------------------------------------------------------------
+%package -n MySQL-shared%{product_suffix}
+Summary: MySQL - Shared libraries
+Group: Applications/Databases
-%description shared
-This package contains the shared libraries (*.so*) which certain
-languages and applications need to dynamically load and use MySQL.
+%description -n MySQL-shared%{product_suffix}
+This package contains the shared libraries (*.so*) which certain languages
+and applications need to dynamically load and use MySQL.
-# ------------------------------------------------------------------------------
+# ----------------------------------------------------------------------------
+%package -n MySQL-embedded%{product_suffix}
+Summary: MySQL - embedded library
+Group: Applications/Databases
+Requires: MySQL-devel%{product_suffix}
+Obsoletes: mysql-embedded
-%if %{EMBEDDED_BUILD}
-
-%package embedded
-Requires: %{name}-devel
-Summary: MySQL - embedded library
-Group: Applications/Databases
-Obsoletes: mysql-embedded
-
-%description embedded
+%description -n MySQL-embedded%{product_suffix}
This package contains the MySQL server as an embedded library.
-The embedded MySQL server library makes it possible to run a
-full-featured MySQL server inside the client application.
-The main benefits are increased speed and more simple management
-for embedded applications.
+The embedded MySQL server library makes it possible to run a full-featured
+MySQL server inside the client application. The main benefits are increased
+speed and more simple management for embedded applications.
The API is identical for the embedded MySQL version and the
client/server version.
-%{see_base}
+For a description of MySQL see the base MySQL RPM or http://www.mysql.com/
-%endif
-
-##############################################################################
-#
##############################################################################
-
%prep
-# We unpack the source two times, for 'debug' and 'release' build.
-%setup -T -a 0 -c -n mysql-%{mysql_version}
-mv mysql-%{mysql_version} mysql-debug-%{mysql_version}
-%setup -D -T -a 0 -n mysql-%{mysql_version}
-mv mysql-%{mysql_version} mysql-release-%{mysql_version}
+%setup -T -a 0 -c -n %{src_dir}
##############################################################################
-# The actual build
-##############################################################################
-
%build
-BuildMySQL() {
-# Let "MYSQL_BUILD_*FLAGS" take precedence.
-CFLAGS=${MYSQL_BUILD_CFLAGS:-$CFLAGS}
-CXXFLAGS=${MYSQL_BUILD_CXXFLAGS:-$CXXFLAGS}
-LDFLAGS=${MYSQL_BUILD_LDFLAGS:-$LDFLAGS}
-# Fall back on RPM_OPT_FLAGS (part of RPM environment) if no flags are given.
-CFLAGS=${CFLAGS:-$RPM_OPT_FLAGS}
-CXXFLAGS=${CXXFLAGS:-$RPM_OPT_FLAGS -felide-constructors -fno-exceptions -fno-rtti }
-# Evaluate current setting of $DEBUG
-if [ $DEBUG -gt 0 ] ; then
- OPT_COMMENT='--with-comment="%{debug_comment}"'
- OPT_DEBUG='--with-debug'
- CFLAGS=`echo " $CFLAGS " | \
- sed -e 's/ -O[0-9]* / /' -e 's/ -unroll2 / /' -e 's/ -ip / /' \
- -e 's/^ //' -e 's/ $//'`
- CXXFLAGS=`echo " $CXXFLAGS " | \
- sed -e 's/ -O[0-9]* / /' -e 's/ -unroll2 / /' -e 's/ -ip / /' \
- -e 's/^ //' -e 's/ $//'`
-else
- OPT_COMMENT='--with-comment="%{ndbug_comment}"'
- OPT_DEBUG=''
-fi
-# The --enable-assembler simply does nothing on systems that does not
-# support assembler speedups.
-sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \
- CC=\"${MYSQL_BUILD_CC:-$CC}\" \
- CXX=\"${MYSQL_BUILD_CXX:-$CXX}\" \
- CFLAGS=\"$CFLAGS\" \
- CXXFLAGS=\"$CXXFLAGS\" \
- LDFLAGS=\"$LDFLAGS\" \
- ./configure \
- $* \
- --with-mysqld-ldflags='-static' \
- --with-client-ldflags='-static' \
- --enable-assembler \
- --enable-local-infile \
- --with-fast-mutexes \
- --with-mysqld-user=%{mysqld_user} \
- --with-unix-socket-path=/var/lib/mysql/mysql.sock \
- --with-pic \
- --prefix=/ \
-%if %{CLUSTER_BUILD}
- --with-extra-charsets=all \
-%else
- --with-extra-charsets=complex \
-%endif
-%if %{YASSL_BUILD}
- --with-ssl \
-%else
- --without-ssl \
-%endif
- --exec-prefix=%{_exec_prefix} \
- --libexecdir=%{_sbindir} \
- --libdir=%{_libdir} \
- --sysconfdir=%{_sysconfdir} \
- --datadir=%{_datadir} \
- --localstatedir=%{mysqldatadir} \
- --infodir=%{_infodir} \
- --includedir=%{_includedir} \
- --mandir=%{_mandir} \
- --enable-thread-safe-client \
- $OPT_COMMENT \
- $OPT_DEBUG \
- --with-readline \
-%if %{WITH_BUNDLED_ZLIB}
- --with-zlib-dir=bundled \
-%endif
-%if %{CLUSTER_BUILD}
- --with-plugin-ndbcluster \
-%else
- --without-plugin-ndbcluster \
-%endif
-%if %{INNODB_BUILD}
- --with-plugin-innobase \
-%else
- --without-plugin-innobase \
-%endif
-%if %{PARTITION_BUILD}
- --with-plugin-partition \
-%else
- --without-plugin-partition \
-%endif
- --with-plugin-csv \
- --with-plugin-archive \
- --with-plugin-blackhole \
- --with-plugin-federated \
- --with-perfschema \
- --without-plugin-daemon_example \
- --without-plugin-ftexample \
-%if %{EMBEDDED_BUILD}
- --with-embedded-server \
-%else
- --without-embedded-server \
-%endif
- --with-big-tables \
- --enable-shared \
- "
- make
-}
-# end of function definition "BuildMySQL"
-
-# Use our own copy of glibc
-
-OTHER_LIBC_DIR=/usr/local/mysql-glibc
-USE_OTHER_LIBC_DIR=""
-if test -d "$OTHER_LIBC_DIR"
-then
- USE_OTHER_LIBC_DIR="--with-other-libc=$OTHER_LIBC_DIR"
-fi
+# Be strict about variables, bail at earliest opportunity, etc.
+set -eu
-# Use the build root for temporary storage of the shared libraries.
-
-RBR=$RPM_BUILD_ROOT
-
-# Clean up the BuildRoot first
-[ "$RBR" != "/" ] && [ -d $RBR ] && rm -rf $RBR;
-mkdir -p $RBR%{_libdir}/mysql
+# Optional package files
+touch optional-files-devel
#
-# Use MYSQL_BUILD_PATH so that we can use a dedicated version of gcc
+# Set environment in order of preference, MYSQL_BUILD_* first, then variable
+# name, finally a default. RPM_OPT_FLAGS is assumed to be a part of the
+# default RPM build environment.
+#
+# We set CXX=gcc by default to support so-called 'generic' binaries, where we
+# do not have a dependancy on libgcc/libstdc++. This only works while we do
+# not require C++ features such as exceptions, and may need to be removed at
+# a later date.
#
-PATH=${MYSQL_BUILD_PATH:-/bin:/usr/bin}
-export PATH
-
-# Build the Debug binary.
-# Use gcc for C and C++ code (to avoid a dependency on libstdc++ and
-# including exceptions into the code
-if [ -z "$CXX" -a -z "$CC" ] ; then
- export CC="gcc" CXX="gcc"
-fi
+# This is a hack, $RPM_OPT_FLAGS on ia64 hosts contains flags which break
+# the compile in cmd-line-utils/readline - needs investigation, but for now
+# we simply unset it and use those specified directly in cmake.
+%if "%{_arch}" == "ia64"
+RPM_OPT_FLAGS=
+%endif
+export PATH=${MYSQL_BUILD_PATH:-$PATH}
+export CC=${MYSQL_BUILD_CC:-${CC:-gcc}}
+export CXX=${MYSQL_BUILD_CXX:-${CXX:-gcc}}
+export CFLAGS=${MYSQL_BUILD_CFLAGS:-${CFLAGS:-$RPM_OPT_FLAGS}}
+export CXXFLAGS=${MYSQL_BUILD_CXXFLAGS:-${CXXFLAGS:-$RPM_OPT_FLAGS -felide-constructors -fno-exceptions -fno-rtti}}
+export LDFLAGS=${MYSQL_BUILD_LDFLAGS:-${LDFLAGS:-}}
+export CMAKE=${MYSQL_BUILD_CMAKE:-${CMAKE:-cmake}}
-##############################################################################
-#
-# Build the debug version
-#
-##############################################################################
-
+# Build debug mysqld and libmysqld.a
+mkdir debug
(
-# We are in a subshell, so we can modify variables just for one run.
-
-# Add -g and --with-debug.
-DEBUG=1
-cd mysql-debug-%{mysql_version} &&
-CFLAGS="$CFLAGS" \
-CXXFLAGS="$CXXFLAGS" \
-BuildMySQL
+ cd debug
+ # Attempt to remove any optimisation flags from the debug build
+ CFLAGS=`echo " ${CFLAGS} " | \
+ sed -e 's/ -O[0-9]* / /' \
+ -e 's/ -unroll2 / /' \
+ -e 's/ -ip / /' \
+ -e 's/^ //' \
+ -e 's/ $//'`
+ CXXFLAGS=`echo " ${CXXFLAGS} " | \
+ sed -e 's/ -O[0-9]* / /' \
+ -e 's/ -unroll2 / /' \
+ -e 's/ -ip / /' \
+ -e 's/^ //' \
+ -e 's/ $//'`
+ # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before
+ # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM
+ ${CMAKE} ../%{src_dir} -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \
+ -DCMAKE_BUILD_TYPE=Debug \
+ -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \
+ -DFEATURE_SET="%{feature_set}" \
+ -DCOMPILATION_COMMENT="%{compilation_comment_debug}" \
+ -DMYSQL_SERVER_SUFFIX="%{server_suffix}"
+ make VERBOSE=1
)
-
-# We might want to save the config log file
-if test -n "$MYSQL_DEBUGCONFLOG_DEST"
-then
- cp -fp mysql-debug-%{mysql_version}/config.log "$MYSQL_DEBUGCONFLOG_DEST"
-fi
-
-(cd mysql-debug-%{mysql_version} ; make test-bt-debug)
-
-##############################################################################
-#
-# Build the release binary
-#
-##############################################################################
-
-DEBUG=0
-(cd mysql-release-%{mysql_version} &&
-CFLAGS="$CFLAGS" \
-CXXFLAGS="$CXXFLAGS" \
-BuildMySQL
+# Build full release
+mkdir release
+(
+ cd release
+ # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before
+ # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM
+ ${CMAKE} ../%{src_dir} -DBUILD_CONFIG=mysql_release -DINSTALL_LAYOUT=RPM \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \
+ -DFEATURE_SET="%{feature_set}" \
+ -DCOMPILATION_COMMENT="%{compilation_comment_release}" \
+ -DMYSQL_SERVER_SUFFIX="%{server_suffix}"
+ make VERBOSE=1
)
-# We might want to save the config log file
-if test -n "$MYSQL_CONFLOG_DEST"
-then
- cp -fp mysql-release-%{mysql_version}/config.log "$MYSQL_CONFLOG_DEST"
-fi
-(cd mysql-release-%{mysql_version} ; make test-bt)
+# Use the build root for temporary storage of the shared libraries.
+RBR=$RPM_BUILD_ROOT
-##############################################################################
+# Clean up the BuildRoot first
+[ "$RBR" != "/" ] && [ -d "$RBR" ] && rm -rf "$RBR";
-# For gcc builds, include libgcc.a in the devel subpackage (BUG 4921)
-# Some "icc" calls may have "gcc" in the argument string, so we should first
-# check for "icc". (If we don't check, the "--print-libgcc-file" call will fail.)
-if expr "$CC" : ".*icc.*" > /dev/null ;
-then
- %define WITH_LIBGCC 0
- :
-elif expr "$CC" : ".*gcc.*" > /dev/null ;
+# For gcc builds, include libgcc.a in the devel subpackage (BUG 4921). This
+# needs to be during build phase as $CC is not set during install.
+if "$CC" -v 2>&1 | grep '^gcc.version' >/dev/null 2>&1
then
libgcc=`$CC $CFLAGS --print-libgcc-file`
if [ -f $libgcc ]
then
- %define WITH_LIBGCC 1
+ mkdir -p $RBR%{_libdir}/mysql
install -m 644 $libgcc $RBR%{_libdir}/mysql/libmygcc.a
- else
- %define WITH_LIBGCC 0
- :
+ echo "%{_libdir}/mysql/libmygcc.a" >>optional-files-devel
fi
-else
- %define WITH_LIBGCC 0
- :
fi
##############################################################################
-
%install
+
RBR=$RPM_BUILD_ROOT
-MBD=$RPM_BUILD_DIR/mysql-%{mysql_version}/mysql-release-%{mysql_version}
+MBD=$RPM_BUILD_DIR/%{src_dir}
# Ensure that needed directories exists
install -d $RBR%{_sysconfdir}/{logrotate.d,init.d}
install -d $RBR%{mysqldatadir}/mysql
install -d $RBR%{_datadir}/mysql-test
+install -d $RBR%{_datadir}/mysql/SELinux/RHEL4
install -d $RBR%{_includedir}
install -d $RBR%{_libdir}
install -d $RBR%{_mandir}
install -d $RBR%{_sbindir}
-# Get the plugin files from the debug build
-mkdir $RBR/tmp-debug-plugin $MBD/plugin/debug
-( cd $RPM_BUILD_DIR/mysql-%{mysql_version}/mysql-debug-%{mysql_version}/plugin
- make install DESTDIR=$RBR/tmp-debug-plugin
- mv $RBR/tmp-debug-plugin/usr/lib*/mysql/plugin/* $MBD/plugin/debug/
- # From here, the install hook in "plugin/Makefile.am" will do the rest.
-)
-rmdir -p $RBR/tmp-debug-plugin/usr/lib*/mysql/plugin || true
-
# Install all binaries
-(cd $MBD && make install DESTDIR=$RBR testroot=%{_datadir})
-# Old packages put shared libs in %{_libdir}/ (not %{_libdir}/mysql), so do
-# the same here.
-mv $RBR/%{_libdir}/mysql/*.so* $RBR/%{_libdir}/
-
-# install "mysqld-debug"
-$MBD/libtool --mode=execute install -m 755 \
- $RPM_BUILD_DIR/mysql-%{mysql_version}/mysql-debug-%{mysql_version}/sql/mysqld \
- $RBR%{_sbindir}/mysqld-debug
+(
+ cd $MBD/release
+ make DESTDIR=$RBR install
+)
-# install saved perror binary with NDB support (BUG#13740)
-install -m 755 $MBD/extra/perror $RBR%{_bindir}/perror
+# FIXME: at some point we should stop doing this and just install everything
+# FIXME: directly into %{_libdir}/mysql - perhaps at the same time as renaming
+# FIXME: the shared libraries to use libmysql*-$major.$minor.so syntax
+mv -v $RBR/%{_libdir}/*.a $RBR/%{_libdir}/mysql/
# Install logrotate and autostart
-install -m 644 $MBD/support-files/mysql-log-rotate $RBR%{_sysconfdir}/logrotate.d/mysql
-install -m 755 $MBD/support-files/mysql.server $RBR%{_sysconfdir}/init.d/mysql
-
-%if %{EMBEDDED_BUILD}
-# Install embedded server library in the build root
-install -m 644 $MBD/libmysqld/libmysqld.a $RBR%{_libdir}/mysql/
-%endif
-
-# in RPMs, it is unlikely that anybody should use "sql-bench"
-rm -fr $RBR%{_datadir}/sql-bench
+install -m 644 $MBD/release/support-files/mysql-log-rotate $RBR%{_sysconfdir}/logrotate.d/mysql
+install -m 755 $MBD/release/support-files/mysql.server $RBR%{_sysconfdir}/init.d/mysql
# Create a symlink "rcmysql", pointing to the init.script. SuSE users
# will appreciate that, as all services usually offer this.
@@ -605,6 +479,10 @@ ln -s %{_sysconfdir}/init.d/mysql $RBR%{_sbindir}/rcmysql
# Just to make sure it's in the file list and marked as a config file
touch $RBR%{_sysconfdir}/my.cnf
+# Install SELinux files in datadir
+install -m 600 $MBD/%{src_dir}/support-files/RHEL4-SElinux/mysql.{fc,te} \
+ $RBR%{_datadir}/mysql/SELinux/RHEL4
+
%if %{WITH_TCMALLOC}
# Even though this is a shared library, put it under /usr/lib*/mysql, so it
# doesn't conflict with possible shared lib by the same name in /usr/lib*. See
@@ -612,11 +490,15 @@ touch $RBR%{_sysconfdir}/my.cnf
install -m 644 "%{malloc_lib_source}" "$RBR%{_libdir}/mysql/%{malloc_lib_target}"
%endif
+# Remove man pages we explicitly do not want to package, avoids 'unpackaged
+# files' warning.
+rm -f $RBR%{_mandir}/man1/make_win_bin_dist.1*
+
##############################################################################
# Post processing actions, i.e. when installed
##############################################################################
-%pre server
+%pre -n MySQL-server%{product_suffix}
# Check if we can safely upgrade. An upgrade is only safe if it's from one
# of our RPMs in the same version family.
@@ -687,12 +569,12 @@ fi
# Shut down a previously installed server first
if [ -x %{_sysconfdir}/init.d/mysql ] ; then
- %{_sysconfdir}/init.d/mysql stop > /dev/null 2>&1
- echo "Giving mysqld 5 seconds to exit nicely"
- sleep 5
+ %{_sysconfdir}/init.d/mysql stop > /dev/null 2>&1
+ echo "Giving mysqld 5 seconds to exit nicely"
+ sleep 5
fi
-%post server
+%post -n MySQL-server%{product_suffix}
mysql_datadir=%{mysqldatadir}
# ----------------------------------------------------------------------
@@ -707,10 +589,10 @@ if [ ! -d $mysql_datadir/test ] ; then mkdir $mysql_datadir/test; fi
# ----------------------------------------------------------------------
# use insserv for older SuSE Linux versions
if [ -x /sbin/insserv ] ; then
- /sbin/insserv %{_sysconfdir}/init.d/mysql
-# use chkconfig on Red Hat and newer SuSE releases
+ /sbin/insserv %{_sysconfdir}/init.d/mysql
+# use chkconfig on Enterprise Linux and newer SuSE releases
elif [ -x /sbin/chkconfig ] ; then
- /sbin/chkconfig --add mysql
+ /sbin/chkconfig --add mysql
fi
# ----------------------------------------------------------------------
@@ -760,28 +642,20 @@ sleep 2
#scheduled service packs and more. Visit www.mysql.com/enterprise for more
#information."
-%if %{CLUSTER_BUILD}
-%post ndb-storage
-mysql_clusterdir=/var/lib/mysql-cluster
-
-# Create cluster directory if needed
-if test ! -d $mysql_clusterdir; then mkdir -m 755 $mysql_clusterdir; fi
-%endif
-
-%preun server
+%preun -n MySQL-server%{product_suffix}
if [ $1 = 0 ] ; then
- # Stop MySQL before uninstalling it
- if [ -x %{_sysconfdir}/init.d/mysql ] ; then
- %{_sysconfdir}/init.d/mysql stop > /dev/null
- # Remove autostart of MySQL
- # For older SuSE Linux versions
- if [ -x /sbin/insserv ] ; then
- /sbin/insserv -r %{_sysconfdir}/init.d/mysql
- # use chkconfig on Red Hat and newer SuSE releases
- elif [ -x /sbin/chkconfig ] ; then
- /sbin/chkconfig --del mysql
- fi
- fi
+ # Stop MySQL before uninstalling it
+ if [ -x %{_sysconfdir}/init.d/mysql ] ; then
+ %{_sysconfdir}/init.d/mysql stop > /dev/null
+ # Remove autostart of MySQL
+ # For older SuSE Linux versions
+ if [ -x /sbin/insserv ] ; then
+ /sbin/insserv -r %{_sysconfdir}/init.d/mysql
+ # use chkconfig on Enterprise Linux and newer SuSE releases
+ elif [ -x /sbin/chkconfig ] ; then
+ /sbin/chkconfig --del mysql
+ fi
+ fi
fi
# We do not remove the mysql user since it may still own a lot of
@@ -797,20 +671,18 @@ fi
# Files section
##############################################################################
-%files server
+%files -n MySQL-server%{product_suffix}
%defattr(-,root,root,0755)
-%doc mysql-release-%{mysql_version}/COPYING mysql-release-%{mysql_version}/README
-%doc mysql-release-%{mysql_version}/support-files/my-*.cnf
-%if %{CLUSTER_BUILD}
-%doc mysql-release-%{mysql_version}/support-files/ndb-*.ini
+%if %{defined license_files_server}
+%doc %{license_files_server}
%endif
+%doc %{src_dir}/Docs/ChangeLog
+%doc release/support-files/my-*.cnf
%doc %attr(644, root, root) %{_infodir}/mysql.info*
-%if %{INNODB_BUILD}
%doc %attr(644, root, man) %{_mandir}/man1/innochecksum.1*
-%endif
%doc %attr(644, root, man) %{_mandir}/man1/my_print_defaults.1*
%doc %attr(644, root, man) %{_mandir}/man1/myisam_ftdump.1*
%doc %attr(644, root, man) %{_mandir}/man1/myisamchk.1*
@@ -840,9 +712,7 @@ fi
%ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf
-%if %{INNODB_BUILD}
%attr(755, root, root) %{_bindir}/innochecksum
-%endif
%attr(755, root, root) %{_bindir}/my_print_defaults
%attr(755, root, root) %{_bindir}/myisam_ftdump
%attr(755, root, root) %{_bindir}/myisamchk
@@ -867,17 +737,19 @@ fi
%attr(755, root, root) %{_bindir}/resolve_stack_dump
%attr(755, root, root) %{_bindir}/resolveip
-%if %{WITH_TCMALLOC}
-%attr(755, root, root) %{_libdir}/mysql/%{malloc_lib_target}
-%endif
-
%attr(755, root, root) %{_sbindir}/mysqld
%attr(755, root, root) %{_sbindir}/mysqld-debug
%attr(755, root, root) %{_sbindir}/rcmysql
-%attr(755, root, root) %{_libdir}/mysql/plugin/semisync_master.so*
-%attr(755, root, root) %{_libdir}/mysql/plugin/semisync_slave.so*
-%attr(755, root, root) %{_libdir}/mysql/plugin/debug/semisync_master.so*
-%attr(755, root, root) %{_libdir}/mysql/plugin/debug/semisync_slave.so*
+%attr(755, root, root) %{_libdir}/mysql/plugin/audit_null.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/daemon_example.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/mypluglib.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/semisync_master.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/semisync_slave.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/debug/audit_null.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/debug/daemon_example.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/debug/mypluglib.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/debug/semisync_master.so
+%attr(755, root, root) %{_libdir}/mysql/plugin/debug/semisync_slave.so
%if %{WITH_TCMALLOC}
%attr(755, root, root) %{_libdir}/mysql/%{malloc_lib_target}
@@ -888,13 +760,17 @@ fi
%attr(755, root, root) %{_datadir}/mysql/
-%files client
+# ----------------------------------------------------------------------------
+%files -n MySQL-client%{product_suffix}
+
%defattr(-, root, root, 0755)
%attr(755, root, root) %{_bindir}/msql2mysql
%attr(755, root, root) %{_bindir}/mysql
%attr(755, root, root) %{_bindir}/mysql_find_rows
%attr(755, root, root) %{_bindir}/mysql_waitpid
%attr(755, root, root) %{_bindir}/mysqlaccess
+# XXX: This should be moved to %{_sysconfdir}
+%attr(644, root, root) %{_bindir}/mysqlaccess.conf
%attr(755, root, root) %{_bindir}/mysqladmin
%attr(755, root, root) %{_bindir}/mysqlbinlog
%attr(755, root, root) %{_bindir}/mysqlcheck
@@ -916,68 +792,12 @@ fi
%doc %attr(644, root, man) %{_mandir}/man1/mysqlshow.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqlslap.1*
-%post shared
-/sbin/ldconfig
-
-%postun shared
-/sbin/ldconfig
-
-%if %{CLUSTER_BUILD}
-%files ndb-storage
-%defattr(-,root,root,0755)
-%attr(755, root, root) %{_sbindir}/ndbd
-%doc %attr(644, root, man) %{_mandir}/man8/ndbd.8*
-
-%files ndb-management
-%defattr(-,root,root,0755)
-%attr(755, root, root) %{_sbindir}/ndb_mgmd
-%doc %attr(644, root, man) %{_mandir}/man8/ndb_mgmd.8*
-
-%files ndb-tools
-%defattr(-,root,root,0755)
-%attr(755, root, root) %{_bindir}/ndb_config
-%attr(755, root, root) %{_bindir}/ndb_desc
-%attr(755, root, root) %{_bindir}/ndb_error_reporter
-%attr(755, root, root) %{_bindir}/ndb_mgm
-%attr(755, root, root) %{_bindir}/ndb_print_backup_file
-%attr(755, root, root) %{_bindir}/ndb_print_schema_file
-%attr(755, root, root) %{_bindir}/ndb_print_sys_file
-%attr(755, root, root) %{_bindir}/ndb_restore
-%attr(755, root, root) %{_bindir}/ndb_select_all
-%attr(755, root, root) %{_bindir}/ndb_select_count
-%attr(755, root, root) %{_bindir}/ndb_show_tables
-%attr(755, root, root) %{_bindir}/ndb_size.pl
-%attr(755, root, root) %{_bindir}/ndb_test_platform
-%attr(755, root, root) %{_bindir}/ndb_waiter
-%doc %attr(644, root, man) %{_mandir}/man1/ndb_config.1*
-%doc %attr(644, root, man) %{_mandir}/man1/ndb_desc.1*
-%doc %attr(644, root, man) %{_mandir}/man1/ndb_error_reporter.1*
-%doc %attr(644, root, man) %{_mandir}/man1/ndb_mgm.1*
-%doc %attr(644, root, man) %{_mandir}/man1/ndb_restore.1*
-%doc %attr(644, root, man) %{_mandir}/man1/ndb_print_backup_file.1*
-%doc %attr(644, root, man) %{_mandir}/man1/ndb_print_schema_file.1*
-%doc %attr(644, root, man) %{_mandir}/man1/ndb_print_sys_file.1*
-%doc %attr(644, root, man) %{_mandir}/man1/ndb_select_all.1*
-%doc %attr(644, root, man) %{_mandir}/man1/ndb_select_count.1*
-%doc %attr(644, root, man) %{_mandir}/man1/ndb_show_tables.1*
-%doc %attr(644, root, man) %{_mandir}/man1/ndb_size.pl.1*
-%doc %attr(644, root, man) %{_mandir}/man1/ndb_waiter.1*
-
-%files ndb-extra
-%defattr(-,root,root,0755)
-%attr(755, root, root) %{_bindir}/ndb_delete_all
-%attr(755, root, root) %{_bindir}/ndb_drop_index
-%attr(755, root, root) %{_bindir}/ndb_drop_table
-%attr(755, root, root) %{_sbindir}/ndb_cpcd
-%doc %attr(644, root, man) %{_mandir}/man1/ndb_delete_all.1*
-%doc %attr(644, root, man) %{_mandir}/man1/ndb_drop_index.1*
-%doc %attr(644, root, man) %{_mandir}/man1/ndb_drop_table.1*
-%doc %attr(644, root, man) %{_mandir}/man1/ndb_cpcd.1*
-%endif
-
-%files devel
+# ----------------------------------------------------------------------------
+%files -n MySQL-devel%{product_suffix} -f optional-files-devel
%defattr(-, root, root, 0755)
-%doc mysql-release-%{mysql_version}/EXCEPTIONS-CLIENT
+%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
@@ -985,63 +805,40 @@ fi
%dir %attr(755, root, root) %{_libdir}/mysql
%{_includedir}/mysql/*
%{_datadir}/aclocal/mysql.m4
-%{_libdir}/mysql/libdbug.a
-%{_libdir}/mysql/libheap.a
-%if %{WITH_LIBGCC}
-%{_libdir}/mysql/libmygcc.a
-%endif
-%{_libdir}/mysql/libmyisam.a
-%{_libdir}/mysql/libmyisammrg.a
%{_libdir}/mysql/libmysqlclient.a
-%{_libdir}/mysql/libmysqlclient.la
%{_libdir}/mysql/libmysqlclient_r.a
-%{_libdir}/mysql/libmysqlclient_r.la
%{_libdir}/mysql/libmysqlservices.a
-%{_libdir}/mysql/libmystrings.a
-%{_libdir}/mysql/libmysys.a
-%if %{CLUSTER_BUILD}
-%{_libdir}/mysql/libndbclient.a
-%{_libdir}/mysql/libndbclient.la
-%endif
-%{_libdir}/mysql/libvio.a
-%{_libdir}/mysql/libz.a
-%{_libdir}/mysql/libz.la
-%{_libdir}/mysql/plugin/semisync_master.a
-%{_libdir}/mysql/plugin/semisync_master.la
-%{_libdir}/mysql/plugin/semisync_slave.a
-%{_libdir}/mysql/plugin/semisync_slave.la
-%{_libdir}/mysql/plugin/debug/semisync_master.a
-%{_libdir}/mysql/plugin/debug/semisync_master.la
-%{_libdir}/mysql/plugin/debug/semisync_slave.a
-%{_libdir}/mysql/plugin/debug/semisync_slave.la
-
-%files shared
+
+# ----------------------------------------------------------------------------
+%files -n MySQL-shared%{product_suffix}
%defattr(-, root, root, 0755)
# Shared libraries (omit for architectures that don't support them)
%{_libdir}/libmysql*.so*
-%if %{CLUSTER_BUILD}
-%{_libdir}/libndb*.so*
-%endif
-%files test
+%post -n MySQL-shared%{product_suffix}
+/sbin/ldconfig
+
+%postun -n MySQL-shared%{product_suffix}
+/sbin/ldconfig
+
+# ----------------------------------------------------------------------------
+%files -n MySQL-test%{product_suffix}
%defattr(-, root, root, 0755)
%attr(-, root, root) %{_datadir}/mysql-test
%attr(755, root, root) %{_bindir}/mysql_client_test
+%attr(755, root, root) %{_bindir}/mysql_client_test_embedded
+%attr(755, root, root) %{_bindir}/mysqltest_embedded
%doc %attr(644, root, man) %{_mandir}/man1/mysql_client_test.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysql-stress-test.pl.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysql-test-run.pl.1*
-%if %{EMBEDDED_BUILD}
-%attr(755, root, root) %{_bindir}/mysql_client_test_embedded
-%attr(755, root, root) %{_bindir}/mysqltest_embedded
%doc %attr(644, root, man) %{_mandir}/man1/mysql_client_test_embedded.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqltest_embedded.1*
-%endif
-%if %{EMBEDDED_BUILD}
-%files embedded
+# ----------------------------------------------------------------------------
+%files -n MySQL-embedded%{product_suffix}
%defattr(-, root, root, 0755)
%attr(644, root, root) %{_libdir}/mysql/libmysqld.a
-%endif
+%attr(644, root, root) %{_libdir}/mysql/libmysqld-debug.a
##############################################################################
# The spec file changelog only includes changes made to the spec file
@@ -1049,6 +846,16 @@ fi
# merging BK trees)
##############################################################################
%changelog
+* Wed May 12 2010 Jonathan Perkin <jonathan.perkin@oracle.com>
+
+- Large number of changes to build using CMake
+- Introduce distribution-specific RPMs
+- Drop debuginfo, build all binaries with debug/symbols
+- Remove __os_install_post, use native macro
+- Remove _unpackaged_files_terminate_build, make it an error to have
+ unpackaged files
+- Remove cluster RPMs
+
* Wed Mar 24 2010 Joerg Bruehe <joerg.bruehe@sun.com>
- Add "--with-perfschema" to the configure options.
@@ -1658,7 +1465,7 @@ fi
- Reworked the build steps a little bit: the Max binary is supposed
to include OpenSSL, which cannot be linked statically, thus trying
- to statically link against a special glibc is futile anyway
+ to statically link against a special glibc is futile anyway
- because of this, it is not required to make yet another build run
just to compile the shared libs (saves a lot of time)
- updated package description of the Max subpackage
@@ -1669,7 +1476,7 @@ fi
- Updated Packager information
- Fixed the build options: the regular package is supposed to
include InnoDB and linked statically, while the Max package
- should include BDB and SSL support
+ should include BDB and SSL support
* Fri May 03 2002 Lenz Grimmer <lenz@mysql.com>
diff --git a/tests/Makefile.am b/tests/Makefile.am
index ddc6da86e1c..ca4a2a4e986 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -60,6 +60,3 @@ DEFS = -DMYSQL_CLIENT_NO_THREADS
thread_test.o: thread_test.c
$(COMPILE) -c $(INCLUDES) $<
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/unittest/Makefile.am b/unittest/Makefile.am
index 65fa615fb98..6197586b008 100644
--- a/unittest/Makefile.am
+++ b/unittest/Makefile.am
@@ -25,6 +25,3 @@ test:
test-verbose:
HARNESS_VERBOSE=1 perl unit.pl run $(unittests)
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/unittest/examples/Makefile.am b/unittest/examples/Makefile.am
index 94032c00928..cfb22e678d4 100644
--- a/unittest/examples/Makefile.am
+++ b/unittest/examples/Makefile.am
@@ -21,6 +21,3 @@ AM_LDFLAGS = -L$(top_builddir)/unittest/mytap
LDADD = -lmytap
noinst_PROGRAMS = simple-t skip-t todo-t skip_all-t no_plan-t core-t
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/unittest/mytap/t/Makefile.am b/unittest/mytap/t/Makefile.am
index e89a088bb3a..bce72a88c05 100644
--- a/unittest/mytap/t/Makefile.am
+++ b/unittest/mytap/t/Makefile.am
@@ -20,6 +20,3 @@ AM_LDFLAGS = -L$(top_builddir)/unittest/mytap
LDADD = -lmytap
noinst_PROGRAMS = basic-t
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/vio/Makefile.am b/vio/Makefile.am
index 27596bb2fa4..c70af1008cd 100644
--- a/vio/Makefile.am
+++ b/vio/Makefile.am
@@ -23,6 +23,3 @@ noinst_HEADERS = vio_priv.h
libvio_a_SOURCES = vio.c viosocket.c viossl.c viosslfactories.c
EXTRA_DIST= CMakeLists.txt
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/win/Makefile.am b/win/Makefile.am
index e5813010740..5b71b7342a9 100644
--- a/win/Makefile.am
+++ b/win/Makefile.am
@@ -17,6 +17,3 @@
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
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%
diff --git a/zlib/Makefile.am b/zlib/Makefile.am
index edcbd5f4a75..277f6445a85 100644
--- a/zlib/Makefile.am
+++ b/zlib/Makefile.am
@@ -33,6 +33,3 @@ libz_la_SOURCES = adler32.c compress.c crc32.c deflate.c gzio.c \
libzlt_la_SOURCES = $(libz_la_SOURCES)
EXTRA_DIST= README FAQ INDEX ChangeLog algorithm.txt zlib.3 CMakeLists.txt
-
-# Don't update the files from bitkeeper
-%::SCCS/s.%