Commit d3b910da authored by Konstantin Osipov's avatar Konstantin Osipov

Merge trunk -> trunk-runtime

parents 9b5d1d98 f54b3042
......@@ -36,6 +36,18 @@ SET(CUSTOM_C_FLAGS $ENV{CFLAGS})
OPTION(WITH_DEBUG "Use dbug/safemutex" OFF)
OPTION(WITH_DEBUG_FULL "Use dbug and safemalloc/safemutex. Slow" OFF)
# Distinguish between community and non-community builds, with the
# default being a community build. This does not impact the feature
# set that will be compiled in; it's merely provided as a hint to
# custom packaging steps.
OPTION(COMMUNITY_BUILD "Set to true if this is a community build" ON)
# Use a default manufacturer if no manufacturer was identified.
SET(MANUFACTURER_DOCSTRING
"Set the entity that appears as the manufacturer of packages that support a manufacturer field.")
IF(NOT DEFINED MANUFACTURER)
SET(MANUFACTURER "Built from Source" CACHE BOOL ${MANUFACTURER_DOCSTRING})
ENDIF()
# We choose to provide WITH_DEBUG as alias to standard CMAKE_BUILD_TYPE=Debug
# which turns out to be not trivial, as this involves synchronization
......@@ -277,6 +289,7 @@ IF(WIN32)
ELSE()
SET(CPACK_GENERATOR "TGZ")
ENDIF()
ADD_SUBDIRECTORY(packaging/WiX)
INCLUDE(CPack)
IF(UNIX)
INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL)
......
......@@ -33,7 +33,7 @@ IF(UNIX)
TARGET_LINK_LIBRARIES(mysql ${READLINE_LIBRARY})
ENDIF(UNIX)
MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc)
MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test)
SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS")
TARGET_LINK_LIBRARIES(mysqltest mysqlclient regex)
......
......@@ -31,8 +31,7 @@ ENDIF()
# Create bootstrapper SQL script
FILE(WRITE bootstrap.sql "use mysql;\n" )
FOREACH(FILENAME mysql_system_tables.sql mysql_system_tables_data.sql
fill_help_tables.sql)
FOREACH(FILENAME mysql_system_tables.sql mysql_system_tables_data.sql)
FILE(STRINGS ${CMAKE_SOURCE_DIR}/scripts/${FILENAME} CONTENTS)
FOREACH(STR ${CONTENTS})
IF(NOT STR MATCHES "@current_hostname")
......@@ -40,6 +39,8 @@ FOREACH(FILENAME mysql_system_tables.sql mysql_system_tables_data.sql
ENDIF()
ENDFOREACH()
ENDFOREACH()
FILE(READ ${CMAKE_SOURCE_DIR}/scripts/fill_help_tables.sql CONTENTS)
FILE(APPEND bootstrap.sql ${CONTENTS})
FILE(REMOVE_RECURSE mysql)
......@@ -56,6 +57,7 @@ SET(BOOTSTRAP_COMMAND
--lc-messages-dir=${CMAKE_CURRENT_BINARY_DIR}/share
--basedir=.
--datadir=.
--default-storage-engine=MyISAM
--loose-skip-innodb
--loose-skip-ndbcluster
--max_allowed_packet=8M
......@@ -78,4 +80,4 @@ EXECUTE_PROCESS (
IF(NOT RESULT EQUAL 0)
MESSAGE(FATAL_ERROR "Could not create initial database \n ${OUT} \n ${ERR}")
ENDIF()
\ No newline at end of file
......@@ -35,15 +35,84 @@ MACRO (INSTALL_DEBUG_SYMBOLS targets)
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
ENDIF()
INSTALL(FILES ${pdb_location} DESTINATION ${INSTALL_LOCATION})
IF(target STREQUAL "mysqld")
SET(comp Server)
ELSE()
SET(comp Debuginfo)
ENDIF()
INSTALL(FILES ${pdb_location} DESTINATION ${INSTALL_LOCATION} COMPONENT ${comp})
ENDFOREACH()
ENDIF()
ENDMACRO()
# Installs manpage for given file (either script or executable)
#
FUNCTION(INSTALL_MANPAGE file)
IF(NOT UNIX)
RETURN()
ENDIF()
GET_FILENAME_COMPONENT(file_name "${file}" NAME)
SET(GLOB_EXPR
${CMAKE_SOURCE_DIR}/man/*${file}man.1*
${CMAKE_SOURCE_DIR}/man/*${file}man.8*
${CMAKE_BINARY_DIR}/man/*${file}man.1*
${CMAKE_BINARY_DIR}/man/*${file}man.8*
)
IF(MYSQL_DOC_DIR)
SET(GLOB_EXPR
${MYSQL_DOC_DIR}/man/*${file}man.1*
${MYSQL_DOC_DIR}/man/*${file}man.8*
${MYSQL_DOC_DIR}/man/*${file}.1*
${MYSQL_DOC_DIR}/man/*${file}.8*
${GLOB_EXPR}
)
ENDIF()
FILE(GLOB_RECURSE MANPAGES ${GLOB_EXPR})
IF(MANPAGES)
LIST(GET MANPAGES 0 MANPAGE)
STRING(REPLACE "${file}man.1" "${file}.1" MANPAGE "${MANPAGE}")
STRING(REPLACE "${file}man.8" "${file}.8" MANPAGE "${MANPAGE}")
IF(MANPAGE MATCHES "${file}.1")
SET(SECTION man1)
ELSE()
SET(SECTION man8)
ENDIF()
INSTALL(FILES "${MANPAGE}" DESTINATION "${INSTALL_MANDIR}/${SECTION}")
ENDIF()
ENDFUNCTION()
FUNCTION(INSTALL_SCRIPT)
CMAKE_PARSE_ARGUMENTS(ARG
"DESTINATION;COMPONENT"
""
${ARGN}
)
SET(script ${ARG_DEFAULT_ARGS})
IF(NOT ARG_DESTINATION)
SET(ARG_DESTINATION ${INSTALL_BINDIR})
ENDIF()
IF(ARG_COMPONENT)
SET(COMP COMPONENT ${ARG_COMPONENT})
ELSE()
SET(COMP)
ENDIF()
INSTALL(FILES
${script}
DESTINATION ${ARG_DESTINATION}
PERMISSIONS OWNER_READ OWNER_WRITE
OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE ${COMP}
)
INSTALL_MANPAGE(${script})
ENDFUNCTION()
# Install symbolic link to CMake target.
# the link is created in the same directory as target
# and extension will be the same as for target file.
MACRO(INSTALL_SYMLINK linkname target destination)
MACRO(INSTALL_SYMLINK linkname target destination component)
IF(UNIX)
GET_TARGET_PROPERTY(location ${target} LOCATION)
GET_FILENAME_COMPONENT(path ${location} PATH)
......@@ -68,7 +137,12 @@ IF(UNIX)
STRING(REPLACE "${CMAKE_CFG_INTDIR}"
"\${CMAKE_INSTALL_CONFIG_NAME}" output ${output})
ENDIF()
INSTALL(FILES ${output} DESTINATION ${destination})
IF(component)
SET(COMP COMPONENT ${component})
ELSE()
SET(COMP)
ENDIF()
INSTALL(FILES ${output} DESTINATION ${destination} ${COMP})
ENDIF()
ENDMACRO()
......@@ -128,13 +202,11 @@ ENDMACRO()
# Installs targets, also installs pdbs on Windows.
#
# More stuff can be added later, e.g signing
# or pre-link custom targets (one example is creating
# version resource for windows executables)
#
FUNCTION(MYSQL_INSTALL_TARGETS)
CMAKE_PARSE_ARGUMENTS(ARG
"DESTINATION"
"DESTINATION;COMPONENT"
""
${ARGN}
)
......@@ -146,15 +218,24 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
MESSAGE(FATAL_ERROR "Need DESTINATION parameter for MYSQL_INSTALL_TARGETS")
ENDIF()
# If signing is required, sign executables before installing
FOREACH(target ${TARGETS})
IF(SIGNCODE AND SIGNCODE_ENABLED)
# If signing is required, sign executables before installing
IF(SIGNCODE AND SIGNCODE_ENABLED)
SIGN_TARGET(${target})
ENDIF()
# For Windows, add version info to executables
ADD_VERSION_INFO(${target})
# Install man pages on Unix
IF(UNIX)
GET_TARGET_PROPERTY(target_location ${target} LOCATION)
INSTALL_MANPAGE(${target_location})
ENDIF()
ENDFOREACH()
INSTALL(TARGETS ${TARGETS} DESTINATION ${ARG_DESTINATION})
IF(ARG_COMPONENT)
SET(COMP COMPONENT ${ARG_COMPONENT})
ENDIF()
INSTALL(TARGETS ${TARGETS} DESTINATION ${ARG_DESTINATION} ${COMP})
SET(INSTALL_LOCATION ${ARG_DESTINATION} )
INSTALL_DEBUG_SYMBOLS("${TARGETS}")
SET(INSTALL_LOCATION)
......
......@@ -214,7 +214,7 @@ ENDMACRO()
#)
MACRO(MERGE_LIBRARIES)
CMAKE_PARSE_ARGUMENTS(ARG
"EXPORTS;OUTPUT_NAME"
"EXPORTS;OUTPUT_NAME;COMPONENT"
"STATIC;SHARED;MODULE;NOINSTALL"
${ARGN}
)
......@@ -259,7 +259,10 @@ MACRO(MERGE_LIBRARIES)
MESSAGE(FATAL_ERROR "Unknown library type")
ENDIF()
IF(NOT ARG_NOINSTALL)
MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}")
IF(ARG_COMPONENT)
SET(COMP COMPONENT ${ARG_COMPONENT})
ENDIF()
MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}" ${COMP})
ENDIF()
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES LINK_INTERFACE_LIBRARIES "")
ENDMACRO()
......
......@@ -29,7 +29,7 @@ INCLUDE(cmake_parse_arguments)
FUNCTION (MYSQL_ADD_EXECUTABLE)
# Pass-through arguments for ADD_EXECUTABLE
CMAKE_PARSE_ARGUMENTS(ARG
"WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION"
"WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT"
""
${ARGN}
)
......@@ -43,7 +43,14 @@ FUNCTION (MYSQL_ADD_EXECUTABLE)
IF(NOT ARG_EXCLUDE_FROM_ALL)
IF(NOT ARG_DESTINATION)
SET(ARG_DESTINATION ${INSTALL_BINDIR})
ENDIF()
IF(ARG_COMPONENT)
SET(COMP COMPONENT ${ARG_COMPONENT})
ELSEIF(MYSQL_INSTALL_COMPONENT)
SET(COMP COMPONENT ${MYSQL_INSTALL_COMPONENT})
ELSE()
SET(COMP COMPONENT Client)
ENDIF()
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION})
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP})
ENDIF()
ENDFUNCTION()
\ No newline at end of file
ENDFUNCTION()
......@@ -15,6 +15,8 @@
# Produce meaningful package name for the binary package
# The logic is rather involved with special cases for different OSes
INCLUDE(CheckTypeSize)
CHECK_TYPE_SIZE("void *" SIZEOF_VOIDP)
MACRO(GET_PACKAGE_FILE_NAME Var)
IF(NOT VERSION)
MESSAGE(FATAL_ERROR
......@@ -24,7 +26,8 @@ IF(NOT VERSION)
SET(NEED_DASH_BETWEEN_PLATFORM_AND_MACHINE 1)
SET(DEFAULT_PLATFORM ${CMAKE_SYSTEM_NAME})
SET(DEFAULT_MACHINE ${CMAKE_SYSTEM_PROCESSOR})
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
MESSAGE("SIZEOF_VOIDP=${SIZEOF_VOIDP}")
IF(SIZEOF_VOIDP EQUAL 8)
SET(64BIT 1)
ENDIF()
......
......@@ -173,7 +173,7 @@ MACRO(MYSQL_ADD_PLUGIN)
SET_TARGET_PROPERTIES(${target} PROPERTIES
OUTPUT_NAME "${ARG_MODULE_OUTPUT_NAME}")
# Install dynamic library
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${INSTALL_PLUGINDIR})
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${INSTALL_PLUGINDIR} COMPONENT Server)
INSTALL_DEBUG_TARGET(${target} DESTINATION ${INSTALL_PLUGINDIR}/debug)
ENDIF()
ENDMACRO()
......
......@@ -25,7 +25,7 @@ MACRO (MYSQL_USE_BUNDLED_SSL)
SET(SSL_LIBRARIES yassl taocrypt)
SET(SSL_INCLUDE_DIRS ${INC_DIRS})
SET(SSL_INTERNAL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
SET(SSL_DEFINES"-DHAVE_YASSL -DYASSL_PURE_C -DYASSL_PREFIX -DHAVE_OPENSSL -DYASSL_THREAD_SAFE")
SET(SSL_DEFINES "-DHAVE_YASSL -DYASSL_PURE_C -DYASSL_PREFIX -DHAVE_OPENSSL -DYASSL_THREAD_SAFE")
CHANGE_SSL_SETTINGS("bundled")
#Remove -fno-implicit-templates
#(yassl sources cannot be compiled with it)
......
......@@ -81,6 +81,8 @@
#cmakedefine HAVE_SYS_STREAM_H 1
#cmakedefine HAVE_SYS_TERMCAP_H 1
#cmakedefine HAVE_SYS_TIMEB_H 1
#cmakedefine HAVE_SYS_TIMES_H 1
#cmakedefine HAVE_SYS_TIME_H 1
#cmakedefine HAVE_SYS_TYPES_H 1
#cmakedefine HAVE_SYS_UN_H 1
#cmakedefine HAVE_SYS_VADVISE_H 1
......@@ -88,6 +90,7 @@
#cmakedefine HAVE_TERMIOS_H 1
#cmakedefine HAVE_TERMIO_H 1
#cmakedefine HAVE_TERMCAP_H 1
#cmakedefine HAVE_TIME_H 1
#cmakedefine HAVE_UNISTD_H 1
#cmakedefine HAVE_UTIME_H 1
#cmakedefine HAVE_VARARGS_H 1
......@@ -261,6 +264,8 @@
#cmakedefine HAVE_TEMPNAM 1
#cmakedefine HAVE_THR_SETCONCURRENCY 1
#cmakedefine HAVE_THR_YIELD 1
#cmakedefine HAVE_TIME 1
#cmakedefine HAVE_TIMES 1
#cmakedefine HAVE_VALLOC 1
#define HAVE_VIO_READ_BUFF 1
#cmakedefine HAVE_VASPRINTF 1
......@@ -295,11 +300,6 @@
/* Types we may use */
#cmakedefine SIZEOF_CHAR @SIZEOF_CHAR@
#if SIZEOF_CHAR
# define HAVE_CHAR 1
#endif
#ifdef __APPLE__
/*
Special handling required for OSX to support universal binaries that
......@@ -310,127 +310,71 @@
#else
#define SIZEOF_LONG 4
#endif
#define SIZEOF_VOIDP SIZEOF_LONG
#define SIZEOF_CHARP SIZEOF_LONG
#define SIZEOF_SIZE_T SIZEOF_LONG
#else
#cmakedefine SIZEOF_LONG @SIZEOF_LONG@
#cmakedefine SIZEOF_CHARP @SIZEOF_CHARP@
#cmakedefine SIZEOF_SIZE_T @SIZEOF_CHARP@
#endif
#if SIZEOF_LONG
# define HAVE_LONG 1
#endif
#if SIZEOF_CHARP
#define HAVE_CHARP 1
#define SIZEOF_VOIDP SIZEOF_CHARP
/* No indentation, to fetch the lines from verification scripts */
#cmakedefine SIZEOF_LONG @SIZEOF_LONG@
#cmakedefine SIZEOF_VOIDP @SIZEOF_VOIDP@
#cmakedefine SIZEOF_CHARP @SIZEOF_CHARP@
#cmakedefine SIZEOF_SIZE_T @SIZEOF_CHARP@
#endif
#cmakedefine SIZEOF_CHAR @SIZEOF_CHAR@
#cmakedefine HAVE_CHAR 1
#cmakedefine HAVE_LONG 1
#cmakedefine HAVE_CHARP 1
#cmakedefine SIZEOF_SHORT @SIZEOF_SHORT@
#if SIZEOF_SHORT
# define HAVE_SHORT 1
#endif
#cmakedefine HAVE_SHORT 1
#cmakedefine SIZEOF_INT @SIZEOF_INT@
#if SIZEOF_INT
# define HAVE_INT 1
#endif
#cmakedefine HAVE_INT 1
#cmakedefine SIZEOF_LONG_LONG @SIZEOF_LONG_LONG@
#if SIZEOF_LONG_LONG
# define HAVE_LONG_LONG 1
#endif
#cmakedefine HAVE_LONG_LONG 1
#cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@
#if SIZEOF_OFF_T
#define HAVE_OFF_T 1
#endif
#cmakedefine HAVE_OFF_T 1
#cmakedefine SIZEOF_SIGSET_T @SIZEOF_SIGSET_T@
#if SIZEOF_SIGSET_T
#define HAVE_SIGSET_T 1
#endif
#if SIZEOF_SIZE_T
#define HAVE_SIZE_T 1
#endif
#cmakedefine HAVE_SIGSET_T 1
#cmakedefine HAVE_SIZE_T 1
#cmakedefine SIZEOF_UCHAR @SIZEOF_UCHAR@
#if SIZEOF_UCHAR
#define HAVE_UCHAR 1
#endif
#cmakedefine HAVE_UCHAR 1
#cmakedefine SIZEOF_UINT @SIZEOF_UINT@
#if SIZEOF_UINT
#define HAVE_UINT 1
#endif
#cmakedefine HAVE_UINT 1
#cmakedefine SIZEOF_ULONG @SIZEOF_ULONG@
#if SIZEOF_ULONG
#define HAVE_ULONG 1
#endif
#cmakedefine HAVE_ULONG 1
#cmakedefine SIZEOF_INT8 @SIZEOF_INT8@
#if SIZEOF_INT8
#define HAVE_INT8 1
#endif
#cmakedefine HAVE_INT8 1
#cmakedefine SIZEOF_UINT8 @SIZEOF_UINT8@
#if SIZEOF_UINT8
#define HAVE_UINT8 1
#endif
#cmakedefine HAVE_UINT8 1
#cmakedefine SIZEOF_INT16 @SIZEOF_INT16@
#if SIZEOF_INT16
# define HAVE_INT16 1
#endif
#cmakedefine HAVE_INT16 1
#cmakedefine SIZEOF_UINT16 @SIZEOF_UINT16@
#if SIZEOF_UINT16
#define HAVE_UINT16 1
#endif
#cmakedefine HAVE_UINT16 1
#cmakedefine SIZEOF_INT32 @SIZEOF_INT32@
#if SIZEOF_INT32
#define HAVE_INT32 1
#endif
#cmakedefine HAVE_INT32 1
#cmakedefine SIZEOF_UINT32 @SIZEOF_UINT32@
#if SIZEOF_UINT32
#define HAVE_UINT32 1
#endif
#cmakedefine HAVE_UINT32 1
#cmakedefine SIZEOF_U_INT32_T @SIZEOF_U_INT32_T@
#if SIZEOF_U_INT32_T
#define HAVE_U_INT32_T 1
#endif
#cmakedefine HAVE_U_INT32_T 1
#cmakedefine SIZEOF_INT64 @SIZEOF_INT64@
#if SIZEOF_INT64
#define HAVE_INT64 1
#endif
#cmakedefine HAVE_INT64 1
#cmakedefine SIZEOF_UINT64 @SIZEOF_UINT64@
#if SIZEOF_UINT64
#define HAVE_UINT64 1
#endif
#cmakedefine HAVE_UINT64 1
#cmakedefine SIZEOF_BOOL @SIZEOF_BOOL@
#cmakedefine HAVE_BOOL 1
#cmakedefine SOCKET_SIZE_TYPE @SOCKET_SIZE_TYPE@
#cmakedefine SIZEOF_BOOL @SIZEOF_BOOL@
#if SIZEOF_BOOL
#define HAVE_BOOL 1
#endif
#cmakedefine HAVE_MBSTATE_T
#define MAX_INDEXES 64
#cmakedefine QSORT_TYPE_IS_VOID 1
#define RETQSORTTYPE void
#cmakedefine RETQSORTTYPE @RETQSORTTYPE@
#cmakedefine SIGNAL_RETURN_TYPE_IS_VOID 1
#define RETSIGTYPE void
#if SIGNAL_RETURN_TYPE_IS_VOID
#define VOID_SIGHANDLER 1
#endif
#cmakedefine RETSIGTYPE @RETSIGTYPE@
#cmakedefine VOID_SIGHANDLER 1
#define STRUCT_RLIMIT struct rlimit
#ifdef __APPLE__
......@@ -547,7 +491,7 @@
#cmakedefine strtoull @strtoull@
#cmakedefine vsnprintf @vsnprintf@
#if (_MSC_VER > 1310)
#define HAVE_SETENV
# define HAVE_SETENV
#define setenv(a,b,c) _putenv_s(a,b)
#endif
......@@ -575,7 +519,7 @@
#cmakedefine FN_NO_CASE_SENSE 1
#cmakedefine HAVE_CHARSET_armscii8 1
#cmakedefine HAVE_CHARSET_ascii
#cmakedefine HAVE_CHARSET_ascii 1
#cmakedefine HAVE_CHARSET_big5 1
#cmakedefine HAVE_CHARSET_cp1250 1
#cmakedefine HAVE_CHARSET_cp1251 1
......@@ -637,7 +581,7 @@
#cmakedefine WITH_PERFSCHEMA_STORAGE_ENGINE 1
#cmakedefine WITH_NDBCLUSTER_STORAGE_ENGINE 1
#if (WITH_NDBCLUSTER_STORAGE_ENGINE) && !defined(EMBEDDED_LIBRARY)
#define HAVE_NDB_BINLOG 1
# define HAVE_NDB_BINLOG 1
#endif
#cmakedefine DEFAULT_MYSQL_HOME "@DEFAULT_MYSQL_HOME@"
......
......@@ -90,6 +90,21 @@ ENDIF(WITHOUT_DYNAMIC_PLUGINS)
# Large files, common flag
SET(_LARGEFILE_SOURCE 1)
# If finds the size of a type, set SIZEOF_<type> and HAVE_<type>
FUNCTION(MY_CHECK_TYPE_SIZE type defbase)
CHECK_TYPE_SIZE("${type}" SIZEOF_${defbase})
IF(SIZEOF_${defbase})
SET(HAVE_${defbase} 1 PARENT_SCOPE)
ENDIF()
ENDFUNCTION()
# Same for structs, setting HAVE_STRUCT_<name> instead
FUNCTION(MY_CHECK_STRUCT_SIZE type defbase)
CHECK_TYPE_SIZE("struct ${type}" SIZEOF_${defbase})
IF(SIZEOF_${defbase})
SET(HAVE_STRUCT_${defbase} 1 PARENT_SCOPE)
ENDIF()
ENDFUNCTION()
# Searches function in libraries
# if function is found, sets output parameter result to the name of the library
......@@ -108,6 +123,7 @@ FUNCTION(MY_SEARCH_LIBS func libs result)
CHECK_LIBRARY_EXISTS(${lib} ${func} "" HAVE_${func}_IN_${lib})
IF(HAVE_${func}_IN_${lib})
SET(${result} ${lib} PARENT_SCOPE)
SET(HAVE_${result} 1 PARENT_SCOPE)
RETURN()
ENDIF()
ENDFOREACH()
......@@ -169,6 +185,7 @@ CHECK_INCLUDE_FILES (alloca.h HAVE_ALLOCA_H)
CHECK_INCLUDE_FILES (aio.h HAVE_AIO_H)
CHECK_INCLUDE_FILES (arpa/inet.h HAVE_ARPA_INET_H)
CHECK_INCLUDE_FILES (crypt.h HAVE_CRYPT_H)
CHECK_INCLUDE_FILES (cxxabi.h HAVE_CXXABI_H)
CHECK_INCLUDE_FILES (dirent.h HAVE_DIRENT_H)
CHECK_INCLUDE_FILES (dlfcn.h HAVE_DLFCN_H)
CHECK_INCLUDE_FILES (execinfo.h HAVE_EXECINFO_H)
......@@ -195,7 +212,6 @@ CHECK_INCLUDE_FILES (select.h HAVE_SELECT_H)
CHECK_INCLUDE_FILES (semaphore.h HAVE_SEMAPHORE_H)
CHECK_INCLUDE_FILES (sys/dir.h HAVE_SYS_DIR_H)
CHECK_INCLUDE_FILES (sys/pte.h HAVE_SYS_PTE_H)
CHECK_INCLUDE_FILES (sys/ptem.h HAVE_SYS_PTEM_H)
CHECK_INCLUDE_FILES (stddef.h HAVE_STDDEF_H)
CHECK_INCLUDE_FILES (stdint.h HAVE_STDINT_H)
CHECK_INCLUDE_FILES (stdlib.h HAVE_STDLIB_H)
......@@ -235,6 +251,13 @@ CHECK_INCLUDE_FILES (fnmatch.h HAVE_FNMATCH_H)
CHECK_INCLUDE_FILES (stdarg.h HAVE_STDARG_H)
CHECK_INCLUDE_FILES("stdlib.h;sys/un.h" HAVE_SYS_UN_H)
IF(HAVE_SYS_STREAM_H)
# Needs sys/stream.h on Solaris
CHECK_INCLUDE_FILES (sys/stream.h sys/ptem.h HAVE_SYS_PTEM_H)
ELSE()
CHECK_INCLUDE_FILES (sys/ptem.h HAVE_SYS_PTEM_H)
ENDIF()
# Figure out threading library
#
FIND_PACKAGE (Threads)
......@@ -458,14 +481,11 @@ set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
-D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS)
SET(CMAKE_EXTRA_INCLUDE_FILES signal.h)
CHECK_TYPE_SIZE(sigset_t SIZEOF_SIGSET_T)
IF(SIZEOF_SIGSET_T)
SET(HAVE_SIGSET_T 1)
ENDIF()
MY_CHECK_TYPE_SIZE(sigset_t SIGSET_T)
IF(NOT SIZEOF_SIGSET_T)
SET(sigset_t int)
ENDIF()
CHECK_TYPE_SIZE(mode_t SIZEOF_MODE_T)
MY_CHECK_TYPE_SIZE(mode_t MODE_T)
IF(NOT SIZEOF_MODE_T)
SET(mode_t int)
ENDIF()
......@@ -478,43 +498,41 @@ ENDIF(HAVE_STDINT_H)
IF(NOT APPLE)
# Prevent some checks on OSX, they return ambigious results
# on universal 32/64 bit binariess
CHECK_TYPE_SIZE("char *" SIZEOF_CHARP)
CHECK_TYPE_SIZE(long SIZEOF_LONG)
CHECK_TYPE_SIZE(size_t SIZEOF_SIZE_T)
MY_CHECK_TYPE_SIZE("void *" VOIDP)
MY_CHECK_TYPE_SIZE("char *" CHARP)
MY_CHECK_TYPE_SIZE(long LONG)
MY_CHECK_TYPE_SIZE(size_t SIZE_T)
ENDIF()
CHECK_TYPE_SIZE(char SIZEOF_CHAR)
CHECK_TYPE_SIZE(short SIZEOF_SHORT)
CHECK_TYPE_SIZE(int SIZEOF_INT)
CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
MY_CHECK_TYPE_SIZE(char CHAR)
MY_CHECK_TYPE_SIZE(short SHORT)
MY_CHECK_TYPE_SIZE(int INT)
MY_CHECK_TYPE_SIZE("long long" LONG_LONG)
SET(CMAKE_EXTRA_INCLUDE_FILES stdio.h sys/types.h)
CHECK_TYPE_SIZE(off_t SIZEOF_OFF_T)
CHECK_TYPE_SIZE(uchar SIZEOF_UCHAR)
CHECK_TYPE_SIZE(uint SIZEOF_UINT)
CHECK_TYPE_SIZE(ulong SIZEOF_ULONG)
CHECK_TYPE_SIZE(int8 SIZEOF_INT8)
CHECK_TYPE_SIZE(uint8 SIZEOF_UINT8)
CHECK_TYPE_SIZE(int16 SIZEOF_INT16)
CHECK_TYPE_SIZE(uint16 SIZEOF_UINT16)
CHECK_TYPE_SIZE(int32 SIZEOF_INT32)
CHECK_TYPE_SIZE(uint32 SIZEOF_UINT32)
CHECK_TYPE_SIZE(u_int32_t SIZEOF_U_INT32_T)
CHECK_TYPE_SIZE(int64 SIZEOF_INT64)
CHECK_TYPE_SIZE(uint64 SIZEOF_UINT64)
MY_CHECK_TYPE_SIZE(off_t OFF_T)
MY_CHECK_TYPE_SIZE(uchar UCHAR)
MY_CHECK_TYPE_SIZE(uint UINT)
MY_CHECK_TYPE_SIZE(ulong ULONG)
MY_CHECK_TYPE_SIZE(int8 INT8)
MY_CHECK_TYPE_SIZE(uint8 UINT8)
MY_CHECK_TYPE_SIZE(int16 INT16)
MY_CHECK_TYPE_SIZE(uint16 UINT16)
MY_CHECK_TYPE_SIZE(int32 INT32)
MY_CHECK_TYPE_SIZE(uint32 UINT32)
MY_CHECK_TYPE_SIZE(u_int32_t U_INT32_T)
MY_CHECK_TYPE_SIZE(int64 INT64)
MY_CHECK_TYPE_SIZE(uint64 UINT64)
SET (CMAKE_EXTRA_INCLUDE_FILES sys/types.h)
CHECK_TYPE_SIZE(bool SIZEOF_BOOL)
MY_CHECK_TYPE_SIZE(bool BOOL)
SET(CMAKE_EXTRA_INCLUDE_FILES)
IF(HAVE_SYS_SOCKET_H)
SET(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
ENDIF(HAVE_SYS_SOCKET_H)
CHECK_TYPE_SIZE(socklen_t SIZEOF_SOCKLEN_T)
MY_CHECK_TYPE_SIZE(socklen_t SOCKLEN_T)
SET(CMAKE_EXTRA_INCLUDE_FILES)
IF(HAVE_IEEEFP_H)
SET(CMAKE_EXTRA_INCLUDE_FILES ieeefp.h)
CHECK_TYPE_SIZE(fp_except SIZEOF_FP_EXCEPT)
IF(SIZEOF_FP_EXCEPT)
SET(HAVE_FP_EXCEPT TRUE)
ENDIF()
MY_CHECK_TYPE_SIZE(fp_except FP_EXCEPT)
ENDIF()
......@@ -678,6 +696,7 @@ int main(int ac, char **av) {}
" SIGNAL_RETURN_TYPE_IS_VOID)
IF(SIGNAL_RETURN_TYPE_IS_VOID)
SET(RETSIGTYPE void)
SET(VOID_SIGHANDLER 1)
ELSE(SIGNAL_RETURN_TYPE_IS_VOID)
SET(RETSIGTYPE int)
ENDIF(SIGNAL_RETURN_TYPE_IS_VOID)
......@@ -777,7 +796,7 @@ ENDIF(NOT HAVE_POSIX_SIGNALS)
# Assume regular sprintf
SET(SPRINTFS_RETURNS_INT 1)
IF(CMAKE_COMPILER_IS_GNUXX)
IF(CMAKE_COMPILER_IS_GNUXX AND HAVE_CXXABI_H)
CHECK_CXX_SOURCE_COMPILES("
#include <cxxabi.h>
int main(int argc, char **argv)
......@@ -787,9 +806,6 @@ CHECK_CXX_SOURCE_COMPILES("
return 0;
}"
HAVE_ABI_CXA_DEMANGLE)
IF(HAVE_ABI_CXA_DEMANGLE)
SET(HAVE_CXXABI_H 1)
ENDIF()
ENDIF()
CHECK_C_SOURCE_COMPILES("
......@@ -983,14 +999,8 @@ ELSEIF(WIN32)
SET(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} winsock2.h ws2ipdef.h)
ENDIF()
CHECK_TYPE_SIZE("struct sockaddr_in6" SIZEOF_SOCKADDR_IN6)
CHECK_TYPE_SIZE("struct in6_addr" SIZEOF_IN6_ADDR)
IF(SIZEOF_SOCKADDR_IN6)
SET(HAVE_STRUCT_SOCKADDR_IN6 1)
ENDIF()
IF(SIZEOF_IN6_ADDR)
SET(HAVE_STRUCT_IN6_ADDR 1)
ENDIF()
MY_CHECK_STRUCT_SIZE("sockaddr_in6" SOCKADDR_IN6)
MY_CHECK_STRUCT_SIZE("in6_addr" IN6_ADDR)
IF(HAVE_STRUCT_SOCKADDR_IN6 OR HAVE_STRUCT_IN6_ADDR)
SET(HAVE_IPV6 TRUE CACHE INTERNAL "")
......
......@@ -27,7 +27,7 @@ dnl
dnl When changing the major version number please also check the switch
dnl statement in mysqlbinlog::check_master_version(). You may also need
dnl to update version.c in ndb.
AC_INIT([MySQL Server], [5.5.5-m3], [], [mysql])
AC_INIT([MySQL Server], [5.5.6-m3], [], [mysql])
AC_CONFIG_SRCDIR([sql/mysqld.cc])
AC_CANONICAL_SYSTEM
......
......@@ -24,6 +24,8 @@ ${CMAKE_SOURCE_DIR}/storage/ndb/include/ndbapi
${CMAKE_SOURCE_DIR}/storage/ndb/include/portlib
${CMAKE_SOURCE_DIR}/storage/ndb/include/mgmapi)
# Default install component for the files is Server here
SET(MYSQL_INSTALL_COMPONENT Server)
IF(NOT CMAKE_CROSSCOMPILING)
ADD_EXECUTABLE(comp_err comp_err.c)
......
......@@ -57,7 +57,7 @@ SET(HEADERS
${HEADERS_GEN_CONFIGURE}
)
INSTALL(FILES ${HEADERS} DESTINATION ${INSTALL_INCLUDEDIR})
INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR} FILES_MATCHING PATTERN "*.h")
INSTALL(FILES ${HEADERS} DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development)
INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development FILES_MATCHING PATTERN "*.h" )
......@@ -152,7 +152,7 @@ SET(LIBS clientlib dbug strings vio mysys ${ZLIB_LIBRARY} ${SSL_LIBRARIES})
# Merge several convenience libraries into one big mysqlclient
# and link them together into shared library.
MERGE_LIBRARIES(mysqlclient STATIC ${LIBS})
MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development)
# Visual Studio users need debug static library for debug projects
IF(MSVC)
......@@ -171,11 +171,11 @@ IF(UNIX)
SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION})
ENDIF()
ENDMACRO()
INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR})
INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} COMPONENT SharedLibraries)
ENDIF()
IF(NOT DISABLE_SHARED)
MERGE_LIBRARIES(libmysql SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS})
MERGE_LIBRARIES(libmysql SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS} COMPONENT SharedLibraries)
IF(UNIX)
# libtool compatability
IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE)
......@@ -209,7 +209,7 @@ IF(NOT DISABLE_SHARED)
"${CMAKE_SHARED_LIBRARY_SUFFIX}"
""
linkname)
INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR})
INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} COMPONENT SharedLibraries)
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})
......@@ -218,7 +218,7 @@ IF(NOT DISABLE_SHARED)
"${CMAKE_SHARED_LIBRARY_SUFFIX}"
"${ver}"
linkname)
INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR})
INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} COMPONENT SharedLibraries)
ENDFOREACH()
ENDIF()
ENDIF()
......@@ -125,7 +125,7 @@ FOREACH(LIB ${LIBS})
ENDFOREACH()
MERGE_LIBRARIES(mysqlserver STATIC ${EMBEDDED_LIBS}
OUTPUT_NAME ${MYSQLSERVER_OUTPUT_NAME})
OUTPUT_NAME ${MYSQLSERVER_OUTPUT_NAME} COMPONENT Embedded)
# Visual Studio users need debug static library
IF(MSVC)
......@@ -138,5 +138,6 @@ IF(UNIX)
ENDIF()
IF(MSVC AND NOT DISABLE_SHARED)
MERGE_LIBRARIES(libmysqld SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS})
MERGE_LIBRARIES(libmysqld SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS}
COMPONENT Embedded)
ENDIF()
......@@ -16,6 +16,7 @@
INSTALL(
DIRECTORY .
DESTINATION ${INSTALL_MYSQLTESTDIR}
COMPONENT Test
PATTERN "var/" EXCLUDE
PATTERN "lib/My/SafeProcess" EXCLUDE
PATTERN "lib/t*" EXCLUDE
......
......@@ -13,15 +13,20 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
SET(INSTALL_ARGS
DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess"
COMPONENT Test
)
IF (WIN32)
ADD_EXECUTABLE(my_safe_process safe_process_win.cc)
ADD_EXECUTABLE(my_safe_kill safe_kill_win.cc)
MYSQL_ADD_EXECUTABLE(my_safe_process safe_process_win.cc ${INSTALL_ARGS})
MYSQL_ADD_EXECUTABLE(my_safe_kill safe_kill_win.cc ${INSTALL_ARGS})
ELSE()
ADD_EXECUTABLE(my_safe_process safe_process.cc)
MYSQL_ADD_EXECUTABLE(my_safe_process safe_process.cc ${INSTALL_ARGS})
ENDIF()
INSTALL(TARGETS my_safe_process DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess")
INSTALL(TARGETS my_safe_process DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test)
IF(WIN32)
INSTALL(TARGETS my_safe_kill DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess")
INSTALL(TARGETS my_safe_kill DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test)
ENDIF()
INSTALL(FILES safe_process.pl Base.pm DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess")
INSTALL(FILES safe_process.pl Base.pm DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test)
......@@ -41,6 +41,12 @@ our $opt_with_ndbcluster_only;
our $defaults_file;
our $defaults_extra_file;
our $quick_collect;
# Set to 1 if you want the tests to override
# default storage engine settings, and use MyISAM
# as default. (temporary option used in connection
# with the change of default storage engine to InnoDB)
our $default_myisam= 1;
sub collect_option {
my ($opt, $value)= @_;
......@@ -591,6 +597,9 @@ sub optimize_cases {
my $default_engine=
mtr_match_prefix($opt, "--default-storage-engine=");
# Allow use of uppercase, convert to all lower case
$default_engine =~ tr/A-Z/a-z/;
if (defined $default_engine){
#print " $tinfo->{name}\n";
......@@ -948,10 +957,12 @@ sub collect_one_test_case {
return $tinfo unless $do_innodb_plugin;
}
}
else
elsif ($default_myisam)
{
push(@{$tinfo->{'master_opt'}}, "--loose-skip-innodb");
push(@{$tinfo->{'slave_opt'}}, "--loose-skip-innodb");
# This is a temporary fix to allow non-innodb tests to run even if
# the default storage engine is innodb.
push(@{$tinfo->{'master_opt'}}, "--default-storage-engine=MyISAM");
push(@{$tinfo->{'slave_opt'}}, "--default-storage-engine=MyISAM");
}
if ( $tinfo->{'need_binlog'} )
......
......@@ -944,6 +944,7 @@ sub command_line_setup {
'timestamp' => \&report_option,
'timediff' => \&report_option,
'max-connections=i' => \$opt_max_connections,
'default-myisam!' => \&collect_option,
'help|h' => \$opt_usage,
'list-options' => \$opt_list_options,
......@@ -2843,7 +2844,6 @@ sub mysql_install_db {
mtr_add_arg($args, "--bootstrap");
mtr_add_arg($args, "--basedir=%s", $install_basedir);
mtr_add_arg($args, "--datadir=%s", $install_datadir);
mtr_add_arg($args, "--loose-innodb=OFF");
mtr_add_arg($args, "--loose-skip-falcon");
mtr_add_arg($args, "--loose-skip-ndbcluster");
mtr_add_arg($args, "--tmpdir=%s", "$opt_vardir/tmp/");
......@@ -5560,7 +5560,9 @@ Misc options
timediff With --timestamp, also print time passed since
*previous* test started
max-connections=N Max number of open connection to server in mysqltest
default-myisam Set default storage engine to MyISAM for non-innodb
tests. This is needed after switching default storage
engine to InnoDB.
HERE
exit(1);
......
......@@ -25,7 +25,7 @@ DROP TABLE t1;
# MySQL Bug#39200: optimize table does not recognize
# ROW_FORMAT=COMPRESSED
#
CREATE TABLE t1 (a INT) ROW_FORMAT=compressed;
CREATE TABLE t1 (a INT) ROW_FORMAT=compressed, ENGINE=MyISAM;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
......
......@@ -746,7 +746,7 @@ connect-timeout 10
console FALSE
date-format %Y-%m-%d
datetime-format %Y-%m-%d %H:%i:%s
default-storage-engine MyISAM
default-storage-engine InnoDB
default-time-zone (No default value)
default-week-format 0
delay-key-write ON
......
......@@ -750,7 +750,7 @@ connect-timeout 10
console FALSE
date-format %Y-%m-%d
datetime-format %Y-%m-%d %H:%i:%s
default-storage-engine MyISAM
default-storage-engine InnoDB
default-time-zone (No default value)
default-week-format 0
delay-key-write ON
......
......@@ -266,12 +266,12 @@ engine = x
partition by key (a);
Warnings:
Warning 1286 Unknown storage engine 'x'
Warning 1266 Using storage engine MyISAM for table 't1'
Warning 1266 Using storage engine InnoDB for table 't1'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (a) */
drop table t1;
create table t1 (a int)
......
--max_binlog_size=4096
--max_binlog_size=4096 --default-storage-engine=MyISAM
--innodb_lock_wait_timeout=2
--innodb_lock_wait_timeout=2 --default-storage-engine=MyISAM
--max_binlog_size=4096
--max_binlog_size=4096 --default-storage-engine=MyISAM
--innodb_lock_wait_timeout=2 --binlog-direct-non-transactional-updates=FALSE
--innodb_lock_wait_timeout=2 --binlog-direct-non-transactional-updates=FALSE --default-storage-engine=MyISAM
SELECT * FROM information_schema.engines
WHERE ENGINE = 'InnoDB';
ENGINE InnoDB
SUPPORT YES
SUPPORT DEFAULT
COMMENT Supports transactions, row-level locking, and foreign keys
TRANSACTIONS YES
XA YES
......
......@@ -171,7 +171,7 @@ CREATE TABLE t1_selects
disable_result ENUM('Yes','No') NOT NULL default 'No',
PRIMARY KEY(id),
UNIQUE (my_select)
);
) ENGINE=MyISAM;
# MODES to be checked
CREATE TABLE t1_modes
......@@ -180,7 +180,7 @@ CREATE TABLE t1_modes
my_mode VARCHAR(200) NOT NULL,
PRIMARY KEY(id),
UNIQUE (my_mode)
);
) ENGINE=MyISAM;
--enable_query_log
# The table to be used in the FROM parts of the SELECTs
......
......@@ -918,9 +918,9 @@ ERROR HY000: Too big row
alter table t1 row_format=compact;
create index t1u on t1 (u(1));
drop table t1;
set global innodb_file_per_table=0;
set global innodb_file_format=Antelope;
set global innodb_file_format_max=Antelope;
set global innodb_file_per_table=1;
set global innodb_file_format=Barracuda;
set global innodb_file_format_max=Barracuda;
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
CREATE TABLE t1(
......
set session innodb_strict_mode=0;
set global innodb_file_per_table=off;
set global innodb_file_format=`0`;
create table t0(a int primary key) engine=innodb row_format=compressed;
......@@ -393,8 +394,8 @@ table_schema table_name row_format
test t8 Compact
test t9 Redundant
drop table t8, t9;
set global innodb_file_per_table=0;
set global innodb_file_format=Antelope;
set global innodb_file_per_table=1;
set global innodb_file_format=Barracuda;
set global innodb_file_per_table=on;
set global innodb_file_format=`Barracuda`;
set global innodb_file_format_max=`Antelope`;
......
......@@ -125,6 +125,6 @@ Warning 1264 Out of range value for column 'col78' at row 1
Warning 1265 Data truncated for column 'col79' at row 1
Warning 1264 Out of range value for column 'col84' at row 1
DROP TABLE bug52745;
SET GLOBAL innodb_file_format=Antelope;
SET GLOBAL innodb_file_format=Barracuda;
SET GLOBAL innodb_file_format_max=Antelope;
SET GLOBAL innodb_file_per_table=0;
SET GLOBAL innodb_file_per_table=1;
......@@ -11,6 +11,6 @@ Error 139 Too big row
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
Error 1030 Got error 139 from storage engine
DROP TABLE bug53591;
SET GLOBAL innodb_file_format=Antelope;
SET GLOBAL innodb_file_format=Barracuda;
SET GLOBAL innodb_file_format_max=Antelope;
SET GLOBAL innodb_file_per_table=0;
SET GLOBAL innodb_file_per_table=1;
select @@innodb_file_format;
@@innodb_file_format
Antelope
Barracuda
select @@innodb_file_format_check;
@@innodb_file_format_check
1
......@@ -17,14 +17,14 @@ Barracuda
set global innodb_file_format=default;
select @@innodb_file_format;
@@innodb_file_format
Antelope
Barracuda
set global innodb_file_format=on;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'ON'
set global innodb_file_format=off;
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'off'
select @@innodb_file_format;
@@innodb_file_format
Antelope
Barracuda
set global innodb_file_format_max=antelope;
set global innodb_file_format_max=barracuda;
set global innodb_file_format_max=cheetah;
......@@ -46,5 +46,5 @@ Antelope
set global innodb_file_format_max=antelope;
set global innodb_file_format_check=off;
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
SET GLOBAL innodb_file_format=Antelope;
SET GLOBAL innodb_file_format=Barracuda;
SET GLOBAL innodb_file_format_max=Antelope;
--default-storage-engine=MyISAM
--innodb-strict-mode=0
--innodb-file-per-table=0
--default-storage-engine=MyISAM
--innodb-strict-mode=0
--innodb-file-per-table=0
--binlog_cache_size=32768 --innodb_lock_wait_timeout=1
--default-storage-engine=MyISAM
--innodb-strict-mode=0
--innodb-file-per-table=0
--default-storage-engine=MyISAM
--innodb-strict-mode=0
--innodb-file-per-table=0
--innodb-use-sys-malloc=true
--default-storage-engine=MyISAM
--loose-innodb-use-sys-malloc=true
--loose-innodb-use-sys-malloc=true
......@@ -3,9 +3,12 @@
let $per_table=`select @@innodb_file_per_table`;
let $format=`select @@innodb_file_format`;
let $innodb_file_format_max_orig=`select @@innodb_file_format_max`;
let $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`;
set session innodb_strict_mode=0;
set global innodb_file_per_table=off;
set global innodb_file_format=`0`;
create table t0(a int primary key) engine=innodb row_format=compressed;
create table t00(a int primary key) engine=innodb
key_block_size=4 row_format=compressed;
......@@ -342,3 +345,4 @@ drop table normal_table, zip_table;
eval set global innodb_file_format=$format;
eval set global innodb_file_per_table=$per_table;
eval set global innodb_file_format_max=$innodb_file_format_max_orig;
eval set session innodb_strict_mode=$innodb_strict_mode_orig;
......@@ -2,6 +2,7 @@
# It tests setting the global variable "innodb_file_format_max" (
# originally "innodb_file_format_check") with a user-Defined Variable.
--source include/not_embedded.inc
--source include/have_innodb.inc
# Save the value (Antelope) in 'innodb_file_format_max' to
......
-- source include/not_embedded.inc
-- source include/have_innodb.inc
let $innodb_file_format_orig=`select @@innodb_file_format`;
......
--innodb-lock-wait-timeout=2
--innodb-lock-wait-timeout=2 --default-storage-engine=MyISAM
......@@ -57,6 +57,7 @@ t1 CREATE TABLE `t1` (
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
t1.frm
t1.ibd
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
......@@ -78,6 +79,7 @@ t1 CREATE TABLE `t1` (
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (YEAR(f_date)) */
t1#P#p0.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
......@@ -96,6 +98,7 @@ t1 CREATE TABLE `t1` (
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (DAYOFYEAR(f_date)) */
t1#P#p0.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
......@@ -112,6 +115,7 @@ t1 CREATE TABLE `t1` (
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (YEAR(f_date)) */
t1#P#p0.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
......@@ -137,6 +141,9 @@ t1 CREATE TABLE `t1` (
(PARTITION p0 ENGINE = InnoDB,
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
......@@ -161,6 +168,10 @@ t1 CREATE TABLE `t1` (
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB,
PARTITION part2 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
......@@ -186,6 +197,14 @@ t1 CREATE TABLE `t1` (
PARTITION p5 ENGINE = InnoDB,
PARTITION p6 ENGINE = InnoDB,
PARTITION p7 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#p4.ibd
t1#P#p5.ibd
t1#P#p6.ibd
t1#P#p7.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
......@@ -222,6 +241,13 @@ t1 CREATE TABLE `t1` (
PARTITION p4 ENGINE = InnoDB,
PARTITION p5 ENGINE = InnoDB,
PARTITION p6 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#p4.ibd
t1#P#p5.ibd
t1#P#p6.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
......@@ -244,6 +270,12 @@ t1 CREATE TABLE `t1` (
PARTITION part2 ENGINE = InnoDB,
PARTITION p4 ENGINE = InnoDB,
PARTITION p5 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#p4.ibd
t1#P#p5.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
......@@ -265,6 +297,11 @@ t1 CREATE TABLE `t1` (
PARTITION part7 ENGINE = InnoDB,
PARTITION part2 ENGINE = InnoDB,
PARTITION p4 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#p4.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
......@@ -285,6 +322,10 @@ t1 CREATE TABLE `t1` (
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB,
PARTITION part2 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
......@@ -304,6 +345,9 @@ t1 CREATE TABLE `t1` (
(PARTITION p0 ENGINE = InnoDB,
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
......@@ -322,6 +366,8 @@ t1 CREATE TABLE `t1` (
/*!50100 PARTITION BY HASH (YEAR(f_date))
(PARTITION p0 ENGINE = InnoDB,
PARTITION part1 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
......@@ -339,6 +385,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY HASH (YEAR(f_date))
(PARTITION p0 ENGINE = InnoDB) */
t1#P#p0.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
......@@ -359,6 +406,7 @@ t1 CREATE TABLE `t1` (
`f_varchar` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
t1.frm
t1.ibd
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
......@@ -398,6 +446,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
t1.frm
t1.ibd
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
......@@ -420,6 +469,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (f_int1) */
t1#P#p0.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
......@@ -448,6 +498,9 @@ t1 CREATE TABLE `t1` (
(PARTITION p0 ENGINE = InnoDB,
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
......@@ -472,6 +525,10 @@ t1 CREATE TABLE `t1` (
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB,
PARTITION part2 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
......@@ -500,6 +557,14 @@ t1 CREATE TABLE `t1` (
PARTITION p5 ENGINE = InnoDB,
PARTITION p6 ENGINE = InnoDB,
PARTITION p7 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#p4.ibd
t1#P#p5.ibd
t1#P#p6.ibd
t1#P#p7.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
......@@ -534,6 +599,13 @@ t1 CREATE TABLE `t1` (
PARTITION p4 ENGINE = InnoDB,
PARTITION p5 ENGINE = InnoDB,
PARTITION p6 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#p4.ibd
t1#P#p5.ibd
t1#P#p6.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
......@@ -559,6 +631,12 @@ t1 CREATE TABLE `t1` (
PARTITION part2 ENGINE = InnoDB,
PARTITION p4 ENGINE = InnoDB,
PARTITION p5 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#p4.ibd
t1#P#p5.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
......@@ -583,6 +661,11 @@ t1 CREATE TABLE `t1` (
PARTITION part7 ENGINE = InnoDB,
PARTITION part2 ENGINE = InnoDB,
PARTITION p4 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#p4.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
......@@ -606,6 +689,10 @@ t1 CREATE TABLE `t1` (
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB,
PARTITION part2 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1#P#part2.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
......@@ -628,6 +715,9 @@ t1 CREATE TABLE `t1` (
(PARTITION p0 ENGINE = InnoDB,
PARTITION part1 ENGINE = InnoDB,
PARTITION part7 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1#P#part7.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
......@@ -649,6 +739,8 @@ t1 CREATE TABLE `t1` (
/*!50100 PARTITION BY KEY (f_int1)
(PARTITION p0 ENGINE = InnoDB,
PARTITION part1 ENGINE = InnoDB) */
t1#P#p0.ibd
t1#P#part1.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
......@@ -669,6 +761,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY KEY (f_int1)
(PARTITION p0 ENGINE = InnoDB) */
t1#P#p0.ibd
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
......@@ -692,6 +785,7 @@ t1 CREATE TABLE `t1` (
`f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
t1.frm
t1.ibd
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
......
--one-thread --thread-handling=no-threads --loose-performance-schema-max-thread_instances=10
--one-thread --thread-handling=no-threads --loose-performance-schema-max-thread_instances=10 --default-storage-engine=MyISAM --skip-innodb
......@@ -7,11 +7,11 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (c1 char(50))
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Xid # # COMMIT /* XID */
DROP TABLE t1;
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
......
......@@ -8,15 +8,15 @@ start slave;
STOP SLAVE;
**** On Master ****
SET SESSION BINLOG_FORMAT=ROW;
CREATE TABLE t1 (a INT, b INT);
CREATE TABLE t2 (c INT, d INT);
CREATE TABLE t1 (a INT, b INT) ENGINE=MyISAM;
CREATE TABLE t2 (c INT, d INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,1),(2,4),(3,9);
INSERT INTO t2 VALUES (1,1),(2,8),(3,27);
UPDATE t1,t2 SET b = d, d = b * 2 WHERE a = c;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT)
master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (c INT, d INT)
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b INT) ENGINE=MyISAM
master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (c INT, d INT) ENGINE=MyISAM
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
......
......@@ -66,7 +66,7 @@ SHOW CREATE TABLE mysqltest1.tmp2;
Table Create Table
tmp2 CREATE TEMPORARY TABLE `tmp2` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=InnoDB DEFAULT CHARSET=latin1
######### Must return no rows here #########
SELECT COUNT(*) FROM mysqltest1.t1;
COUNT(*)
......
RESET MASTER;
CREATE TABLE t1 (c1 char(50));
CREATE TABLE t1 (c1 char(50)) ENGINE=MyISAM;
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
LOAD DATA CONCURRENT INFILE '../../std_data/words.dat' INTO TABLE t1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (c1 char(50))
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (c1 char(50)) ENGINE=MyISAM
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=#
master-bin.000001 # Execute_load_query # # use `test`; LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`c1`) ;file_id=#
......
--binlog_ignore_db=test_ignore
--binlog_ignore_db=test_ignore --default-storage-engine=MyISAM
--binlog_cache_size=4096 --max_binlog_cache_size=7680
--binlog_cache_size=4096 --max_binlog_cache_size=7680 --default-storage-engine=MyISAM
--skip-external-locking
--default-storage-engine=MyISAM
......@@ -17,8 +17,8 @@ STOP SLAVE;
connection master;
SET SESSION BINLOG_FORMAT=ROW;
CREATE TABLE t1 (a INT, b INT);
CREATE TABLE t2 (c INT, d INT);
CREATE TABLE t1 (a INT, b INT) ENGINE=MyISAM;
CREATE TABLE t2 (c INT, d INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,1),(2,4),(3,9);
INSERT INTO t2 VALUES (1,1),(2,8),(3,27);
let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
......
......@@ -4,7 +4,7 @@
RESET MASTER;
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
CREATE TABLE t1 (c1 char(50));
CREATE TABLE t1 (c1 char(50)) ENGINE=MyISAM;
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
LOAD DATA CONCURRENT INFILE '../../std_data/words.dat' INTO TABLE t1;
-- source include/show_binlog_events.inc
......
--default-storage-engine=MyISAM
--innodb-file-per-table=0
--sync-relay-log-info=1 --relay-log-recovery=1 --innodb_file_format_check='ON'
--sync-relay-log-info=1 --relay-log-recovery=1 --innodb_file_format_check='ON' --default-storage-engine=MyISAM --innodb-file-per-table=0
SET @start_global_value = @@global.default_storage_engine;
SELECT @start_global_value;
@start_global_value
MyISAM
InnoDB
SET @start_session_value = @@session.default_storage_engine;
SELECT @start_session_value;
@start_session_value
MyISAM
InnoDB
'#--------------------FN_DYNVARS_005_01-------------------------#'
SET @@global.default_storage_engine = INNODB;
SET @@global.default_storage_engine = DEFAULT;
SELECT @@global.default_storage_engine;
@@global.default_storage_engine
MyISAM
InnoDB
SET @@session.default_storage_engine = INNODB;
SET @@session.default_storage_engine = DEFAULT;
SELECT @@session.default_storage_engine;
@@session.default_storage_engine
MyISAM
InnoDB
'#--------------------FN_DYNVARS_005_02-------------------------#'
SET @@global.default_storage_engine = MYISAM;
SELECT @@global.default_storage_engine;
......@@ -110,8 +110,8 @@ SET @@default_storage_engine = @start_global_value;
SET @@global.default_storage_engine = @start_global_value;
SELECT @@global.default_storage_engine;
@@global.default_storage_engine
MyISAM
InnoDB
SET @@session.default_storage_engine = @start_session_value;
SELECT @@session.default_storage_engine;
@@session.default_storage_engine
MyISAM
InnoDB
SET @start_global_value = @@global.innodb_file_format;
SELECT @start_global_value;
@start_global_value
Antelope
Barracuda
Valid values are 'Antelope' and 'Barracuda'
select @@global.innodb_file_format in ('Antelope', 'Barracuda');
@@global.innodb_file_format in ('Antelope', 'Barracuda')
1
select @@global.innodb_file_format;
@@global.innodb_file_format
Antelope
Barracuda
select @@session.innodb_file_format;
ERROR HY000: Variable 'innodb_file_format' is a GLOBAL variable
show global variables like 'innodb_file_format';
Variable_name Value
innodb_file_format Antelope
innodb_file_format Barracuda
show session variables like 'innodb_file_format';
Variable_name Value
innodb_file_format Antelope
innodb_file_format Barracuda
select * from information_schema.global_variables where variable_name='innodb_file_format';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT Antelope
INNODB_FILE_FORMAT Barracuda
select * from information_schema.session_variables where variable_name='innodb_file_format';
VARIABLE_NAME VARIABLE_VALUE
INNODB_FILE_FORMAT Antelope
INNODB_FILE_FORMAT Barracuda
set global innodb_file_format='Antelope';
select @@global.innodb_file_format;
@@global.innodb_file_format
......@@ -56,4 +56,4 @@ ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'Salmon'
SET @@global.innodb_file_format = @start_global_value;
SELECT @@global.innodb_file_format;
@@global.innodb_file_format
Antelope
Barracuda
SET @start_global_value = @@global.innodb_strict_mode;
SELECT @start_global_value;
@start_global_value
0
1
Valid values are 'ON' and 'OFF'
select @@global.innodb_strict_mode in (0, 1);
@@global.innodb_strict_mode in (0, 1)
1
select @@global.innodb_strict_mode;
@@global.innodb_strict_mode
0
1
select @@session.innodb_strict_mode in (0, 1);
@@session.innodb_strict_mode in (0, 1)
1
select @@session.innodb_strict_mode;
@@session.innodb_strict_mode
0
1
show global variables like 'innodb_strict_mode';
Variable_name Value
innodb_strict_mode OFF
innodb_strict_mode ON
show session variables like 'innodb_strict_mode';
Variable_name Value
innodb_strict_mode OFF
innodb_strict_mode ON
select * from information_schema.global_variables where variable_name='innodb_strict_mode';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STRICT_MODE OFF
INNODB_STRICT_MODE ON
select * from information_schema.session_variables where variable_name='innodb_strict_mode';
VARIABLE_NAME VARIABLE_VALUE
INNODB_STRICT_MODE OFF
INNODB_STRICT_MODE ON
set global innodb_strict_mode='OFF';
set session innodb_strict_mode='OFF';
select @@global.innodb_strict_mode;
......@@ -117,4 +117,4 @@ INNODB_STRICT_MODE ON
SET @@global.innodb_strict_mode = @start_global_value;
SELECT @@global.innodb_strict_mode;
@@global.innodb_strict_mode
0
1
SET @start_global_value = @@global.storage_engine;
SELECT @start_global_value;
@start_global_value
MyISAM
InnoDB
SET @start_session_value = @@session.storage_engine;
SELECT @start_session_value;
@start_session_value
MyISAM
InnoDB
'#--------------------FN_DYNVARS_005_01-------------------------#'
SET @@global.storage_engine = INNODB;
SET @@global.storage_engine = DEFAULT;
SELECT @@global.storage_engine;
@@global.storage_engine
MyISAM
InnoDB
SET @@session.storage_engine = INNODB;
SET @@session.storage_engine = DEFAULT;
SELECT @@session.storage_engine;
@@session.storage_engine
MyISAM
InnoDB
'#--------------------FN_DYNVARS_005_02-------------------------#'
SET @@global.storage_engine = MYISAM;
SELECT @@global.storage_engine;
......@@ -110,8 +110,8 @@ SET @@storage_engine = @start_global_value;
SET @@global.storage_engine = @start_global_value;
SELECT @@global.storage_engine;
@@global.storage_engine
MyISAM
InnoDB
SET @@session.storage_engine = @start_session_value;
SELECT @@session.storage_engine;
@@session.storage_engine
MyISAM
InnoDB
......@@ -15,6 +15,7 @@
# #
########################################################################
--source include/not_embedded.inc
--source include/have_innodb.inc
--source include/load_sysvars.inc
......
......@@ -2,7 +2,7 @@
# 2010-01-25 - Added
#
--source include/not_embedded.inc
--source include/have_innodb.inc
SET @start_global_value = @@global.innodb_file_format_max;
......
......@@ -21,6 +21,7 @@
# #
########################################################################
--source include/not_embedded.inc
--source include/have_innodb.inc
--source include/load_sysvars.inc
......
--default-storage-engine=MyISAM --skip-innodb
......@@ -8,8 +8,7 @@ drop table if exists t1;
# Add the datadir to the bootstrap command
let $MYSQLD_DATADIR= `select @@datadir`;
let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD --datadir=$MYSQLD_DATADIR;
let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD --datadir=$MYSQLD_DATADIR --default-storage-engine=MyISAM --skip-innodb;
#
# Check that --bootstrap reads from stdin
#
......@@ -20,7 +19,6 @@ EOF
--exec $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
drop table t1;
remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_test.sql;
#
# Check that --bootstrap of file with SQL error returns error
#
......
......@@ -29,7 +29,7 @@ DROP TABLE t1;
--echo # ROW_FORMAT=COMPRESSED
--echo #
CREATE TABLE t1 (a INT) ROW_FORMAT=compressed;
CREATE TABLE t1 (a INT) ROW_FORMAT=compressed, ENGINE=MyISAM;
SHOW CREATE TABLE t1;
OPTIMIZE TABLE t1;
SHOW CREATE TABLE t1;
......
--skip-stack-trace --skip-core-file
--default-storage-engine=MyISAM
--innodb-file-per-table=0
--default-storage-engine=MyISAM
--default-storage-engine=MyISAM
--default-storage-engine=MyISAM
--default-storage-engine=MyISAM
--default-storage-engine=MyISAM
--default-storage-engine=MyISAM
--default-storage-engine=MyISAM
--source include/not_embedded.inc
--source include/have_partition.inc
--source include/have_innodb.inc
......
--innodb_lock_wait_timeout=2
--innodb_lock_wait_timeout=2 --default-storage-engine=MyISAM
--default-storage-engine=MyISAM
--default-storage-engine=MyISAM
......@@ -93,10 +93,6 @@ my_bool my_basic_init(void)
my_umask_dir= (int) (atoi_octal(str) | 0700);
#endif
/* $HOME is needed early to parse configuration files located in ~/ */
if ((home_dir= getenv("HOME")) != 0)
home_dir= intern_filename(home_dir_buff, home_dir);
init_glob_errs();
instrumented_stdin.m_file= stdin;
......@@ -122,6 +118,10 @@ my_bool my_basic_init(void)
return 1;
#endif
/* $HOME is needed early to parse configuration files located in ~/ */
if ((home_dir= getenv("HOME")) != 0)
home_dir= intern_filename(home_dir_buff, home_dir);
return 0;
}
......
# Copyright 2010, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
IF(NOT WIN32)
RETURN()
ENDIF()
FIND_PATH(WIX_DIR heat.exe
$ENV{WIX_DIR}/bin
$ENV{ProgramFiles}/wix/bin
"$ENV{ProgramFiles}/Windows Installer XML v3/bin"
"$ENV{ProgramFiles}/Windows Installer XML v3.5/bin"
)
IF(NOT WIX_DIR)
IF(NOT _WIX_DIR_CHECKED)
SET(_WIX_DIR_CHECKED 1 CACHE INTERNAL "")
MESSAGE(STATUS "Cannot find wix 3, installer project will not be generated")
ENDIF()
RETURN()
ENDIF()
ADD_SUBDIRECTORY(ca)
# extra.wxs.in needs DATADIR_MYSQL_FILES and DATADIR_PERFORMANCE_SCHEMA_FILES, i.e
# Wix-compatible file lists for ${builddir}\sql\data\{mysql,performance_schema}
FOREACH(dir mysql performance_schema)
FILE(GLOB files ${CMAKE_BINARY_DIR}/sql/data/${dir}/*)
SET(filelist)
FOREACH(f ${files})
FILE(TO_NATIVE_PATH "${f}" file_native_path)
GET_FILENAME_COMPONENT(file_name "${f}" NAME)
SET(filelist
"${filelist}
<File Id='${file_name}' Source='${file_native_path}'/>")
ENDFOREACH()
STRING(TOUPPER ${dir} DIR_UPPER)
SET(DATADIR_${DIR_UPPER}_FILES "${filelist}")
ENDFOREACH()
FIND_PROGRAM(HEAT_EXECUTABLE heat ${WIX_DIR})
FIND_PROGRAM(CANDLE_EXECUTABLE candle ${WIX_DIR})
FIND_PROGRAM(LIGHT_EXECUTABLE light ${WIX_DIR})
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/create_msi.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake
@ONLY)
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(WixWin64 " Win64='yes'")
ELSE()
SET(WixWin64)
ENDIF()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/extra.wxs.in
${CMAKE_CURRENT_BINARY_DIR}/extra.wxs)
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
SET(CONFIG_PARAM "-DCMAKE_INSTALL_CONFIG_NAME=${CMAKE_CFG_INTDIR}")
ENDIF()
# WiX wants the license text as rtf; if there is no rtf license,
# we create a fake one from the plain text COPYING file.
IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.rtf")
MESSAGE("copying COPYING.rtf")
FILE(READ "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.rtf" CONTENTS)
FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.rtf" "${CONTENTS}")
ELSE()
MESSAGE("creating COPYING.rtf")
FILE(READ "${CMAKE_CURRENT_SOURCE_DIR}/../../COPYING" CONTENTS)
STRING(REGEX REPLACE "\n" "\\\\par\n" CONTENTS "${CONTENTS}")
STRING(REGEX REPLACE "\t" "\\\\tab" CONTENTS "${CONTENTS}")
FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.rtf" "{\\rtf1\\ansi\\deff0{\\fonttbl{\\f0\\fnil\\fcharset0 Courier New;}}\\viewkind4\\uc1\\pard\\lang1031\\f0\\fs15")
FILE(APPEND "${CMAKE_CURRENT_BINARY_DIR}/COPYING.rtf" "${CONTENTS}")
FILE(APPEND "${CMAKE_CURRENT_BINARY_DIR}/COPYING.rtf" "\n}\n")
ENDIF()
ADD_CUSTOM_TARGET(
MSI
COMMAND set VS_UNICODE_OUTPUT=
COMMAND ${CMAKE_COMMAND}
-DCPACK_WIX_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/CPackWixConfig.cmake
-DCPACK_WIX_INCLUDE=${CMAKE_CURRENT_BINARY_DIR}/extra.wxs
${CONFIG_PARAM}
-P ${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake
)
ADD_DEPENDENCIES(MSI wixca)
ADD_CUSTOM_TARGET(
MSI_ESSENTIALS
COMMAND set VS_UNICODE_OUTPUT=
COMMAND ${CMAKE_COMMAND} -DESSENTIALS=1
-DCPACK_WIX_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/CPackWixConfig.cmake
-DCPACK_WIX_INCLUDE=${CMAKE_CURRENT_BINARY_DIR}/extra.wxs
${CONFIG_PARAM}
-P ${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake
)
ADD_DEPENDENCIES(MSI wixca)
IF(ESSENTIALS)
MESSAGE("Essentials!")
SET(CPACK_COMPONENTS_USED "Server;Client;DataFiles")
SET(CPACK_WIX_UI "WixUI_InstallDir")
MATH(EXPR bits ${CMAKE_SIZEOF_VOID_P}*8)
SET(CPACK_PACKAGE_FILE_NAME "mysql-essentials-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH}-win${bits}")
ELSE()
SET(CPACK_COMPONENTS_USED
"Server;Client;DataFiles;Development;SharedLibraries;Embedded;Debuginfo;Documentation;IniFiles;Readme;Server_Scripts")
ENDIF()
# Some components like Embedded are optional
# We will build MSI without embedded if it was not selected for build
#(need to modify CPACK_COMPONENTS_ALL for that)
SET(CPACK_ALL)
FOREACH(comp1 ${CPACK_COMPONENTS_USED})
SET(found)
FOREACH(comp2 ${CPACK_COMPONENTS_ALL})
IF(comp1 STREQUAL comp2)
SET(found 1)
BREAK()
ENDIF()
ENDFOREACH()
IF(found)
SET(CPACK_ALL ${CPACK_ALL} ${comp1})
ENDIF()
ENDFOREACH()
SET(CPACK_COMPONENTS_ALL ${CPACK_ALL})
# Always install (hidden), includes Readme files
SET(CPACK_COMPONENT_GROUP_ALWAYSINSTALL_HIDDEN 1)
SET(CPACK_COMPONENT_README_GROUP "AlwaysInstall")
# Feature MySQL Server
SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_DISPLAY_NAME "MySQL Server")
SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_EXPANDED "1")
SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_DESCRIPTION "Install MySQL Server")
# Subfeature "Server" (hidden)
SET(CPACK_COMPONENT_SERVER_GROUP "MySQLServer")
SET(CPACK_COMPONENT_SERVER_HIDDEN 1)
# Subfeature "Client"
SET(CPACK_COMPONENT_CLIENT_GROUP "MySQLServer")
SET(CPACK_COMPONENT_CLIENT_DISPLAY_NAME "Client Programs")
SET(CPACK_COMPONENT_CLIENT_DESCRIPTION
"Various helpful (commandline) tools including the mysql command line client" )
#Subfeature "Data Files"
SET(CPACK_COMPONENT_DATAFILES_GROUP "MySQLServer")
SET(CPACK_COMPONENT_DATAFILES_DISPLAY_NAME "Server data files")
SET(CPACK_COMPONENT_DATAFILES_DESCRIPTION "Server data files" )
#Feature "Devel"
SET(CPACK_COMPONENT_GROUP_DEVEL_DISPLAY_NAME "Development Components")
SET(CPACK_COMPONENT_GROUP_DEVEL_DESCRIPTION "Installs C/C++ header files and libraries")
#Subfeature "Development"
SET(CPACK_COMPONENT_DEVELOPMENT_GROUP "Devel")
SET(CPACK_COMPONENT_DEVELOPMENT_HIDDEN 1)
#Subfeature "Shared libraries"
SET(CPACK_COMPONENT_SHAREDLIBRARIES_GROUP "Devel")
SET(CPACK_COMPONENT_SHAREDLIBRARIES_DISPLAY_NAME "Client C API library (shared)")
SET(CPACK_COMPONENT_SHAREDLIBRARIES_DESCRIPTION "Installs shared client library")
#Subfeature "Embedded"
SET(CPACK_COMPONENT_EMBEDDED_GROUP "Devel")
SET(CPACK_COMPONENT_EMBEDDED_DISPLAY_NAME "Embedded server library")
SET(CPACK_COMPONENT_EMBEDDED_DESCRIPTION "Installs embedded server library")
SET(CPACK_COMPONENT_EMBEDDED_WIX_LEVEL 2)
#Feature Debug Symbols
SET(CPACK_COMPONENT_GROUP_DEBUGSYMBOLS_DISPLAY_NAME "Debug Symbols")
SET(CPACK_COMPONENT_GROUP_DEBUGSYMBOLS_DESCRIPTION "Installs Debug Symbols")
SET(CPACK_COMPONENT_GROUP_DEBUGSYMBOLS_WIX_LEVEL 2)
SET(CPACK_COMPONENT_DEBUGINFO_GROUP "DebugSymbols")
SET(CPACK_COMPONENT_DEBUGINFO_HIDDEN 1)
#Feature Documentation
SET(CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "Documentation")
SET(CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION "Installs documentation")
SET(CPACK_COMPONENT_DOCUMENTATION_WIX_LEVEL 2)
#Feature tests
SET(CPACK_COMPONENT_TEST_DISPLAY_NAME "Tests")
SET(CPACK_COMPONENT_TEST_DESCRIPTION "Installs unittests (requires Perl to run)")
SET(CPACK_COMPONENT_TEST_WIX_LEVEL 2)
#Feature Misc (hidden, installs only if everything is installed)
SET(CPACK_COMPONENT_GROUP_MISC_HIDDEN 1)
SET(CPACK_COMPONENT_GROUP_MISC_WIX_LEVEL 100)
SET(CPACK_COMPONENT_INIFILES_GROUP "Misc")
SET(CPACK_COMPONENT_SERVER_SCRIPTS_GROUP "Misc")
# Copyright 2010, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
INCLUDE_DIRECTORIES(${WIX_DIR}/../SDK/inc)
LINK_DIRECTORIES(${WIX_DIR}/../SDK/lib)
SET(WIXCA_SOURCES CustomAction.cpp CustomAction.rc CustomAction.def)
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
LINK_LIBRARIES(wcautil_x64 dutil_x64 msi version)
ELSE()
LINK_LIBRARIES(wcautil dutil msi version)
ENDIF()
ADD_LIBRARY(wixca SHARED ${WIXCA_SOURCES})
/* Copyright 2010, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifndef UNICODE
#define UNICODE
#endif
#include <windows.h>
#include <winreg.h>
#include <msi.h>
#include <msiquery.h>
#include <wcautil.h>
#include <string.h>
#include <strsafe.h>
/*
* Search the registry for a service whose ImagePath starts
* with our install directory. Stop and remove it if requested.
*/
static TCHAR last_service_name[128];
int remove_service(TCHAR *installdir, int check_only) {
HKEY hKey;
int done = 0;
if(wcslen(installdir) < 3) {
WcaLog(LOGMSG_STANDARD, "INSTALLDIR is suspiciously short, better not do anything.");
return 0;
}
if(check_only == 0) {
WcaLog(LOGMSG_STANDARD, "Determining number of matching services...");
int servicecount = remove_service(installdir, 1);
if(servicecount <= 0) {
WcaLog(LOGMSG_STANDARD, "No services found, not removing anything.");
return 0;
} else if(servicecount == 1) {
TCHAR buf[256];
swprintf_s(buf, sizeof(buf), TEXT("There is a service called '%ls' set up to run from this installation. Do you wish me to stop and remove that service?"), last_service_name);
int rc = MessageBox(NULL, buf, TEXT("Removing MySQL Server"), MB_ICONQUESTION|MB_YESNOCANCEL|MB_SYSTEMMODAL);
if(rc == IDCANCEL) return -1;
if(rc != IDYES) return 0;
} else if(servicecount > 0) {
TCHAR buf[256];
swprintf_s(buf, sizeof(buf), TEXT("There appear to be %d services set up to run from this installation. Do you wish me to stop and remove those services?"), servicecount);
int rc = MessageBox(NULL, buf, TEXT("Removing MySQL Server"), MB_ICONQUESTION|MB_YESNOCANCEL|MB_SYSTEMMODAL);
if(rc == IDCANCEL) return -1;
if(rc != IDYES) return 0;
}
}
if(check_only == -1) check_only = 0;
WcaLog(LOGMSG_STANDARD, "Looking for service...");
WcaLog(LOGMSG_STANDARD, "INSTALLDIR = %ls", installdir);
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, TEXT("SYSTEM\\CurrentControlSet\\services"), 0, KEY_READ, &hKey)==ERROR_SUCCESS) {
DWORD index = 0;
TCHAR keyname[1024];
DWORD keylen = sizeof(keyname);
FILETIME t;
/* Go through all services in the registry */
while(RegEnumKeyExW(hKey, index, keyname, &keylen, NULL, NULL, NULL, &t) == ERROR_SUCCESS) {
HKEY hServiceKey = 0;
TCHAR path[1024];
DWORD pathlen = sizeof(path)-1;
if (RegOpenKeyExW(hKey, keyname, NULL, KEY_READ, &hServiceKey) == ERROR_SUCCESS) {
/* Look at the ImagePath value of each service */
if (RegQueryValueExW(hServiceKey, TEXT("ImagePath"), NULL, NULL, (LPBYTE)path, &pathlen) == ERROR_SUCCESS) {
path[pathlen] = 0;
TCHAR *p = path;
if(p[0] == '"') p += 1;
/* See if it is similar to our install directory */
if(wcsncmp(p, installdir, wcslen(installdir)) == 0) {
WcaLog(LOGMSG_STANDARD, "Found service '%ls' with ImagePath '%ls'.", keyname, path);
swprintf_s(last_service_name, sizeof(last_service_name), TEXT("%ls"), keyname);
/* If we are supposed to stop and remove the service... */
if(!check_only) {
WcaLog(LOGMSG_STANDARD, "Trying to stop the service.");
SC_HANDLE hSCM = NULL;
hSCM = OpenSCManager(NULL, NULL, SC_MANAGER_CONNECT);
if(hSCM != NULL) {
SC_HANDLE hService = NULL;
hService = OpenService(hSCM, keyname, SERVICE_STOP|SERVICE_QUERY_STATUS|DELETE);
if(hService != NULL) {
WcaLog(LOGMSG_STANDARD, "Waiting for the service to stop...");
SERVICE_STATUS status;
/* Attempt to stop the service */
if(ControlService(hService, SERVICE_CONTROL_STOP, &status)) {
/* Now wait until it's stopped */
while("it's one big, mean and cruel world out there") {
if(!QueryServiceStatus(hService, &status)) break;
if(status.dwCurrentState == SERVICE_STOPPED) break;
Sleep(1000);
}
WcaLog(LOGMSG_STANDARD, "Stopped the service.");
}
/* Mark the service for deletion */
DeleteService(hService);
CloseServiceHandle(hService);
}
CloseServiceHandle(hSCM);
}
}
done++;
}
}
RegCloseKey(hServiceKey);
}
index++;
keylen = sizeof(keyname)-1;
}
RegCloseKey(hKey);
} else {
WcaLog(LOGMSG_STANDARD, "Can't seem to go through the list of installed services in the registry.");
}
return done;
}
UINT wrap(MSIHANDLE hInstall, char *name, int check_only) {
HRESULT hr = S_OK;
UINT er = ERROR_SUCCESS;
hr = WcaInitialize(hInstall, name);
ExitOnFailure(hr, "Failed to initialize");
WcaLog(LOGMSG_STANDARD, "Initialized.");
TCHAR INSTALLDIR[1024];
DWORD INSTALLDIR_size = sizeof(INSTALLDIR);
if(MsiGetPropertyW(hInstall, TEXT("CustomActionData"), INSTALLDIR, &INSTALLDIR_size) == ERROR_SUCCESS) {
int rc = remove_service(INSTALLDIR, check_only);
if(rc < 0) {
er = ERROR_CANCELLED;
}
} else {
er = ERROR_CANT_ACCESS_FILE;
}
LExit:
return WcaFinalize(er);
}
UINT __stdcall RemoveServiceNoninteractive(MSIHANDLE hInstall)
{
return wrap(hInstall, "RemoveServiceNoninteractive", -1);
}
UINT __stdcall RemoveService(MSIHANDLE hInstall)
{
return wrap(hInstall, "RemoveService", 0);
}
UINT __stdcall TestService(MSIHANDLE hInstall)
{
return wrap(hInstall, "TestService", 1);
}
/* DllMain - Initialize and cleanup WiX custom action utils */
extern "C" BOOL WINAPI DllMain(
__in HINSTANCE hInst,
__in ULONG ulReason,
__in LPVOID
)
{
switch(ulReason)
{
case DLL_PROCESS_ATTACH:
WcaGlobalInitialize(hInst);
break;
case DLL_PROCESS_DETACH:
WcaGlobalFinalize();
break;
}
return TRUE;
}
LIBRARY "wixca"
VERSION 1.0
EXPORTS
RemoveService
RemoveServiceNoninteractive
TestService
#include "afxres.h"
#undef APSTUDIO_READONLY_SYMBOLS
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x0L
FILESUBTYPE 0x0L
BEGIN
END
This diff is collapsed.
<Include xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<!-- Datafiles that installation will copy to CommonAppData (initial database)
They are declared Permanent and NeverOverwrite since it is user data -->
<DirectoryRef Id='TARGETDIR'>
<Directory Id="CommonAppDataFolder">
<Directory Id="datadir.mysql" Name="MySQL">
<Directory Id="datadir.mysql.mysqlserver"
Name="MySQL Server @MAJOR_VERSION@.@MINOR_VERSION@">
<Directory Id="DATADIR" Name=".">
<Component Id="component.datadir" Guid="d3491319-5dbc-4477-95f3-4f809ef1dd2d">
<CreateFolder>
<util:PermissionEx User="[LogonUser]" GenericAll="yes" />
</CreateFolder>
</Component>
<Directory Id="datadir.mysql.mysqlserver.data" Name="data">
<Directory Id="datadir.mysql.mysqlserver.data.mysql" Name="mysql">
<Component Id="component.datadir.mysql"
Guid="19ec0f1f-1a7f-424e-a788-b09346c0a709"
Permanent="yes" NeverOverwrite="yes">
<CreateFolder>
<util:PermissionEx User="[LogonUser]" GenericAll="yes" />
</CreateFolder>
@DATADIR_MYSQL_FILES@
</Component>
</Directory>
<Directory Id="datadir.mysql.mysqlserver.data.performance_schema"
Name="performance_schema">
<Component Id="component.datadir.performance_schema"
Guid="af2a6776-2655-431f-a748-9e9f4645acc3"
Permanent="yes" NeverOverwrite="yes">
<CreateFolder>
<util:PermissionEx User="[LogonUser]" GenericAll="yes" />
</CreateFolder>
@DATADIR_PERFORMANCE_SCHEMA_FILES@
</Component>
</Directory>
<Directory Id="datadir.mysql.mysqlserver.data.test" Name="test">
<Component Id="component.datadir.test" Guid="52fa9f0a-fcd1-420a-b2ac-95a8f70ad20a">
<CreateFolder/>
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
</DirectoryRef>
<Feature Id="UserEditableDatafiles" Level='1' Display='hidden' ConfigurableDirectory="DATADIR">
<ComponentRef Id="component.datadir"/>
<ComponentRef Id="component.datadir.mysql"/>
<ComponentRef Id="component.datadir.performance_schema"/>
<ComponentRef Id="component.datadir.test"/>
</Feature>
</Include>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product
Id="*"
UpgradeCode="49EB7A6A-1CEF-4A1E-9E89-B9A4993963E3"
Name="MySQL Server @MAJOR_VERSION@.@MINOR_VERSION@"
Version="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@"
Language="1033"
Manufacturer="@MANUFACTURER@">
<Package Id='*'
Keywords='Installer'
Description="MySQL Database Server"
Manufacturer='@MANUFACTURER@'
InstallerVersion='200'
Languages='1033'
Compressed='yes'
SummaryCodepage='1252'
Platform='@Platform@'/>
<Media Id='1' Cabinet='product.cab' EmbedCab='yes' />
<!-- Upgrade -->
<Upgrade Id="49EB7A6A-1CEF-4A1E-9E89-B9A4993963E3">
<UpgradeVersion
Minimum="@MAJOR_VERSION@.@MINOR_VERSION@.0"
IncludeMinimum="yes"
Maximum="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@"
Property="OLDERVERSIONBEINGUPGRADED" />
<UpgradeVersion
Minimum="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@"
OnlyDetect="yes"
Property="NEWERVERSIONDETECTED" />
</Upgrade>
<Condition Message="A later version of [ProductName] is already installed. Setup will now exit.">
NOT NEWERVERSIONDETECTED OR Installed
</Condition>
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallInitialize"/>
</InstallExecuteSequence>
<!-- UI -->
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"></Property>
<UIRef Id="@CPACK_WIX_UI@" />
<UIRef Id="WixUI_ErrorProgressText" />
<WixVariable
Id="WixUIBannerBmp"
Value="@CMAKE_CURRENT_SOURCE_DIR@/AdminHeader.jpg" />
<WixVariable
Id="WixUIDialogBmp"
Value="@CMAKE_CURRENT_SOURCE_DIR@/AdminBackground.jpg" />
<Icon
Id="icon.ico"
SourceFile="@CMAKE_CURRENT_SOURCE_DIR@/MySQLServer.ico"/>
<Property
Id="ARPPRODUCTICON"
Value="icon.ico" />
<!-- License -->
<WixVariable
Id="WixUILicenseRtf"
Value="@CMAKE_CURRENT_BINARY_DIR@/COPYING.rtf"/>
<!-- How to remove the service on uninstall -->
<Binary Id='wixca.dll' SourceFile='@CMAKE_CURRENT_BINARY_DIR@/ca/RelWithDebInfo/wixca.dll' />
<CustomAction Id="UnregisterProperty" Property="UnregisterService" Value="[INSTALLDIR]" Return="check" />
<CustomAction Id="UnregisterPropertySilent" Property="UnregisterServiceSilently" Value="[INSTALLDIR]" Return="check" />
<CustomAction Id="UnregisterService"
BinaryKey="wixca.dll"
DllEntry="RemoveService"
Execute="deferred"
Impersonate="no"
Return="check" />
<CustomAction Id="UnregisterServiceSilently"
BinaryKey="wixca.dll"
DllEntry="RemoveServiceNoninteractive"
Execute="deferred"
Impersonate="no"
Return="check" />
<InstallExecuteSequence>
<Custom Action="UnregisterProperty" After="InstallInitialize">Installed And Not UPGRADINGPRODUCTCODE</Custom>
<Custom Action="UnregisterPropertySilent" After="InstallInitialize">Installed And Not UPGRADINGPRODUCTCODE</Custom>
<Custom Action="UnregisterService" After="UnregisterProperty">Installed And Not UPGRADINGPRODUCTCODE And UILevel&gt;2</Custom>
<Custom Action="UnregisterServiceSilently" After="UnregisterPropertySilent">Installed And Not UPGRADINGPRODUCTCODE And UILevel&lt;=2</Custom>
</InstallExecuteSequence>
<!-- Installation root-->
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='@PlatformProgramFilesFolder@'>
<Directory Id='directory.MySQL' Name='MySQL'>
<Directory Id='INSTALLDIR' Name='MySQL Server @MAJOR_VERSION@.@MINOR_VERSION@'>
</Directory>
</Directory>
</Directory>
</Directory>
<!-- CPACK_WIX_FEATURES -->
@CPACK_WIX_FEATURES@
<!-- CPACK_WIX_DIRECTORIES -->
@CPACK_WIX_DIRECTORIES@
<!--CPACK_WIX_COMPONENTS-->
@CPACK_WIX_COMPONENTS@
<!--CPACK_WIX_COMPONENTS_GROUPS -->
@CPACK_WIX_COMPONENT_GROUPS@
<!--CPACK_WIX_INCLUDES -->
@CPACK_WIX_INCLUDES@
</Product>
</Wix>
\ No newline at end of file
......@@ -13,4 +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(audit_null audit_null.c MODULE_ONLY)
MYSQL_ADD_PLUGIN(audit_null audit_null.c
MODULE_ONLY MODULE_OUTPUT_NAME "adt_null")
......@@ -13,4 +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(daemon_example daemon_example.cc MODULE_ONLY)
MYSQL_ADD_PLUGIN(daemon_example daemon_example.cc
MODULE_ONLY MODULE_OUTPUT_NAME "libdaemon_example")
......@@ -77,7 +77,7 @@ INSTALL(FILES
${CMAKE_CURRENT_SOURCE_DIR}/fill_help_tables.sql
${CMAKE_CURRENT_SOURCE_DIR}/mysql_test_data_timezone.sql
${FIX_PRIVILEGES_SQL}
DESTINATION ${INSTALL_MYSQLSHAREDIR}
DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server
)
# TCMalloc hacks
......@@ -175,12 +175,10 @@ ELSE()
SET(EXT ".pl")
ENDIF()
INSTALL(FILES
INSTALL_SCRIPT(
"${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db${EXT}"
DESTINATION ${DEST}
PERMISSIONS OWNER_READ OWNER_WRITE
OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
COMPONENT Server
)
......@@ -255,6 +253,7 @@ IF(MSVC)
ENDIF()
SET(NON_THREADED_LIBS ${CLIENT_LIBS})
SET(mysql_config_COMPONENT COMPONENT Development)
IF(WIN32)
# On Windows, some .sh and some .pl.in files are configured
......@@ -268,31 +267,22 @@ IF(WIN32)
mysqlhotcopy)
FOREACH(file ${PLIN_FILES})
IF(NOT ${file}_COMPONENT)
SET(${file}_COMPONENT Server_Scripts)
ENDIF()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.pl.in
${CMAKE_CURRENT_BINARY_DIR}/${file}.pl ESCAPE_QUOTES @ONLY)
INSTALL(FILES
${CMAKE_CURRENT_BINARY_DIR}/${file}.pl
DESTINATION scripts
PERMISSIONS OWNER_READ OWNER_WRITE
OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl COMPONENT ${${file}_COMPONENT})
ENDFOREACH()
FOREACH(file ${SH_FILES})
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh
${CMAKE_CURRENT_BINARY_DIR}/${file}.pl ESCAPE_QUOTES @ONLY)
INSTALL(FILES
${CMAKE_CURRENT_BINARY_DIR}/${file}.pl
DESTINATION scripts
PERMISSIONS OWNER_READ OWNER_WRITE
OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl COMPONENT ${${file}_COMPONENT})
ENDFOREACH()
ELSE()
# On Unix, most of the files end up in the bin directory
SET(mysql_config_COMPONENT COMPONENT Development)
SET(BIN_SCRIPTS
msql2mysql
mysql_config
......@@ -321,13 +311,14 @@ ELSE()
MESSAGE(FATAL_ERROR "Can not find ${file}.sh or ${file} in "
"${CMAKE_CURRENT_SOURCE_DIR}" )
ENDIF()
INSTALL(FILES
${CMAKE_CURRENT_BINARY_DIR}/${file}
DESTINATION ${INSTALL_BINDIR}
PERMISSIONS OWNER_READ OWNER_WRITE
OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
IF(NOT ${file}_COMPONENT)
SET(${file}_COMPONENT Server)
ENDIF()
INSTALL_SCRIPT(
${CMAKE_CURRENT_BINARY_DIR}/${file}
DESTINATION ${INSTALL_BINDIR}
COMPONENT ${${file}_COMPONENT}
)
ENDFOREACH()
ENDIF()
......@@ -342,7 +333,8 @@ IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_FLAGS MATCHES "-static")
ERROR_QUIET
)
IF(${RESULT} EQUAL 0 AND EXISTS ${LIBGCC_LOCATION})
INSTALL(FILES "${LIBGCC_LOCATION}" DESTINATION ${INSTALL_LIBDIR})
INSTALL(FILES "${LIBGCC_LOCATION}" DESTINATION ${INSTALL_LIBDIR}
COMPONENT Development)
ENDIF()
ENDIF()
......@@ -483,9 +483,11 @@ $CP mysql-test/std_data/*.dat mysql-test/std_data/*.frm \
mysql-test/std_data/des_key_file mysql-test/std_data/*.*001 \
mysql-test/std_data/*.cnf mysql-test/std_data/*.MY* \
$BASE/mysql-test/std_data
$CP mysql-test/t/*.test mysql-test/t/*.imtest \
mysql-test/t/*.disabled mysql-test/t/*.opt \
mysql-test/t/*.slave-mi mysql-test/t/*.sh mysql-test/t/*.sql $BASE/mysql-test/t
# Attention: when the wildcards expand to a line that is very long,
# it may exceed the command line length limit on some platform(s). Bug#54590
$CP mysql-test/t/*.test mysql-test/t/*.imtest $BASE/mysql-test/t
$CP mysql-test/t/*.disabled mysql-test/t/*.opt $BASE/mysql-test/t
$CP mysql-test/t/*.slave-mi mysql-test/t/*.sh mysql-test/t/*.sql $BASE/mysql-test/t
$CP mysql-test/r/*.result mysql-test/r/*.require \
$BASE/mysql-test/r
......
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