summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@sun.com>2010-05-18 14:52:51 +0200
committerJon Olav Hauglid <jon.hauglid@sun.com>2010-05-18 14:52:51 +0200
commit198d51efe7a7bcd9ffceb2953faccc39d6df55d6 (patch)
tree7a7d548b20b27bd6b1cdb29f4052ffd1b406f39b
parentd1dd2d11c4207b8e75931b9c575ea51273185b4b (diff)
parent21643fb22e527f4328b1dde1d21193b5e80455e3 (diff)
downloadmariadb-git-198d51efe7a7bcd9ffceb2953faccc39d6df55d6.tar.gz
manual merge from mysql-trunk-bugfixing
-rwxr-xr-xCMakeLists.txt45
-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--config.h.cmake1
-rwxr-xr-xlibmysql/CMakeLists.txt34
-rw-r--r--libmysqld/CMakeLists.txt2
-rw-r--r--libmysqld/examples/CMakeLists.txt4
-rw-r--r--man/CMakeLists.txt4
-rw-r--r--mysql-test/CMakeLists.txt1
-rw-r--r--mysql-test/collections/default.experimental2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test14
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_tabledefs.test10
-rw-r--r--mysql-test/include/ctype_numconv.inc2
-rw-r--r--mysql-test/include/mysqld--help.inc2
-rw-r--r--mysql-test/include/show_slave_status.inc2
-rw-r--r--mysql-test/include/show_slave_status2.inc2
-rw-r--r--mysql-test/include/test_fieldsize.inc2
-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/sp.result4
-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/r/rpl_000015.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_bug33931.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_change_master.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_deadlock_innodb.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result7
-rw-r--r--mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result7
-rw-r--r--mysql-test/suite/rpl/r/rpl_flushlog_loop.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_grant.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_heartbeat.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_incident.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_known_bugs_detection.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_loaddata_fatal.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_log_pos.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_replicate_do.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_rotate_logs.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_colSize.result13
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_log.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_log_innodb.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_max_relay_size.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_reset_slave.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result5
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_until.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_show_master_info_file.result9
-rw-r--r--mysql-test/suite/rpl/r/rpl_skip_error.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_slave_skip.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_ssl.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_ssl1.result3
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_log.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_reset_slave.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_until.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporary_errors.result1
-rw-r--r--mysql-test/suite/rpl/t/disabled.def1
-rw-r--r--mysql-test/suite/rpl/t/rpl_bug33931.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_flushlog_loop.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_incident.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_known_bugs_detection.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_replicate_do.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_until.test8
-rw-r--r--mysql-test/suite/rpl/t/rpl_show_master_info_file-master.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_show_master_info_file.test18
-rw-r--r--mysql-test/suite/rpl/t/rpl_slave_skip.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_ssl.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_ssl1.test6
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result1
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result2
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result2
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result94
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result1
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result1
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test2
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test4
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test4
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test10
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test2
-rw-r--r--mysql-test/t/parser_stack.test8
-rw-r--r--plugin/audit_null/CMakeLists.txt2
-rw-r--r--plugin/fulltext/CMakeLists.txt4
-rwxr-xr-xscripts/CMakeLists.txt12
-rw-r--r--scripts/mysqld_safe.sh4
-rw-r--r--sql-bench/CMakeLists.txt9
-rwxr-xr-xsql/CMakeLists.txt3
-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/rpl_mi.cc22
-rw-r--r--sql/rpl_mi.h1
-rw-r--r--sql/slave.cc4
-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.h27
-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--support-files/CMakeLists.txt14
-rw-r--r--support-files/mysql.spec.sh1021
116 files changed, 1436 insertions, 960 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b0beea6f42..536fae9f4b1 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)
@@ -275,20 +278,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/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/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/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/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/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/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/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/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/extra/rpl_tests/rpl_extraMaster_Col.test b/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
index c426ac1fae8..3f7a0f84fac 100644
--- a/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
+++ b/mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
@@ -149,7 +149,7 @@ SELECT * FROM t1 ORDER BY f3 LIMIT 20;
--echo
--echo * Show Slave Status *
--echo
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
--query_vertical show slave status;
--echo
@@ -439,7 +439,7 @@ connection master;
select * from t31;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
--query_vertical show slave status;
#### Clean Up ####
@@ -499,7 +499,7 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -556,7 +556,7 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -699,7 +699,7 @@ SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1;
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
--query_vertical SHOW SLAVE STATUS
#***************************
@@ -765,7 +765,7 @@ SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1;
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
--query_vertical SHOW SLAVE STATUS
STOP SLAVE;
RESET SLAVE;
@@ -842,7 +842,7 @@ SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1;
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
--query_vertical SHOW SLAVE STATUS
STOP SLAVE;
RESET SLAVE;
diff --git a/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test b/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
index 083088f12ff..7d9ac07a6b7 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
@@ -139,7 +139,7 @@ sync_slave_with_master;
--echo **** On Slave ****
SELECT * FROM t2;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
+--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error> 41 <Master-Info-File>
--query_vertical SHOW SLAVE STATUS
connection master;
@@ -151,7 +151,7 @@ INSERT INTO t4 VALUES (4);
connection slave;
--source include/wait_for_slave_sql_to_stop.inc
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
+--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error> 41 <Master-Info-File>
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -165,7 +165,7 @@ INSERT INTO t5 VALUES (5,10,25);
connection slave;
--source include/wait_for_slave_sql_to_stop.inc
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
+--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error> 41 <Master-Info-File>
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -179,7 +179,7 @@ INSERT INTO t6 VALUES (6,12,36);
connection slave;
--source include/wait_for_slave_sql_to_stop.inc
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
+--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error> 41 <Master-Info-File>
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -188,7 +188,7 @@ connection master;
INSERT INTO t9 VALUES (6);
sync_slave_with_master;
--replace_result $SLAVE_MYPORT SLAVE_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
+--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error> 41 <Master-Info-File>
--query_vertical SHOW SLAVE STATUS
# Testing some tables extra field that can be null and cannot be null
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/include/show_slave_status.inc b/mysql-test/include/show_slave_status.inc
index b315b9e45ca..9f51b8bcea1 100644
--- a/mysql-test/include/show_slave_status.inc
+++ b/mysql-test/include/show_slave_status.inc
@@ -2,5 +2,5 @@
# that varies depending on where the test is executed.
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 8 # 9 # 16 # 23 # 33 # 35 # 36 # 41 #
query_vertical SHOW SLAVE STATUS;
diff --git a/mysql-test/include/show_slave_status2.inc b/mysql-test/include/show_slave_status2.inc
index 7e970b31d8e..e078b19be12 100644
--- a/mysql-test/include/show_slave_status2.inc
+++ b/mysql-test/include/show_slave_status2.inc
@@ -4,5 +4,5 @@
# masked out log positions
--replace_result $MASTER_MYPORT MASTER_PORT $DEFAULT_MASTER_PORT 3306
---replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 # 41 #
query_vertical SHOW SLAVE STATUS;
diff --git a/mysql-test/include/test_fieldsize.inc b/mysql-test/include/test_fieldsize.inc
index 606bc63779d..ec7b705396d 100644
--- a/mysql-test/include/test_fieldsize.inc
+++ b/mysql-test/include/test_fieldsize.inc
@@ -24,7 +24,7 @@ connection slave;
START SLAVE;
--source include/wait_for_slave_sql_to_stop.inc
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 # 41 #
--query_vertical SHOW SLAVE STATUS
# The following should be 0
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 533dfa4db34..324848be835 100644
--- a/mysql-test/r/ctype_ucs.result
+++ b/mysql-test/r/ctype_ucs.result
@@ -2006,6 +2006,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/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/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/r/rpl_000015.result b/mysql-test/suite/rpl/r/rpl_000015.result
index 1b1249bc979..007279da96a 100644
--- a/mysql-test/suite/rpl/r/rpl_000015.result
+++ b/mysql-test/suite/rpl/r/rpl_000015.result
@@ -47,6 +47,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 0
+Master_Info_File #
start slave;
SHOW SLAVE STATUS;
Slave_IO_State #
@@ -89,6 +90,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
drop table if exists t1;
create table t1 (n int, PRIMARY KEY(n));
insert into t1 values (10),(45),(90);
diff --git a/mysql-test/suite/rpl/r/rpl_bug33931.result b/mysql-test/suite/rpl/r/rpl_bug33931.result
index 256238d35cd..2978881a72a 100644
--- a/mysql-test/suite/rpl/r/rpl_bug33931.result
+++ b/mysql-test/suite/rpl/r/rpl_bug33931.result
@@ -44,4 +44,5 @@ Last_SQL_Errno #
Last_SQL_Error Failed during slave thread initialization
Replicate_Ignore_Server_Ids
Master_Server_Id 0
+Master_Info_File #
SET GLOBAL debug="";
diff --git a/mysql-test/suite/rpl/r/rpl_change_master.result b/mysql-test/suite/rpl/r/rpl_change_master.result
index a51ba50475b..f2a4a94a88a 100644
--- a/mysql-test/suite/rpl/r/rpl_change_master.result
+++ b/mysql-test/suite/rpl/r/rpl_change_master.result
@@ -52,6 +52,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
change master to master_user='root';
SHOW SLAVE STATUS;
Slave_IO_State #
@@ -94,6 +95,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
start slave;
select * from t1;
n
diff --git a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result
index 25c31675b53..e8dec72a828 100644
--- a/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_deadlock_innodb.result
@@ -91,6 +91,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
*** Test lock wait timeout ***
include/stop_slave.inc
@@ -155,6 +156,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
*** Test lock wait timeout and purged relay logs ***
SET @my_max_relay_log_size= @@global.max_relay_log_size;
@@ -224,6 +226,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
*** Clean up ***
DROP TABLE t1,t2,t3;
diff --git a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result b/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
index 6399e384d72..5931be18fb9 100644
--- a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
@@ -134,6 +134,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
***** Testing Altering table def scenario *****
@@ -512,6 +513,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
****************************************
* columns in master at middle of table *
@@ -588,6 +590,7 @@ Last_SQL_Errno 1677
Last_SQL_Error Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -665,6 +668,7 @@ Last_SQL_Errno 1677
Last_SQL_Error Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -818,6 +822,7 @@ Last_SQL_Errno 1091
Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
STOP SLAVE;
RESET SLAVE;
@@ -906,6 +911,7 @@ Last_SQL_Errno 1054
Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
STOP SLAVE;
RESET SLAVE;
@@ -994,6 +1000,7 @@ Last_SQL_Errno 1072
Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
STOP SLAVE;
RESET SLAVE;
diff --git a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result b/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
index f55df71d532..41149899f51 100644
--- a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
@@ -134,6 +134,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
***** Testing Altering table def scenario *****
@@ -512,6 +513,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
****************************************
* columns in master at middle of table *
@@ -588,6 +590,7 @@ Last_SQL_Errno 1677
Last_SQL_Error Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -665,6 +668,7 @@ Last_SQL_Errno 1677
Last_SQL_Error Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
@@ -818,6 +822,7 @@ Last_SQL_Errno 1091
Last_SQL_Error Error 'Can't DROP 'c7'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t14 DROP COLUMN c7'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
STOP SLAVE;
RESET SLAVE;
@@ -906,6 +911,7 @@ Last_SQL_Errno 1054
Last_SQL_Error Error 'Unknown column 'c7' in 't15'' on query. Default database: 'test'. Query: 'ALTER TABLE t15 ADD COLUMN c2 DECIMAL(8,2) AFTER c7'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
STOP SLAVE;
RESET SLAVE;
@@ -994,6 +1000,7 @@ Last_SQL_Errno 1072
Last_SQL_Error Error 'Key column 'c6' doesn't exist in table' on query. Default database: 'test'. Query: 'CREATE INDEX part_of_c6 ON t16 (c6)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
STOP SLAVE;
RESET SLAVE;
diff --git a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result
index 5e74a4eb999..82e295317ce 100644
--- a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result
+++ b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result
@@ -62,3 +62,4 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 2
+Master_Info_File #
diff --git a/mysql-test/suite/rpl/r/rpl_grant.result b/mysql-test/suite/rpl/r/rpl_grant.result
index fc32dcefec7..4612cf9caea 100644
--- a/mysql-test/suite/rpl/r/rpl_grant.result
+++ b/mysql-test/suite/rpl/r/rpl_grant.result
@@ -82,3 +82,4 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat.result b/mysql-test/suite/rpl/r/rpl_heartbeat.result
index 44b3964f632..d91713a97ab 100644
--- a/mysql-test/suite/rpl/r/rpl_heartbeat.result
+++ b/mysql-test/suite/rpl/r/rpl_heartbeat.result
@@ -93,6 +93,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SHOW SLAVE STATUS;
Slave_IO_State #
Master_Host 127.0.0.1
@@ -134,6 +135,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
show status like 'Slave_heartbeat_period';;
Variable_name Slave_heartbeat_period
Value 0.500
diff --git a/mysql-test/suite/rpl/r/rpl_incident.result b/mysql-test/suite/rpl/r/rpl_incident.result
index a9b641b243b..e6834521f2c 100644
--- a/mysql-test/suite/rpl/r/rpl_incident.result
+++ b/mysql-test/suite/rpl/r/rpl_incident.result
@@ -66,6 +66,7 @@ Last_SQL_Errno 1590
Last_SQL_Error The incident LOST_EVENTS occured on the master. Message: <none>
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SELECT * FROM t1;
@@ -115,4 +116,5 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
index cc7cfa144ee..97675038481 100644
--- a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
+++ b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
@@ -52,6 +52,7 @@ Last_SQL_Errno 1105
Last_SQL_Error Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SELECT * FROM t1;
a b
stop slave;
@@ -145,6 +146,7 @@ ON DUPLICATE KEY UPDATE
t1.field_3 = t2.field_c'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SELECT * FROM t1;
id field_1 field_2 field_3
drop table t1, t2;
diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
index 814b83e39f8..ffc8f70f628 100644
--- a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
+++ b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
@@ -47,6 +47,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1;
SHOW SLAVE STATUS;
Slave_IO_State #
@@ -89,6 +90,7 @@ Last_SQL_Errno 1593
Last_SQL_Error Fatal error: Not enough memory
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_log_pos.result b/mysql-test/suite/rpl/r/rpl_log_pos.result
index 4da8b4c3a3c..d09afe1698b 100644
--- a/mysql-test/suite/rpl/r/rpl_log_pos.result
+++ b/mysql-test/suite/rpl/r/rpl_log_pos.result
@@ -51,6 +51,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
start slave;
include/stop_slave.inc
SHOW SLAVE STATUS;
@@ -94,6 +95,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
diff --git a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
index 76db52c05b1..07933581ab8 100644
--- a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
+++ b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result
@@ -61,6 +61,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SHOW BINLOG EVENTS;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
diff --git a/mysql-test/suite/rpl/r/rpl_replicate_do.result b/mysql-test/suite/rpl/r/rpl_replicate_do.result
index 2fbd283a9c8..e77193ffc27 100644
--- a/mysql-test/suite/rpl/r/rpl_replicate_do.result
+++ b/mysql-test/suite/rpl/r/rpl_replicate_do.result
@@ -67,6 +67,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
create table t1 (ts timestamp);
set one_shot time_zone='met';
insert into t1 values('2005-08-12 00:00:00');
diff --git a/mysql-test/suite/rpl/r/rpl_rotate_logs.result b/mysql-test/suite/rpl/r/rpl_rotate_logs.result
index ba269344492..e17c5cdfe3f 100644
--- a/mysql-test/suite/rpl/r/rpl_rotate_logs.result
+++ b/mysql-test/suite/rpl/r/rpl_rotate_logs.result
@@ -55,6 +55,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
select * from t1;
s
Could not break slave
@@ -136,6 +137,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
select * from t2;
m
34
@@ -205,6 +207,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
lock tables t3 read;
select count(*) from t3 where n >= 4;
count(*)
diff --git a/mysql-test/suite/rpl/r/rpl_row_colSize.result b/mysql-test/suite/rpl/r/rpl_row_colSize.result
index 1f2b5800228..9837c7f6265 100644
--- a/mysql-test/suite/rpl/r/rpl_row_colSize.result
+++ b/mysql-test/suite/rpl/r/rpl_row_colSize.result
@@ -59,6 +59,7 @@ Last_SQL_Errno 1677
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'decimal(20,10)' to type 'decimal(5,2)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -115,6 +116,7 @@ Last_SQL_Errno 1677
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'decimal(27,18)' to type 'decimal(27,9)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -171,6 +173,7 @@ Last_SQL_Errno 1677
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'decimal(20,10)' to type 'decimal(5,2)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -228,6 +231,7 @@ Last_SQL_Errno 1677
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'double' to type 'float'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -285,6 +289,7 @@ Last_SQL_Errno 1677
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'bit(64)' to type 'bit(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -341,6 +346,7 @@ Last_SQL_Errno 1677
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'bit(12)' to type 'bit(11)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -398,6 +404,7 @@ Last_SQL_Errno 1677
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'set' to type 'set('4')'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -455,6 +462,7 @@ Last_SQL_Errno 1677
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'char(20)' to type 'char(10)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -543,6 +551,7 @@ Last_SQL_Errno 1677
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'enum' to type 'enum('44','54')'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -600,6 +609,7 @@ Last_SQL_Errno 1677
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'varchar(2000)' to type 'varchar(100)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -656,6 +666,7 @@ Last_SQL_Errno 1677
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'varchar(200)' to type 'varchar(10)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -712,6 +723,7 @@ Last_SQL_Errno 1677
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'varchar(2000)' to type 'varchar(1000)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
@@ -769,6 +781,7 @@ Last_SQL_Errno 1677
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'tinyblob' to type 'tinyblob'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SELECT COUNT(*) FROM t1;
COUNT(*)
0
diff --git a/mysql-test/suite/rpl/r/rpl_row_log.result b/mysql-test/suite/rpl/r/rpl_row_log.result
index 488ebb92a02..1700dc3f9d6 100644
--- a/mysql-test/suite/rpl/r/rpl_row_log.result
+++ b/mysql-test/suite/rpl/r/rpl_row_log.result
@@ -288,6 +288,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result
index 7a1615c0c7f..96730996eda 100644
--- a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result
@@ -288,6 +288,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
index a21bec6ae55..7c49d9dcfa4 100644
--- a/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
+++ b/mysql-test/suite/rpl/r/rpl_row_max_relay_size.result
@@ -64,6 +64,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
#
# Test 2
#
@@ -114,6 +115,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
#
# Test 3: max_relay_log_size = 0
#
@@ -164,6 +166,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
#
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
#
@@ -211,6 +214,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
#
# Test 5
#
@@ -259,6 +263,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
#
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
#
@@ -305,6 +310,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
flush logs;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
diff --git a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result
index 028b73e6153..82e95852830 100644
--- a/mysql-test/suite/rpl/r/rpl_row_reset_slave.result
+++ b/mysql-test/suite/rpl/r/rpl_row_reset_slave.result
@@ -45,6 +45,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
stop slave;
change master to master_user='test';
SHOW SLAVE STATUS;
@@ -88,6 +89,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
reset slave;
SHOW SLAVE STATUS;
Slave_IO_State #
@@ -130,6 +132,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
change master to master_user='root';
start slave;
SHOW SLAVE STATUS;
@@ -173,6 +176,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
stop slave;
reset slave;
start slave;
diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
index 2974b9ad259..81794c17fda 100644
--- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
@@ -159,6 +159,7 @@ Last_SQL_Errno 0
Last_SQL_Error <Last_SQL_Error>
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File <Master-Info-File>
INSERT INTO t9 VALUES (4);
INSERT INTO t4 VALUES (4);
SHOW SLAVE STATUS;
@@ -202,6 +203,7 @@ Last_SQL_Errno 1677
Last_SQL_Error <Last_SQL_Error>
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File <Master-Info-File>
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
INSERT INTO t9 VALUES (5);
@@ -247,6 +249,7 @@ Last_SQL_Errno 1677
Last_SQL_Error <Last_SQL_Error>
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File <Master-Info-File>
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
INSERT INTO t9 VALUES (6);
@@ -292,6 +295,7 @@ Last_SQL_Errno 1677
Last_SQL_Error <Last_SQL_Error>
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File <Master-Info-File>
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
INSERT INTO t9 VALUES (6);
@@ -336,6 +340,7 @@ Last_SQL_Errno 0
Last_SQL_Error <Last_SQL_Error>
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File <Master-Info-File>
INSERT INTO t7 VALUES (1),(2),(3);
INSERT INTO t8 VALUES (1),(2),(3);
SELECT * FROM t7 ORDER BY a;
diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
index 04f22a864e1..f7db7ac1d1a 100644
--- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
@@ -159,6 +159,7 @@ Last_SQL_Errno 0
Last_SQL_Error <Last_SQL_Error>
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File <Master-Info-File>
INSERT INTO t9 VALUES (4);
INSERT INTO t4 VALUES (4);
SHOW SLAVE STATUS;
@@ -202,6 +203,7 @@ Last_SQL_Errno 1677
Last_SQL_Error <Last_SQL_Error>
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File <Master-Info-File>
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
INSERT INTO t9 VALUES (5);
@@ -247,6 +249,7 @@ Last_SQL_Errno 1677
Last_SQL_Error <Last_SQL_Error>
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File <Master-Info-File>
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
INSERT INTO t9 VALUES (6);
@@ -292,6 +295,7 @@ Last_SQL_Errno 1677
Last_SQL_Error <Last_SQL_Error>
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File <Master-Info-File>
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
INSERT INTO t9 VALUES (6);
@@ -336,6 +340,7 @@ Last_SQL_Errno 0
Last_SQL_Error <Last_SQL_Error>
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File <Master-Info-File>
INSERT INTO t7 VALUES (1),(2),(3);
INSERT INTO t8 VALUES (1),(2),(3);
SELECT * FROM t7 ORDER BY a;
diff --git a/mysql-test/suite/rpl/r/rpl_row_until.result b/mysql-test/suite/rpl/r/rpl_row_until.result
index e878456e296..c7722556bf0 100644
--- a/mysql-test/suite/rpl/r/rpl_row_until.result
+++ b/mysql-test/suite/rpl/r/rpl_row_until.result
@@ -61,6 +61,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
START SLAVE UNTIL MASTER_LOG_FILE='master-no-such-bin.000001', MASTER_LOG_POS=291;
SELECT * FROM t1;
n
@@ -109,6 +110,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', RELAY_LOG_POS=relay_pos_insert1_t2
SELECT * FROM t2;
n
@@ -155,6 +157,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
START SLAVE;
include/stop_slave.inc
START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=master_pos_create_t2
@@ -199,6 +202,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
START SLAVE UNTIL MASTER_LOG_FILE='master-bin', MASTER_LOG_POS=561;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=561, RELAY_LOG_POS=12;
diff --git a/mysql-test/suite/rpl/r/rpl_show_master_info_file.result b/mysql-test/suite/rpl/r/rpl_show_master_info_file.result
new file mode 100644
index 00000000000..15c6dea9bdc
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_show_master_info_file.result
@@ -0,0 +1,9 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+SELECT "MYSQLTEST_VARDIR/mysqld.2/data/master.info" as Master_Info_File;
+Master_Info_File
+MYSQLTEST_VARDIR/mysqld.2/data/master.info
diff --git a/mysql-test/suite/rpl/r/rpl_skip_error.result b/mysql-test/suite/rpl/r/rpl_skip_error.result
index 7b2bd48515d..a8a69d27c3e 100644
--- a/mysql-test/suite/rpl/r/rpl_skip_error.result
+++ b/mysql-test/suite/rpl/r/rpl_skip_error.result
@@ -72,6 +72,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
==== Clean Up ====
drop table t1;
create table t1(a int primary key);
@@ -127,6 +128,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
==== Clean Up ====
drop table t1;
==== Using Innodb ====
diff --git a/mysql-test/suite/rpl/r/rpl_slave_skip.result b/mysql-test/suite/rpl/r/rpl_slave_skip.result
index 24000df40d2..a5efa59ae4f 100644
--- a/mysql-test/suite/rpl/r/rpl_slave_skip.result
+++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result
@@ -84,6 +84,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
START SLAVE;
SELECT * FROM t1;
@@ -152,6 +153,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
**** On Master ****
DROP TABLE t1, t2;
SET SESSION BINLOG_FORMAT=ROW;
diff --git a/mysql-test/suite/rpl/r/rpl_ssl.result b/mysql-test/suite/rpl/r/rpl_ssl.result
index c8e9e1a4911..9aeb991e980 100644
--- a/mysql-test/suite/rpl/r/rpl_ssl.result
+++ b/mysql-test/suite/rpl/r/rpl_ssl.result
@@ -60,6 +60,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
STOP SLAVE;
select * from t1;
t
@@ -106,6 +107,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
drop user replssl@localhost;
drop table t1;
End of 5.0 tests
diff --git a/mysql-test/suite/rpl/r/rpl_ssl1.result b/mysql-test/suite/rpl/r/rpl_ssl1.result
index de255228aff..036d51e56b1 100644
--- a/mysql-test/suite/rpl/r/rpl_ssl1.result
+++ b/mysql-test/suite/rpl/r/rpl_ssl1.result
@@ -59,6 +59,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
stop slave;
change master to master_user='root',master_password='', master_ssl=0;
start slave;
@@ -105,6 +106,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
stop slave;
change master to
master_host="localhost",
@@ -161,4 +163,5 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
drop table t1;
diff --git a/mysql-test/suite/rpl/r/rpl_stm_log.result b/mysql-test/suite/rpl/r/rpl_stm_log.result
index 17134b1f02f..397ea495a44 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_log.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_log.result
@@ -286,6 +286,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result b/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result
index a21bec6ae55..7c49d9dcfa4 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result
@@ -64,6 +64,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
#
# Test 2
#
@@ -114,6 +115,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
#
# Test 3: max_relay_log_size = 0
#
@@ -164,6 +166,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
#
# Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
#
@@ -211,6 +214,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
#
# Test 5
#
@@ -259,6 +263,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
#
# Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
#
@@ -305,6 +310,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
flush logs;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
diff --git a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
index 94e8a31390d..5fd00f74136 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_reset_slave.result
@@ -45,6 +45,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
stop slave;
change master to master_user='test';
SHOW SLAVE STATUS;
@@ -88,6 +89,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
reset slave;
SHOW SLAVE STATUS;
Slave_IO_State #
@@ -130,6 +132,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
change master to master_user='root';
start slave;
SHOW SLAVE STATUS;
@@ -173,6 +176,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
stop slave;
reset slave;
start slave;
diff --git a/mysql-test/suite/rpl/r/rpl_stm_until.result b/mysql-test/suite/rpl/r/rpl_stm_until.result
index b131cbc7e63..098a3c7a158 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_until.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_until.result
@@ -65,6 +65,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
select * from t1;
n
@@ -113,6 +114,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=891;
select * from t2;
n
@@ -159,6 +161,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
start slave;
[on master]
[on slave]
@@ -205,6 +208,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
==== Test various error conditions ====
start slave until master_log_file='master-bin', master_log_pos=561;
ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
diff --git a/mysql-test/suite/rpl/r/rpl_temporary_errors.result b/mysql-test/suite/rpl/r/rpl_temporary_errors.result
index 8ecbbde65b4..847187fa9a7 100644
--- a/mysql-test/suite/rpl/r/rpl_temporary_errors.result
+++ b/mysql-test/suite/rpl/r/rpl_temporary_errors.result
@@ -80,6 +80,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
DROP TABLE t1;
**** On Master ****
DROP TABLE t1;
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/suite/rpl/t/rpl_bug33931.test b/mysql-test/suite/rpl/t/rpl_bug33931.test
index 42d86a7fc1e..e5b119dee40 100644
--- a/mysql-test/suite/rpl/t/rpl_bug33931.test
+++ b/mysql-test/suite/rpl/t/rpl_bug33931.test
@@ -40,7 +40,7 @@ connection slave;
source include/wait_for_slave_to_stop.inc;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 19 # 23 # 33 # 37 #
+--replace_column 1 # 8 # 9 # 19 # 23 # 33 # 37 # 41 #
query_vertical show slave status;
#
diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test
index a873c1fa3a9..71749444cbd 100644
--- a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test
+++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test
@@ -71,7 +71,7 @@ source include/wait_for_slave_param.inc;
# Show status of slave
#
--replace_result $SLAVE_MYPORT SLAVE_PORT $slave_param_value POSITION
---replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 #
+--replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 # 41 #
--query_vertical SHOW SLAVE STATUS
--disable_query_log
diff --git a/mysql-test/suite/rpl/t/rpl_incident.test b/mysql-test/suite/rpl/t/rpl_incident.test
index 66893ebb93f..dd9ec702a90 100644
--- a/mysql-test/suite/rpl/t/rpl_incident.test
+++ b/mysql-test/suite/rpl/t/rpl_incident.test
@@ -24,7 +24,7 @@ source include/wait_for_slave_sql_error.inc;
SELECT * FROM t1;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 6 # 7 # 8 # 9 # 22 # 23 # 33 #
+--replace_column 1 # 6 # 7 # 8 # 9 # 22 # 23 # 33 # 41 #
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
@@ -36,7 +36,7 @@ START SLAVE;
SELECT * FROM t1;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 6 # 7 # 8 # 9 # 22 # 23 # 33 #
+--replace_column 1 # 6 # 7 # 8 # 9 # 22 # 23 # 33 # 41 #
--query_vertical SHOW SLAVE STATUS
connection master;
diff --git a/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test b/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test
index 60bccaad0d3..3c50eb3db04 100644
--- a/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test
+++ b/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test
@@ -27,7 +27,7 @@ SELECT * FROM t1;
connection slave;
--source include/wait_for_slave_sql_to_stop.inc
# show the error message
---replace_column 1 # 4 # 7 # 8 # 9 # 23 # 33 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 23 # 33 # 41 #
--query_vertical show slave status;
# show that it was not replicated
SELECT * FROM t1;
@@ -83,7 +83,7 @@ SELECT * FROM t1;
connection slave;
--source include/wait_for_slave_sql_to_stop.inc
# show the error message
---replace_column 1 # 4 # 7 # 8 # 9 # 23 # 33 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 23 # 33 # 41 #
--query_vertical show slave status;
# show that it was not replicated
SELECT * FROM t1;
diff --git a/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test b/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test
index 6a9a30fcb0e..8740b7da7a9 100644
--- a/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test
+++ b/mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test
@@ -17,7 +17,7 @@ SHOW BINLOG EVENTS;
sync_slave_with_master;
--echo **** On Slave ****
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 34 # 35 #
+--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 34 # 35 # 41 #
--query_vertical SHOW SLAVE STATUS
--replace_result $VERSION VERSION
--replace_column 2 # 5 #
diff --git a/mysql-test/suite/rpl/t/rpl_replicate_do.test b/mysql-test/suite/rpl/t/rpl_replicate_do.test
index 3e22984aef8..5976a858ac9 100644
--- a/mysql-test/suite/rpl/t/rpl_replicate_do.test
+++ b/mysql-test/suite/rpl/t/rpl_replicate_do.test
@@ -28,7 +28,7 @@ drop table if exists t1,t2,t11;
sync_slave_with_master;
# show slave status, just to see of it prints replicate-do-table
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
query_vertical SHOW SLAVE STATUS;
#
diff --git a/mysql-test/suite/rpl/t/rpl_row_until.test b/mysql-test/suite/rpl/t/rpl_row_until.test
index 52e38fa3e57..bfc5851a2b7 100644
--- a/mysql-test/suite/rpl/t/rpl_row_until.test
+++ b/mysql-test/suite/rpl/t/rpl_row_until.test
@@ -57,7 +57,7 @@ eval START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=$mast
# Here table should be still not deleted
SELECT * FROM t1;
--replace_result $master_pos_drop_t1 MASTER_POS_DROP_T1
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 # 41 #
query_vertical SHOW SLAVE STATUS;
# This should fail right after start
@@ -66,7 +66,7 @@ START SLAVE UNTIL MASTER_LOG_FILE='master-no-such-bin.000001', MASTER_LOG_POS=29
# again this table should be still not deleted
SELECT * FROM t1;
--replace_result $master_pos_drop_t1 MASTER_POS_DROP_T1
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 # 41 #
query_vertical SHOW SLAVE STATUS;
# Try replicate all up to and not including the second insert to t2;
@@ -77,7 +77,7 @@ eval START SLAVE UNTIL RELAY_LOG_FILE='slave-relay-bin.000002', RELAY_LOG_POS=$r
--source include/wait_for_slave_sql_to_stop.inc
SELECT * FROM t2;
--replace_result $relay_pos_insert1_t2 RELAY_POS_INSERT1_T2 $master_pos_insert1_t2 MASTER_POS_INSERT1_T2
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 # 41 #
query_vertical SHOW SLAVE STATUS;
# clean up
@@ -99,7 +99,7 @@ let $slave_param_value= $master_pos_create_t2;
# here the sql slave thread should be stopped
--replace_result bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
--replace_result $master_pos_create_t2 MASTER_POS_CREATE_T2 $master_pos_drop_t2 MASTER_POS_DROP_T2
---replace_column 1 # 4 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 # 41 #
query_vertical SHOW SLAVE STATUS;
#testing various error conditions
diff --git a/mysql-test/suite/rpl/t/rpl_show_master_info_file-master.opt b/mysql-test/suite/rpl/t/rpl_show_master_info_file-master.opt
new file mode 100644
index 00000000000..1a95bfcef8b
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_show_master_info_file-master.opt
@@ -0,0 +1 @@
+--master-info-file=$MYSQLTEST_VARDIR/master.info
diff --git a/mysql-test/suite/rpl/t/rpl_show_master_info_file.test b/mysql-test/suite/rpl/t/rpl_show_master_info_file.test
new file mode 100644
index 00000000000..b8c385aaae5
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_show_master_info_file.test
@@ -0,0 +1,18 @@
+#
+# Bug #50316 Add Master_info_file to SHOW SLAVE STATUS
+# Testing of matching --master-info-file value to the value of the
+# new added SSS' field
+#
+
+source include/master-slave.inc;
+source include/have_binlog_format_mixed.inc;
+
+# test reveals different path separator on windows.
+# Leaving out windows because there is nothing more platform specific.
+source include/not_windows.inc;
+
+connection slave;
+
+--let $master_info_file= query_get_value(SHOW SLAVE STATUS, Master_Info_File, 1)
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+--eval SELECT "$master_info_file" as Master_Info_File
diff --git a/mysql-test/suite/rpl/t/rpl_slave_skip.test b/mysql-test/suite/rpl/t/rpl_slave_skip.test
index 587a812d0ae..87b4ebe7abd 100644
--- a/mysql-test/suite/rpl/t/rpl_slave_skip.test
+++ b/mysql-test/suite/rpl/t/rpl_slave_skip.test
@@ -36,7 +36,7 @@ connection slave;
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=762;
--source include/wait_for_slave_sql_to_stop.inc
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 8 # 9 # 23 # 33 # 35 # 36 # 41 #
query_vertical SHOW SLAVE STATUS;
# Now we skip *one* table map event. If the execution starts right
@@ -74,7 +74,7 @@ START SLAVE;
--source include/wait_for_slave_to_start.inc
sync_with_master;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 8 # 9 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 8 # 9 # 23 # 33 # 35 # 36 # 41 #
query_vertical SHOW SLAVE STATUS;
--echo **** On Master ****
diff --git a/mysql-test/suite/rpl/t/rpl_ssl.test b/mysql-test/suite/rpl/t/rpl_ssl.test
index fd4897586f6..f3c4bae751c 100644
--- a/mysql-test/suite/rpl/t/rpl_ssl.test
+++ b/mysql-test/suite/rpl/t/rpl_ssl.test
@@ -31,7 +31,7 @@ select * from t1;
# The slave is synced and waiting/reading from master
# SHOW SLAVE STATUS will show "Waiting for master to send event"
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
query_vertical show slave status;
# Stop the slave, as reported in bug#21871 it would hang
@@ -71,7 +71,7 @@ let $master_count= `select count(*) from t1`;
sync_slave_with_master;
--source include/wait_for_slave_to_start.inc
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
query_vertical show slave status;
let $slave_count= `select count(*) from t1`;
diff --git a/mysql-test/suite/rpl/t/rpl_ssl1.test b/mysql-test/suite/rpl/t/rpl_ssl1.test
index b28f7b11c03..f3a765791da 100644
--- a/mysql-test/suite/rpl/t/rpl_ssl1.test
+++ b/mysql-test/suite/rpl/t/rpl_ssl1.test
@@ -45,7 +45,7 @@ select * from t1;
#checking show slave status
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 35 # 36 # 41 #
query_vertical show slave status;
#checking if replication works without ssl also performing clean up
@@ -59,7 +59,7 @@ drop user replssl@localhost;
drop table t1;
sync_slave_with_master;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 35 # 36 # 41 #
query_vertical show slave status;
# End of 4.1 tests
@@ -91,7 +91,7 @@ select * from t1;
#checking show slave status
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT
---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # 35 # 36 # 41 #
query_vertical show slave status;
connection master;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result
index 6680f3fd70f..52e5ea72dcc 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result
@@ -181,6 +181,7 @@ Last_SQL_Errno <Last_SQL_Errno>
Last_SQL_Error <Last_SQL_Error>
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File <Master-Info-File>
set GLOBAL slave_transaction_retries=10;
include/start_slave.inc
select * from t1 order by nid;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result
index aeb9e215d15..f5f1725b517 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular.result
@@ -58,6 +58,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
SELECT * FROM t1 ORDER BY a;
a b
1 2
@@ -103,5 +104,6 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 2
+Master_Info_File #
STOP SLAVE;
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result
index 8eb7df3f890..646c03db363 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result
@@ -55,6 +55,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 2
+Master_Info_File #
SELECT * FROM t1 ORDER BY a;
a b
1 2
@@ -106,4 +107,5 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result
index 2df70ace0c1..1a11a5cb7b8 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_idempotent.result
@@ -32,16 +32,55 @@ SELECT * FROM t1 ORDER BY c3;
c1 c2 c3
row3 C 3
row4 D 4
-SHOW SLAVE STATUS;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id
-<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 Yes Yes <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> No <Last_IO_Errno> <Last_IO_Error> 0 1
+SHOW SLAVE STATUS;;
+Slave_IO_State <Slave_IO_State>
+Master_Host 127.0.0.1
+Master_User root
+Master_Port MASTER_PORT
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos <Read_Master_Log_Pos>
+Relay_Log_File <Relay_Log_File>
+Relay_Log_Pos <Relay_Log_Pos>
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running Yes
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table <Replicate_Ignore_Table>
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 0
+Last_Error
+Skip_Counter 0
+Exec_Master_Log_Pos <Exec_Master_Log_Pos>
+Relay_Log_Space <Relay_Log_Space>
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master <Seconds_Behind_Master>
+Master_SSL_Verify_Server_Cert No
+Last_IO_Errno <Last_IO_Errno>
+Last_IO_Error <Last_IO_Error>
+Last_SQL_Errno 0
+Last_SQL_Error
+Replicate_Ignore_Server_Ids
+Master_Server_Id 1
+Master_Info_File <Master-Info-File>
STOP SLAVE;
CHANGE MASTER TO
master_log_file = 'master-bin.000001',
master_log_pos = <the_pos> ;
SHOW SLAVE STATUS;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id
-<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 No No <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> No <Last_IO_Errno> <Last_IO_Error> 0 1
+Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_Info_File
+<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 No No <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> No <Last_IO_Errno> <Last_IO_Error> 0 1 <Master-Info-File>
START SLAVE;
SELECT * FROM t1 ORDER BY c3;
c1 c2 c3
@@ -67,7 +106,46 @@ COMMIT;
SELECT * FROM t1;
c1 c2 c3
row2 new on slave 2
-SHOW SLAVE STATUS;
-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id
-<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 Yes Yes <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> <Last_IO_Errno> <Last_IO_Error> 0 1
+SHOW SLAVE STATUS;;
+Slave_IO_State <Slave_IO_State>
+Master_Host 127.0.0.1
+Master_User root
+Master_Port MASTER_PORT
+Connect_Retry 1
+Master_Log_File master-bin.000001
+Read_Master_Log_Pos <Read_Master_Log_Pos>
+Relay_Log_File <Relay_Log_File>
+Relay_Log_Pos <Relay_Log_Pos>
+Relay_Master_Log_File master-bin.000001
+Slave_IO_Running Yes
+Slave_SQL_Running Yes
+Replicate_Do_DB
+Replicate_Ignore_DB
+Replicate_Do_Table
+Replicate_Ignore_Table <Replicate_Ignore_Table>
+Replicate_Wild_Do_Table
+Replicate_Wild_Ignore_Table
+Last_Errno 0
+Last_Error
+Skip_Counter 0
+Exec_Master_Log_Pos <Exec_Master_Log_Pos>
+Relay_Log_Space <Relay_Log_Space>
+Until_Condition None
+Until_Log_File
+Until_Log_Pos 0
+Master_SSL_Allowed No
+Master_SSL_CA_File
+Master_SSL_CA_Path
+Master_SSL_Cert
+Master_SSL_Cipher
+Master_SSL_Key
+Seconds_Behind_Master <Seconds_Behind_Master>
+Master_SSL_Verify_Server_Cert <Last_IO_Errno>
+Last_IO_Errno <Last_IO_Error>
+Last_IO_Error
+Last_SQL_Errno 0
+Last_SQL_Error
+Replicate_Ignore_Server_Ids
+Master_Server_Id 1
+Master_Info_File <Master-Info-File>
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result
index 67aa0955b71..cb46dd1e76f 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result
@@ -304,6 +304,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File #
show binlog events in 'slave-bin.000005' from 4;
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
DROP TABLE t1;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result
index b61f5550719..678a7f0d785 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result
@@ -109,6 +109,7 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
+Master_Info_File <Master-Info-File>
SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
hex(c1) hex(c2) c3
1 1 row1
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test
index 04ef7f31b7c..64ac6136cad 100644
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test
@@ -196,7 +196,7 @@ source include/wait_for_slave_sql_to_stop.inc;
# Replication should have stopped, since max retries were not enough.
# verify with show slave status
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 19 <Last_Errno> 20 <Last_Error> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error> 37 <Last_SQL_Errno> 38 <Last_SQL_Error>
+--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 19 <Last_Errno> 20 <Last_Error> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error> 37 <Last_SQL_Errno> 38 <Last_SQL_Error> 41 <Master-Info-File>
--query_vertical SHOW SLAVE STATUS;
# now set max retries high enough to succeed, and start slave again
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test
index bfa50537430..a69f9d49672 100644
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test
@@ -43,14 +43,14 @@ INSERT INTO t1 VALUES (2,3);
SELECT * FROM t1 ORDER BY a;
#SELECT * FROM t2 ORDER BY a;
# BUG#34654 Last_IO_Errno is not reset - Mask columns 35 and 36
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
--query_vertical show slave status;
# connect to master and ensure data it there.
--connection master
SELECT * FROM t1 ORDER BY a;
#SELECT * FROM t2 ORDER BY a;
# BUG#34654 Last_IO_Errno is not reset - Mask columns 35 and 36
---replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
--query_vertical show slave status;
# stop replication on "master" as not to replicate
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test
index 92f7aaebcd4..102fefddbb4 100644
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test
@@ -52,7 +52,7 @@ sync_with_master;
# Check that there is no error in replication
--replace_result $SLAVE_MYPORT SLAVE_PORT
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
query_vertical SHOW SLAVE STATUS;
# Check that we have the data on the master
@@ -79,7 +79,7 @@ SELECT * FROM t1 ORDER BY a;
# Check that there is no error in replication
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
+--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
query_vertical SHOW SLAVE STATUS;
connection master;
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test
index 3133ad34f0c..8543266f545 100644
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test
@@ -43,8 +43,8 @@ SELECT * FROM t1 ORDER BY c3;
SELECT * FROM t1 ORDER BY c3;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error>
-SHOW SLAVE STATUS;
+--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error> 41 <Master-Info-File>
+--query_vertical SHOW SLAVE STATUS;
# stop slave and reset position to before the last changes
STOP SLAVE;
@@ -54,7 +54,7 @@ eval CHANGE MASTER TO
master_log_pos = $the_pos ;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error>
+--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error> 41 <Master-Info-File>
SHOW SLAVE STATUS;
# start the slave again
@@ -107,8 +107,8 @@ COMMIT;
--connection slave
SELECT * FROM t1;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 34 <Last_IO_Errno> 35 <Last_IO_Error>
-SHOW SLAVE STATUS;
+--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 34 <Last_IO_Errno> 35 <Last_IO_Error> 41 <Master-Info-File>
+--query_vertical SHOW SLAVE STATUS;
connection master;
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test
index 88572c3e9a2..1cf91e0e5cd 100644
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test
@@ -72,7 +72,7 @@ START SLAVE;
--sync_slave_with_master
--connection slave
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error>
+--replace_column 1 <Slave_IO_State> 7 <Read_Master_Log_Pos> 8 <Relay_Log_File> 9 <Relay_Log_Pos> 16 <Replicate_Ignore_Table> 22 <Exec_Master_Log_Pos> 23 <Relay_Log_Space> 33 <Seconds_Behind_Master> 35 <Last_IO_Errno> 36 <Last_IO_Error> 41 <Master-Info-File>
query_vertical SHOW SLAVE STATUS;
SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
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/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/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/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/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 5420ebd908e..4514b5437b7 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -306,7 +306,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'"
@@ -699,7 +699,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/CMakeLists.txt b/sql/CMakeLists.txt
index 253d546d4a4..357575c5b47 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/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 4caf23232c5..d5ae1c954ff 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -3290,8 +3290,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 e036f255960..fd01e4a8885 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/rpl_mi.cc b/sql/rpl_mi.cc
index 10bf752e140..34051f1e74e 100644
--- a/sql/rpl_mi.cc
+++ b/sql/rpl_mi.cc
@@ -143,7 +143,6 @@ int init_master_info(Master_info* mi, const char* master_info_fname,
int thread_mask)
{
int fd,error;
- char fname[FN_REFLEN+128];
DBUG_ENTER("init_master_info");
if (mi->inited)
@@ -169,7 +168,8 @@ int init_master_info(Master_info* mi, const char* master_info_fname,
mi->mysql=0;
mi->file_id=1;
- fn_format(fname, master_info_fname, mysql_data_home, "", 4+32);
+ fn_format(mi->info_file_name, master_info_fname, mysql_data_home, "",
+ MYF(MY_UNPACK_FILENAME|MY_RETURN_REAL_PATH));
/*
We need a mutex while we are changing master info parameters to
@@ -181,7 +181,7 @@ int init_master_info(Master_info* mi, const char* master_info_fname,
/* does master.info exist ? */
- if (access(fname,F_OK))
+ if (access(mi->info_file_name, F_OK))
{
if (abort_if_no_master_info_file)
{
@@ -194,18 +194,18 @@ int init_master_info(Master_info* mi, const char* master_info_fname,
*/
if (fd >= 0)
mysql_file_close(fd, MYF(MY_WME));
- if ((fd= mysql_file_open(key_file_master_info,
- fname, O_CREAT|O_RDWR|O_BINARY, MYF(MY_WME))) < 0 )
+ if ((fd= mysql_file_open(key_file_master_info, mi->info_file_name,
+ O_CREAT|O_RDWR|O_BINARY, MYF(MY_WME))) < 0 )
{
sql_print_error("Failed to create a new master info file (\
-file '%s', errno %d)", fname, my_errno);
+file '%s', errno %d)", mi->info_file_name, my_errno);
goto err;
}
if (init_io_cache(&mi->file, fd, IO_SIZE*2, READ_CACHE, 0L,0,
MYF(MY_WME)))
{
sql_print_error("Failed to create a cache on master info file (\
-file '%s')", fname);
+file '%s')", mi->info_file_name);
goto err;
}
@@ -220,17 +220,17 @@ file '%s')", fname);
else
{
if ((fd= mysql_file_open(key_file_master_info,
- fname, O_RDWR|O_BINARY, MYF(MY_WME))) < 0 )
+ mi->info_file_name, O_RDWR|O_BINARY, MYF(MY_WME))) < 0 )
{
sql_print_error("Failed to open the existing master info file (\
-file '%s', errno %d)", fname, my_errno);
+file '%s', errno %d)", mi->info_file_name, my_errno);
goto err;
}
if (init_io_cache(&mi->file, fd, IO_SIZE*2, READ_CACHE, 0L,
0, MYF(MY_WME)))
{
sql_print_error("Failed to create a cache on master info file (\
-file '%s')", fname);
+file '%s')", mi->info_file_name);
goto err;
}
}
@@ -344,7 +344,7 @@ file '%s')", fname);
if (ssl)
sql_print_warning("SSL information in the master info file "
"('%s') are ignored because this MySQL slave was "
- "compiled without SSL support.", fname);
+ "compiled without SSL support.", mi->info_file_name);
#endif /* HAVE_OPENSSL */
/*
diff --git a/sql/rpl_mi.h b/sql/rpl_mi.h
index c3734fdf59e..89bab16b63b 100644
--- a/sql/rpl_mi.h
+++ b/sql/rpl_mi.h
@@ -112,6 +112,7 @@ class Master_info : public Slave_reporting_capability
ulonglong received_heartbeats; // counter of received heartbeat events
DYNAMIC_ARRAY ignore_server_ids;
ulong master_id;
+ char info_file_name[FN_REFLEN + 128];
};
void init_master_log_pos(Master_info* mi);
int init_master_info(Master_info* mi, const char* master_info_fname,
diff --git a/sql/slave.cc b/sql/slave.cc
index e23763696df..2ecfd7be5b2 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -1802,7 +1802,8 @@ bool show_master_info(THD* thd, Master_info* mi)
FN_REFLEN));
field_list.push_back(new Item_return_int("Master_Server_Id", sizeof(ulong),
MYSQL_TYPE_LONG));
-
+ field_list.push_back(new Item_empty_string("Master_Info_File",
+ sizeof(mi->info_file_name)));
if (protocol->send_result_set_metadata(&field_list,
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
DBUG_RETURN(TRUE);
@@ -1950,6 +1951,7 @@ bool show_master_info(THD* thd, Master_info* mi)
}
// Master_Server_id
protocol->store((uint32) mi->master_id);
+ protocol->store(mi->info_file_name, &my_charset_bin);
mysql_mutex_unlock(&mi->rli.err_lock);
mysql_mutex_unlock(&mi->err_lock);
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 3144192a971..789b01443f7 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -512,7 +512,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;
@@ -804,7 +804,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);
+ }
}
}
@@ -1805,11 +1808,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;
@@ -2830,11 +2828,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 ac1a10f57b9..916b79f8353 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -1994,7 +1994,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;
/*
@@ -2826,6 +2869,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);
}
@@ -2835,6 +2879,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);
}
@@ -3496,7 +3541,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 103be4c851f..1f9d69a798e 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 6bd6a374883..1795bc272f1 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 6f7acc4a609..2ce6bdeed42 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -1379,6 +1379,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.
@@ -2206,8 +2208,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);
@@ -2220,7 +2222,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.
*/
@@ -2237,8 +2239,17 @@ class Yacc_state
{
public:
Yacc_state()
- : yacc_yyss(NULL), yacc_yyvs(NULL), m_lock_type(TL_READ_DEFAULT)
- {}
+ {
+ reset();
+ }
+
+ void reset()
+ {
+ yacc_yyss= NULL;
+ yacc_yyvs= NULL;
+ m_set_signal_info.clear();
+ m_lock_type= TL_READ_DEFAULT;
+ }
~Yacc_state();
@@ -2311,6 +2322,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 c8faac7c91d..60b2ffa4179 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"));
@@ -3184,7 +3184,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
@@ -3250,7 +3250,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;
}
/*
@@ -3296,7 +3296,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:
@@ -4299,8 +4299,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);
@@ -4687,15 +4688,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:
@@ -5734,7 +5726,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");
@@ -5764,10 +5756,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)
{
@@ -5782,6 +5771,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
@@ -5792,12 +5782,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;
@@ -5834,11 +5824,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 412a053014f..300ca1098fb 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 */
@@ -2150,8 +2149,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/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/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>