Merge 10.4 into 10.5
This commit is contained in:
commit
3c88ce4cd1
18
.clang-format
Normal file
18
.clang-format
Normal file
@ -0,0 +1,18 @@
|
||||
SpaceBeforeAssignmentOperators: false
|
||||
SpaceAfterCStyleCast: true
|
||||
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterClass: true
|
||||
AfterControlStatement: true
|
||||
AfterEnum: true
|
||||
AfterFunction: true
|
||||
AfterNamespace: true
|
||||
AfterStruct: true
|
||||
AfterUnion: true
|
||||
AfterExternBlock: true
|
||||
BeforeCatch: true
|
||||
BeforeElse: true
|
||||
SplitEmptyFunction: true
|
||||
SplitEmptyRecord: true
|
||||
SplitEmptyNamespace: true
|
65
.gitignore
vendored
65
.gitignore
vendored
@ -58,6 +58,7 @@ extra/perror
|
||||
extra/replace
|
||||
extra/resolve_stack_dump
|
||||
extra/resolveip
|
||||
extra/wolfssl/user_settings.h
|
||||
import_executables.cmake
|
||||
include/*.h.tmp
|
||||
include/config.h
|
||||
@ -524,3 +525,67 @@ compile_commands.json
|
||||
# Clion && other JetBrains ides
|
||||
.idea
|
||||
|
||||
client/mariadb
|
||||
client/mariadb-admin
|
||||
client/mariadb-binlog
|
||||
client/mariadb-check
|
||||
client/mariadb-dump
|
||||
client/mariadb-import
|
||||
client/mariadb-plugin
|
||||
client/mariadb-show
|
||||
client/mariadb-slap
|
||||
client/mariadb-test
|
||||
client/mariadb-upgrade
|
||||
extra/mariabackup/mariadb-backup
|
||||
extra/mariadb-waitpid
|
||||
extra/mariadbd-safe-helper
|
||||
libmysqld/examples/mariadb-client-test-embedded
|
||||
libmysqld/examples/mariadb-embedded
|
||||
libmysqld/examples/mariadb-test-embedded
|
||||
man/mariadb-access.1
|
||||
man/mariadb-admin.1
|
||||
man/mariadb-backup.1
|
||||
man/mariadb-binlog.1
|
||||
man/mariadb-check.1
|
||||
man/mariadb-client-test-embedded.1
|
||||
man/mariadb-client-test.1
|
||||
man/mariadb-convert-table-format.1
|
||||
man/mariadb-dump.1
|
||||
man/mariadb-dumpslow.1
|
||||
man/mariadb-embedded.1
|
||||
man/mariadb-find-rows.1
|
||||
man/mariadb-fix-extensions.1
|
||||
man/mariadb-hotcopy.1
|
||||
man/mariadb-import.1
|
||||
man/mariadb-install-db.1
|
||||
man/mariadb-ldb.1
|
||||
man/mariadb-plugin.1
|
||||
man/mariadb-secure-installation.1
|
||||
man/mariadb-setpermission.1
|
||||
man/mariadb-show.1
|
||||
man/mariadb-slap.1
|
||||
man/mariadb-test-embedded.1
|
||||
man/mariadb-test.1
|
||||
man/mariadb-tzinfo-to-sql.1
|
||||
man/mariadb-upgrade.1
|
||||
man/mariadb-waitpid.1
|
||||
man/mariadb.1
|
||||
man/mariadbd-multi.1
|
||||
man/mariadbd-safe-helper.1
|
||||
man/mariadbd-safe.1
|
||||
man/mariadbd.8
|
||||
scripts/mariadb-access
|
||||
scripts/mariadb-convert-table-format
|
||||
scripts/mariadb-dumpslow
|
||||
scripts/mariadb-find-rows
|
||||
scripts/mariadb-fix-extensions
|
||||
scripts/mariadb-hotcopy
|
||||
scripts/mariadb-install-db
|
||||
scripts/mariadb-secure-installation
|
||||
scripts/mariadb-setpermission
|
||||
scripts/mariadbd-multi
|
||||
scripts/mariadbd-safe
|
||||
sql/mariadb-tzinfo-to-sql
|
||||
sql/mariadbd
|
||||
storage/rocksdb/mariadb-ldb
|
||||
tests/mariadb-client-test
|
||||
|
@ -165,6 +165,7 @@ INCLUDE(plugin)
|
||||
INCLUDE(install_macros)
|
||||
INCLUDE(systemd)
|
||||
INCLUDE(mysql_add_executable)
|
||||
INCLUDE(symlinks)
|
||||
INCLUDE(compile_flags)
|
||||
INCLUDE(crc32)
|
||||
|
||||
@ -194,6 +195,8 @@ INCLUDE(check_compiler_flag)
|
||||
OPTION(WITH_ASAN "Enable address sanitizer" OFF)
|
||||
|
||||
IF (WITH_ASAN AND NOT MSVC)
|
||||
# this flag might be set by default on some OS
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG("-U_FORTIFY_SOURCE" DEBUG RELWITHDEBINFO)
|
||||
# gcc 4.8.1 and new versions of clang
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -fPIC"
|
||||
DEBUG RELWITHDEBINFO)
|
||||
@ -227,22 +230,22 @@ ENDIF()
|
||||
|
||||
OPTION(WITH_UBSAN "Enable undefined behavior sanitizer" OFF)
|
||||
IF (WITH_UBSAN)
|
||||
IF(SECURITY_HARDENED)
|
||||
MESSAGE(FATAL_ERROR "WITH_UBSAN and SECURITY_HARDENED are mutually exclusive")
|
||||
ENDIF()
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=undefined -fno-sanitize=alignment" DEBUG RELWITHDEBINFO)
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=undefined -fno-sanitize=alignment -U_FORTIFY_SOURCE" DEBUG RELWITHDEBINFO)
|
||||
ENDIF()
|
||||
|
||||
IF(NOT WITH_TSAN)
|
||||
# enable security hardening features, like most distributions do
|
||||
# in our benchmarks that costs about ~1% of performance, depending on the load
|
||||
IF(CMAKE_C_COMPILER_VERSION VERSION_LESS "4.6")
|
||||
IF(CMAKE_C_COMPILER_VERSION VERSION_LESS "4.6" OR WITH_ASAN OR WITH_UBSAN)
|
||||
SET(security_default OFF)
|
||||
ELSE()
|
||||
SET(security_default ON)
|
||||
ENDIF()
|
||||
OPTION(SECURITY_HARDENED "Use security-enhancing compiler features (stack protector, relro, etc)" ${security_default})
|
||||
IF(SECURITY_HARDENED)
|
||||
IF(WITH_ASAN OR WITH_UBSAN)
|
||||
MESSAGE(FATAL_ERROR "WITH_ASAN/WITH_UBSAN and SECURITY_HARDENED are mutually exclusive")
|
||||
ENDIF()
|
||||
# security-enhancing flags
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG("-pie -fPIC")
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG("-Wl,-z,relro,-z,now")
|
||||
|
@ -56,7 +56,6 @@ TARGET_LINK_LIBRARIES(mysqlcheck ${CLIENT_LIB})
|
||||
MYSQL_ADD_EXECUTABLE(mysqldump mysqldump.c ../sql-common/my_user.c)
|
||||
TARGET_LINK_LIBRARIES(mysqldump ${CLIENT_LIB})
|
||||
|
||||
|
||||
MYSQL_ADD_EXECUTABLE(mysqlimport mysqlimport.c)
|
||||
SET_SOURCE_FILES_PROPERTIES(mysqlimport.c PROPERTIES COMPILE_FLAGS "-DTHREADS")
|
||||
TARGET_LINK_LIBRARIES(mysqlimport ${CLIENT_LIB})
|
||||
@ -93,11 +92,9 @@ TARGET_LINK_LIBRARIES(async_example ${CLIENT_LIB})
|
||||
SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysqlslap mysql_plugin async_example
|
||||
PROPERTIES HAS_CXX TRUE)
|
||||
|
||||
|
||||
FOREACH(t mysql mysqltest mysqltest mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysql_plugin mysqlbinlog
|
||||
FOREACH(t mysql mysqltest mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysql_plugin mysqlbinlog
|
||||
mysqladmin mysqlslap async_example)
|
||||
ADD_DEPENDENCIES(${t} GenError ${CLIENT_LIB})
|
||||
ENDFOREACH()
|
||||
|
||||
ADD_DEFINITIONS(-DHAVE_DLOPEN)
|
||||
|
||||
|
@ -46,7 +46,7 @@ enum options_client
|
||||
OPT_MAX_ALLOWED_PACKET, OPT_NET_BUFFER_LENGTH,
|
||||
OPT_SELECT_LIMIT, OPT_MAX_JOIN_SIZE, OPT_SSL_SSL,
|
||||
OPT_SSL_KEY, OPT_SSL_CERT, OPT_SSL_CA, OPT_SSL_CAPATH,
|
||||
OPT_SSL_CIPHER, OPT_SHUTDOWN_TIMEOUT, OPT_LOCAL_INFILE,
|
||||
OPT_SSL_CIPHER, OPT_TLS_VERSION, OPT_SHUTDOWN_TIMEOUT, OPT_LOCAL_INFILE,
|
||||
OPT_DELETE_MASTER_LOGS, OPT_COMPACT,
|
||||
OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL,
|
||||
OPT_FRM, OPT_SKIP_OPTIMIZATION,
|
||||
|
@ -1363,6 +1363,7 @@ static bool do_connect(MYSQL *mysql, const char *host, const char *user,
|
||||
opt_ssl_capath, opt_ssl_cipher);
|
||||
mysql_options(mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
|
||||
mysql_options(mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
|
||||
mysql_options(mysql, MARIADB_OPT_TLS_VERSION, opt_tls_version);
|
||||
}
|
||||
mysql_options(mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
|
||||
(char*)&opt_ssl_verify_server_cert);
|
||||
|
@ -359,6 +359,7 @@ int main(int argc,char *argv[])
|
||||
opt_ssl_capath, opt_ssl_cipher);
|
||||
mysql_options(&mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
|
||||
mysql_options(&mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
|
||||
mysql_options(&mysql, MARIADB_OPT_TLS_VERSION, opt_tls_version);
|
||||
}
|
||||
mysql_options(&mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
|
||||
(char*)&opt_ssl_verify_server_cert);
|
||||
|
@ -2126,6 +2126,7 @@ static Exit_status safe_connect()
|
||||
opt_ssl_capath, opt_ssl_cipher);
|
||||
mysql_options(mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
|
||||
mysql_options(mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
|
||||
mysql_options(mysql, MARIADB_OPT_TLS_VERSION, opt_tls_version);
|
||||
}
|
||||
mysql_options(mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
|
||||
(char*)&opt_ssl_verify_server_cert);
|
||||
|
@ -1709,6 +1709,7 @@ static int connect_to_db(char *host, char *user,char *passwd)
|
||||
opt_ssl_capath, opt_ssl_cipher);
|
||||
mysql_options(&mysql_connection, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
|
||||
mysql_options(&mysql_connection, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
|
||||
mysql_options(&mysql_connection, MARIADB_OPT_TLS_VERSION, opt_tls_version);
|
||||
}
|
||||
mysql_options(&mysql_connection,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
|
||||
(char*)&opt_ssl_verify_server_cert);
|
||||
|
@ -448,6 +448,7 @@ static MYSQL *db_connect(char *host, char *database,
|
||||
opt_ssl_capath, opt_ssl_cipher);
|
||||
mysql_options(mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
|
||||
mysql_options(mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
|
||||
mysql_options(mysql, MARIADB_OPT_TLS_VERSION, opt_tls_version);
|
||||
}
|
||||
mysql_options(mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
|
||||
(char*)&opt_ssl_verify_server_cert);
|
||||
|
@ -122,6 +122,7 @@ int main(int argc, char **argv)
|
||||
opt_ssl_capath, opt_ssl_cipher);
|
||||
mysql_options(&mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
|
||||
mysql_options(&mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
|
||||
mysql_options(&mysql, MARIADB_OPT_TLS_VERSION, opt_tls_version);
|
||||
}
|
||||
mysql_options(&mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
|
||||
(char*)&opt_ssl_verify_server_cert);
|
||||
|
@ -6068,6 +6068,7 @@ void do_connect(struct st_command *command)
|
||||
opt_ssl_capath, ssl_cipher ? ssl_cipher : opt_ssl_cipher);
|
||||
mysql_options(con_slot->mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
|
||||
mysql_options(con_slot->mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
|
||||
mysql_options(con_slot->mysql, MARIADB_OPT_TLS_VERSION, opt_tls_version);
|
||||
#if MYSQL_VERSION_ID >= 50000
|
||||
/* Turn on ssl_verify_server_cert only if host is "localhost" */
|
||||
opt_ssl_verify_server_cert= !strcmp(ds_host.str, "localhost");
|
||||
|
@ -13,7 +13,8 @@ SET(fail_patterns
|
||||
FAIL_REGEX "warning:.*redefined"
|
||||
FAIL_REGEX "[Ww]arning: [Oo]ption"
|
||||
)
|
||||
|
||||
#The regex patterns above are not localized, thus LANG=C
|
||||
SET(ENV{LANG} C)
|
||||
MACRO (MY_CHECK_C_COMPILER_FLAG flag)
|
||||
STRING(REGEX REPLACE "[-,= +]" "_" result "have_C_${flag}")
|
||||
SET(SAVE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
||||
|
@ -71,9 +71,10 @@ FUNCTION(INSTALL_MANPAGE file)
|
||||
${MYSQL_DOC_DIR}/man/*${file}.8*
|
||||
${GLOB_EXPR}
|
||||
)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
FILE(GLOB_RECURSE MANPAGES ${GLOB_EXPR})
|
||||
|
||||
IF(MANPAGES)
|
||||
LIST(GET MANPAGES 0 MANPAGE)
|
||||
STRING(REPLACE "${file}man.1" "${file}.1" MANPAGE "${MANPAGE}")
|
||||
@ -100,19 +101,17 @@ FUNCTION(INSTALL_SCRIPT)
|
||||
IF(NOT ARG_DESTINATION)
|
||||
SET(ARG_DESTINATION ${INSTALL_BINDIR})
|
||||
ENDIF()
|
||||
IF(ARG_COMPONENT)
|
||||
SET(COMP COMPONENT ${ARG_COMPONENT})
|
||||
ELSE()
|
||||
SET(COMP)
|
||||
ENDIF()
|
||||
SET(COMP ${ARG_COMPONENT})
|
||||
|
||||
IF (COMP MATCHES ${SKIP_COMPONENTS})
|
||||
RETURN()
|
||||
ENDIF()
|
||||
|
||||
INSTALL(PROGRAMS ${script} DESTINATION ${ARG_DESTINATION} ${COMP})
|
||||
INSTALL(PROGRAMS ${script} DESTINATION ${ARG_DESTINATION} COMPONENT ${COMP})
|
||||
get_filename_component(dest "${script}" NAME)
|
||||
CREATE_MARIADB_SYMLINK(${dest} ${ARG_DESTINATION} ${COMP})
|
||||
|
||||
INSTALL_MANPAGE(${script})
|
||||
INSTALL_MANPAGE(${dest})
|
||||
ENDFUNCTION()
|
||||
|
||||
|
||||
|
@ -63,21 +63,25 @@ FUNCTION (MYSQL_ADD_EXECUTABLE)
|
||||
UNSET(EXCLUDE_FROM_ALL)
|
||||
ENDIF()
|
||||
ADD_EXECUTABLE(${target} ${WIN32} ${MACOSX_BUNDLE} ${EXCLUDE_FROM_ALL} ${sources})
|
||||
|
||||
# tell CPack where to install
|
||||
IF(NOT ARG_EXCLUDE_FROM_ALL)
|
||||
IF(NOT ARG_DESTINATION)
|
||||
SET(ARG_DESTINATION ${INSTALL_BINDIR})
|
||||
ENDIF()
|
||||
IF(ARG_COMPONENT)
|
||||
SET(COMP COMPONENT ${ARG_COMPONENT})
|
||||
SET(COMP ${ARG_COMPONENT})
|
||||
ELSEIF(MYSQL_INSTALL_COMPONENT)
|
||||
SET(COMP COMPONENT ${MYSQL_INSTALL_COMPONENT})
|
||||
SET(COMP ${MYSQL_INSTALL_COMPONENT})
|
||||
ELSE()
|
||||
SET(COMP COMPONENT Client)
|
||||
SET(COMP Client)
|
||||
ENDIF()
|
||||
IF (COMP MATCHES ${SKIP_COMPONENTS})
|
||||
RETURN()
|
||||
ENDIF()
|
||||
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP})
|
||||
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} COMPONENT ${COMP})
|
||||
ENDIF()
|
||||
|
||||
# create mariadb named symlink
|
||||
CREATE_MARIADB_SYMLINK(${target} ${ARG_DESTINATION} ${COMP})
|
||||
ENDFUNCTION()
|
||||
|
@ -49,12 +49,13 @@ ENDMACRO()
|
||||
|
||||
MACRO (MYSQL_USE_BUNDLED_SSL)
|
||||
SET(INC_DIRS
|
||||
${CMAKE_BINARY_DIR}/extra/wolfssl
|
||||
${CMAKE_SOURCE_DIR}/extra/wolfssl/wolfssl
|
||||
${CMAKE_SOURCE_DIR}/extra/wolfssl/wolfssl/wolfssl
|
||||
)
|
||||
SET(SSL_LIBRARIES wolfssl wolfcrypt)
|
||||
SET(SSL_INCLUDE_DIRS ${INC_DIRS})
|
||||
SET(SSL_DEFINES "-DHAVE_OPENSSL -DHAVE_WOLFSSL -DOPENSSL_ALL -DWOLFSSL_MYSQL_COMPATIBLE -DWC_NO_HARDEN")
|
||||
SET(SSL_DEFINES "-DHAVE_OPENSSL -DHAVE_WOLFSSL -DWOLFSSL_USER_SETTINGS")
|
||||
SET(HAVE_ERR_remove_thread_state ON CACHE INTERNAL "wolfssl doesn't have ERR_remove_thread_state")
|
||||
SET(HAVE_EncryptAes128Ctr OFF CACHE INTERNAL "wolfssl does support AES-CTR, but differently from openssl")
|
||||
SET(HAVE_EncryptAes128Gcm OFF CACHE INTERNAL "wolfssl does not support AES-GCM")
|
||||
|
72
cmake/symlinks.cmake
Normal file
72
cmake/symlinks.cmake
Normal file
@ -0,0 +1,72 @@
|
||||
# Create lists
|
||||
macro(REGISTER_SYMLINK from to)
|
||||
list(APPEND MARIADB_SYMLINK_FROMS ${from})
|
||||
list(APPEND MARIADB_SYMLINK_TOS ${to})
|
||||
endmacro()
|
||||
|
||||
# MariaDB names for executables
|
||||
REGISTER_SYMLINK("mysql" "mariadb")
|
||||
REGISTER_SYMLINK("mysqlaccess" "mariadb-access")
|
||||
REGISTER_SYMLINK("mysqladmin" "mariadb-admin")
|
||||
REGISTER_SYMLINK("mariabackup" "mariadb-backup")
|
||||
REGISTER_SYMLINK("mysqlbinlog" "mariadb-binlog")
|
||||
REGISTER_SYMLINK("mysqlcheck" "mariadb-check")
|
||||
REGISTER_SYMLINK("mysql_client_test_embedded" "mariadb-client-test-embedded")
|
||||
REGISTER_SYMLINK("mysql_client_test" "mariadb-client-test")
|
||||
REGISTER_SYMLINK("mariadb_config" "mariadb-config")
|
||||
REGISTER_SYMLINK("mysql_convert_table_format" "mariadb-convert-table-format")
|
||||
REGISTER_SYMLINK("mysqldump" "mariadb-dump")
|
||||
REGISTER_SYMLINK("mysqldumpslow" "mariadb-dumpslow")
|
||||
REGISTER_SYMLINK("mysql_embedded" "mariadb-embedded")
|
||||
REGISTER_SYMLINK("mysql_find_rows" "mariadb-find-rows")
|
||||
REGISTER_SYMLINK("mysql_fix_extensions" "mariadb-fix-extensions")
|
||||
REGISTER_SYMLINK("mysqlhotcopy" "mariadb-hotcopy")
|
||||
REGISTER_SYMLINK("mysqlimport" "mariadb-import")
|
||||
REGISTER_SYMLINK("mysql_install_db" "mariadb-install-db")
|
||||
REGISTER_SYMLINK("mysql_ldb" "mariadb-ldb")
|
||||
REGISTER_SYMLINK("mysql_plugin" "mariadb-plugin")
|
||||
REGISTER_SYMLINK("mysql_secure_installation" "mariadb-secure-installation")
|
||||
REGISTER_SYMLINK("mysql_setpermission" "mariadb-setpermission")
|
||||
REGISTER_SYMLINK("mysqlshow" "mariadb-show")
|
||||
REGISTER_SYMLINK("mysqlslap" "mariadb-slap")
|
||||
REGISTER_SYMLINK("mysqltest" "mariadb-test")
|
||||
REGISTER_SYMLINK("mysqltest_embedded" "mariadb-test-embedded")
|
||||
REGISTER_SYMLINK("mysql_tzinfo_to_sql" "mariadb-tzinfo-to-sql")
|
||||
REGISTER_SYMLINK("mysql_upgrade" "mariadb-upgrade")
|
||||
REGISTER_SYMLINK("mysql_upgrade_service" "mariadb-upgrade-service")
|
||||
REGISTER_SYMLINK("mysql_upgrade_wizard" "mariadb-upgrade-wizard")
|
||||
REGISTER_SYMLINK("mysql_waitpid" "mariadb-waitpid")
|
||||
REGISTER_SYMLINK("mysqld" "mariadbd")
|
||||
REGISTER_SYMLINK("mysqld_multi" "mariadbd-multi")
|
||||
REGISTER_SYMLINK("mysqld_safe" "mariadbd-safe")
|
||||
REGISTER_SYMLINK("mysqld_safe_helper" "mariadbd-safe-helper")
|
||||
|
||||
# Add MariaDB symlinks
|
||||
macro(CREATE_MARIADB_SYMLINK src dir comp)
|
||||
# Find the MariaDB name for executable
|
||||
list(FIND MARIADB_SYMLINK_FROMS ${src} _index)
|
||||
|
||||
if (${_index} GREATER -1)
|
||||
list(GET MARIADB_SYMLINK_TOS ${_index} mariadbname)
|
||||
endif()
|
||||
|
||||
if (mariadbname)
|
||||
CREATE_MARIADB_SYMLINK_IN_DIR(${src} ${mariadbname} ${dir} ${comp})
|
||||
endif()
|
||||
endmacro(CREATE_MARIADB_SYMLINK)
|
||||
|
||||
# Add MariaDB symlinks in directory
|
||||
macro(CREATE_MARIADB_SYMLINK_IN_DIR src dest dir comp)
|
||||
if(UNIX)
|
||||
add_custom_target(
|
||||
SYM_${dest} ALL
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${dest}
|
||||
)
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${dest} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink ${src} ${dest}
|
||||
COMMENT "mklink ${src} -> ${dest}")
|
||||
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${dest} DESTINATION ${dir} COMPONENT ${comp})
|
||||
endif()
|
||||
endmacro(CREATE_MARIADB_SYMLINK_IN_DIR)
|
2
debian/mariadb-backup.install
vendored
2
debian/mariadb-backup.install
vendored
@ -1,2 +1,4 @@
|
||||
usr/bin/mariabackup
|
||||
usr/bin/mbstream
|
||||
usr/share/man/man1/mariabackup.1
|
||||
usr/share/man/man1/mariadb-backup.1
|
||||
|
1
debian/mariadb-backup.links
vendored
Normal file
1
debian/mariadb-backup.links
vendored
Normal file
@ -0,0 +1 @@
|
||||
usr/bin/mariabackup usr/bin/mariadb-backup
|
11
debian/mariadb-client-10.5.install
vendored
11
debian/mariadb-client-10.5.install
vendored
@ -20,3 +20,14 @@ usr/share/man/man1/mysqldumpslow.1
|
||||
usr/share/man/man1/mysqlimport.1
|
||||
usr/share/man/man1/mysqlshow.1
|
||||
usr/share/man/man1/mysqlslap.1
|
||||
usr/share/man/man1/mariadb-access.1
|
||||
usr/share/man/man1/mariadb-admin.1
|
||||
usr/share/man/man1/mariadb-binlog.1
|
||||
usr/share/man/man1/mariadb-dump.1
|
||||
usr/share/man/man1/mariadb-dumpslow.1
|
||||
usr/share/man/man1/mariadb-find-rows.1
|
||||
usr/share/man/man1/mariadb-fix-extensions.1
|
||||
usr/share/man/man1/mariadb-import.1
|
||||
usr/share/man/man1/mariadb-plugin.1
|
||||
usr/share/man/man1/mariadb-slap.1
|
||||
usr/share/man/man1/mariadb-waitpid.1
|
||||
|
19
debian/mariadb-client-10.5.links
vendored
19
debian/mariadb-client-10.5.links
vendored
@ -1,6 +1,25 @@
|
||||
usr/bin/mysql_find_rows usr/bin/mariadb-find-rows
|
||||
usr/bin/mysql_fix_extensions usr/bin/mariadb-fix-extensions
|
||||
usr/bin/mysql_plugin usr/bin/mariadb-plugin
|
||||
usr/bin/mysql_waitpid usr/bin/mariadb-waitpid
|
||||
usr/bin/mysqlaccess usr/bin/mariadb-access
|
||||
usr/bin/mysqladmin usr/bin/mariadb-admin
|
||||
usr/bin/mysqlbinlog usr/bin/mariadb-binlog
|
||||
usr/bin/mysqlcheck usr/bin/mariadb-analyze
|
||||
usr/bin/mysqlcheck usr/bin/mariadb-optimize
|
||||
usr/bin/mysqlcheck usr/bin/mariadb-repair
|
||||
usr/bin/mysqlcheck usr/bin/mysqlanalyze
|
||||
usr/bin/mysqlcheck usr/bin/mysqloptimize
|
||||
usr/bin/mysqlcheck usr/bin/mysqlrepair
|
||||
usr/bin/mysqldump usr/bin/mariadb-dump
|
||||
usr/bin/mysqldumpslow usr/bin/mariadb-dumpslow
|
||||
usr/bin/mysqlimport usr/bin/mariadb-import
|
||||
usr/bin/mysqlreport usr/bin/mariadb-report
|
||||
usr/bin/mysqlslap usr/bin/mariadb-slap
|
||||
usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mariadb-analyze.1.gz
|
||||
usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mariadb-optimize.1.gz
|
||||
usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mariadb-repair.1.gz
|
||||
usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqlanalyze.1.gz
|
||||
usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqloptimize.1.gz
|
||||
usr/share/man/man1/mysqlcheck.1.gz usr/share/man/man1/mysqlrepair.1.gz
|
||||
usr/share/man/man1/mysqlreport.1.gz usr/share/man/man1/mariadb-report.1.gz
|
||||
|
2
debian/mariadb-client-core-10.5.install
vendored
2
debian/mariadb-client-core-10.5.install
vendored
@ -2,3 +2,5 @@ usr/bin/mysql
|
||||
usr/bin/mysqlcheck
|
||||
usr/share/man/man1/mysql.1
|
||||
usr/share/man/man1/mysqlcheck.1
|
||||
usr/share/man/man1/mariadb.1
|
||||
usr/share/man/man1/mariadb-check.1
|
||||
|
2
debian/mariadb-client-core-10.5.links
vendored
Normal file
2
debian/mariadb-client-core-10.5.links
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
usr/bin/mysql usr/bin/mariadb
|
||||
usr/bin/mysqlcheck usr/bin/mariadb-check
|
2
debian/mariadb-plugin-rocksdb.install
vendored
2
debian/mariadb-plugin-rocksdb.install
vendored
@ -1,5 +1,7 @@
|
||||
etc/mysql/conf.d/rocksdb.cnf etc/mysql/mariadb.conf.d
|
||||
usr/bin/myrocks_hotbackup
|
||||
usr/bin/mysql_ldb
|
||||
usr/share/man/man1/mariadb-ldb.1
|
||||
usr/share/man/man1/mysql_ldb.1
|
||||
usr/bin/sst_dump
|
||||
usr/lib/mysql/plugin/ha_rocksdb.so
|
||||
|
1
debian/mariadb-plugin-rocksdb.links
vendored
Normal file
1
debian/mariadb-plugin-rocksdb.links
vendored
Normal file
@ -0,0 +1 @@
|
||||
usr/bin/mysql_ldb usr/bin/mariadb-ldb
|
12
debian/mariadb-server-10.5.install
vendored
12
debian/mariadb-server-10.5.install
vendored
@ -2,6 +2,7 @@ debian/additions/debian-start etc/mysql
|
||||
debian/additions/debian-start.inc.sh usr/share/mysql
|
||||
debian/additions/echo_stderr usr/share/mysql
|
||||
debian/additions/mysqld_safe_syslog.cnf etc/mysql/conf.d
|
||||
debian/additions/mysql.init usr/share/mysql
|
||||
etc/apparmor.d/usr.sbin.mysqld
|
||||
lib/systemd/system/mariadb@bootstrap.service.d/use_galera_new_cluster.conf
|
||||
usr/bin/aria_chk
|
||||
@ -65,7 +66,16 @@ usr/share/man/man1/aria_pack.1
|
||||
usr/share/man/man1/aria_read_log.1
|
||||
usr/share/man/man1/galera_new_cluster.1
|
||||
usr/share/man/man1/galera_recovery.1
|
||||
usr/share/man/man1/mariadb-convert-table-format.1
|
||||
usr/share/man/man1/mariadb-hotcopy.1
|
||||
usr/share/man/man1/mariadb-secure-installation.1
|
||||
usr/share/man/man1/mariadb-service-convert.1
|
||||
usr/share/man/man1/mariadb-setpermission.1
|
||||
usr/share/man/man1/mariadb-show.1
|
||||
usr/share/man/man1/mariadb-tzinfo-to-sql.1
|
||||
usr/share/man/man1/mariadbd-multi.1
|
||||
usr/share/man/man1/mariadbd-safe-helper.1
|
||||
usr/share/man/man1/mariadbd-safe.1
|
||||
usr/share/man/man1/msql2mysql.1
|
||||
usr/share/man/man1/my_print_defaults.1
|
||||
usr/share/man/man1/myisam_ftdump.1
|
||||
@ -87,9 +97,9 @@ usr/share/man/man1/replace.1
|
||||
usr/share/man/man1/resolve_stack_dump.1
|
||||
usr/share/man/man1/resolveip.1
|
||||
usr/share/man/man1/wsrep_sst_common.1
|
||||
usr/share/man/man1/wsrep_sst_mariabackup.1
|
||||
usr/share/man/man1/wsrep_sst_mysqldump.1
|
||||
usr/share/man/man1/wsrep_sst_rsync.1
|
||||
usr/share/man/man1/wsrep_sst_mariabackup.1
|
||||
usr/share/mysql/errmsg-utf8.txt
|
||||
usr/share/mysql/fill_help_tables.sql
|
||||
usr/share/mysql/maria_add_gis_sp_bootstrap.sql
|
||||
|
9
debian/mariadb-server-10.5.links
vendored
Normal file
9
debian/mariadb-server-10.5.links
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
usr/bin/mysql_convert_table_format usr/bin/mariadb-convert-table-format
|
||||
usr/bin/mysql_secure_installation usr/bin/mariadb-secure-installation
|
||||
usr/bin/mysql_setpermission usr/bin/mariadb-setpermission
|
||||
usr/bin/mysql_tzinfo_to_sql usr/bin/mariadb-tzinfo-to-sql
|
||||
usr/bin/mysqld_multi usr/bin/mariadbd-multi
|
||||
usr/bin/mysqld_safe usr/bin/mariadbd-safe
|
||||
usr/bin/mysqld_safe_helper usr/bin/mariadbd-safe-helper
|
||||
usr/bin/mysqlhotcopy usr/bin/mariadb-hotcopy
|
||||
usr/bin/mysqlshow usr/bin/mariadb-show
|
6
debian/mariadb-server-10.5.postinst
vendored
6
debian/mariadb-server-10.5.postinst
vendored
@ -17,11 +17,7 @@ ERR_LOGGER="logger -p daemon.err -t mariadb-server-$VER.postinst -i"
|
||||
set -o pipefail
|
||||
|
||||
invoke() {
|
||||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||||
invoke-rc.d mysql $1
|
||||
else
|
||||
/etc/init.d/mysql $1
|
||||
fi
|
||||
systemctl $1 mysql
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
|
6
debian/mariadb-server-10.5.postrm
vendored
6
debian/mariadb-server-10.5.postrm
vendored
@ -12,11 +12,7 @@ MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
|
||||
# is running!
|
||||
stop_server() {
|
||||
set +e
|
||||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||||
invoke-rc.d mysql stop
|
||||
else
|
||||
/etc/init.d/mysql stop
|
||||
fi
|
||||
systemctl stop mysql
|
||||
errno=$?
|
||||
set -e
|
||||
|
||||
|
11
debian/mariadb-server-10.5.preinst
vendored
11
debian/mariadb-server-10.5.preinst
vendored
@ -20,25 +20,18 @@ mysql_upgradedir=/var/lib/mysql-upgrade
|
||||
# do it himself. No database directories should be removed while the server
|
||||
# is running! Another mysqld in e.g. a different chroot is fine for us.
|
||||
stop_server() {
|
||||
if [ ! -x /etc/init.d/mysql ]; then return; fi
|
||||
|
||||
# Return immediately if there are no mysql processes running
|
||||
# as there is no point in trying to shutdown in that case.
|
||||
if ! pgrep mysqld > /dev/null; then return; fi
|
||||
|
||||
set +e
|
||||
if [ -x /usr/sbin/invoke-rc.d ]; then
|
||||
cmd="invoke-rc.d mysql stop"
|
||||
else
|
||||
cmd="/etc/init.d/mysql stop"
|
||||
fi
|
||||
$cmd
|
||||
systemctl stop mysql
|
||||
errno=$?
|
||||
set -e
|
||||
|
||||
# 0=ok, 100=no init script (fresh install)
|
||||
if [ "$errno" != 0 -a "$errno" != 100 ]; then
|
||||
echo "${cmd/ */} returned $errno" 1>&2
|
||||
echo "'systemctl stop mysql' returned $errno" 1>&2
|
||||
echo "There is a MySQL server running, but we failed in our attempts to stop it." 1>&2
|
||||
echo "Stop it yourself and try again!" 1>&2
|
||||
db_stop
|
||||
|
3
debian/mariadb-server-core-10.5.install
vendored
3
debian/mariadb-server-core-10.5.install
vendored
@ -6,6 +6,9 @@ usr/share/man/man1/innochecksum.1
|
||||
usr/share/man/man1/mysql_install_db.1
|
||||
usr/share/man/man1/mysql_upgrade.1
|
||||
usr/share/man/man8/mysqld.8
|
||||
usr/share/man/man1/mariadb-install-db.1
|
||||
usr/share/man/man1/mariadb-upgrade.1
|
||||
usr/share/man/man8/mariadbd.8
|
||||
usr/share/mysql/charsets
|
||||
usr/share/mysql/czech
|
||||
usr/share/mysql/danish
|
||||
|
3
debian/mariadb-server-core-10.5.links
vendored
Normal file
3
debian/mariadb-server-core-10.5.links
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
usr/bin/mysql_install_db usr/bin/mariadb-install-db
|
||||
usr/bin/mysql_upgrade usr/bin/mariadb-upgrade
|
||||
usr/sbin/mysqld usr/sbin/mariadbd
|
4
debian/mariadb-test.install
vendored
4
debian/mariadb-test.install
vendored
@ -23,6 +23,10 @@ usr/share/man/man1/mysql_client_test.1
|
||||
usr/share/man/man1/mysql_client_test_embedded.1
|
||||
usr/share/man/man1/mysqltest.1
|
||||
usr/share/man/man1/mysqltest_embedded.1
|
||||
usr/share/man/man1/mariadb-client-test-embedded.1
|
||||
usr/share/man/man1/mariadb-client-test.1
|
||||
usr/share/man/man1/mariadb-test-embedded.1
|
||||
usr/share/man/man1/mariadb-test.1
|
||||
usr/share/mysql/mysql-test/README
|
||||
usr/share/mysql/mysql-test/README-gcov
|
||||
usr/share/mysql/mysql-test/README.stress
|
||||
|
4
debian/mariadb-test.links
vendored
4
debian/mariadb-test.links
vendored
@ -1,2 +1,6 @@
|
||||
usr/share/mysql/mysql-test/mysql-test-run.pl usr/share/mysql/mysql-test/mtr
|
||||
usr/share/mysql/mysql-test/mysql-test-run.pl usr/share/mysql/mysql-test/mysql-test-run
|
||||
usr/bin/mysql_client_test_embedded usr/bin/mariadb-client-test-embedded
|
||||
usr/bin/mysqltest_embedded usr/bin/mariadb-test-embedded
|
||||
usr/bin/mysql_client_test usr/bin/mariadb-client-test
|
||||
usr/bin/mysqltest usr/bin/mariadb-test
|
||||
|
@ -2,7 +2,7 @@ ADD_CONVENIENCE_LIBRARY(${CRC32_LIBRARY} $<TARGET_OBJECTS:crc32c> $<TARGET_OBJEC
|
||||
ADD_LIBRARY(crc32c OBJECT vec_crc32.c)
|
||||
ADD_LIBRARY(crc32ieee OBJECT vec_crc32.c)
|
||||
|
||||
GET_TARGET_PROPERTY(CFLAGS_CRC32_VPMSUM ${CRC32_LIBRARY} COMPILE_FLAGS)
|
||||
GET_PROPERTY(CFLAGS_CRC32_VPMSUM TARGET ${CRC32_LIBRARY} PROPERTY COMPILE_FLAGS)
|
||||
SET_TARGET_PROPERTIES(crc32c crc32ieee PROPERTIES COMPILE_FLAGS "${CFLAGS_CRC32_VPMSUM} -maltivec -mvsx -mpower8-vector -mcrypto -mpower8-vector")
|
||||
SET_TARGET_PROPERTIES(crc32ieee PROPERTIES COMPILE_DEFINITIONS "CRC32_FUNCTION=crc32ieee_vpmsum;CRC32_CONSTANTS_HEADER=\"crc32ieee_constants.h\"")
|
||||
SET_TARGET_PROPERTIES(crc32c PROPERTIES COMPILE_DEFINITIONS "CRC32_FUNCTION=crc32c_vpmsum;CRC32_CONSTANTS_HEADER=\"crc32c_constants.h\"")
|
||||
|
@ -199,6 +199,7 @@ static char* log_ignored_opt;
|
||||
|
||||
|
||||
extern my_bool opt_use_ssl;
|
||||
extern char *opt_tls_version;
|
||||
my_bool opt_ssl_verify_server_cert;
|
||||
my_bool opt_extended_validation;
|
||||
my_bool opt_encrypted_backup;
|
||||
@ -829,6 +830,7 @@ enum options_xtrabackup
|
||||
OPT_XTRA_CHECK_PRIVILEGES
|
||||
};
|
||||
|
||||
|
||||
struct my_option xb_client_options[] =
|
||||
{
|
||||
{"verbose", 'V', "display verbose output",
|
||||
|
@ -6,7 +6,8 @@ ELSE()
|
||||
PROJECT(wolfssl C)
|
||||
ENDIF()
|
||||
|
||||
IF(MSVC AND (CMAKE_SIZEOF_VOID_P MATCHES 8))
|
||||
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
|
||||
IF(MSVC)
|
||||
SET(WOLFSSL_INTELASM ON)
|
||||
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
IF(CMAKE_C_COMPILER_ID MATCHES GNU AND CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9)
|
||||
@ -20,28 +21,10 @@ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
SET(WOLFSSL_INTELASM ON)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
SET(WOLFSSL_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl/src)
|
||||
ADD_DEFINITIONS(${SSL_DEFINES})
|
||||
ADD_DEFINITIONS(
|
||||
-DHAVE_CRL
|
||||
-DWOLFSSL_MYSQL_COMPATIBLE
|
||||
-DHAVE_ECC
|
||||
-DECC_TIMING_RESISTANT
|
||||
-DBUILDING_WOLFSSL
|
||||
-DHAVE_HASHDRBG
|
||||
-DWOLFSSL_AES_DIRECT
|
||||
-DWOLFSSL_SHA384
|
||||
-DWOLFSSL_SHA512
|
||||
-DWOLFSSL_SHA224
|
||||
-DSESSION_CERT
|
||||
-DKEEP_OUR_CERT
|
||||
-DWOLFSSL_STATIC_RSA
|
||||
-DWC_RSA_BLINDING
|
||||
-DHAVE_TLS_EXTENSIONS
|
||||
-DHAVE_AES_ECB
|
||||
-DWOLFSSL_AES_COUNTER
|
||||
-DNO_WOLFSSL_STUB)
|
||||
|
||||
SET(WOLFSSL_SOURCES
|
||||
${WOLFSSL_SRCDIR}/crl.c
|
||||
@ -51,7 +34,8 @@ SET(WOLFSSL_SOURCES
|
||||
${WOLFSSL_SRCDIR}/wolfio.c
|
||||
${WOLFSSL_SRCDIR}/ocsp.c
|
||||
${WOLFSSL_SRCDIR}/ssl.c)
|
||||
ADD_DEFINITIONS(-DWOLFSSL_LIB)
|
||||
ADD_DEFINITIONS(-DWOLFSSL_LIB -DBUILDING_WOLFSSL)
|
||||
|
||||
INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/wolfssl)
|
||||
IF(MSVC)
|
||||
# size_t to long truncation warning
|
||||
@ -114,28 +98,31 @@ IF(NOT (MSVC AND CMAKE_C_COMPILER_ID MATCHES Clang)
|
||||
ENDIF()
|
||||
|
||||
IF(WOLFSSL_FASTMATH)
|
||||
ADD_DEFINITIONS(-DUSE_FAST_MATH)
|
||||
# FP_MAX_BITS is set high solely to satisfy ssl_8k_key.test
|
||||
# WolfSSL will use more stack space with it
|
||||
ADD_DEFINITIONS(-DFP_MAX_BITS=16384)
|
||||
SET(WOLFCRYPT_SOURCES ${WOLFCRYPT_SOURCES} ${WOLFCRYPT_SRCDIR}/tfm.c)
|
||||
SET(USE_FAST_MATH 1)
|
||||
SET(TFM_TIMING_RESISTANT 1)
|
||||
# FP_MAX_BITS is set high solely to satisfy ssl_8k_key.test
|
||||
# WolfSSL will use more stack space with it
|
||||
SET(FP_MAX_BITS 16384)
|
||||
SET(WOLFCRYPT_SOURCES ${WOLFCRYPT_SOURCES} ${WOLFCRYPT_SRCDIR}/tfm.c)
|
||||
ELSE()
|
||||
SET(WOLFCRYPT_SOURCES ${WOLFCRYPT_SOURCES} ${WOLFCRYPT_SRCDIR}/integer.c)
|
||||
SET(WOLFCRYPT_SOURCES ${WOLFCRYPT_SOURCES} ${WOLFCRYPT_SRCDIR}/integer.c)
|
||||
ENDIF()
|
||||
|
||||
IF(WOLFSSL_INTELASM)
|
||||
ADD_DEFINITIONS(-DWOLFSSL_AESNI)
|
||||
SET(SSL_DEFINES "${SSL_DEFINES} -DWOLFSSL_AESNI" PARENT_SCOPE)
|
||||
SET(WOLFSSL_AESNI 1)
|
||||
|
||||
LIST(APPEND WOLFCRYPT_SOURCES ${WOLFCRYPT_SRCDIR}/cpuid.c)
|
||||
IF(MSVC)
|
||||
LIST(APPEND WOLFCRYPT_SOURCES ${WOLFCRYPT_SRCDIR}/aes_asm.asm)
|
||||
IF(CMAKE_C_COMPILER_ID MATCHES Clang)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
|
||||
ELSE()
|
||||
ADD_DEFINITIONS(-DHAVE_INTEL_RDSEED -DWOLFSSL_X86_64_BUILD)
|
||||
SET(HAVE_INTEL_RDSEED 1)
|
||||
SET(WOLFSSL_X86_64_BUILD 1)
|
||||
ENDIF()
|
||||
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
ADD_DEFINITIONS(-DHAVE_INTEL_RDSEED -DUSE_INTEL_SPEEDUP)
|
||||
SET(HAVE_INTEL_RDSEED 1)
|
||||
SET(USE_INTEL_SPEEDUP 1)
|
||||
LIST(APPEND WOLFCRYPT_SOURCES
|
||||
${WOLFCRYPT_SRCDIR}/aes_asm.S
|
||||
${WOLFCRYPT_SRCDIR}/sha512_asm.S
|
||||
@ -144,5 +131,7 @@ IF(WOLFSSL_INTELASM)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
CONFIGURE_FILE(user_settings.h.in user_settings.h)
|
||||
INCLUDE_DIRECTORIES(${SSL_INCLUDE_DIRS})
|
||||
ADD_CONVENIENCE_LIBRARY(wolfcrypt ${WOLFCRYPT_SOURCES})
|
||||
|
||||
|
33
extra/wolfssl/user_settings.h.in
Normal file
33
extra/wolfssl/user_settings.h.in
Normal file
@ -0,0 +1,33 @@
|
||||
#ifndef WOLFSSL_USER_SETTINGS_H
|
||||
#define WOLFSSL_USER_SETTINGS_H
|
||||
|
||||
#define HAVE_CRL
|
||||
#define WOLFSSL_MYSQL_COMPATIBLE
|
||||
#define HAVE_ECC
|
||||
#define ECC_TIMING_RESISTANT
|
||||
#define HAVE_HASHDRBG
|
||||
#define WOLFSSL_AES_DIRECT
|
||||
#define WOLFSSL_SHA384
|
||||
#define WOLFSSL_SHA512
|
||||
#define WOLFSSL_SHA224
|
||||
#define SESSION_CERT
|
||||
#define KEEP_OUR_CERT
|
||||
#define WOLFSSL_STATIC_RSA
|
||||
#define WC_RSA_BLINDING
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_AES_ECB
|
||||
#define WOLFSSL_AES_COUNTER
|
||||
#define NO_WOLFSSL_STUB
|
||||
#define OPENSSL_ALL
|
||||
|
||||
|
||||
#cmakedefine WOLFSSL_AESNI
|
||||
#cmakedefine USE_FAST_MATH
|
||||
#cmakedefine TFM_TIMING_RESISTANT
|
||||
#cmakedefine HAVE_INTEL_RDSEED
|
||||
#cmakedefine USE_INTEL_SPEEDUP
|
||||
#cmakedefine FP_MAX_BITS @FP_MAX_BITS@
|
||||
#cmakedefine USE_FAST_MATH
|
||||
#cmakedefine WOLFSSL_X86_64_BUILD
|
||||
|
||||
#endif /* WOLFSSL_USER_SETTINGS_H */
|
@ -647,6 +647,7 @@ typedef ulong ha_rows;
|
||||
|
||||
#define HA_POS_ERROR (~ (ha_rows) 0)
|
||||
#define HA_OFFSET_ERROR (~ (my_off_t) 0)
|
||||
#define HA_ROWS_MAX HA_POS_ERROR
|
||||
|
||||
#if SIZEOF_OFF_T == 4
|
||||
#define MAX_FILE_SIZE INT_MAX32
|
||||
|
@ -46,6 +46,11 @@
|
||||
"Certificate revocation list path (implies --ssl).",
|
||||
&opt_ssl_crlpath, &opt_ssl_crlpath, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"tls-version", OPT_TLS_VERSION,
|
||||
"TLS protocol version for secure connection.",
|
||||
&opt_tls_version, &opt_tls_version, 0, GET_STR, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
|
||||
#ifdef MYSQL_CLIENT
|
||||
{"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT,
|
||||
"Verify server's \"Common Name\" in its cert against hostname used "
|
||||
|
@ -30,6 +30,7 @@ SSL_STATIC char *opt_ssl_cipher = 0;
|
||||
SSL_STATIC char *opt_ssl_key = 0;
|
||||
SSL_STATIC char *opt_ssl_crl = 0;
|
||||
SSL_STATIC char *opt_ssl_crlpath = 0;
|
||||
SSL_STATIC char *opt_tls_version = 0;
|
||||
#ifdef MYSQL_CLIENT
|
||||
SSL_STATIC my_bool opt_ssl_verify_server_cert= 0;
|
||||
#endif
|
||||
|
@ -59,6 +59,11 @@ struct vio_keepalive_opts
|
||||
};
|
||||
|
||||
|
||||
#define VIO_TLSv1_0 1
|
||||
#define VIO_TLSv1_1 2
|
||||
#define VIO_TLSv1_2 4
|
||||
#define VIO_TLSv1_3 8
|
||||
|
||||
#define VIO_LOCALHOST 1U /* a localhost connection */
|
||||
#define VIO_BUFFERED_READ 2U /* use buffered read */
|
||||
#define VIO_READ_BUFFER_SIZE 16384U /* size of read buffer */
|
||||
@ -148,7 +153,8 @@ enum enum_ssl_init_error
|
||||
{
|
||||
SSL_INITERR_NOERROR= 0, SSL_INITERR_CERT, SSL_INITERR_KEY,
|
||||
SSL_INITERR_NOMATCH, SSL_INITERR_BAD_PATHS, SSL_INITERR_CIPHERS,
|
||||
SSL_INITERR_MEMFAIL, SSL_INITERR_DH, SSL_INITERR_LASTERR
|
||||
SSL_INITERR_MEMFAIL, SSL_INITERR_DH, SSL_INITERR_PROTOCOL,
|
||||
SSL_INITERR_LASTERR
|
||||
};
|
||||
const char* sslGetErrString(enum enum_ssl_init_error err);
|
||||
|
||||
@ -169,7 +175,8 @@ struct st_VioSSLFd
|
||||
*new_VioSSLAcceptorFd(const char *key_file, const char *cert_file,
|
||||
const char *ca_file,const char *ca_path,
|
||||
const char *cipher, enum enum_ssl_init_error *error,
|
||||
const char *crl_file, const char *crl_path);
|
||||
const char *crl_file, const char *crl_path,
|
||||
ulonglong tls_version);
|
||||
void free_vio_ssl_acceptor_fd(struct st_VioSSLFd *fd);
|
||||
#endif /* HAVE_OPENSSL */
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit ab4d09dd8de0bb2c56ca0c60cb386f02d1736190
|
||||
Subproject commit c098613d289ed88fc53286e98add28ae9f2d8b46
|
@ -44,3 +44,43 @@ INSTALL(FILES ${MAN1_CLIENT} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPag
|
||||
INSTALL(FILES ${MAN1_DEVEL} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesDevelopment)
|
||||
INSTALL(FILES ${MAN1_TEST} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesTest)
|
||||
|
||||
macro(MARIADB_SYMLINK_MANPAGE)
|
||||
list(LENGTH MARIADB_SYMLINK_FROMS _len)
|
||||
math(EXPR _listlen "${_len}-1")
|
||||
|
||||
foreach(_index RANGE ${_listlen})
|
||||
list(GET MARIADB_SYMLINK_FROMS ${_index} _name)
|
||||
|
||||
set(_manname "${_name}")
|
||||
list(FIND MAN1_SERVER ${_manname}.1 _iman1server)
|
||||
list(FIND MAN8_SERVER ${_manname}.8 _iman8server)
|
||||
list(FIND MAN1_CLIENT ${_manname}.1 _iman1client)
|
||||
list(FIND MAN1_DEVEL ${_manname}.1 _iman1devel)
|
||||
list(FIND MAN1_TEST ${_manname}.1 _iman1test)
|
||||
|
||||
if (${_iman1server} GREATER -1)
|
||||
MARIADB_SYMLINK_MANPAGE_CREATE(${_manname} ${_index} 1 "man1" ManPagesServer)
|
||||
endif()
|
||||
if (${_iman8server} GREATER -1)
|
||||
MARIADB_SYMLINK_MANPAGE_CREATE(${_manname} ${_index} 8 "man8" ManPagesServer)
|
||||
endif()
|
||||
if (${_iman1client} GREATER -1)
|
||||
MARIADB_SYMLINK_MANPAGE_CREATE(${_manname} ${_index} 1 "man1" ManPagesClient)
|
||||
endif()
|
||||
if (${_iman1devel} GREATER -1)
|
||||
MARIADB_SYMLINK_MANPAGE_CREATE(${_manname} ${_index} 1 "man1" ManPagesDevelopment)
|
||||
endif()
|
||||
if (${_iman1test} GREATER -1)
|
||||
MARIADB_SYMLINK_MANPAGE_CREATE(${_manname} ${_index} 1 "man1" ManPagesTest)
|
||||
endif()
|
||||
endforeach(_index)
|
||||
endmacro(MARIADB_SYMLINK_MANPAGE)
|
||||
|
||||
macro(MARIADB_SYMLINK_MANPAGE_CREATE mysqlname index mannr dir comp)
|
||||
LIST(GET MARIADB_SYMLINK_TOS ${index} _mariadbname)
|
||||
SET(dest "${CMAKE_CURRENT_BINARY_DIR}/${_mariadbname}.${mannr}")
|
||||
FILE(WRITE ${dest} ".so ${mysqlname}.${mannr}")
|
||||
INSTALL(FILES ${dest} DESTINATION ${INSTALL_MANDIR}/${dir} COMPONENT ${comp})
|
||||
endmacro(MARIADB_SYMLINK_MANPAGE_CREATE)
|
||||
|
||||
MARIADB_SYMLINK_MANPAGE()
|
||||
|
1
mysql-test/main/ctype_utf8_def_upgrade.opt
Normal file
1
mysql-test/main/ctype_utf8_def_upgrade.opt
Normal file
@ -0,0 +1 @@
|
||||
--character-set-server=utf8
|
99
mysql-test/main/ctype_utf8_def_upgrade.result
Normal file
99
mysql-test/main/ctype_utf8_def_upgrade.result
Normal file
@ -0,0 +1,99 @@
|
||||
#
|
||||
# Start of 10.1 tests
|
||||
#
|
||||
#
|
||||
# MDEV-19675 Wrong charset is chosen when opening a pre-4.1 table
|
||||
#
|
||||
# Test with a saved table from 3.23
|
||||
SELECT @@character_set_database;
|
||||
@@character_set_database
|
||||
latin1
|
||||
SET @@character_set_database="latin1";
|
||||
SELECT COUNT(*) FROM t1;
|
||||
ERROR HY000: Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You may have retry " from storage engine MyISAM
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check Error Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You may have retry " from storage engine MyISAM
|
||||
test.t1 check error Corrupt
|
||||
REPAIR TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair Error Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You may have retry " from storage engine MyISAM
|
||||
test.t1 repair error Corrupt
|
||||
REPAIR TABLE t1 USE_FRM;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair status OK
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`Host` char(60) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
|
||||
`Db` char(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
|
||||
`Select_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
`Insert_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
`Update_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
`Delete_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
`Create_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
`Drop_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
`Grant_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
`References_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
`Index_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
`Alter_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
PRIMARY KEY (`Host`,`Db`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Host privileges; Merged with database privileges'
|
||||
DROP TABLE t1;
|
||||
SET @@character_set_database=DEFAULT;
|
||||
# Now do the same, but doing 'ALTER DATABASE' to create the db.opt file,
|
||||
# instead of setting variables directly.
|
||||
# Emulate a pre-4.1 database without db.opt
|
||||
SHOW CREATE DATABASE db1;
|
||||
Database Create Database
|
||||
db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET utf8 */
|
||||
USE db1;
|
||||
SELECT @@character_set_database, 'taken from defaults' AS comment;
|
||||
@@character_set_database comment
|
||||
utf8 taken from defaults
|
||||
USE test;
|
||||
ALTER DATABASE db1 DEFAULT CHARACTER SET latin1;
|
||||
USE db1;
|
||||
SELECT @@character_set_database, 'taken from db.opt' AS comment;
|
||||
@@character_set_database comment
|
||||
latin1 taken from db.opt
|
||||
SELECT COUNT(*) FROM t1;
|
||||
ERROR HY000: Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You may have retry " from storage engine MyISAM
|
||||
REPAIR TABLE t1 USE_FRM;
|
||||
Table Op Msg_type Msg_text
|
||||
db1.t1 repair status OK
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
db1.t1 check status OK
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`Host` char(60) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
|
||||
`Db` char(64) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
|
||||
`Select_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
`Insert_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
`Update_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
`Delete_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
`Create_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
`Drop_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
`Grant_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
`References_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
`Index_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
`Alter_priv` enum('N','Y') NOT NULL DEFAULT 'N',
|
||||
PRIMARY KEY (`Host`,`Db`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Host privileges; Merged with database privileges'
|
||||
DROP TABLE t1;
|
||||
DROP DATABASE db1;
|
||||
USE test;
|
||||
#
|
||||
# End of 10.1 tests
|
||||
#
|
61
mysql-test/main/ctype_utf8_def_upgrade.test
Normal file
61
mysql-test/main/ctype_utf8_def_upgrade.test
Normal file
@ -0,0 +1,61 @@
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.1 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-19675 Wrong charset is chosen when opening a pre-4.1 table
|
||||
--echo #
|
||||
|
||||
--echo # Test with a saved table from 3.23
|
||||
|
||||
SELECT @@character_set_database;
|
||||
SET @@character_set_database="latin1";
|
||||
--copy_file std_data/host_old.frm $MYSQLD_DATADIR/test/t1.frm
|
||||
--copy_file std_data/host_old.MYD $MYSQLD_DATADIR/test/t1.MYD
|
||||
--copy_file std_data/host_old.MYI $MYSQLD_DATADIR/test/t1.MYI
|
||||
|
||||
--error ER_GET_ERRNO
|
||||
SELECT COUNT(*) FROM t1;
|
||||
CHECK TABLE t1;
|
||||
REPAIR TABLE t1;
|
||||
REPAIR TABLE t1 USE_FRM;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
CHECK TABLE t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
SET @@character_set_database=DEFAULT;
|
||||
|
||||
|
||||
--echo # Now do the same, but doing 'ALTER DATABASE' to create the db.opt file,
|
||||
--echo # instead of setting variables directly.
|
||||
|
||||
--echo # Emulate a pre-4.1 database without db.opt
|
||||
--mkdir $MYSQLD_DATADIR/db1
|
||||
SHOW CREATE DATABASE db1;
|
||||
USE db1;
|
||||
SELECT @@character_set_database, 'taken from defaults' AS comment;
|
||||
USE test;
|
||||
ALTER DATABASE db1 DEFAULT CHARACTER SET latin1;
|
||||
USE db1;
|
||||
SELECT @@character_set_database, 'taken from db.opt' AS comment;
|
||||
|
||||
--copy_file std_data/host_old.frm $MYSQLD_DATADIR/db1/t1.frm
|
||||
--copy_file std_data/host_old.MYD $MYSQLD_DATADIR/db1/t1.MYD
|
||||
--copy_file std_data/host_old.MYI $MYSQLD_DATADIR/db1/t1.MYI
|
||||
|
||||
--error ER_GET_ERRNO
|
||||
SELECT COUNT(*) FROM t1;
|
||||
REPAIR TABLE t1 USE_FRM;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
CHECK TABLE t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
DROP DATABASE db1;
|
||||
USE test;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.1 tests
|
||||
--echo #
|
@ -1,4 +1,3 @@
|
||||
drop table if exists t1,t2,t3;
|
||||
set @save_derived_optimizer_switch=@@optimizer_switch;
|
||||
set optimizer_switch='derived_merge=off,derived_with_keys=off';
|
||||
select * from (select 2 from DUAL) b;
|
||||
|
@ -1,7 +1,4 @@
|
||||
# Initialize
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2,t3;
|
||||
--enable_warnings
|
||||
|
||||
set @save_derived_optimizer_switch=@@optimizer_switch;
|
||||
set optimizer_switch='derived_merge=off,derived_with_keys=off';
|
||||
|
@ -3022,7 +3022,7 @@ DROP TABLE t1;
|
||||
set optimizer_switch=@exit_optimizer_switch;
|
||||
set join_cache_level=@exit_join_cache_level;
|
||||
#
|
||||
# Bug mdev-12812: EXPLAIN for query with many expensive derived
|
||||
# Bug mdev-18479: EXPLAIN for query with many expensive derived
|
||||
#
|
||||
CREATE TABLE t1
|
||||
(id int auto_increment primary key,
|
||||
@ -3323,8 +3323,6 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY p10 ALL NULL NULL NULL NULL 550 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived17> ALL NULL NULL NULL NULL 50328437500000 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived14> ALL NULL NULL NULL NULL 27680640625000000 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived7> ALL NULL NULL NULL NULL 7798774269472204800 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived8> ALL NULL NULL NULL NULL 7798774269472204800 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived9> ALL NULL NULL NULL NULL 15224352343750000640 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived10> ALL NULL NULL NULL NULL 15224352343750000640 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived11> ALL NULL NULL NULL NULL 15224352343750000640 Using where; Using join buffer (incremental, BNL join)
|
||||
@ -3332,6 +3330,8 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <derived13> ALL NULL NULL NULL NULL 15224352343750000640 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived15> ALL NULL NULL NULL NULL 15224352343750000640 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived16> ALL NULL NULL NULL NULL 15224352343750000640 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived7> ALL NULL NULL NULL NULL 18446744073709551615 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived8> ALL NULL NULL NULL NULL 18446744073709551615 Using where; Using join buffer (incremental, BNL join)
|
||||
17 DERIVED t2 system NULL NULL NULL NULL 1
|
||||
17 DERIVED p4 ALL NULL NULL NULL NULL 550 Using where
|
||||
17 DERIVED p5 ALL NULL NULL NULL NULL 550 Using where; Using join buffer (flat, BNL join)
|
||||
|
@ -1978,7 +1978,7 @@ set optimizer_switch=@exit_optimizer_switch;
|
||||
set join_cache_level=@exit_join_cache_level;
|
||||
|
||||
--echo #
|
||||
--echo # Bug mdev-12812: EXPLAIN for query with many expensive derived
|
||||
--echo # Bug mdev-18479: EXPLAIN for query with many expensive derived
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1
|
||||
|
@ -102,3 +102,28 @@ u6 Y mysql_old_password 78a302dd267f6044
|
||||
u7 Y mysql_old_password 78a302dd267f6044
|
||||
u8 Y nonexistent 78a302dd267f6044
|
||||
drop user u1@h, u2@h, u3@h, u4@h, u5@h, u6@h, u7@h, u8@h;
|
||||
create database mysqltest_1;
|
||||
create user twg@'%' identified by 'test';
|
||||
create table mysqltest_1.t1(id int);
|
||||
grant create, drop on `mysqltest_1%`.* to twg@'%';
|
||||
grant all privileges on `mysqltest_1`.* to twg@'%';
|
||||
connect conn1,localhost,twg,test,mysqltest_1;
|
||||
insert into t1 values(1);
|
||||
disconnect conn1;
|
||||
connection default;
|
||||
revoke all privileges, grant option from twg@'%';
|
||||
grant create, drop on `mysqlt%`.* to twg@'%';
|
||||
grant all privileges on `mysqlt%1`.* to twg@'%';
|
||||
connect conn1,localhost,twg,test,mysqltest_1;
|
||||
insert into t1 values(1);
|
||||
disconnect conn1;
|
||||
connection default;
|
||||
revoke all privileges, grant option from twg@'%';
|
||||
grant create, drop on `mysqlt%`.* to twg@'%';
|
||||
grant all privileges on `%mysqltest_1`.* to twg@'%';
|
||||
connect conn1,localhost,twg,test,mysqltest_1;
|
||||
insert into t1 values(1);
|
||||
disconnect conn1;
|
||||
connection default;
|
||||
drop database mysqltest_1;
|
||||
drop user twg@'%';
|
||||
|
@ -86,3 +86,41 @@ select user,select_priv,plugin,authentication_string from mysql.user where user
|
||||
|
||||
# but they still can be dropped
|
||||
drop user u1@h, u2@h, u3@h, u4@h, u5@h, u6@h, u7@h, u8@h;
|
||||
|
||||
#
|
||||
# MDEV-14735 better matching order for grants
|
||||
# MDEV-14732 mysql.db privileges evaluated on order of grants rather than hierarchically
|
||||
# MDEV-8269 Correct fix for Bug #20181776 :- ACCESS CONTROL DOESN'T MATCH MOST SPECIFIC HOST WHEN IT CONTAINS WILDCARD
|
||||
#
|
||||
create database mysqltest_1;
|
||||
create user twg@'%' identified by 'test';
|
||||
create table mysqltest_1.t1(id int);
|
||||
|
||||
# MDEV-14732 test case
|
||||
grant create, drop on `mysqltest_1%`.* to twg@'%';
|
||||
grant all privileges on `mysqltest_1`.* to twg@'%';
|
||||
connect conn1,localhost,twg,test,mysqltest_1;
|
||||
insert into t1 values(1);
|
||||
disconnect conn1;
|
||||
connection default;
|
||||
|
||||
# prefix%suffix
|
||||
revoke all privileges, grant option from twg@'%';
|
||||
grant create, drop on `mysqlt%`.* to twg@'%';
|
||||
grant all privileges on `mysqlt%1`.* to twg@'%';
|
||||
connect conn1,localhost,twg,test,mysqltest_1;
|
||||
insert into t1 values(1);
|
||||
disconnect conn1;
|
||||
connection default;
|
||||
|
||||
# more specific can even have a shorter prefix
|
||||
revoke all privileges, grant option from twg@'%';
|
||||
grant create, drop on `mysqlt%`.* to twg@'%';
|
||||
grant all privileges on `%mysqltest_1`.* to twg@'%';
|
||||
connect conn1,localhost,twg,test,mysqltest_1;
|
||||
insert into t1 values(1);
|
||||
disconnect conn1;
|
||||
connection default;
|
||||
|
||||
drop database mysqltest_1;
|
||||
drop user twg@'%';
|
||||
|
@ -1140,7 +1140,7 @@ SELECT 1 FROM v1 right join v1 AS v2 ON RAND();
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select 1 AS `1` from `test`.`t1` left join `test`.`t1` `t2` on(1 = 1) left join (`test`.`t1` left join `test`.`t1` `t2` on(1 = 1)) on(rand()) where 1
|
||||
|
@ -1966,3 +1966,36 @@ Note 1003 select 1 AS `K1`,'T1Row1' AS `Name`,`t2a`.`K2` AS `K2`,`t2a`.`K1r` AS
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1,t2;
|
||||
set optimizer_search_depth= @tmp_mdev621;
|
||||
#
|
||||
# MDEV-19588: Nested left joins using optimized join cache
|
||||
#
|
||||
set optimizer_switch='optimize_join_buffer_size=on';
|
||||
set @save_join_cache_level= @@join_cache_level;
|
||||
set join_cache_level=2;
|
||||
CREATE TABLE t1 (i1 int, c1 varchar(20), pk int) engine=myisam;
|
||||
CREATE TABLE t2 (pk int, c1 varchar(20), i1 int) engine=myisam;
|
||||
INSERT INTO t2 VALUES (7,'a',-912),(8,'a',5);
|
||||
CREATE TABLE t3 (pk int, c1 varchar(20), i1 int) engine=myisam;
|
||||
INSERT INTO t3 VALUES
|
||||
(1,'a',-145),(2,'a',6),(3,'a',1),(7,'a',NULL),(8,'a',889),(9,'a',146),
|
||||
(10,'a',177),(16,'a',-433),(17,'a',NULL),(18,'a',2),(19,'a',3),(20,'a',5),
|
||||
(21,'a',-484),(22,'a',369),(23,'a',-192),(24,'a',-163),(25,'a',5),(26,'a',NULL);
|
||||
SELECT t3.*
|
||||
FROM t3 LEFT JOIN t1 LEFT JOIN t2 ON t1.i1 = t2.i1 ON t3.i1 = t1.i1
|
||||
WHERE t2.pk < 13 OR t3.i1 IS NULL;
|
||||
pk c1 i1
|
||||
7 a NULL
|
||||
17 a NULL
|
||||
26 a NULL
|
||||
explain extended SELECT t3.*
|
||||
FROM t3 LEFT JOIN t1 LEFT JOIN t2 ON t1.i1 = t2.i1 ON t3.i1 = t1.i1
|
||||
WHERE t2.pk < 13 OR t3.i1 IS NULL;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 18 100.00
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 0 0.00 Using where; Using join buffer (flat, BNL join)
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (incremental, BNL join)
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`pk` AS `pk`,`test`.`t3`.`c1` AS `c1`,`test`.`t3`.`i1` AS `i1` from `test`.`t3` left join (`test`.`t1` left join `test`.`t2` on(`test`.`t2`.`i1` = `test`.`t3`.`i1`)) on(`test`.`t1`.`i1` = `test`.`t3`.`i1`) where `test`.`t2`.`pk` < 13 or `test`.`t3`.`i1` is null
|
||||
DROP TABLE t1,t2,t3;
|
||||
set join_cache_level= @save_join_cache_level;
|
||||
set optimizer_switch=@save_optimizer_switch;
|
||||
|
@ -1380,3 +1380,37 @@ DROP VIEW v1;
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
set optimizer_search_depth= @tmp_mdev621;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-19588: Nested left joins using optimized join cache
|
||||
--echo #
|
||||
|
||||
set optimizer_switch='optimize_join_buffer_size=on';
|
||||
|
||||
set @save_join_cache_level= @@join_cache_level;
|
||||
set join_cache_level=2;
|
||||
|
||||
CREATE TABLE t1 (i1 int, c1 varchar(20), pk int) engine=myisam;
|
||||
|
||||
CREATE TABLE t2 (pk int, c1 varchar(20), i1 int) engine=myisam;
|
||||
INSERT INTO t2 VALUES (7,'a',-912),(8,'a',5);
|
||||
|
||||
CREATE TABLE t3 (pk int, c1 varchar(20), i1 int) engine=myisam;
|
||||
INSERT INTO t3 VALUES
|
||||
(1,'a',-145),(2,'a',6),(3,'a',1),(7,'a',NULL),(8,'a',889),(9,'a',146),
|
||||
(10,'a',177),(16,'a',-433),(17,'a',NULL),(18,'a',2),(19,'a',3),(20,'a',5),
|
||||
(21,'a',-484),(22,'a',369),(23,'a',-192),(24,'a',-163),(25,'a',5),(26,'a',NULL);
|
||||
|
||||
let $q=
|
||||
SELECT t3.*
|
||||
FROM t3 LEFT JOIN t1 LEFT JOIN t2 ON t1.i1 = t2.i1 ON t3.i1 = t1.i1
|
||||
WHERE t2.pk < 13 OR t3.i1 IS NULL;
|
||||
|
||||
eval $q;
|
||||
eval explain extended $q;
|
||||
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
||||
set join_cache_level= @save_join_cache_level;
|
||||
|
||||
set optimizer_switch=@save_optimizer_switch;
|
||||
|
@ -1977,6 +1977,39 @@ Note 1003 select 1 AS `K1`,'T1Row1' AS `Name`,`t2a`.`K2` AS `K2`,`t2a`.`K1r` AS
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1,t2;
|
||||
set optimizer_search_depth= @tmp_mdev621;
|
||||
#
|
||||
# MDEV-19588: Nested left joins using optimized join cache
|
||||
#
|
||||
set optimizer_switch='optimize_join_buffer_size=on';
|
||||
set @save_join_cache_level= @@join_cache_level;
|
||||
set join_cache_level=2;
|
||||
CREATE TABLE t1 (i1 int, c1 varchar(20), pk int) engine=myisam;
|
||||
CREATE TABLE t2 (pk int, c1 varchar(20), i1 int) engine=myisam;
|
||||
INSERT INTO t2 VALUES (7,'a',-912),(8,'a',5);
|
||||
CREATE TABLE t3 (pk int, c1 varchar(20), i1 int) engine=myisam;
|
||||
INSERT INTO t3 VALUES
|
||||
(1,'a',-145),(2,'a',6),(3,'a',1),(7,'a',NULL),(8,'a',889),(9,'a',146),
|
||||
(10,'a',177),(16,'a',-433),(17,'a',NULL),(18,'a',2),(19,'a',3),(20,'a',5),
|
||||
(21,'a',-484),(22,'a',369),(23,'a',-192),(24,'a',-163),(25,'a',5),(26,'a',NULL);
|
||||
SELECT t3.*
|
||||
FROM t3 LEFT JOIN t1 LEFT JOIN t2 ON t1.i1 = t2.i1 ON t3.i1 = t1.i1
|
||||
WHERE t2.pk < 13 OR t3.i1 IS NULL;
|
||||
pk c1 i1
|
||||
7 a NULL
|
||||
17 a NULL
|
||||
26 a NULL
|
||||
explain extended SELECT t3.*
|
||||
FROM t3 LEFT JOIN t1 LEFT JOIN t2 ON t1.i1 = t2.i1 ON t3.i1 = t1.i1
|
||||
WHERE t2.pk < 13 OR t3.i1 IS NULL;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 18 100.00
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 0 0.00 Using where; Using join buffer (flat, BNL join)
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (incremental, BNL join)
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t3`.`pk` AS `pk`,`test`.`t3`.`c1` AS `c1`,`test`.`t3`.`i1` AS `i1` from `test`.`t3` left join (`test`.`t1` left join `test`.`t2` on(`test`.`t2`.`i1` = `test`.`t3`.`i1`)) on(`test`.`t1`.`i1` = `test`.`t3`.`i1`) where `test`.`t2`.`pk` < 13 or `test`.`t3`.`i1` is null
|
||||
DROP TABLE t1,t2,t3;
|
||||
set join_cache_level= @save_join_cache_level;
|
||||
set optimizer_switch=@save_optimizer_switch;
|
||||
CREATE TABLE t5 (a int, b int, c int, PRIMARY KEY(a), KEY b_i (b));
|
||||
CREATE TABLE t6 (a int, b int, c int, PRIMARY KEY(a), KEY b_i (b));
|
||||
CREATE TABLE t7 (a int, b int, c int, PRIMARY KEY(a), KEY b_i (b));
|
||||
|
@ -79,21 +79,21 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY p7 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY p8 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY p9 ALL NULL NULL NULL NULL 50 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived3> ALL NULL NULL NULL NULL 17319535557742690304 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived4> ALL NULL NULL NULL NULL 17319535557742690304 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived5> ALL NULL NULL NULL NULL 17319535557742690304 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived6> ALL NULL NULL NULL NULL 17319535557742690304 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived7> ALL NULL NULL NULL NULL 17319535557742690304 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived8> ALL NULL NULL NULL NULL 17319535557742690304 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived9> ALL NULL NULL NULL NULL 17319535557742690304 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived10> ALL NULL NULL NULL NULL 17319535557742690304 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived11> ALL NULL NULL NULL NULL 17319535557742690304 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived12> ALL NULL NULL NULL NULL 17319535557742690304 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived13> ALL NULL NULL NULL NULL 17319535557742690304 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived14> ALL NULL NULL NULL NULL 17319535557742690304 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived15> ALL NULL NULL NULL NULL 17319535557742690304 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived16> ALL NULL NULL NULL NULL 17319535557742690304 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived17> ALL NULL NULL NULL NULL 17319535557742690304 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived3> ALL NULL NULL NULL NULL 18446744073709551615 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived4> ALL NULL NULL NULL NULL 18446744073709551615 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived5> ALL NULL NULL NULL NULL 18446744073709551615 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived6> ALL NULL NULL NULL NULL 18446744073709551615 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived7> ALL NULL NULL NULL NULL 18446744073709551615 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived8> ALL NULL NULL NULL NULL 18446744073709551615 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived9> ALL NULL NULL NULL NULL 18446744073709551615 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived10> ALL NULL NULL NULL NULL 18446744073709551615 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived11> ALL NULL NULL NULL NULL 18446744073709551615 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived12> ALL NULL NULL NULL NULL 18446744073709551615 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived13> ALL NULL NULL NULL NULL 18446744073709551615 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived14> ALL NULL NULL NULL NULL 18446744073709551615 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived15> ALL NULL NULL NULL NULL 18446744073709551615 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived16> ALL NULL NULL NULL NULL 18446744073709551615 Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived17> ALL NULL NULL NULL NULL 18446744073709551615 Using join buffer (incremental, BNL join)
|
||||
17 DERIVED r1 ALL NULL NULL NULL NULL 2
|
||||
17 DERIVED d1 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
|
||||
17 DERIVED r2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (incremental, BNL join)
|
||||
|
@ -412,7 +412,6 @@ c2_id c2_p_id c2_note c2_active
|
||||
1 1 A Note 1
|
||||
drop table t1, t2;
|
||||
connect root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK;
|
||||
connection root;
|
||||
create database mysqltest;
|
||||
create table mysqltest.t1 (a int, b int, primary key (a));
|
||||
create table mysqltest.t2 (a int, b int, primary key (a));
|
||||
@ -421,7 +420,6 @@ create user mysqltest_1@localhost;
|
||||
grant select on mysqltest.* to mysqltest_1@localhost;
|
||||
grant update on mysqltest.t1 to mysqltest_1@localhost;
|
||||
connect user1,localhost,mysqltest_1,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK;
|
||||
connection user1;
|
||||
update t1, t2 set t1.b=1 where t1.a=t2.a;
|
||||
update t1, t2 set t1.b=(select t3.b from t3 where t1.a=t3.a) where t1.a=t2.a;
|
||||
connection root;
|
||||
@ -456,13 +454,10 @@ create table t2 (a int);
|
||||
insert into t2 values (10), (20), (30);
|
||||
create view v1 as select a as b, a/10 as a from t2;
|
||||
connect locker,localhost,root,,test;
|
||||
connection locker;
|
||||
lock table t1 write;
|
||||
connect changer,localhost,root,,test;
|
||||
connection changer;
|
||||
alter table t1 add column c int default 100 after a;
|
||||
connect updater,localhost,root,,test;
|
||||
connection updater;
|
||||
update t1, v1 set t1.b=t1.a+t1.b+v1.b where t1.a=v1.a;
|
||||
connection locker;
|
||||
unlock tables;
|
||||
@ -963,7 +958,30 @@ triggered
|
||||
triggered
|
||||
drop table t1,t2, t3;
|
||||
drop user foo;
|
||||
end of 5.5 tests
|
||||
create table t1 (a int, b int);
|
||||
create table t2 (c int, d int);
|
||||
insert t1 values (1,2),(3,4);
|
||||
insert t2 values (5,6),(7,8);
|
||||
create table t0 (x int);
|
||||
insert t0 values (11), (22);
|
||||
create trigger tr1 before update on t2 for each row insert t0 values (new.c);
|
||||
connect con1, localhost, root;
|
||||
lock table t0 write;
|
||||
connection default;
|
||||
update t1 join t2 on (a=c+4) set b=d;
|
||||
disconnect con1;
|
||||
drop table t1, t2, t0;
|
||||
create table t1 (a int, b varchar(50), c varchar(50));
|
||||
insert t1 (a,b) values (1,'1'), (2,'2'), (3,'3');
|
||||
create function f1() returns varchar(50) return 'result';
|
||||
create trigger tr before update on t1 for each row set new.c = (select f1());
|
||||
create table t2 select a, b from t1;
|
||||
update t1 join t2 using (a) set t1.b = t2.b;
|
||||
drop table t1, t2;
|
||||
drop function f1;
|
||||
#
|
||||
# end of 5.5 tests
|
||||
#
|
||||
create table t1 (c1 int, c3 int);
|
||||
insert t1(c3) values (1), (2), (3), (4), (5), (6), (7), (8);
|
||||
create table t2 select * from t1;
|
||||
|
@ -354,7 +354,6 @@ drop table t1, t2;
|
||||
#
|
||||
|
||||
connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
|
||||
connection root;
|
||||
create database mysqltest;
|
||||
create table mysqltest.t1 (a int, b int, primary key (a));
|
||||
create table mysqltest.t2 (a int, b int, primary key (a));
|
||||
@ -363,7 +362,6 @@ create user mysqltest_1@localhost;
|
||||
grant select on mysqltest.* to mysqltest_1@localhost;
|
||||
grant update on mysqltest.t1 to mysqltest_1@localhost;
|
||||
connect (user1,localhost,mysqltest_1,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK);
|
||||
connection user1;
|
||||
update t1, t2 set t1.b=1 where t1.a=t2.a;
|
||||
update t1, t2 set t1.b=(select t3.b from t3 where t1.a=t3.a) where t1.a=t2.a;
|
||||
connection root;
|
||||
@ -419,15 +417,12 @@ insert into t2 values (10), (20), (30);
|
||||
create view v1 as select a as b, a/10 as a from t2;
|
||||
|
||||
connect (locker,localhost,root,,test);
|
||||
connection locker;
|
||||
lock table t1 write;
|
||||
|
||||
connect (changer,localhost,root,,test);
|
||||
connection changer;
|
||||
send alter table t1 add column c int default 100 after a;
|
||||
|
||||
connect (updater,localhost,root,,test);
|
||||
connection updater;
|
||||
# Wait till "alter table t1 ..." of session changer is in work.
|
||||
# = There is one session waiting.
|
||||
let $wait_condition= select count(*)= 1 from information_schema.processlist
|
||||
@ -930,7 +925,38 @@ select * from t2;
|
||||
drop table t1,t2, t3;
|
||||
drop user foo;
|
||||
|
||||
--echo end of 5.5 tests
|
||||
#
|
||||
# Another test on not-opening tables unnecessary
|
||||
#
|
||||
create table t1 (a int, b int);
|
||||
create table t2 (c int, d int);
|
||||
insert t1 values (1,2),(3,4);
|
||||
insert t2 values (5,6),(7,8);
|
||||
create table t0 (x int);
|
||||
insert t0 values (11), (22);
|
||||
create trigger tr1 before update on t2 for each row insert t0 values (new.c);
|
||||
connect con1, localhost, root;
|
||||
lock table t0 write;
|
||||
connection default;
|
||||
update t1 join t2 on (a=c+4) set b=d;
|
||||
disconnect con1;
|
||||
drop table t1, t2, t0;
|
||||
|
||||
#
|
||||
# MDEV-19521 Update Table Fails with Trigger and Stored Function
|
||||
#
|
||||
create table t1 (a int, b varchar(50), c varchar(50));
|
||||
insert t1 (a,b) values (1,'1'), (2,'2'), (3,'3');
|
||||
create function f1() returns varchar(50) return 'result';
|
||||
create trigger tr before update on t1 for each row set new.c = (select f1());
|
||||
create table t2 select a, b from t1;
|
||||
update t1 join t2 using (a) set t1.b = t2.b;
|
||||
drop table t1, t2;
|
||||
drop function f1;
|
||||
|
||||
--echo #
|
||||
--echo # end of 5.5 tests
|
||||
--echo #
|
||||
|
||||
#
|
||||
# MDEV-13911 Support ORDER BY and LIMIT in multi-table update
|
||||
|
16
mysql-test/main/multi_update_debug.result
Normal file
16
mysql-test/main/multi_update_debug.result
Normal file
@ -0,0 +1,16 @@
|
||||
create table t1 (a int, b int);
|
||||
create table t2 (c int, d int);
|
||||
insert t1 values (1,2),(3,4);
|
||||
insert t2 values (5,6),(7,8);
|
||||
create table t0 (x int);
|
||||
insert t0 values (11), (22);
|
||||
create trigger tr1 before update on t1 for each row insert t0 values (new.b);
|
||||
set debug_sync='open_tables_after_open_and_process_table WAIT_FOR cont';
|
||||
update t1 join t2 on (a=c+4) set b=d;
|
||||
connect con1, localhost, root;
|
||||
set debug_sync='mdl_acquire_lock_wait SIGNAL cont';
|
||||
lock table t1 write, t0 write;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
drop table t1, t2, t0;
|
||||
set debug_sync='reset';
|
27
mysql-test/main/multi_update_debug.test
Normal file
27
mysql-test/main/multi_update_debug.test
Normal file
@ -0,0 +1,27 @@
|
||||
#
|
||||
# test MDL backoff-and-retry during multi-update
|
||||
#
|
||||
source include/have_debug_sync.inc;
|
||||
create table t1 (a int, b int);
|
||||
create table t2 (c int, d int);
|
||||
insert t1 values (1,2),(3,4);
|
||||
insert t2 values (5,6),(7,8);
|
||||
create table t0 (x int);
|
||||
insert t0 values (11), (22);
|
||||
create trigger tr1 before update on t1 for each row insert t0 values (new.b);
|
||||
|
||||
set debug_sync='open_tables_after_open_and_process_table WAIT_FOR cont';
|
||||
send update t1 join t2 on (a=c+4) set b=d;
|
||||
|
||||
connect con1, localhost, root;
|
||||
let $wait_condition= select count(*) from information_schema.processlist where state = ' debug sync point: open_tables_after_open_and_process_table'
|
||||
source include/wait_condition.inc;
|
||||
set debug_sync='mdl_acquire_lock_wait SIGNAL cont';
|
||||
lock table t1 write, t0 write;
|
||||
let $wait_condition= select count(*) from information_schema.processlist where state = 'Waiting for table metadata lock'
|
||||
source include/wait_condition.inc;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
reap;
|
||||
drop table t1, t2, t0;
|
||||
set debug_sync='reset';
|
@ -67,6 +67,23 @@ SELECT * FROM t2;
|
||||
col_int_key pk_1 pk_2 col_int
|
||||
1 2 3 4
|
||||
DROP TABLE t1,t2;
|
||||
create table t1 (id serial, size int(11)) engine=innodb;
|
||||
create table t2 (id serial, size int, account_id int) engine=innodb;
|
||||
create table t3 (id serial, size int, article_id int) engine=innodb;
|
||||
create table t4 (id serial, file_id int, article_id int) engine=innodb;
|
||||
insert t1 values(null, 400);
|
||||
insert t2 values(null, 0, 1), (null, 1, 1);
|
||||
insert t3 values(null, 100, 1);
|
||||
insert t4 values(null, 1, 2);
|
||||
create trigger file_update_article before update on t3 for each row
|
||||
update t2 set t2.size = new.size where t2.id = new.article_id;
|
||||
create trigger article_update_account before update on t2 for each row
|
||||
update t1 set t1.size = t1.size + new.size where t1.id = new.account_id;
|
||||
update t3 join t4 on t4.file_id =t3.id and t4.article_id=2 set t3.size=t3.size + 2;
|
||||
drop table t1, t2, t3, t4;
|
||||
#
|
||||
# end of 5.5 tests
|
||||
#
|
||||
|
||||
# Bug mdev-5970
|
||||
# Bug#13256831 - ERROR 1032 (HY000): CAN'T FIND RECORD
|
||||
|
@ -76,6 +76,28 @@ SELECT * FROM t2;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
#
|
||||
# MDEV-19491 update query stopped working after mariadb upgrade 10.2.23 -> 10.2.24
|
||||
#
|
||||
create table t1 (id serial, size int(11)) engine=innodb;
|
||||
create table t2 (id serial, size int, account_id int) engine=innodb;
|
||||
create table t3 (id serial, size int, article_id int) engine=innodb;
|
||||
create table t4 (id serial, file_id int, article_id int) engine=innodb;
|
||||
insert t1 values(null, 400);
|
||||
insert t2 values(null, 0, 1), (null, 1, 1);
|
||||
insert t3 values(null, 100, 1);
|
||||
insert t4 values(null, 1, 2);
|
||||
create trigger file_update_article before update on t3 for each row
|
||||
update t2 set t2.size = new.size where t2.id = new.article_id;
|
||||
create trigger article_update_account before update on t2 for each row
|
||||
update t1 set t1.size = t1.size + new.size where t1.id = new.account_id;
|
||||
update t3 join t4 on t4.file_id =t3.id and t4.article_id=2 set t3.size=t3.size + 2;
|
||||
drop table t1, t2, t3, t4;
|
||||
|
||||
--echo #
|
||||
--echo # end of 5.5 tests
|
||||
--echo #
|
||||
|
||||
--echo
|
||||
--echo # Bug mdev-5970
|
||||
--echo # Bug#13256831 - ERROR 1032 (HY000): CAN'T FIND RECORD
|
||||
|
@ -1357,6 +1357,8 @@ The following specify which files/extra groups are read (specified before remain
|
||||
--time-format=name The TIME format (ignored)
|
||||
--timed-mutexes Specify whether to time mutexes. Deprecated, has no
|
||||
effect.
|
||||
--tls-version=name TLS protocol version for secure connections.. Any
|
||||
combination of: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3
|
||||
--tmp-disk-table-size=#
|
||||
Max size for data for an internal temporary on-disk
|
||||
MyISAM or Aria table.
|
||||
|
@ -23,7 +23,7 @@ perl;
|
||||
log-slow-queries pid-file slow-query-log-file log-basename
|
||||
datadir slave-load-tmpdir tmpdir socket thread-pool-size
|
||||
large-files-support lower-case-file-system system-time-zone
|
||||
collation-server character-set-server log-tc-size version.*/;
|
||||
collation-server character-set-server log-tc-size tls-version version.*/;
|
||||
|
||||
# Plugins which may or may not be there:
|
||||
@plugins=qw/innodb archive blackhole federated partition s3
|
||||
|
@ -18,25 +18,25 @@ let $mysql=$MYSQL --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$
|
||||
|
||||
disable_abort_on_error;
|
||||
echo TLS1.2 ciphers: user is ok with any cipher;
|
||||
exec $mysql --ssl-cipher=AES128-SHA256;
|
||||
exec $mysql --tls-version=TLSv1.2 --ssl-cipher=AES128-SHA256;
|
||||
--replace_result DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-GCM-SHA384
|
||||
exec $mysql --ssl-cipher=TLSv1.2;
|
||||
exec $mysql --tls-version=TLSv1.2 --ssl-cipher=TLSv1.2;
|
||||
echo TLS1.2 ciphers: user requires SSLv3 cipher AES128-SHA;
|
||||
exec $mysql --user ssl_sslv3 --ssl-cipher=AES128-SHA256;
|
||||
exec $mysql --user ssl_sslv3 --ssl-cipher=TLSv1.2;
|
||||
exec $mysql --user ssl_sslv3 --tls-version=TLSv1.2 --ssl-cipher=AES128-SHA256;
|
||||
exec $mysql --user ssl_sslv3 --tls-version=TLSv1.2 --ssl-cipher=TLSv1.2;
|
||||
echo TLS1.2 ciphers: user requires TLSv1.2 cipher AES128-SHA256;
|
||||
exec $mysql --user ssl_tls12 --ssl-cipher=AES128-SHA256;
|
||||
exec $mysql --user ssl_tls12 --ssl-cipher=TLSv1.2;
|
||||
exec $mysql --user ssl_tls12 --tls-version=TLSv1.2 --ssl-cipher=AES128-SHA256;
|
||||
exec $mysql --user ssl_tls12 --tls-version=TLSv1.2 --ssl-cipher=TLSv1.2;
|
||||
|
||||
echo SSLv3 ciphers: user is ok with any cipher;
|
||||
exec $mysql --ssl-cipher=AES256-SHA;
|
||||
exec $mysql --ssl-cipher=SSLv3;
|
||||
exec $mysql --tls-version=TLSv1.0,TLSv1.1,TLSv1.2 --ssl-cipher=AES256-SHA;
|
||||
exec $mysql --tls-version=TLSv1.0,TLSv1.1,TLSv1.2 --ssl-cipher=SSLv3;
|
||||
echo SSLv3 ciphers: user requires SSLv3 cipher AES128-SHA;
|
||||
exec $mysql --user ssl_sslv3 --ssl-cipher=AES128-SHA;
|
||||
exec $mysql --user ssl_sslv3 --ssl-cipher=SSLv3;
|
||||
exec $mysql --user ssl_sslv3 --tls-version=TLSv1.0,TLSv1.1,TLSv1.2 --ssl-cipher=AES128-SHA;
|
||||
exec $mysql --user ssl_sslv3 --tls-version=TLSv1.0,TLSv1.1,TLSv1.2 --ssl-cipher=SSLv3;
|
||||
echo SSLv3 ciphers: user requires TLSv1.2 cipher AES128-SHA256;
|
||||
exec $mysql --user ssl_tls12 --ssl-cipher=AES128-SHA;
|
||||
exec $mysql --user ssl_tls12 --ssl-cipher=SSLv3;
|
||||
exec $mysql --user ssl_tls12 --tls-version=TLSv1.0,TLSv1.1,TLSv1.2 --ssl-cipher=AES128-SHA;
|
||||
exec $mysql --user ssl_tls12 --tls-version=TLSv1.0,TLSv1.1,TLSv1.2 --ssl-cipher=SSLv3;
|
||||
|
||||
drop user ssl_sslv3@localhost;
|
||||
drop user ssl_tls12@localhost;
|
||||
|
@ -4,6 +4,9 @@ User plugin authentication_string
|
||||
========== test 1.1.3.2 ====================================
|
||||
CREATE USER plug_user IDENTIFIED WITH test_plugin_server AS 'plug_dest';
|
||||
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
|
||||
GRANT PROXY ON `plug%dest` TO plug_user;
|
||||
ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using password: YES)
|
||||
REVOKE PROXY ON `plug%dest` FROM plug_user;
|
||||
GRANT PROXY ON plug_dest TO plug_user;
|
||||
current_user()
|
||||
plug_dest@%
|
||||
|
@ -13,6 +13,10 @@ SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
# CREATE...WITH/CREATE...BY/GRANT
|
||||
CREATE USER plug_user IDENTIFIED WITH test_plugin_server AS 'plug_dest';
|
||||
CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
|
||||
GRANT PROXY ON `plug%dest` TO plug_user;
|
||||
--error 1
|
||||
--exec $MYSQL -S $MASTER_MYSOCK -u plug_user --password=plug_dest -e "SELECT current_user();SELECT user();USE test_user_db;CREATE TABLE t1(a int);SHOW TABLES;DROP TABLE t1;" 2>&1
|
||||
REVOKE PROXY ON `plug%dest` FROM plug_user;
|
||||
GRANT PROXY ON plug_dest TO plug_user;
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQL -S $MASTER_MYSOCK -u plug_user --password=plug_dest -e "SELECT current_user();SELECT user();USE test_user_db;CREATE TABLE t1(a int);SHOW TABLES;DROP TABLE t1;" 2>&1
|
||||
|
@ -80,3 +80,21 @@ ERROR HY000: Table definition has changed, please retry transaction
|
||||
DROP TABLE t0,t1;
|
||||
set @@global.debug_dbug="-d";
|
||||
set @@optimizer_switch= @optimizer_switch_save;
|
||||
#
|
||||
# MDEV-19634: Assertion `0' failed in row_sel_convert_mysql_key_to_innobase,
|
||||
# [Warning] InnoDB: Using a partial-field key prefix in search
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
pk INT,
|
||||
a VARCHAR(1),
|
||||
b INT,
|
||||
PRIMARY KEY (pk),
|
||||
KEY (a,b)
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1,'a',1),(2,'b',2);
|
||||
explain SELECT a FROM t1 WHERE pk < 0 AND a <= 'w' and b > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index PRIMARY,a a 9 NULL 2 Using where; Using index
|
||||
SELECT a FROM t1 WHERE pk < 0 AND a <= 'w' and b > 0;
|
||||
a
|
||||
drop table t1;
|
||||
|
@ -87,3 +87,22 @@ select * from t1 where a=10 and b=10;
|
||||
DROP TABLE t0,t1;
|
||||
set @@global.debug_dbug="-d";
|
||||
set @@optimizer_switch= @optimizer_switch_save;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-19634: Assertion `0' failed in row_sel_convert_mysql_key_to_innobase,
|
||||
--echo # [Warning] InnoDB: Using a partial-field key prefix in search
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (
|
||||
pk INT,
|
||||
a VARCHAR(1),
|
||||
b INT,
|
||||
PRIMARY KEY (pk),
|
||||
KEY (a,b)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t1 VALUES (1,'a',1),(2,'b',2);
|
||||
|
||||
explain SELECT a FROM t1 WHERE pk < 0 AND a <= 'w' and b > 0;
|
||||
SELECT a FROM t1 WHERE pk < 0 AND a <= 'w' and b > 0;
|
||||
drop table t1;
|
||||
|
@ -6988,7 +6988,7 @@ WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 );
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||
1 PRIMARY t2 ALL b NULL NULL NULL 2 Using where
|
||||
1 PRIMARY t3 ref d d 5 test.t2.b 2 Using where; Using index
|
||||
1 PRIMARY t3 ref d d 5 test.t2.b 2 Using index
|
||||
3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
set @tmp_mdev410=@@global.userstat;
|
||||
set global userstat=on;
|
||||
|
@ -2517,6 +2517,95 @@ SELECT 1 FROM t1 where t1.id IN (SELECT v1.i1 from v1);
|
||||
1
|
||||
drop table t1,t2;
|
||||
drop view v1;
|
||||
#
|
||||
# MDEV-19580: function invocation in the left part of IN subquery
|
||||
#
|
||||
create table t1 (id int, a varchar(50), b int);
|
||||
insert into t1 values
|
||||
(1,'mrs',2), (2,'joe',2), (3,'paul',1), (4,'art',1);
|
||||
create table t2 (id int, a varchar(50), x int);
|
||||
insert into t2 values
|
||||
(1,'grand',1),(2,'average',1),(3,'serf',0);
|
||||
create table t3 (d1 date, d2 date, t1_id int, t2_id int );
|
||||
insert into t3 values
|
||||
('1972-01-01','1988-12-31',3,1), ('1972-01-01','1988-12-31',4,1),
|
||||
('1972-01-01','1988-12-31',1,2), ('1972-01-01','1988-12-31',2,3);
|
||||
create table t4 ( id int, a varchar(50) );
|
||||
insert into t4 values
|
||||
(1,'songwriter'),(2,'song character');
|
||||
create function f1(who int, dt date) returns int
|
||||
deterministic
|
||||
begin
|
||||
declare result int;
|
||||
select t2_id into result from t3 where dt>=d1 and dt<=d2 and t1_id=who;
|
||||
return result;
|
||||
end$$
|
||||
create function f2(who int, dt date) returns int
|
||||
begin
|
||||
declare result int;
|
||||
select t2_id into result from t3 where dt>=d1 and dt<=d2 and t1_id=who;
|
||||
return result;
|
||||
end$$
|
||||
# Deterministic function in left part of IN subquery: semi-join is OK
|
||||
select * from t1
|
||||
left join t4 on t1.b = t4.id
|
||||
where f1(t1.id, '1980-01-01') in (select id from t2 where x=1);
|
||||
id a b id a
|
||||
3 paul 1 1 songwriter
|
||||
4 art 1 1 songwriter
|
||||
1 mrs 2 2 song character
|
||||
explain extended select * from t1
|
||||
left join t4 on t1.b = t4.id
|
||||
where f1(t1.id, '1980-01-01') in (select id from t2 where x=1);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 4 100.00
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 Using where
|
||||
1 PRIMARY t4 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t4`.`id` AS `id`,`test`.`t4`.`a` AS `a` from `test`.`t1` semi join (`test`.`t2`) left join `test`.`t4` on(`test`.`t4`.`id` = `test`.`t1`.`b`) where `test`.`t2`.`x` = 1 and `f1`(`test`.`t1`.`id`,'1980-01-01') = `test`.`t2`.`id`
|
||||
# Non-deterministic function in left part of IN subq: semi-join is OK
|
||||
select * from t1
|
||||
left join t4 on t1.b = t4.id
|
||||
where f2(t1.id, '1980-01-01') in (select id from t2 where x=1);
|
||||
id a b id a
|
||||
3 paul 1 1 songwriter
|
||||
4 art 1 1 songwriter
|
||||
1 mrs 2 2 song character
|
||||
explain extended select * from t1
|
||||
left join t4 on t1.b = t4.id
|
||||
where f2(t1.id, '1980-01-01') in (select id from t2 where x=1);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 4 100.00
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 Using where
|
||||
1 PRIMARY t4 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t4`.`id` AS `id`,`test`.`t4`.`a` AS `a` from `test`.`t1` semi join (`test`.`t2`) left join `test`.`t4` on(`test`.`t4`.`id` = `test`.`t1`.`b`) where `test`.`t2`.`x` = 1 and `f2`(`test`.`t1`.`id`,'1980-01-01') = `test`.`t2`.`id`
|
||||
select t1.*, t4.*,
|
||||
(select max(t4.id) from t4 where t4.id=t1.b and sleep(0) = 0) as s
|
||||
from t1 left join t4 on t1.b = t4.id
|
||||
where f2(t1.id, '1980-01-01') in (select id from t2 where x=1);
|
||||
id a b id a s
|
||||
3 paul 1 1 songwriter 1
|
||||
4 art 1 1 songwriter 1
|
||||
1 mrs 2 2 song character 2
|
||||
explain extended select t1.*, t4.*,
|
||||
(select max(t4.id) from t4 where t4.id=t1.b and sleep(0) = 0) as s
|
||||
from t1 left join t4 on t1.b = t4.id
|
||||
where f2(t1.id, '1980-01-01') in (select id from t2 where x=1);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 4 100.00
|
||||
1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1 100.00 Using where
|
||||
1 PRIMARY t4 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
3 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1276 Field or reference 'test.t1.b' of SELECT #2 was resolved in SELECT #1
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`id` AS `id`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t4`.`id` AS `id`,`test`.`t4`.`a` AS `a`,(/* select#2 */ select max(`test`.`t4`.`id`) from `test`.`t4` where `test`.`t4`.`id` = `test`.`t1`.`b` and sleep(0) = 0) AS `s` from `test`.`t1` semi join (`test`.`t2`) left join `test`.`t4` on(`test`.`t4`.`id` = `test`.`t1`.`b`) where `test`.`t2`.`x` = 1 and `f2`(`test`.`t1`.`id`,'1980-01-01') = `test`.`t2`.`id`
|
||||
drop function f1;
|
||||
drop function f2;
|
||||
drop table t1,t2,t3,t4;
|
||||
# End of 5.5 tests
|
||||
#
|
||||
# MDEV-7220: Materialization strategy is not used for REPLACE ... SELECT
|
||||
|
@ -6988,7 +6988,7 @@ WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 );
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||
1 PRIMARY t2 ALL b NULL NULL NULL 2 Using where
|
||||
1 PRIMARY t3 ref d d 5 test.t2.b 2 Using where; Using index
|
||||
1 PRIMARY t3 ref d d 5 test.t2.b 2 Using index
|
||||
3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
set @tmp_mdev410=@@global.userstat;
|
||||
set global userstat=on;
|
||||
|
@ -6982,7 +6982,7 @@ WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 );
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||
1 PRIMARY t2 ALL b NULL NULL NULL 2 Using where
|
||||
1 PRIMARY t3 ref d d 5 test.t2.b 2 Using where; Using index
|
||||
1 PRIMARY t3 ref d d 5 test.t2.b 2 Using index
|
||||
3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
set @tmp_mdev410=@@global.userstat;
|
||||
set global userstat=on;
|
||||
|
@ -6979,7 +6979,7 @@ WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 );
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||
1 PRIMARY t2 ALL b NULL NULL NULL 2 Using where
|
||||
1 PRIMARY t3 ref d d 5 test.t2.b 2 Using where; Using index
|
||||
1 PRIMARY t3 ref d d 5 test.t2.b 2 Using index
|
||||
3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
set @tmp_mdev410=@@global.userstat;
|
||||
set global userstat=on;
|
||||
|
@ -6994,7 +6994,7 @@ WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 );
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||
1 PRIMARY t2 ALL b NULL NULL NULL 2 Using where
|
||||
1 PRIMARY t3 ref d d 5 test.t2.b 2 Using where; Using index
|
||||
1 PRIMARY t3 ref d d 5 test.t2.b 2 Using index
|
||||
3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
set @tmp_mdev410=@@global.userstat;
|
||||
set global userstat=on;
|
||||
|
@ -6979,7 +6979,7 @@ WHERE SLEEP(0.1) OR c < 'p' OR b = ( SELECT MIN(b) FROM t2 );
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||
1 PRIMARY t2 ALL b NULL NULL NULL 2 Using where
|
||||
1 PRIMARY t3 ref d d 5 test.t2.b 2 Using where; Using index
|
||||
1 PRIMARY t3 ref d d 5 test.t2.b 2 Using index
|
||||
3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
set @tmp_mdev410=@@global.userstat;
|
||||
set global userstat=on;
|
||||
|
@ -2553,6 +2553,95 @@ SELECT 1 FROM t1 where t1.id IN (SELECT v1.i1 from v1);
|
||||
1
|
||||
drop table t1,t2;
|
||||
drop view v1;
|
||||
#
|
||||
# MDEV-19580: function invocation in the left part of IN subquery
|
||||
#
|
||||
create table t1 (id int, a varchar(50), b int);
|
||||
insert into t1 values
|
||||
(1,'mrs',2), (2,'joe',2), (3,'paul',1), (4,'art',1);
|
||||
create table t2 (id int, a varchar(50), x int);
|
||||
insert into t2 values
|
||||
(1,'grand',1),(2,'average',1),(3,'serf',0);
|
||||
create table t3 (d1 date, d2 date, t1_id int, t2_id int );
|
||||
insert into t3 values
|
||||
('1972-01-01','1988-12-31',3,1), ('1972-01-01','1988-12-31',4,1),
|
||||
('1972-01-01','1988-12-31',1,2), ('1972-01-01','1988-12-31',2,3);
|
||||
create table t4 ( id int, a varchar(50) );
|
||||
insert into t4 values
|
||||
(1,'songwriter'),(2,'song character');
|
||||
create function f1(who int, dt date) returns int
|
||||
deterministic
|
||||
begin
|
||||
declare result int;
|
||||
select t2_id into result from t3 where dt>=d1 and dt<=d2 and t1_id=who;
|
||||
return result;
|
||||
end$$
|
||||
create function f2(who int, dt date) returns int
|
||||
begin
|
||||
declare result int;
|
||||
select t2_id into result from t3 where dt>=d1 and dt<=d2 and t1_id=who;
|
||||
return result;
|
||||
end$$
|
||||
# Deterministic function in left part of IN subquery: semi-join is OK
|
||||
select * from t1
|
||||
left join t4 on t1.b = t4.id
|
||||
where f1(t1.id, '1980-01-01') in (select id from t2 where x=1);
|
||||
id a b id a
|
||||
3 paul 1 1 songwriter
|
||||
4 art 1 1 songwriter
|
||||
1 mrs 2 2 song character
|
||||
explain extended select * from t1
|
||||
left join t4 on t1.b = t4.id
|
||||
where f1(t1.id, '1980-01-01') in (select id from t2 where x=1);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 4 100.00
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 Using where
|
||||
1 PRIMARY t4 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t4`.`id` AS `id`,`test`.`t4`.`a` AS `a` from `test`.`t1` semi join (`test`.`t2`) left join `test`.`t4` on(`test`.`t4`.`id` = `test`.`t1`.`b`) where `test`.`t2`.`x` = 1 and `f1`(`test`.`t1`.`id`,'1980-01-01') = `test`.`t2`.`id`
|
||||
# Non-deterministic function in left part of IN subq: semi-join is OK
|
||||
select * from t1
|
||||
left join t4 on t1.b = t4.id
|
||||
where f2(t1.id, '1980-01-01') in (select id from t2 where x=1);
|
||||
id a b id a
|
||||
3 paul 1 1 songwriter
|
||||
4 art 1 1 songwriter
|
||||
1 mrs 2 2 song character
|
||||
explain extended select * from t1
|
||||
left join t4 on t1.b = t4.id
|
||||
where f2(t1.id, '1980-01-01') in (select id from t2 where x=1);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 4 100.00
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00 Using where
|
||||
1 PRIMARY t4 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t4`.`id` AS `id`,`test`.`t4`.`a` AS `a` from `test`.`t1` semi join (`test`.`t2`) left join `test`.`t4` on(`test`.`t4`.`id` = `test`.`t1`.`b`) where `test`.`t2`.`x` = 1 and `f2`(`test`.`t1`.`id`,'1980-01-01') = `test`.`t2`.`id`
|
||||
select t1.*, t4.*,
|
||||
(select max(t4.id) from t4 where t4.id=t1.b and sleep(0) = 0) as s
|
||||
from t1 left join t4 on t1.b = t4.id
|
||||
where f2(t1.id, '1980-01-01') in (select id from t2 where x=1);
|
||||
id a b id a s
|
||||
3 paul 1 1 songwriter 1
|
||||
4 art 1 1 songwriter 1
|
||||
1 mrs 2 2 song character 2
|
||||
explain extended select t1.*, t4.*,
|
||||
(select max(t4.id) from t4 where t4.id=t1.b and sleep(0) = 0) as s
|
||||
from t1 left join t4 on t1.b = t4.id
|
||||
where f2(t1.id, '1980-01-01') in (select id from t2 where x=1);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 4 100.00
|
||||
1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1 100.00 Using where
|
||||
1 PRIMARY t4 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
3 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1276 Field or reference 'test.t1.b' of SELECT #2 was resolved in SELECT #1
|
||||
Note 1003 /* select#1 */ select `test`.`t1`.`id` AS `id`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t4`.`id` AS `id`,`test`.`t4`.`a` AS `a`,(/* select#2 */ select max(`test`.`t4`.`id`) from `test`.`t4` where `test`.`t4`.`id` = `test`.`t1`.`b` and sleep(0) = 0) AS `s` from `test`.`t1` semi join (`test`.`t2`) left join `test`.`t4` on(`test`.`t4`.`id` = `test`.`t1`.`b`) where `test`.`t2`.`x` = 1 and `f2`(`test`.`t1`.`id`,'1980-01-01') = `test`.`t2`.`id`
|
||||
drop function f1;
|
||||
drop function f2;
|
||||
drop table t1,t2,t3,t4;
|
||||
# End of 5.5 tests
|
||||
#
|
||||
# MDEV-7220: Materialization strategy is not used for REPLACE ... SELECT
|
||||
|
@ -2248,6 +2248,81 @@ explain SELECT 1 FROM t1 where t1.id IN (SELECT v1.i1 from v1);
|
||||
SELECT 1 FROM t1 where t1.id IN (SELECT v1.i1 from v1);
|
||||
drop table t1,t2;
|
||||
drop view v1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-19580: function invocation in the left part of IN subquery
|
||||
--echo #
|
||||
|
||||
create table t1 (id int, a varchar(50), b int);
|
||||
insert into t1 values
|
||||
(1,'mrs',2), (2,'joe',2), (3,'paul',1), (4,'art',1);
|
||||
|
||||
create table t2 (id int, a varchar(50), x int);
|
||||
insert into t2 values
|
||||
(1,'grand',1),(2,'average',1),(3,'serf',0);
|
||||
|
||||
create table t3 (d1 date, d2 date, t1_id int, t2_id int );
|
||||
insert into t3 values
|
||||
('1972-01-01','1988-12-31',3,1), ('1972-01-01','1988-12-31',4,1),
|
||||
('1972-01-01','1988-12-31',1,2), ('1972-01-01','1988-12-31',2,3);
|
||||
|
||||
create table t4 ( id int, a varchar(50) );
|
||||
insert into t4 values
|
||||
(1,'songwriter'),(2,'song character');
|
||||
|
||||
delimiter $$;
|
||||
|
||||
create function f1(who int, dt date) returns int
|
||||
deterministic
|
||||
begin
|
||||
declare result int;
|
||||
select t2_id into result from t3 where dt>=d1 and dt<=d2 and t1_id=who;
|
||||
return result;
|
||||
end$$
|
||||
|
||||
create function f2(who int, dt date) returns int
|
||||
begin
|
||||
declare result int;
|
||||
select t2_id into result from t3 where dt>=d1 and dt<=d2 and t1_id=who;
|
||||
return result;
|
||||
end$$
|
||||
|
||||
delimiter ;$$
|
||||
|
||||
--echo # Deterministic function in left part of IN subquery: semi-join is OK
|
||||
|
||||
let $q1=
|
||||
select * from t1
|
||||
left join t4 on t1.b = t4.id
|
||||
where f1(t1.id, '1980-01-01') in (select id from t2 where x=1);
|
||||
|
||||
eval $q1;
|
||||
eval explain extended $q1;
|
||||
|
||||
--echo # Non-deterministic function in left part of IN subq: semi-join is OK
|
||||
|
||||
let $q2=
|
||||
select * from t1
|
||||
left join t4 on t1.b = t4.id
|
||||
where f2(t1.id, '1980-01-01') in (select id from t2 where x=1);
|
||||
|
||||
eval $q2;
|
||||
eval explain extended $q2;
|
||||
|
||||
let $q3=
|
||||
select t1.*, t4.*,
|
||||
(select max(t4.id) from t4 where t4.id=t1.b and sleep(0) = 0) as s
|
||||
from t1 left join t4 on t1.b = t4.id
|
||||
where f2(t1.id, '1980-01-01') in (select id from t2 where x=1);
|
||||
|
||||
eval $q3;
|
||||
eval explain extended $q3;
|
||||
|
||||
drop function f1;
|
||||
drop function f2;
|
||||
drop table t1,t2,t3,t4;
|
||||
|
||||
--echo # End of 5.5 tests
|
||||
--echo #
|
||||
--echo # MDEV-7220: Materialization strategy is not used for REPLACE ... SELECT
|
||||
|
1
mysql-test/main/tls_version.opt
Normal file
1
mysql-test/main/tls_version.opt
Normal file
@ -0,0 +1 @@
|
||||
--tls_version=TLSv1.1,TLSv1.2
|
14
mysql-test/main/tls_version.result
Normal file
14
mysql-test/main/tls_version.result
Normal file
@ -0,0 +1,14 @@
|
||||
Variable_name Value
|
||||
Ssl_version TLSv1.2
|
||||
Variable_name Value
|
||||
Ssl_version TLSv1.2
|
||||
Variable_name Value
|
||||
Ssl_version TLSv1.1
|
||||
Variable_name Value
|
||||
Ssl_version TLSv1.1
|
||||
Variable_name Value
|
||||
Ssl_version TLSv1.2
|
||||
Variable_name Value
|
||||
Ssl_version TLSv1.2
|
||||
@@tls_version
|
||||
TLSv1.1,TLSv1.2
|
24
mysql-test/main/tls_version.test
Normal file
24
mysql-test/main/tls_version.test
Normal file
@ -0,0 +1,24 @@
|
||||
# Tests for SSL connections, only run if mysqld is compiled
|
||||
# with support for SSL.
|
||||
|
||||
-- source include/have_ssl_communication.inc
|
||||
#default is highest available version: TLSv1.2
|
||||
--exec $MYSQL --host=localhost --ssl -e "show status like 'ssl_version';"
|
||||
# TLSv1.2
|
||||
--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.2 -e "show status like 'ssl_version';"
|
||||
# TLSv1.1
|
||||
--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.1 -e "show status like 'ssl_version';"
|
||||
# if a gap is between TLS versions, lowest version number should be used (TLS1.1)
|
||||
--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.1,TLSv1.3 -e "show status like 'ssl_version';"
|
||||
# TLSv1.3 is not enabled, so TLSv1.2 should be used
|
||||
--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.2,TLSv1.3 -e "show status like 'ssl_version';"
|
||||
# Highest TLS version number should be used (TLSv1.2)
|
||||
--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.1,TLSv1.2 -e "show status like 'ssl_version';"
|
||||
# Errors:
|
||||
# TLS v1.0 is disabled on server, so we should get an error
|
||||
--replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
|
||||
--error 1
|
||||
--exec $MYSQL --host=localhost --ssl --tls_version=TLSv1.0 -e "show status like 'ssl_version';"
|
||||
# finally list available protocols
|
||||
--exec $MYSQL --host=localhost --ssl -e "select @@tls_version;"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +0,0 @@
|
||||
--innodb-tablespaces-encryption
|
||||
--innodb-encrypt-tables=off
|
||||
--innodb-encryption-threads=0
|
@ -1,207 +0,0 @@
|
||||
-- source include/have_innodb.inc
|
||||
-- source include/have_example_key_management_plugin.inc
|
||||
-- source include/big_test.inc
|
||||
|
||||
# embedded does not support restart
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
--disable_query_log
|
||||
let $innodb_encryption_threads_orig = `SELECT @@global.innodb_encryption_threads`;
|
||||
--enable_query_log
|
||||
|
||||
# empty the change buffer and the undo logs to avoid extra reads
|
||||
SET GLOBAL innodb_fast_shutdown=0;
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
SHOW VARIABLES LIKE 'innodb_encrypt%';
|
||||
|
||||
#
|
||||
# This will create 100 tables where that could be
|
||||
# encrypted an unencrypt
|
||||
#
|
||||
create database innodb_encrypted_1;
|
||||
use innodb_encrypted_1;
|
||||
set autocommit=0;
|
||||
let $tables = 100;
|
||||
|
||||
--disable_query_log
|
||||
while ($tables)
|
||||
{
|
||||
eval create table t_$tables (a int not null primary key, b varchar(200)) engine=innodb
|
||||
stats_persistent=0;
|
||||
commit;
|
||||
let $rows = 100;
|
||||
while($rows)
|
||||
{
|
||||
eval insert into t_$tables values ($rows, substring(MD5(RAND()), -64));
|
||||
dec $rows;
|
||||
}
|
||||
commit;
|
||||
dec $tables;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
set autocommit=1;
|
||||
commit work;
|
||||
#
|
||||
# Verify
|
||||
#
|
||||
--echo # should be empty
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE NAME LIKE 'innodb_encrypted%';
|
||||
|
||||
#
|
||||
# This will create 100 tables that are encrypted always
|
||||
#
|
||||
create database innodb_encrypted_2;
|
||||
use innodb_encrypted_2;
|
||||
set autocommit=0;
|
||||
|
||||
--disable_query_log
|
||||
let $tables = 100;
|
||||
while ($tables)
|
||||
{
|
||||
eval create table t_$tables (a int not null primary key, b varchar(200)) engine=innodb
|
||||
stats_persistent=0 encrypted=yes;
|
||||
commit;
|
||||
let $rows = 100;
|
||||
while($rows)
|
||||
{
|
||||
eval insert into t_$tables values ($rows, substring(MD5(RAND()), -64));
|
||||
dec $rows;
|
||||
}
|
||||
commit;
|
||||
dec $tables;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
commit work;
|
||||
set autocommit=1;
|
||||
#
|
||||
# Verify
|
||||
#
|
||||
--echo # should contain 100 tables
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||
--echo # should contain 0 tables
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||
|
||||
#
|
||||
# This will create 100 tables that are not encrypted
|
||||
#
|
||||
create database innodb_encrypted_3;
|
||||
use innodb_encrypted_3;
|
||||
set autocommit=0;
|
||||
|
||||
--disable_query_log
|
||||
let $tables = 100;
|
||||
while ($tables)
|
||||
{
|
||||
eval create table t_$tables (a int not null primary key, b varchar(200)) engine=innodb
|
||||
stats_persistent=0 encrypted=no;
|
||||
commit;
|
||||
let $rows = 100;
|
||||
while($rows)
|
||||
{
|
||||
eval insert into t_$tables values ($rows, substring(MD5(RAND()), -64));
|
||||
dec $rows;
|
||||
}
|
||||
commit;
|
||||
dec $tables;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
commit work;
|
||||
set autocommit=1;
|
||||
#
|
||||
# Verify
|
||||
#
|
||||
--echo # should contain 100 tables
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||
--echo # should contain 100 tables
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||
|
||||
use test;
|
||||
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||
|
||||
SET GLOBAL innodb_encrypt_tables = on;
|
||||
SET GLOBAL innodb_encryption_threads=4;
|
||||
|
||||
--let $wait_timeout= 600
|
||||
--let $wait_condition=SELECT COUNT(*) = 100 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||
|
||||
--echo # Success!
|
||||
--echo # Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0
|
||||
-- let $restart_parameters=--innodb_encrypt_tables=0 --innodb_encryption_threads=0
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
--echo # Restart Success!
|
||||
|
||||
use innodb_encrypted_1;
|
||||
|
||||
--disable_result_log
|
||||
--disable_query_log
|
||||
let $tables = 100;
|
||||
while ($tables)
|
||||
{
|
||||
eval select * from t_$tables;
|
||||
dec $tables;
|
||||
}
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
|
||||
use innodb_encrypted_2;
|
||||
|
||||
--disable_result_log
|
||||
--disable_query_log
|
||||
let $tables = 100;
|
||||
while ($tables)
|
||||
{
|
||||
eval select * from t_$tables;
|
||||
dec $tables;
|
||||
}
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
|
||||
use innodb_encrypted_3;
|
||||
|
||||
--disable_result_log
|
||||
--disable_query_log
|
||||
let $tables = 100;
|
||||
while ($tables)
|
||||
{
|
||||
eval select * from t_$tables;
|
||||
dec $tables;
|
||||
}
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||
|
||||
SET GLOBAL innodb_encrypt_tables = off;
|
||||
SET GLOBAL innodb_encryption_threads=4;
|
||||
|
||||
--let $wait_timeout= 600
|
||||
--let $wait_condition=SELECT COUNT(*) = 100 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||
--source include/wait_condition.inc
|
||||
|
||||
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
use test;
|
||||
drop database innodb_encrypted_1;
|
||||
drop database innodb_encrypted_2;
|
||||
drop database innodb_encrypted_3;
|
||||
|
||||
--disable_query_log
|
||||
EVAL SET GLOBAL innodb_encryption_threads = $innodb_encryption_threads_orig;
|
||||
--enable_query_log
|
@ -18,6 +18,7 @@ MW-328C : MDEV-17847 Galera test failure on MW-328[A|B|C]
|
||||
MW-329 : wsrep_local_replays not stable
|
||||
MW-336 : MDEV-13549 incorrect wait_condition for wsrep_slave_threads changes
|
||||
MW-360 : needs rewrite to be MariaDB gtid compatible
|
||||
MW-336 : MDEV-19746 Galera test failures because of wsrep_slave_threads identification
|
||||
MW-416 : MDEV-13549 Galera test failures
|
||||
MW-44 : MDEV-15809 Test failure on galera.MW-44
|
||||
galera_account_management : MariaDB 10.0 does not support ALTER USER
|
||||
@ -49,6 +50,7 @@ galera_var_node_address : MDEV-17151 Galera test failure
|
||||
galera_var_notify_cmd : MDEV-13549 Galera test failures
|
||||
galera_var_reject_queries : assertion in inline_mysql_socket_send
|
||||
galera_var_retry_autocommit: MDEV-18181 Galera test failure on galera.galera_var_retry_autocommit
|
||||
galera_var_slave_threads : MDEV-19746 Galera test failures because of wsrep_slave_threads identification
|
||||
galera_wan : MDEV-17259: Test failure on galera.galera_wan
|
||||
mysql-wsrep#198 : MDEV-18935 Galera test mysql-wsrep#198 sporaric assertion transaction.cpp:362: int wsrep::transaction::before_commit(): Assertion `state() == s_executing || state() == s_committing || state() == s_must_abort || state() == s_replaying' failed.
|
||||
partition : MDEV-13549 regularly showing auto_increment mismatch
|
||||
|
@ -563,32 +563,32 @@ t1 CREATE TABLE `t1` (
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
270
|
||||
267
|
||||
insert into t1 values(concat('a',char(1)),concat('a',char(1)),concat('a',char(1)));
|
||||
select count(*) from t1 where v='a';
|
||||
count(*)
|
||||
10
|
||||
7
|
||||
select count(*) from t1 where c='a';
|
||||
count(*)
|
||||
10
|
||||
7
|
||||
select count(*) from t1 where t='a';
|
||||
count(*)
|
||||
10
|
||||
7
|
||||
select count(*) from t1 where v='a ';
|
||||
count(*)
|
||||
10
|
||||
7
|
||||
select count(*) from t1 where c='a ';
|
||||
count(*)
|
||||
10
|
||||
7
|
||||
select count(*) from t1 where t='a ';
|
||||
count(*)
|
||||
10
|
||||
7
|
||||
select count(*) from t1 where v between 'a' and 'a ';
|
||||
count(*)
|
||||
10
|
||||
7
|
||||
select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b\n';
|
||||
count(*)
|
||||
10
|
||||
7
|
||||
explain select count(*) from t1 where v='a ';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref v v 13 const # Using where
|
||||
@ -618,9 +618,6 @@ qq
|
||||
*a *a*a *
|
||||
*a *a*a *
|
||||
*a *a*a *
|
||||
*a *a*a *
|
||||
*a *a*a *
|
||||
*a *a*a *
|
||||
explain select * from t1 where v='a';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref v v 13 const # Using where
|
||||
|
@ -337,6 +337,7 @@ while ($1)
|
||||
}
|
||||
dec $1;
|
||||
}
|
||||
delete from t1 where v like 'a%' and length(v) > 7;
|
||||
commit;
|
||||
--enable_query_log
|
||||
select count(*) from t1;
|
||||
|
@ -271,320 +271,14 @@ vb=@c,wb=@c,xb=@c,yb=@c,zb=@c,
|
||||
ac=@c,bc=@c,cc=@c,dc=@c,ec=@c,fc=@c,gc=@c,hc=@c,ic=@c,jc=@c,
|
||||
kc=@c,lc=@c,mc=@c,nc=@c,oc=@c,pc=@c,qc=@c,rc=@c,sc=@c,tc=@c,uc=@c,
|
||||
vc=@c,wc=@c,xc=@c,yc=@c,zc=@c;
|
||||
connect con1,localhost,root,,;
|
||||
SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
||||
DELETE FROM t2 LIMIT 1;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
# restart
|
||||
UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e,f=@e,g=@e,h=@e,i=@e,j=@e,
|
||||
k=@e,l=@e,m=@e,n=@e,o=@e,p=@e,q=@e,r=@e,s=@e,t=@e,u=@e,
|
||||
v=@e,w=@e,x=@e,y=@e,z=@e,
|
||||
aa=@e,ba=@e,ca=@e,da=@e,ea=@e,fa=@e,ga=@e,ha=@e,ia=@e,ja=@e,
|
||||
ka=@e,la=@e,ma=@e,na=@e,oa=@e,pa=@e,qa=@e,ra=@e,sa=@e,ta=@e,ua=@e,
|
||||
va=@e,wa=@e,xa=@e,ya=@e,za=@e,
|
||||
ab=@e,bb=@e,cb=@e,db=@e,eb=@e,fb=@e,gb=@e,hb=@e,ib=@e,jb=@e,
|
||||
kb=@e,lb=@e,mb=@e,nb=@e,ob=@e,pb=@e,qb=@e,rb=@e,sb=@e,tb=@e,ub=@e,
|
||||
vb=@e,wb=@e,xb=@e,yb=@e,zb=@e,
|
||||
ac=@e,bc=@e,cc=@e,dc=@e,ec=@e,fc=@e,gc=@e,hc=@e,ic=@e,jc=@e,
|
||||
kc=@e,lc=@e,mc=@e,nc=@e,oc=@e,pc=@e,qc=@e,rc=@e,sc=@e,tc=@e,uc=@e,
|
||||
vc=@e,wc=@e,xc=@e,yc=@e,zc=@e;
|
||||
UPDATE t2 SET a=@l,b=@l,c=@l,d=@l,e=@l,f=@l,g=@l,h=@l,i=@l,j=@l,
|
||||
k=@l,l=@l,m=@l,n=@l,o=@l,p=@l,q=@l,r=@l,s=@l,t=@l,u=@l,
|
||||
v=@l,w=@l,x=@l,y=@l,z=@l,
|
||||
aa=@l,ba=@l,ca=@l,da=@l,ea=@l,fa=@l,ga=@l,ha=@l,ia=@l,ja=@l,
|
||||
ka=@l,la=@l,ma=@l,na=@l,oa=@l,pa=@l,qa=@l,ra=@l,sa=@l,ta=@l,ua=@l,
|
||||
va=@l,wa=@l,xa=@l,ya=@l,za=@l,
|
||||
ab=@l,bb=@l,cb=@l,db=@l,eb=@l,fb=@l,gb=@l,hb=@l,ib=@l,jb=@l,
|
||||
kb=@l,lb=@l,mb=@l,nb=@l,ob=@l,pb=@l,qb=@l,rb=@l,sb=@l,tb=@l,ub=@l,
|
||||
vb=@l,wb=@l,xb=@l,yb=@l,zb=@l,
|
||||
ac=@l,bc=@l,cc=@l,dc=@l,ec=@l,fc=@l,gc=@l,hc=@l,ic=@l,jc=@l,
|
||||
kc=@l,lc=@l,mc=@l,nc=@l,oc=@l,pc=@l,qc=@l,rc=@l,sc=@l,tc=@l,uc=@l,
|
||||
vc=@l,wc=@l,xc=@l,yc=@l,zc=@l;
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
UPDATE t1 SET a=@f,b=@f,c=@f,d=@f,e=@f;
|
||||
UPDATE t1 SET f=@f,g=@f,h=@f,i=@f,j=@f;
|
||||
UPDATE t1 SET k=@f,l=@f,m=@f,n=@f,o=@f;
|
||||
UPDATE t1 SET p=@f,q=@f,r=@f,s=@f,t=@f,u=@f;
|
||||
UPDATE t1 SET v=@f,w=@f,x=@f,y=@f,z=@f;
|
||||
UPDATE t1 SET aa=@f,ba=@f,ca=@f,da=@f;
|
||||
UPDATE t1 SET ea=@f,fa=@f,ga=@f,ha=@f,ia=@f,ja=@f;
|
||||
UPDATE t1 SET ka=@f,la=@f,ma=@f,na=@f,oa=@f,pa=@f;
|
||||
UPDATE t1 SET qa=@f,ra=@f,sa=@f,ta=@f,ua=@f;
|
||||
UPDATE t1 SET va=@f,wa=@f,xa=@f,ya=@f,za=@f;
|
||||
UPDATE t1 SET ab=@f,bb=@f,cb=@f,db=@f;
|
||||
UPDATE t1 SET eb=@f,fb=@f,gb=@f,hb=@f,ib=@f,ja=@f;
|
||||
UPDATE t1 SET kb=@f,lb=@f,mb=@f,nb=@f,ob=@f,pa=@f;
|
||||
UPDATE t1 SET qb=@f,rb=@f,sb=@f,tb=@f,ub=@f;
|
||||
UPDATE t1 SET vb=@f,wb=@f,xb=@f,yb=@f,zb=@f;
|
||||
UPDATE t1 SET ac=@f,bc=@f,cc=@f,dc=@f;
|
||||
UPDATE t1 SET ec=@f,fc=@f,gc=@f,hc=@f,ic=@f,jc=@f;
|
||||
UPDATE t1 SET kc=@f,lc=@f,mc=@f,nc=@f,oc=@f,pc=@f;
|
||||
UPDATE t1 SET qc=@f,rc=@f,sc=@f,tc=@f,uc=@f;
|
||||
UPDATE t1 SET vc=@f,wc=@f,xc=@f,yc=@f,zc=@f;
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
UPDATE t2 SET a=@f,b=@f,c=@f,d=@f,e=@f;
|
||||
UPDATE t2 SET f=@f,g=@f,h=@f,i=@f,j=@f;
|
||||
UPDATE t2 SET k=@f,l=@f,m=@f,n=@f,o=@f;
|
||||
UPDATE t2 SET p=@f,q=@f,r=@f,s=@f,t=@f,u=@f;
|
||||
UPDATE t2 SET v=@f,w=@f,x=@f,y=@f,z=@f;
|
||||
UPDATE t2 SET aa=@f,ba=@f,ca=@f,da=@f;
|
||||
UPDATE t2 SET ea=@f,fa=@f,ga=@f,ha=@f,ia=@f,ja=@f;
|
||||
UPDATE t2 SET ka=@f,la=@f,ma=@f,na=@f,oa=@f,pa=@f;
|
||||
UPDATE t2 SET qa=@f,ra=@f,sa=@f,ta=@f,ua=@f;
|
||||
UPDATE t2 SET va=@f,wa=@f,xa=@f,ya=@f,za=@f;
|
||||
UPDATE t2 SET ab=@f,bb=@f,cb=@f,db=@f;
|
||||
UPDATE t2 SET eb=@f,fb=@f,gb=@f,hb=@f,ib=@f,ja=@f;
|
||||
UPDATE t2 SET kb=@f,lb=@f,mb=@f,nb=@f,ob=@f,pa=@f;
|
||||
UPDATE t2 SET qb=@f,rb=@f,sb=@f,tb=@f,ub=@f;
|
||||
UPDATE t2 SET vb=@f,wb=@f,xb=@f,yb=@f,zb=@f;
|
||||
UPDATE t2 SET ac=@f,bc=@f,cc=@f,dc=@f;
|
||||
UPDATE t2 SET ec=@f,fc=@f,gc=@f,hc=@f,ic=@f,jc=@f;
|
||||
UPDATE t2 SET kc=@f,lc=@f,mc=@f,nc=@f,oc=@f,pc=@f;
|
||||
UPDATE t2 SET qc=@f,rc=@f,sc=@f,tc=@f,uc=@f;
|
||||
UPDATE t2 SET vc=@f,wc=@f,xc=@f,yc=@f,zc=@f;
|
||||
COMMIT;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` blob DEFAULT NULL,
|
||||
`b` blob DEFAULT NULL,
|
||||
`c` blob DEFAULT NULL,
|
||||
`d` blob DEFAULT NULL,
|
||||
`e` blob DEFAULT NULL,
|
||||
`f` blob DEFAULT NULL,
|
||||
`g` blob DEFAULT NULL,
|
||||
`h` blob DEFAULT NULL,
|
||||
`i` blob DEFAULT NULL,
|
||||
`j` blob DEFAULT NULL,
|
||||
`k` blob DEFAULT NULL,
|
||||
`l` blob DEFAULT NULL,
|
||||
`m` blob DEFAULT NULL,
|
||||
`n` blob DEFAULT NULL,
|
||||
`o` blob DEFAULT NULL,
|
||||
`p` blob DEFAULT NULL,
|
||||
`q` blob DEFAULT NULL,
|
||||
`r` blob DEFAULT NULL,
|
||||
`s` blob DEFAULT NULL,
|
||||
`t` blob DEFAULT NULL,
|
||||
`u` blob DEFAULT NULL,
|
||||
`v` blob DEFAULT NULL,
|
||||
`w` blob DEFAULT NULL,
|
||||
`x` blob DEFAULT NULL,
|
||||
`y` blob DEFAULT NULL,
|
||||
`z` blob DEFAULT NULL,
|
||||
`aa` blob DEFAULT NULL,
|
||||
`ba` blob DEFAULT NULL,
|
||||
`ca` blob DEFAULT NULL,
|
||||
`da` blob DEFAULT NULL,
|
||||
`ea` blob DEFAULT NULL,
|
||||
`fa` blob DEFAULT NULL,
|
||||
`ga` blob DEFAULT NULL,
|
||||
`ha` blob DEFAULT NULL,
|
||||
`ia` blob DEFAULT NULL,
|
||||
`ja` blob DEFAULT NULL,
|
||||
`ka` blob DEFAULT NULL,
|
||||
`la` blob DEFAULT NULL,
|
||||
`ma` blob DEFAULT NULL,
|
||||
`na` blob DEFAULT NULL,
|
||||
`oa` blob DEFAULT NULL,
|
||||
`pa` blob DEFAULT NULL,
|
||||
`qa` blob DEFAULT NULL,
|
||||
`ra` blob DEFAULT NULL,
|
||||
`sa` blob DEFAULT NULL,
|
||||
`ta` blob DEFAULT NULL,
|
||||
`ua` blob DEFAULT NULL,
|
||||
`va` blob DEFAULT NULL,
|
||||
`wa` blob DEFAULT NULL,
|
||||
`xa` blob DEFAULT NULL,
|
||||
`ya` blob DEFAULT NULL,
|
||||
`za` blob DEFAULT NULL,
|
||||
`ab` blob DEFAULT NULL,
|
||||
`bb` blob DEFAULT NULL,
|
||||
`cb` blob DEFAULT NULL,
|
||||
`db` blob DEFAULT NULL,
|
||||
`eb` blob DEFAULT NULL,
|
||||
`fb` blob DEFAULT NULL,
|
||||
`gb` blob DEFAULT NULL,
|
||||
`hb` blob DEFAULT NULL,
|
||||
`ib` blob DEFAULT NULL,
|
||||
`jb` blob DEFAULT NULL,
|
||||
`kb` blob DEFAULT NULL,
|
||||
`lb` blob DEFAULT NULL,
|
||||
`mb` blob DEFAULT NULL,
|
||||
`nb` blob DEFAULT NULL,
|
||||
`ob` blob DEFAULT NULL,
|
||||
`pb` blob DEFAULT NULL,
|
||||
`qb` blob DEFAULT NULL,
|
||||
`rb` blob DEFAULT NULL,
|
||||
`sb` blob DEFAULT NULL,
|
||||
`tb` blob DEFAULT NULL,
|
||||
`ub` blob DEFAULT NULL,
|
||||
`vb` blob DEFAULT NULL,
|
||||
`wb` blob DEFAULT NULL,
|
||||
`xb` blob DEFAULT NULL,
|
||||
`yb` blob DEFAULT NULL,
|
||||
`zb` blob DEFAULT NULL,
|
||||
`ac` blob DEFAULT NULL,
|
||||
`bc` blob DEFAULT NULL,
|
||||
`cc` blob DEFAULT NULL,
|
||||
`dc` blob DEFAULT NULL,
|
||||
`ec` blob DEFAULT NULL,
|
||||
`fc` blob DEFAULT NULL,
|
||||
`gc` blob DEFAULT NULL,
|
||||
`hc` blob DEFAULT NULL,
|
||||
`ic` blob DEFAULT NULL,
|
||||
`jc` blob DEFAULT NULL,
|
||||
`kc` blob DEFAULT NULL,
|
||||
`lc` blob DEFAULT NULL,
|
||||
`mc` blob DEFAULT NULL,
|
||||
`nc` blob DEFAULT NULL,
|
||||
`oc` blob DEFAULT NULL,
|
||||
`pc` blob DEFAULT NULL,
|
||||
`qc` blob DEFAULT NULL,
|
||||
`rc` blob DEFAULT NULL,
|
||||
`sc` blob DEFAULT NULL,
|
||||
`tc` blob DEFAULT NULL,
|
||||
`uc` blob DEFAULT NULL,
|
||||
`vc` blob DEFAULT NULL,
|
||||
`wc` blob DEFAULT NULL,
|
||||
`xc` blob DEFAULT NULL,
|
||||
`yc` blob DEFAULT NULL,
|
||||
`zc` blob DEFAULT NULL,
|
||||
KEY `t1a` (`a`(767),`b`(767)),
|
||||
KEY `t1c` (`c`(767),`d`(767)),
|
||||
KEY `t1e` (`e`(767),`f`(767)),
|
||||
KEY `t1f2` (`g`(767),`h`(767)),
|
||||
KEY `t1f4` (`i`(767),`j`(767)),
|
||||
KEY `t1k` (`k`(767),`m`(767)),
|
||||
KEY `t1f8` (`n`(767),`o`(767)),
|
||||
KEY `t1f11` (`p`(767),`q`(767)),
|
||||
KEY `t1f13` (`r`(767),`s`(767)),
|
||||
KEY `t1f15` (`t`(767),`u`(767)),
|
||||
KEY `t1f18` (`w`(767),`x`(767)),
|
||||
KEY `t1f20` (`y`(767),`z`(767)),
|
||||
KEY `ta1a6` (`aa`(767),`ba`(767)),
|
||||
KEY `tc1c6` (`ca`(767),`da`(767)),
|
||||
KEY `te1e6` (`ea`(767),`fa`(767))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` blob DEFAULT NULL,
|
||||
`b` blob DEFAULT NULL,
|
||||
`c` blob DEFAULT NULL,
|
||||
`d` blob DEFAULT NULL,
|
||||
`e` blob DEFAULT NULL,
|
||||
`f` blob DEFAULT NULL,
|
||||
`g` blob DEFAULT NULL,
|
||||
`h` blob DEFAULT NULL,
|
||||
`i` blob DEFAULT NULL,
|
||||
`j` blob DEFAULT NULL,
|
||||
`k` blob DEFAULT NULL,
|
||||
`l` blob DEFAULT NULL,
|
||||
`m` blob DEFAULT NULL,
|
||||
`n` blob DEFAULT NULL,
|
||||
`o` blob DEFAULT NULL,
|
||||
`p` blob DEFAULT NULL,
|
||||
`q` blob DEFAULT NULL,
|
||||
`r` blob DEFAULT NULL,
|
||||
`s` blob DEFAULT NULL,
|
||||
`t` blob DEFAULT NULL,
|
||||
`u` blob DEFAULT NULL,
|
||||
`v` blob DEFAULT NULL,
|
||||
`w` blob DEFAULT NULL,
|
||||
`x` blob DEFAULT NULL,
|
||||
`y` blob DEFAULT NULL,
|
||||
`z` blob DEFAULT NULL,
|
||||
`aa` blob DEFAULT NULL,
|
||||
`ba` blob DEFAULT NULL,
|
||||
`ca` blob DEFAULT NULL,
|
||||
`da` blob DEFAULT NULL,
|
||||
`ea` blob DEFAULT NULL,
|
||||
`fa` blob DEFAULT NULL,
|
||||
`ga` blob DEFAULT NULL,
|
||||
`ha` blob DEFAULT NULL,
|
||||
`ia` blob DEFAULT NULL,
|
||||
`ja` blob DEFAULT NULL,
|
||||
`ka` blob DEFAULT NULL,
|
||||
`la` blob DEFAULT NULL,
|
||||
`ma` blob DEFAULT NULL,
|
||||
`na` blob DEFAULT NULL,
|
||||
`oa` blob DEFAULT NULL,
|
||||
`pa` blob DEFAULT NULL,
|
||||
`qa` blob DEFAULT NULL,
|
||||
`ra` blob DEFAULT NULL,
|
||||
`sa` blob DEFAULT NULL,
|
||||
`ta` blob DEFAULT NULL,
|
||||
`ua` blob DEFAULT NULL,
|
||||
`va` blob DEFAULT NULL,
|
||||
`wa` blob DEFAULT NULL,
|
||||
`xa` blob DEFAULT NULL,
|
||||
`ya` blob DEFAULT NULL,
|
||||
`za` blob DEFAULT NULL,
|
||||
`ab` blob DEFAULT NULL,
|
||||
`bb` blob DEFAULT NULL,
|
||||
`cb` blob DEFAULT NULL,
|
||||
`db` blob DEFAULT NULL,
|
||||
`eb` blob DEFAULT NULL,
|
||||
`fb` blob DEFAULT NULL,
|
||||
`gb` blob DEFAULT NULL,
|
||||
`hb` blob DEFAULT NULL,
|
||||
`ib` blob DEFAULT NULL,
|
||||
`jb` blob DEFAULT NULL,
|
||||
`kb` blob DEFAULT NULL,
|
||||
`lb` blob DEFAULT NULL,
|
||||
`mb` blob DEFAULT NULL,
|
||||
`nb` blob DEFAULT NULL,
|
||||
`ob` blob DEFAULT NULL,
|
||||
`pb` blob DEFAULT NULL,
|
||||
`qb` blob DEFAULT NULL,
|
||||
`rb` blob DEFAULT NULL,
|
||||
`sb` blob DEFAULT NULL,
|
||||
`tb` blob DEFAULT NULL,
|
||||
`ub` blob DEFAULT NULL,
|
||||
`vb` blob DEFAULT NULL,
|
||||
`wb` blob DEFAULT NULL,
|
||||
`xb` blob DEFAULT NULL,
|
||||
`yb` blob DEFAULT NULL,
|
||||
`zb` blob DEFAULT NULL,
|
||||
`ac` blob DEFAULT NULL,
|
||||
`bc` blob DEFAULT NULL,
|
||||
`cc` blob DEFAULT NULL,
|
||||
`dc` blob DEFAULT NULL,
|
||||
`ec` blob DEFAULT NULL,
|
||||
`fc` blob DEFAULT NULL,
|
||||
`gc` blob DEFAULT NULL,
|
||||
`hc` blob DEFAULT NULL,
|
||||
`ic` blob DEFAULT NULL,
|
||||
`jc` blob DEFAULT NULL,
|
||||
`kc` blob DEFAULT NULL,
|
||||
`lc` blob DEFAULT NULL,
|
||||
`mc` blob DEFAULT NULL,
|
||||
`nc` blob DEFAULT NULL,
|
||||
`oc` blob DEFAULT NULL,
|
||||
`pc` blob DEFAULT NULL,
|
||||
`qc` blob DEFAULT NULL,
|
||||
`rc` blob DEFAULT NULL,
|
||||
`sc` blob DEFAULT NULL,
|
||||
`tc` blob DEFAULT NULL,
|
||||
`uc` blob DEFAULT NULL,
|
||||
`vc` blob DEFAULT NULL,
|
||||
`wc` blob DEFAULT NULL,
|
||||
`xc` blob DEFAULT NULL,
|
||||
`yc` blob DEFAULT NULL,
|
||||
`zc` blob DEFAULT NULL,
|
||||
KEY `t2a` (`a`(767),`b`(767)),
|
||||
KEY `t2c` (`c`(767),`d`(767)),
|
||||
KEY `t2e` (`e`(767),`f`(767)),
|
||||
KEY `t2f2` (`g`(767),`h`(767)),
|
||||
KEY `t2f4` (`i`(767),`j`(767)),
|
||||
KEY `t2k` (`k`(767),`m`(767)),
|
||||
KEY `t2f8` (`n`(767),`o`(767)),
|
||||
KEY `t2f11` (`p`(767),`q`(767)),
|
||||
KEY `t2f13` (`r`(767),`s`(767)),
|
||||
KEY `t2f15` (`t`(767),`u`(767)),
|
||||
KEY `t2f18` (`w`(767),`x`(767)),
|
||||
KEY `t2f20` (`y`(767),`z`(767)),
|
||||
KEY `ta2a6` (`aa`(767),`ba`(767)),
|
||||
KEY `tc2c6` (`ca`(767),`da`(767)),
|
||||
KEY `te2e6` (`ea`(767),`fa`(767))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
|
||||
check table t1,t2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
test.t2 check status OK
|
||||
drop table t1,t2;
|
||||
|
@ -300,84 +300,15 @@ UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
|
||||
kc=@c,lc=@c,mc=@c,nc=@c,oc=@c,pc=@c,qc=@c,rc=@c,sc=@c,tc=@c,uc=@c,
|
||||
vc=@c,wc=@c,xc=@c,yc=@c,zc=@c;
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
||||
DELETE FROM t2 LIMIT 1;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
|
||||
--let $shutdown_timeout=0
|
||||
--source include/restart_mysqld.inc
|
||||
--let $shutdown_timeout=
|
||||
|
||||
UPDATE t1 SET a=@e,b=@e,c=@e,d=@e,e=@e,f=@e,g=@e,h=@e,i=@e,j=@e,
|
||||
k=@e,l=@e,m=@e,n=@e,o=@e,p=@e,q=@e,r=@e,s=@e,t=@e,u=@e,
|
||||
v=@e,w=@e,x=@e,y=@e,z=@e,
|
||||
aa=@e,ba=@e,ca=@e,da=@e,ea=@e,fa=@e,ga=@e,ha=@e,ia=@e,ja=@e,
|
||||
ka=@e,la=@e,ma=@e,na=@e,oa=@e,pa=@e,qa=@e,ra=@e,sa=@e,ta=@e,ua=@e,
|
||||
va=@e,wa=@e,xa=@e,ya=@e,za=@e,
|
||||
ab=@e,bb=@e,cb=@e,db=@e,eb=@e,fb=@e,gb=@e,hb=@e,ib=@e,jb=@e,
|
||||
kb=@e,lb=@e,mb=@e,nb=@e,ob=@e,pb=@e,qb=@e,rb=@e,sb=@e,tb=@e,ub=@e,
|
||||
vb=@e,wb=@e,xb=@e,yb=@e,zb=@e,
|
||||
ac=@e,bc=@e,cc=@e,dc=@e,ec=@e,fc=@e,gc=@e,hc=@e,ic=@e,jc=@e,
|
||||
kc=@e,lc=@e,mc=@e,nc=@e,oc=@e,pc=@e,qc=@e,rc=@e,sc=@e,tc=@e,uc=@e,
|
||||
vc=@e,wc=@e,xc=@e,yc=@e,zc=@e;
|
||||
|
||||
UPDATE t2 SET a=@l,b=@l,c=@l,d=@l,e=@l,f=@l,g=@l,h=@l,i=@l,j=@l,
|
||||
k=@l,l=@l,m=@l,n=@l,o=@l,p=@l,q=@l,r=@l,s=@l,t=@l,u=@l,
|
||||
v=@l,w=@l,x=@l,y=@l,z=@l,
|
||||
aa=@l,ba=@l,ca=@l,da=@l,ea=@l,fa=@l,ga=@l,ha=@l,ia=@l,ja=@l,
|
||||
ka=@l,la=@l,ma=@l,na=@l,oa=@l,pa=@l,qa=@l,ra=@l,sa=@l,ta=@l,ua=@l,
|
||||
va=@l,wa=@l,xa=@l,ya=@l,za=@l,
|
||||
ab=@l,bb=@l,cb=@l,db=@l,eb=@l,fb=@l,gb=@l,hb=@l,ib=@l,jb=@l,
|
||||
kb=@l,lb=@l,mb=@l,nb=@l,ob=@l,pb=@l,qb=@l,rb=@l,sb=@l,tb=@l,ub=@l,
|
||||
vb=@l,wb=@l,xb=@l,yb=@l,zb=@l,
|
||||
ac=@l,bc=@l,cc=@l,dc=@l,ec=@l,fc=@l,gc=@l,hc=@l,ic=@l,jc=@l,
|
||||
kc=@l,lc=@l,mc=@l,nc=@l,oc=@l,pc=@l,qc=@l,rc=@l,sc=@l,tc=@l,uc=@l,
|
||||
vc=@l,wc=@l,xc=@l,yc=@l,zc=@l;
|
||||
|
||||
COMMIT;
|
||||
|
||||
BEGIN;
|
||||
UPDATE t1 SET a=@f,b=@f,c=@f,d=@f,e=@f;
|
||||
UPDATE t1 SET f=@f,g=@f,h=@f,i=@f,j=@f;
|
||||
UPDATE t1 SET k=@f,l=@f,m=@f,n=@f,o=@f;
|
||||
UPDATE t1 SET p=@f,q=@f,r=@f,s=@f,t=@f,u=@f;
|
||||
UPDATE t1 SET v=@f,w=@f,x=@f,y=@f,z=@f;
|
||||
UPDATE t1 SET aa=@f,ba=@f,ca=@f,da=@f;
|
||||
UPDATE t1 SET ea=@f,fa=@f,ga=@f,ha=@f,ia=@f,ja=@f;
|
||||
UPDATE t1 SET ka=@f,la=@f,ma=@f,na=@f,oa=@f,pa=@f;
|
||||
UPDATE t1 SET qa=@f,ra=@f,sa=@f,ta=@f,ua=@f;
|
||||
UPDATE t1 SET va=@f,wa=@f,xa=@f,ya=@f,za=@f;
|
||||
UPDATE t1 SET ab=@f,bb=@f,cb=@f,db=@f;
|
||||
UPDATE t1 SET eb=@f,fb=@f,gb=@f,hb=@f,ib=@f,ja=@f;
|
||||
UPDATE t1 SET kb=@f,lb=@f,mb=@f,nb=@f,ob=@f,pa=@f;
|
||||
UPDATE t1 SET qb=@f,rb=@f,sb=@f,tb=@f,ub=@f;
|
||||
UPDATE t1 SET vb=@f,wb=@f,xb=@f,yb=@f,zb=@f;
|
||||
UPDATE t1 SET ac=@f,bc=@f,cc=@f,dc=@f;
|
||||
UPDATE t1 SET ec=@f,fc=@f,gc=@f,hc=@f,ic=@f,jc=@f;
|
||||
UPDATE t1 SET kc=@f,lc=@f,mc=@f,nc=@f,oc=@f,pc=@f;
|
||||
UPDATE t1 SET qc=@f,rc=@f,sc=@f,tc=@f,uc=@f;
|
||||
UPDATE t1 SET vc=@f,wc=@f,xc=@f,yc=@f,zc=@f;
|
||||
COMMIT;
|
||||
|
||||
BEGIN;
|
||||
UPDATE t2 SET a=@f,b=@f,c=@f,d=@f,e=@f;
|
||||
UPDATE t2 SET f=@f,g=@f,h=@f,i=@f,j=@f;
|
||||
UPDATE t2 SET k=@f,l=@f,m=@f,n=@f,o=@f;
|
||||
UPDATE t2 SET p=@f,q=@f,r=@f,s=@f,t=@f,u=@f;
|
||||
UPDATE t2 SET v=@f,w=@f,x=@f,y=@f,z=@f;
|
||||
UPDATE t2 SET aa=@f,ba=@f,ca=@f,da=@f;
|
||||
UPDATE t2 SET ea=@f,fa=@f,ga=@f,ha=@f,ia=@f,ja=@f;
|
||||
UPDATE t2 SET ka=@f,la=@f,ma=@f,na=@f,oa=@f,pa=@f;
|
||||
UPDATE t2 SET qa=@f,ra=@f,sa=@f,ta=@f,ua=@f;
|
||||
UPDATE t2 SET va=@f,wa=@f,xa=@f,ya=@f,za=@f;
|
||||
UPDATE t2 SET ab=@f,bb=@f,cb=@f,db=@f;
|
||||
UPDATE t2 SET eb=@f,fb=@f,gb=@f,hb=@f,ib=@f,ja=@f;
|
||||
UPDATE t2 SET kb=@f,lb=@f,mb=@f,nb=@f,ob=@f,pa=@f;
|
||||
UPDATE t2 SET qb=@f,rb=@f,sb=@f,tb=@f,ub=@f;
|
||||
UPDATE t2 SET vb=@f,wb=@f,xb=@f,yb=@f,zb=@f;
|
||||
UPDATE t2 SET ac=@f,bc=@f,cc=@f,dc=@f;
|
||||
UPDATE t2 SET ec=@f,fc=@f,gc=@f,hc=@f,ic=@f,jc=@f;
|
||||
UPDATE t2 SET kc=@f,lc=@f,mc=@f,nc=@f,oc=@f,pc=@f;
|
||||
UPDATE t2 SET qc=@f,rc=@f,sc=@f,tc=@f,uc=@f;
|
||||
UPDATE t2 SET vc=@f,wc=@f,xc=@f,yc=@f,zc=@f;
|
||||
COMMIT;
|
||||
|
||||
show create table t1;
|
||||
show create table t2;
|
||||
check table t1,t2;
|
||||
drop table t1,t2;
|
||||
|
@ -9,6 +9,7 @@ call mtr.add_suppression("\\[ERROR\\] InnoDB: Plugin initialization aborted at s
|
||||
call mtr.add_suppression("\\[ERROR\\] Plugin 'InnoDB' (init function|registration)");
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption");
|
||||
call mtr.add_suppression("\\[ERROR\\] mysqld.*: Index for table 't1' is corrupt; try to repair it");
|
||||
call mtr.add_suppression("InnoDB: Error code: [0-9][0-9][0-9]* btr_pcur_open_low level: 0 called from file: ");
|
||||
--enable_query_log
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, c CHAR(255))ENGINE=InnoDB STATS_PERSISTENT=0;
|
||||
|
||||
@ -47,8 +48,6 @@ EOF
|
||||
SELECT * FROM t1 WHERE PK = 1;
|
||||
|
||||
let $restart_parameters=--innodb-force-recovery=1;
|
||||
# Work around MDEV-19435 to avoid crash in row_purge_reset_trx_id()
|
||||
let $restart_parameters=--innodb-force-recovery=2;
|
||||
--source include/restart_mysqld.inc
|
||||
SELECT * FROM t1 WHERE PK = 1;
|
||||
--error ER_NOT_KEYFILE
|
||||
|
@ -293,10 +293,10 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t2 values (1), (2)',0
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t2,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t2',0
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,ALTER,test,t1,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,RENAME,test,t1|test.renamed_t1,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,table_stats,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,column_stats,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,index_stats,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,RENAME,test,t1|test.renamed_t1,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'alter table t1 rename renamed_t1',0
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_events=\'connect,query\'',0
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select 1,\n2,\n# comment\n3',0
|
||||
|
@ -266,10 +266,10 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t2 values (1), (2)',0
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t2,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t2',0
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,ALTER,test,t1,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,RENAME,test,t1|test.renamed_t1,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,table_stats,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,column_stats,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,index_stats,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,RENAME,test,t1|test.renamed_t1,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'alter table t1 rename renamed_t1',0
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_events=\'connect,query\'',0
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select 1,\n2,\n# comment\n3',0
|
||||
|
@ -14,7 +14,6 @@ rpl_spec_variables : BUG#11755836 2009-10-27 jasonh rpl_spec_variables fa
|
||||
rpl_get_master_version_and_clock : Bug#11766137 Jan 05 2011 joro Valgrind warnings rpl_get_master_version_and_clock
|
||||
rpl_partition_archive : MDEV-5077 2013-09-27 svoj Cannot exchange partition with archive table
|
||||
rpl_row_binlog_max_cache_size : MDEV-11092
|
||||
rpl_blackhole : MDEV-11094
|
||||
rpl_row_index_choice : MDEV-11666
|
||||
rpl_parallel2 : fails after MDEV-16172
|
||||
rpl_semi_sync_after_sync : fails after MDEV-16172
|
||||
|
@ -11,7 +11,7 @@
|
||||
# executing statement. If difference is >0, then something was
|
||||
# written to the binary log on the slave.
|
||||
|
||||
connection slave;
|
||||
# On Connection Slave
|
||||
let $before = query_get_value("SHOW MASTER STATUS", Position, 1);
|
||||
|
||||
connection master;
|
||||
|
97
mysql-test/suite/rpl/include/rpl_blackhole_basic.test
Normal file
97
mysql-test/suite/rpl/include/rpl_blackhole_basic.test
Normal file
@ -0,0 +1,97 @@
|
||||
# PURPOSE. Test that blackhole works with replication in all three
|
||||
# modes: STATEMENT, MIXED, and ROW.
|
||||
#
|
||||
# METHOD. We start by creating a table on the master and then change
|
||||
# the engine to use blackhole on the slave.
|
||||
#
|
||||
# After insert/update/delete of one or more rows, the test the
|
||||
# proceeds to check that replication is running after replicating an
|
||||
# change, that the blackhole engine does not contain anything (which
|
||||
# is just a check that the correct engine is used), and that something
|
||||
# is written to the binary log.
|
||||
#
|
||||
# Whe check INSERT, UPDATE, and DELETE statement for tables with no
|
||||
# key (forcing a range search on the slave), primary keys (using a
|
||||
# primary key lookup), and index/key with multiple matches (forcing an
|
||||
# index search).
|
||||
|
||||
# We start with no primary key
|
||||
CREATE TABLE t1 (a INT, b INT, c INT);
|
||||
CREATE TABLE t2 (a INT, b INT, c INT);
|
||||
|
||||
sync_slave_with_master;
|
||||
ALTER TABLE t1 ENGINE=BLACKHOLE;
|
||||
|
||||
connection master;
|
||||
INSERT INTO t2 VALUES (1,9,1), (2,9,2), (3,9,3), (4,9,4);
|
||||
sync_slave_with_master;
|
||||
|
||||
# Test insert, no primary key
|
||||
let $statement = INSERT INTO t1 VALUES (1,1,1),(2,1,2),(3,1,3),(4,1,4);
|
||||
source include/rpl_blackhole.test;
|
||||
|
||||
# Test update, no primary key
|
||||
let $statement = UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 1;
|
||||
source include/rpl_blackhole.test;
|
||||
|
||||
# Test delete, no primary key
|
||||
let $statement = DELETE FROM t1 WHERE a % 2 = 0 AND b = 1;
|
||||
source include/rpl_blackhole.test;
|
||||
|
||||
# Test INSERT-SELECT into Blackhole, no primary key
|
||||
let $statement = INSERT INTO t1 SELECT * FROM t2;
|
||||
source include/rpl_blackhole.test;
|
||||
|
||||
#
|
||||
# The MASTER has MyISAM as the engine for both tables. The SLAVE has Blackhole
|
||||
# on t1 (transactional engine) and MyISAM on t2 (non-transactional engine).
|
||||
#
|
||||
# In MIXED mode, the command "INSERT INTO t2 SELECT * FROM t1" is logged as
|
||||
# statement on the master. On the slave, it is tagged as unsafe because the
|
||||
# statement mixes both transactional and non-transactional engines and as such
|
||||
# its changes are logged as rows. However, due to the nature of the blackhole
|
||||
# engine, no rows are returned and thus any chain replication would make the
|
||||
# next master on the chain diverge.
|
||||
#
|
||||
# Fo this reason, we have disabled the statement.
|
||||
#
|
||||
# Test INSERT-SELECT from Blackhole, no primary key
|
||||
# let $statement = INSERT INTO t2 SELECT * FROM t1;
|
||||
# source include/rpl_blackhole.test;
|
||||
#
|
||||
|
||||
connection master;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY pk_t1 (a,b);
|
||||
sync_slave_with_master;
|
||||
|
||||
# Test insert, primary key
|
||||
let $statement = INSERT INTO t1 VALUES (1,2,1),(2,2,2),(3,2,3),(4,2,4);
|
||||
source include/rpl_blackhole.test;
|
||||
|
||||
# Test update, primary key
|
||||
let $statement = UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 2;
|
||||
source include/rpl_blackhole.test;
|
||||
|
||||
# Test delete, primary key
|
||||
let $statement = DELETE FROM t1 WHERE a % 2 = 0 AND b = 2;
|
||||
source include/rpl_blackhole.test;
|
||||
|
||||
connection master;
|
||||
ALTER TABLE t1 DROP PRIMARY KEY, ADD KEY key_t1 (a);
|
||||
sync_slave_with_master;
|
||||
|
||||
# Test insert, key
|
||||
let $statement = INSERT INTO t1 VALUES (1,3,1),(2,3,2),(3,3,3),(4,3,4);
|
||||
source include/rpl_blackhole.test;
|
||||
|
||||
# Test update, key
|
||||
let $statement = UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 3;
|
||||
source include/rpl_blackhole.test;
|
||||
|
||||
# Test delete, key
|
||||
let $statement = DELETE FROM t1 WHERE a % 2 = 0 AND b = 3;
|
||||
source include/rpl_blackhole.test;
|
||||
|
||||
connection master;
|
||||
DROP TABLE t1,t2;
|
||||
sync_slave_with_master;
|
@ -8,7 +8,6 @@ ALTER TABLE t1 ENGINE=BLACKHOLE;
|
||||
connection master;
|
||||
INSERT INTO t2 VALUES (1,9,1), (2,9,2), (3,9,3), (4,9,4);
|
||||
connection slave;
|
||||
connection slave;
|
||||
connection master;
|
||||
INSERT INTO t1 VALUES (1,1,1),(2,1,2),(3,1,3),(4,1,4);
|
||||
connection slave;
|
||||
@ -17,7 +16,6 @@ SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
connection slave;
|
||||
connection master;
|
||||
UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 1;
|
||||
connection slave;
|
||||
@ -26,7 +24,6 @@ SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
connection slave;
|
||||
connection master;
|
||||
DELETE FROM t1 WHERE a % 2 = 0 AND b = 1;
|
||||
connection slave;
|
||||
@ -35,7 +32,6 @@ SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
connection slave;
|
||||
connection master;
|
||||
INSERT INTO t1 SELECT * FROM t2;
|
||||
connection slave;
|
||||
@ -55,7 +51,6 @@ SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
connection slave;
|
||||
connection master;
|
||||
UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 2;
|
||||
connection slave;
|
||||
@ -64,7 +59,6 @@ SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
connection slave;
|
||||
connection master;
|
||||
DELETE FROM t1 WHERE a % 2 = 0 AND b = 2;
|
||||
connection slave;
|
||||
@ -84,7 +78,6 @@ SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
connection slave;
|
||||
connection master;
|
||||
UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 3;
|
||||
connection slave;
|
||||
@ -93,7 +86,6 @@ SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
connection slave;
|
||||
connection master;
|
||||
DELETE FROM t1 WHERE a % 2 = 0 AND b = 3;
|
||||
connection slave;
|
||||
@ -104,4 +96,5 @@ COUNT(*)
|
||||
>>> Something was written to binary log <<<
|
||||
connection master;
|
||||
DROP TABLE t1,t2;
|
||||
connection slave;
|
||||
include/rpl_end.inc
|
||||
|
457
mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result
Normal file
457
mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result
Normal file
@ -0,0 +1,457 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
SET timestamp=1000000000;
|
||||
RESET MASTER;
|
||||
connection slave;
|
||||
SET timestamp=1000000000;
|
||||
RESET MASTER;
|
||||
connection master;
|
||||
CREATE TABLE t1 (a INT, b INT, c INT);
|
||||
CREATE TABLE t2 (a INT, b INT, c INT);
|
||||
connection slave;
|
||||
ALTER TABLE t1 ENGINE=BLACKHOLE;
|
||||
connection master;
|
||||
INSERT INTO t2 VALUES (1,9,1), (2,9,2), (3,9,3), (4,9,4);
|
||||
connection slave;
|
||||
connection master;
|
||||
INSERT INTO t1 VALUES (1,1,1),(2,1,2),(3,1,3),(4,1,4);
|
||||
connection slave;
|
||||
# Expect 0
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
connection master;
|
||||
UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 1;
|
||||
connection slave;
|
||||
# Expect 0
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
connection master;
|
||||
DELETE FROM t1 WHERE a % 2 = 0 AND b = 1;
|
||||
connection slave;
|
||||
# Expect 0
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
connection master;
|
||||
INSERT INTO t1 SELECT * FROM t2;
|
||||
connection slave;
|
||||
# Expect 0
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
connection master;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY pk_t1 (a,b);
|
||||
connection slave;
|
||||
connection master;
|
||||
INSERT INTO t1 VALUES (1,2,1),(2,2,2),(3,2,3),(4,2,4);
|
||||
connection slave;
|
||||
# Expect 0
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
connection master;
|
||||
UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 2;
|
||||
connection slave;
|
||||
# Expect 0
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
connection master;
|
||||
DELETE FROM t1 WHERE a % 2 = 0 AND b = 2;
|
||||
connection slave;
|
||||
# Expect 0
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
connection master;
|
||||
ALTER TABLE t1 DROP PRIMARY KEY, ADD KEY key_t1 (a);
|
||||
connection slave;
|
||||
connection master;
|
||||
INSERT INTO t1 VALUES (1,3,1),(2,3,2),(3,3,3),(4,3,4);
|
||||
connection slave;
|
||||
# Expect 0
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
connection master;
|
||||
UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 3;
|
||||
connection slave;
|
||||
# Expect 0
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
connection master;
|
||||
DELETE FROM t1 WHERE a % 2 = 0 AND b = 3;
|
||||
connection slave;
|
||||
# Expect 0
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
>>> Something was written to binary log <<<
|
||||
connection master;
|
||||
DROP TABLE t1,t2;
|
||||
connection slave;
|
||||
connection slave;
|
||||
FLUSH LOGS;
|
||||
show binlog events in 'slave-bin.000001' from <start_pos>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
slave-bin.000001 # Gtid_list 2 # []
|
||||
slave-bin.000001 # Binlog_checkpoint 2 # slave-bin.000001
|
||||
slave-bin.000001 # Gtid 1 # GTID 0-1-1
|
||||
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT, b INT, c INT)
|
||||
slave-bin.000001 # Gtid 1 # GTID 0-1-2
|
||||
slave-bin.000001 # Query 1 # use `test`; CREATE TABLE t2 (a INT, b INT, c INT)
|
||||
slave-bin.000001 # Gtid 2 # GTID 0-2-3
|
||||
slave-bin.000001 # Query 2 # use `test`; ALTER TABLE t1 ENGINE=BLACKHOLE
|
||||
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-3
|
||||
slave-bin.000001 # Annotate_rows 1 # INSERT INTO t2 VALUES (1,9,1), (2,9,2), (3,9,3), (4,9,4)
|
||||
slave-bin.000001 # Table_map 1 # table_id: # (test.t2)
|
||||
slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Query 1 # COMMIT
|
||||
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-4
|
||||
slave-bin.000001 # Annotate_rows 1 # INSERT INTO t1 VALUES (1,1,1),(2,1,2),(3,1,3),(4,1,4)
|
||||
slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Query 1 # COMMIT
|
||||
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-5
|
||||
slave-bin.000001 # Annotate_rows 1 # UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 1
|
||||
slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
slave-bin.000001 # Update_rows_v1 1 # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Query 1 # COMMIT
|
||||
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-6
|
||||
slave-bin.000001 # Annotate_rows 1 # DELETE FROM t1 WHERE a % 2 = 0 AND b = 1
|
||||
slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
slave-bin.000001 # Delete_rows_v1 1 # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Query 1 # COMMIT
|
||||
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-7
|
||||
slave-bin.000001 # Annotate_rows 1 # INSERT INTO t1 SELECT * FROM t2
|
||||
slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Query 1 # COMMIT
|
||||
slave-bin.000001 # Gtid 1 # GTID 0-1-8
|
||||
slave-bin.000001 # Query 1 # use `test`; ALTER TABLE t1 ADD PRIMARY KEY pk_t1 (a,b)
|
||||
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-9
|
||||
slave-bin.000001 # Annotate_rows 1 # INSERT INTO t1 VALUES (1,2,1),(2,2,2),(3,2,3),(4,2,4)
|
||||
slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Query 1 # COMMIT
|
||||
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-10
|
||||
slave-bin.000001 # Annotate_rows 1 # UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 2
|
||||
slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
slave-bin.000001 # Update_rows_v1 1 # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Query 1 # COMMIT
|
||||
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-11
|
||||
slave-bin.000001 # Annotate_rows 1 # DELETE FROM t1 WHERE a % 2 = 0 AND b = 2
|
||||
slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
slave-bin.000001 # Delete_rows_v1 1 # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Query 1 # COMMIT
|
||||
slave-bin.000001 # Gtid 1 # GTID 0-1-12
|
||||
slave-bin.000001 # Query 1 # use `test`; ALTER TABLE t1 DROP PRIMARY KEY, ADD KEY key_t1 (a)
|
||||
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-13
|
||||
slave-bin.000001 # Annotate_rows 1 # INSERT INTO t1 VALUES (1,3,1),(2,3,2),(3,3,3),(4,3,4)
|
||||
slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
slave-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Query 1 # COMMIT
|
||||
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-14
|
||||
slave-bin.000001 # Annotate_rows 1 # UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 3
|
||||
slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
slave-bin.000001 # Update_rows_v1 1 # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Query 1 # COMMIT
|
||||
slave-bin.000001 # Gtid 1 # BEGIN GTID 0-1-15
|
||||
slave-bin.000001 # Annotate_rows 1 # DELETE FROM t1 WHERE a % 2 = 0 AND b = 3
|
||||
slave-bin.000001 # Table_map 1 # table_id: # (test.t1)
|
||||
slave-bin.000001 # Delete_rows_v1 1 # table_id: # flags: STMT_END_F
|
||||
slave-bin.000001 # Query 1 # COMMIT
|
||||
slave-bin.000001 # Gtid 1 # GTID 0-1-16
|
||||
slave-bin.000001 # Query 1 # use `test`; DROP TABLE IF EXISTS `t1`,`t2` /* generated by server */
|
||||
slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
|
||||
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
|
||||
DELIMITER /*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
|
||||
ROLLBACK/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Gtid list []
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Binlog checkpoint slave-bin.000001
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-1 ddl
|
||||
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
|
||||
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
|
||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
use `test`/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
SET @@session.pseudo_thread_id=#/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
|
||||
SET @@session.sql_mode=1411383296/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
|
||||
SET @@session.lc_time_names=0/*!*/;
|
||||
SET @@session.collation_database=DEFAULT/*!*/;
|
||||
CREATE TABLE t1 (a INT, b INT, c INT)
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-2 ddl
|
||||
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
CREATE TABLE t2 (a INT, b INT, c INT)
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-2-3 ddl
|
||||
/*!100001 SET @@session.server_id=2*//*!*/;
|
||||
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
ALTER TABLE t1 ENGINE=BLACKHOLE
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-3 trans
|
||||
/*!100001 SET @@session.server_id=1*//*!*/;
|
||||
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows:
|
||||
#Q> INSERT INTO t2 VALUES (1,9,1), (2,9,2), (3,9,3), (4,9,4)
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
|
||||
# Number of rows: 4
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-4 trans
|
||||
/*!100001 SET @@session.gtid_seq_no=4*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows:
|
||||
#Q> INSERT INTO t1 VALUES (1,1,1),(2,1,2),(3,1,3),(4,1,4)
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
|
||||
# Number of rows: 4
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-5 trans
|
||||
/*!100001 SET @@session.gtid_seq_no=5*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows:
|
||||
#Q> UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 1
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
|
||||
# Number of rows: 2
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-6 trans
|
||||
/*!100001 SET @@session.gtid_seq_no=6*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows:
|
||||
#Q> DELETE FROM t1 WHERE a % 2 = 0 AND b = 1
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
|
||||
# Number of rows: 2
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-7 trans
|
||||
/*!100001 SET @@session.gtid_seq_no=7*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows:
|
||||
#Q> INSERT INTO t1 SELECT * FROM t2
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
|
||||
# Number of rows: 4
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-8 ddl
|
||||
/*!100001 SET @@session.gtid_seq_no=8*//*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY pk_t1 (a,b)
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-9 trans
|
||||
/*!100001 SET @@session.gtid_seq_no=9*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows:
|
||||
#Q> INSERT INTO t1 VALUES (1,2,1),(2,2,2),(3,2,3),(4,2,4)
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
|
||||
# Number of rows: 4
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-10 trans
|
||||
/*!100001 SET @@session.gtid_seq_no=10*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows:
|
||||
#Q> UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 2
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
|
||||
# Number of rows: 2
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-11 trans
|
||||
/*!100001 SET @@session.gtid_seq_no=11*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows:
|
||||
#Q> DELETE FROM t1 WHERE a % 2 = 0 AND b = 2
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
|
||||
# Number of rows: 2
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-12 ddl
|
||||
/*!100001 SET @@session.gtid_seq_no=12*//*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
ALTER TABLE t1 DROP PRIMARY KEY, ADD KEY key_t1 (a)
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-13 trans
|
||||
/*!100001 SET @@session.gtid_seq_no=13*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows:
|
||||
#Q> INSERT INTO t1 VALUES (1,3,1),(2,3,2),(3,3,3),(4,3,4)
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
|
||||
# Number of rows: 4
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-14 trans
|
||||
/*!100001 SET @@session.gtid_seq_no=14*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows:
|
||||
#Q> UPDATE t1 SET c = 2*c WHERE a % 2 = 0 AND b = 3
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
|
||||
# Number of rows: 2
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-15 trans
|
||||
/*!100001 SET @@session.gtid_seq_no=15*//*!*/;
|
||||
BEGIN
|
||||
/*!*/;
|
||||
# at #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Annotate_rows:
|
||||
#Q> DELETE FROM t1 WHERE a % 2 = 0 AND b = 3
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
|
||||
# Number of rows: 2
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
COMMIT
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-16 ddl
|
||||
/*!100001 SET @@session.gtid_seq_no=16*//*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
DROP TABLE IF EXISTS `t1`,`t2` /* generated by server */
|
||||
/*!*/;
|
||||
# at #
|
||||
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Rotate to slave-bin.000002 pos: 4
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
|
||||
include/rpl_end.inc
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user