Commit 1c02ed3e authored by Jon Olav Hauglid's avatar Jon Olav Hauglid

manual merge from mysql-trunk-bugfixing

parents d63caa0c 1579ae04
......@@ -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
)
......@@ -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
......
This diff is collapsed.
......@@ -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)
......
......@@ -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.
......
......@@ -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()
......
......@@ -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
......
......@@ -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()
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -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
......
......@@ -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
......
......@@ -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;
......
......@@ -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
......
......@@ -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;
......
......@@ -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)-/;
......
......@@ -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;
......@@ -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;
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
# --
# -- 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.
--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.
......@@ -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);
......
......@@ -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="";
......@@ -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
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -62,3 +62,4 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 2
Master_Info_File #
......@@ -82,3 +82,4 @@ Last_SQL_Errno 0
Last_SQL_Error
Replicate_Ignore_Server_Ids
Master_Server_Id 1
Master_Info_File #
......@@ -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
......
......@@ -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;
......@@ -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;
......
......@@ -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;
......@@ -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>
......
......@@ -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
......
......@@ -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');
......
......@@ -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(*)
......
......@@ -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
......
......@@ -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;
......
......@@ -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;
......
......@@ -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
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
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
......@@ -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 ====
......
......@@ -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;
......
......@@ -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
......@@ -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;
......@@ -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;
......
......@@ -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
......
......@@ -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;
......
......@@ -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
......
......@@ -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;
......@@ -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).
......
......@@ -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;
#
......
......@@ -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
......
......@@ -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;
......
......@@ -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;
......
......@@ -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 #
......
......@@ -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;
#
......
......@@ -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
......
--master-info-file=$MYSQLTEST_VARDIR/master.info
#
# 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
......@@ -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 ****
......
......@@ -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`;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......@@ -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;
......@@ -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;
......@@ -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;
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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
......@@ -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)
......@@ -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")
......@@ -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})
......
......@@ -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"
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
{
......
......@@ -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();
}
......
......@@ -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);
/*
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment