Galera4
This commit is contained in:
parent
382115b992
commit
36a2a185fe
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -4,3 +4,7 @@
|
||||
[submodule "storage/rocksdb/rocksdb"]
|
||||
path = storage/rocksdb/rocksdb
|
||||
url = https://github.com/facebook/rocksdb.git
|
||||
[submodule "wsrep-lib"]
|
||||
path = wsrep-lib
|
||||
url = https://github.com/codership/wsrep-lib.git
|
||||
branch = master
|
||||
|
@ -143,6 +143,7 @@ INCLUDE(misc)
|
||||
INCLUDE(mysql_version)
|
||||
INCLUDE(cpack_source_ignore_files)
|
||||
INCLUDE(install_layout)
|
||||
INCLUDE(submodules)
|
||||
INCLUDE(wsrep)
|
||||
INCLUDE(cpack_rpm)
|
||||
INCLUDE(cpack_deb)
|
||||
@ -377,7 +378,6 @@ ENDIF()
|
||||
|
||||
SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "")
|
||||
|
||||
INCLUDE(submodules)
|
||||
INCLUDE(mariadb_connector_c) # this does ADD_SUBDIRECTORY(libmariadb)
|
||||
|
||||
# Add storage engines and plugins.
|
||||
@ -405,7 +405,7 @@ IF(NOT WITHOUT_SERVER)
|
||||
ENDIF(WITH_EMBEDDED_SERVER)
|
||||
|
||||
IF(WITH_WSREP)
|
||||
ADD_SUBDIRECTORY(wsrep)
|
||||
ADD_SUBDIRECTORY(wsrep-lib)
|
||||
ENDIF()
|
||||
|
||||
ADD_SUBDIRECTORY(mysql-test)
|
||||
|
@ -171,7 +171,7 @@ SETA(CPACK_RPM_server_PACKAGE_REQUIRES
|
||||
|
||||
IF(WITH_WSREP)
|
||||
SETA(CPACK_RPM_server_PACKAGE_REQUIRES
|
||||
"galera" "rsync" "lsof" "grep" "gawk" "iproute"
|
||||
"galera-4" "rsync" "lsof" "grep" "gawk" "iproute"
|
||||
"coreutils" "findutils" "tar")
|
||||
ENDIF()
|
||||
|
||||
|
@ -50,6 +50,14 @@ IF(GIT_EXECUTABLE)
|
||||
IF(NOT RESULT EQUAL 0)
|
||||
SET(GIT_EXECUTABLE)
|
||||
ENDIF()
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND "${GIT_EXECUTABLE}" submodule foreach "${GIT_EXECUTABLE} checkout-index --all --prefix=${PACKAGE_DIR}/wsrep-lib/$path/"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/wsrep-lib
|
||||
RESULT_VARIABLE RESULT
|
||||
)
|
||||
IF(NOT RESULT EQUAL 0)
|
||||
SET(GIT_EXECUTABLE)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
CONFIGURE_FILE(${CMAKE_BINARY_DIR}/include/source_revision.h
|
||||
|
@ -14,16 +14,16 @@ IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||
SET(update_result 0)
|
||||
ELSEIF (cmake_update_submodules MATCHES force)
|
||||
MESSAGE(STATUS "Updating submodules (forced)")
|
||||
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init --force
|
||||
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init --force --recursive
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE update_result)
|
||||
ELSEIF (cmake_update_submodules MATCHES yes)
|
||||
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init
|
||||
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init --recursive
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE update_result)
|
||||
ELSE()
|
||||
MESSAGE(STATUS "Updating submodules")
|
||||
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init
|
||||
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" submodule update --init --recursive
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE update_result)
|
||||
ENDIF()
|
||||
|
@ -24,12 +24,15 @@ ELSE()
|
||||
ENDIF()
|
||||
|
||||
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default})
|
||||
OPTION(WITH_WSREP_ALL
|
||||
"Build all components of WSREP (unit tests, sample programs)"
|
||||
OFF)
|
||||
|
||||
# Set the patch version
|
||||
SET(WSREP_PATCH_VERSION "23")
|
||||
SET(WSREP_PATCH_VERSION "22")
|
||||
|
||||
# Obtain wsrep API version
|
||||
FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION
|
||||
FILE(STRINGS "${CMAKE_SOURCE_DIR}/wsrep-lib/wsrep-API/v26/wsrep_api.h" WSREP_API_VERSION
|
||||
LIMIT_COUNT 1 REGEX "WSREP_INTERFACE_VERSION")
|
||||
STRING(REGEX MATCH "([0-9]+)" WSREP_API_VERSION "${WSREP_API_VERSION}")
|
||||
|
||||
@ -40,4 +43,12 @@ SET(WSREP_PROC_INFO ${WITH_WSREP})
|
||||
|
||||
IF(WITH_WSREP)
|
||||
SET(WSREP_PATCH_VERSION "wsrep_${WSREP_VERSION}")
|
||||
if (NOT WITH_WSREP_ALL)
|
||||
SET(WSREP_LIB_WITH_UNIT_TESTS OFF CACHE BOOL
|
||||
"Disable unit tests for wsrep-lib")
|
||||
SET(WSREP_LIB_WITH_DBSIM OFF CACHE BOOL
|
||||
"Disable building dbsim for wsrep-lib")
|
||||
endif()
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/wsrep-lib/include)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/wsrep-lib/wsrep-API/v26)
|
||||
ENDIF()
|
||||
|
2
debian/control
vendored
2
debian/control
vendored
@ -430,7 +430,7 @@ Recommends: libhtml-template-perl
|
||||
Pre-Depends: adduser (>= 3.40),
|
||||
debconf,
|
||||
mariadb-common (>= ${source:Version})
|
||||
Depends: galera-3 (>=25.3),
|
||||
Depends: galera-4 (>=26.4),
|
||||
gawk,
|
||||
iproute | iproute2,
|
||||
libdbi-perl,
|
||||
|
@ -40,9 +40,6 @@ IF(NOT HAVE_SYSTEM_REGEX)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/pcre)
|
||||
ENDIF()
|
||||
|
||||
IF(WITH_WSREP)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/wsrep)
|
||||
ENDIF()
|
||||
|
||||
ADD_DEFINITIONS(-UMYSQL_SERVER)
|
||||
########################################################################
|
||||
|
@ -1,5 +1,20 @@
|
||||
#ifndef MYSQL_SERVICE_WSREP_INCLUDED
|
||||
#define MYSQL_SERVICE_WSREP_INCLUDED
|
||||
|
||||
enum Wsrep_service_key_type
|
||||
{
|
||||
WSREP_SERVICE_KEY_SHARED,
|
||||
WSREP_SERVICE_KEY_REFERENCE,
|
||||
WSREP_SERVICE_KEY_UPDATE,
|
||||
WSREP_SERVICE_KEY_EXCLUSIVE
|
||||
};
|
||||
|
||||
#if (defined (MYSQL_DYNAMIC_PLUGIN) && defined(MYSQL_SERVICE_WSREP_DYNAMIC_INCLUDED)) || (!defined(MYSQL_DYNAMIC_PLUGIN) && defined(MYSQL_SERVICE_WSREP_STATIC_INCLUDED))
|
||||
|
||||
#else
|
||||
|
||||
/* Copyright (c) 2015 MariaDB Corporation Ab
|
||||
2018 Codership Oy <info@codership.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -21,153 +36,92 @@
|
||||
Interface to WSREP functionality in the server.
|
||||
For engines that want to support galera.
|
||||
*/
|
||||
|
||||
#include <my_pthread.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum wsrep_conflict_state {
|
||||
NO_CONFLICT,
|
||||
MUST_ABORT,
|
||||
ABORTING,
|
||||
ABORTED,
|
||||
MUST_REPLAY,
|
||||
REPLAYING,
|
||||
RETRY_AUTOCOMMIT,
|
||||
CERT_FAILURE,
|
||||
};
|
||||
|
||||
enum wsrep_exec_mode {
|
||||
/* Transaction processing before replication. */
|
||||
LOCAL_STATE,
|
||||
/* Slave thread applying write sets from other nodes or replaying thread. */
|
||||
REPL_RECV,
|
||||
/* Total-order-isolation mode. */
|
||||
TOTAL_ORDER,
|
||||
/*
|
||||
Transaction procession after it has been replicated in prepare stage and
|
||||
has passed certification.
|
||||
*/
|
||||
LOCAL_COMMIT
|
||||
};
|
||||
|
||||
enum wsrep_query_state {
|
||||
QUERY_IDLE,
|
||||
QUERY_EXEC,
|
||||
QUERY_COMMITTING,
|
||||
QUERY_EXITING,
|
||||
QUERY_ROLLINGBACK,
|
||||
};
|
||||
|
||||
enum wsrep_trx_status {
|
||||
WSREP_TRX_OK,
|
||||
WSREP_TRX_CERT_FAIL, /* certification failure, must abort */
|
||||
WSREP_TRX_SIZE_EXCEEDED, /* trx size exceeded */
|
||||
WSREP_TRX_ERROR, /* native mysql error */
|
||||
};
|
||||
|
||||
struct xid_t;
|
||||
struct wsrep;
|
||||
struct wsrep_ws_handle;
|
||||
struct wsrep_buf;
|
||||
|
||||
/* Must match to definition in sql/mysqld.h */
|
||||
typedef int64 query_id_t;
|
||||
|
||||
|
||||
extern struct wsrep_service_st {
|
||||
struct wsrep * (*get_wsrep_func)();
|
||||
my_bool (*get_wsrep_certify_nonPK_func)();
|
||||
my_bool (*get_wsrep_debug_func)();
|
||||
my_bool (*get_wsrep_drupal_282555_workaround_func)();
|
||||
my_bool (*get_wsrep_recovery_func)();
|
||||
my_bool (*get_wsrep_load_data_splitting_func)();
|
||||
my_bool (*get_wsrep_log_conflicts_func)();
|
||||
long (*get_wsrep_protocol_version_func)();
|
||||
my_bool (*wsrep_aborting_thd_contains_func)(THD *thd);
|
||||
void (*wsrep_aborting_thd_enqueue_func)(THD *thd);
|
||||
bool (*wsrep_consistency_check_func)(THD *thd);
|
||||
int (*wsrep_is_wsrep_xid_func)(const struct xid_t *xid);
|
||||
bool (*wsrep_consistency_check_func)(MYSQL_THD thd);
|
||||
int (*wsrep_is_wsrep_xid_func)(const void *xid);
|
||||
long long (*wsrep_xid_seqno_func)(const struct xid_t *xid);
|
||||
const unsigned char* (*wsrep_xid_uuid_func)(const struct xid_t *xid);
|
||||
void (*wsrep_lock_rollback_func)();
|
||||
int (*wsrep_on_func)(MYSQL_THD);
|
||||
void (*wsrep_post_commit_func)(THD* thd, bool all);
|
||||
bool (*wsrep_prepare_key_func)(const unsigned char*, size_t, const unsigned char*, size_t, struct wsrep_buf*, size_t*);
|
||||
enum wsrep_trx_status (*wsrep_run_wsrep_commit_func)(THD *thd, bool all);
|
||||
void (*wsrep_thd_LOCK_func)(THD *thd);
|
||||
void (*wsrep_thd_UNLOCK_func)(THD *thd);
|
||||
void (*wsrep_thd_awake_func)(THD *thd, my_bool signal);
|
||||
enum wsrep_conflict_state (*wsrep_thd_conflict_state_func)(MYSQL_THD, my_bool);
|
||||
const char * (*wsrep_thd_conflict_state_str_func)(THD *thd);
|
||||
enum wsrep_exec_mode (*wsrep_thd_exec_mode_func)(THD *thd);
|
||||
const char * (*wsrep_thd_exec_mode_str_func)(THD *thd);
|
||||
enum wsrep_conflict_state (*wsrep_thd_get_conflict_state_func)(MYSQL_THD);
|
||||
my_bool (*wsrep_thd_is_BF_func)(MYSQL_THD , my_bool);
|
||||
my_bool (*wsrep_thd_is_wsrep_func)(MYSQL_THD thd);
|
||||
char * (*wsrep_thd_query_func)(THD *thd);
|
||||
enum wsrep_query_state (*wsrep_thd_query_state_func)(THD *thd);
|
||||
const char * (*wsrep_thd_query_state_str_func)(THD *thd);
|
||||
int (*wsrep_thd_retry_counter_func)(THD *thd);
|
||||
void (*wsrep_thd_set_conflict_state_func)(THD *thd, enum wsrep_conflict_state state);
|
||||
bool (*wsrep_thd_ignore_table_func)(THD *thd);
|
||||
long long (*wsrep_thd_trx_seqno_func)(THD *thd);
|
||||
struct wsrep_ws_handle * (*wsrep_thd_ws_handle_func)(THD *thd);
|
||||
int (*wsrep_trx_is_aborting_func)(MYSQL_THD thd);
|
||||
int (*wsrep_trx_order_before_func)(MYSQL_THD, MYSQL_THD);
|
||||
void (*wsrep_unlock_rollback_func)();
|
||||
my_bool (*wsrep_on_func)(const MYSQL_THD thd);
|
||||
bool (*wsrep_prepare_key_for_innodb_func)(MYSQL_THD thd, const unsigned char*, size_t, const unsigned char*, size_t, struct wsrep_buf*, size_t*);
|
||||
void (*wsrep_thd_LOCK_func)(const MYSQL_THD thd);
|
||||
void (*wsrep_thd_UNLOCK_func)(const MYSQL_THD thd);
|
||||
const char * (*wsrep_thd_query_func)(const MYSQL_THD thd);
|
||||
int (*wsrep_thd_retry_counter_func)(const MYSQL_THD thd);
|
||||
bool (*wsrep_thd_ignore_table_func)(MYSQL_THD thd);
|
||||
long long (*wsrep_thd_trx_seqno_func)(const MYSQL_THD thd);
|
||||
my_bool (*wsrep_thd_is_aborting_func)(const MYSQL_THD thd);
|
||||
void (*wsrep_set_data_home_dir_func)(const char *data_dir);
|
||||
my_bool (*wsrep_thd_is_BF_func)(const MYSQL_THD thd, my_bool sync);
|
||||
my_bool (*wsrep_thd_is_local_func)(const MYSQL_THD thd);
|
||||
void (*wsrep_thd_self_abort_func)(MYSQL_THD thd);
|
||||
int (*wsrep_thd_append_key_func)(MYSQL_THD thd, const struct wsrep_key* key,
|
||||
int n_keys, enum Wsrep_service_key_type);
|
||||
const char* (*wsrep_thd_client_state_str_func)(const MYSQL_THD thd);
|
||||
const char* (*wsrep_thd_client_mode_str_func)(const MYSQL_THD thd);
|
||||
const char* (*wsrep_thd_transaction_state_str_func)(const MYSQL_THD thd);
|
||||
query_id_t (*wsrep_thd_transaction_id_func)(const MYSQL_THD thd);
|
||||
my_bool (*wsrep_thd_bf_abort_func)(const MYSQL_THD bf_thd,
|
||||
MYSQL_THD victim_thd,
|
||||
my_bool signal);
|
||||
my_bool (*wsrep_thd_order_before_func)(const MYSQL_THD left, const MYSQL_THD right);
|
||||
void (*wsrep_handle_SR_rollback_func)(MYSQL_THD BF_thd, MYSQL_THD victim_thd);
|
||||
my_bool (*wsrep_thd_skip_locking_func)(const MYSQL_THD thd);
|
||||
const char* (*wsrep_get_sr_table_name_func)();
|
||||
my_bool (*wsrep_get_debug_func)();
|
||||
} *wsrep_service;
|
||||
|
||||
#define MYSQL_SERVICE_WSREP_INCLUDED
|
||||
#endif
|
||||
|
||||
#ifdef MYSQL_DYNAMIC_PLUGIN
|
||||
#define get_wsrep() wsrep_service->get_wsrep_func()
|
||||
#define get_wsrep_certify_nonPK() wsrep_service->get_wsrep_certify_nonPK_func()
|
||||
#define get_wsrep_debug() wsrep_service->get_wsrep_debug_func()
|
||||
#define get_wsrep_drupal_282555_workaround() wsrep_service->get_wsrep_drupal_282555_workaround_func()
|
||||
|
||||
#define MYSQL_SERVICE_WSREP_DYNAMIC_INCLUDED
|
||||
#define get_wsrep_recovery() wsrep_service->get_wsrep_recovery_func()
|
||||
#define get_wsrep_load_data_splitting() wsrep_service->get_wsrep_load_data_splitting_func()
|
||||
#define get_wsrep_log_conflicts() wsrep_service->get_wsrep_log_conflicts_func()
|
||||
#define get_wsrep_protocol_version() wsrep_service->get_wsrep_protocol_version_func()
|
||||
#define wsrep_aborting_thd_contains(T) wsrep_service->wsrep_aborting_thd_contains_func(T)
|
||||
#define wsrep_aborting_thd_enqueue(T) wsrep_service->wsrep_aborting_thd_enqueue_func(T)
|
||||
#define wsrep_consistency_check(T) wsrep_service->wsrep_consistency_check_func(T)
|
||||
#define wsrep_is_wsrep_xid(X) wsrep_service->wsrep_is_wsrep_xid_func(X)
|
||||
#define wsrep_xid_seqno(X) wsrep_service->wsrep_xid_seqno_func(X)
|
||||
#define wsrep_xid_uuid(X) wsrep_service->wsrep_xid_uuid_func(X)
|
||||
#define wsrep_lock_rollback() wsrep_service->wsrep_lock_rollback_func()
|
||||
#define wsrep_on(X) wsrep_service->wsrep_on_func(X)
|
||||
#define wsrep_post_commit(T,A) wsrep_service->wsrep_post_commit_func(T,A)
|
||||
#define wsrep_prepare_key(A,B,C,D,E,F) wsrep_service->wsrep_prepare_key_func(A,B,C,D,E,F)
|
||||
#define wsrep_run_wsrep_commit(T,A) wsrep_service->wsrep_run_wsrep_commit_func(T,A)
|
||||
#define wsrep_prepare_key_for_innodb(A,B,C,D,E,F,G) wsrep_service->wsrep_prepare_key_for_innodb_func(A,B,C,D,E,F,G)
|
||||
#define wsrep_thd_LOCK(T) wsrep_service->wsrep_thd_LOCK_func(T)
|
||||
#define wsrep_thd_UNLOCK(T) wsrep_service->wsrep_thd_UNLOCK_func(T)
|
||||
#define wsrep_thd_awake(T,S) wsrep_service->wsrep_thd_awake_func(T,S)
|
||||
#define wsrep_thd_conflict_state(T,S) wsrep_service->wsrep_thd_conflict_state_func(T,S)
|
||||
#define wsrep_thd_conflict_state_str(T) wsrep_service->wsrep_thd_conflict_state_str_func(T)
|
||||
#define wsrep_thd_exec_mode(T) wsrep_service->wsrep_thd_exec_mode_func(T)
|
||||
#define wsrep_thd_exec_mode_str(T) wsrep_service->wsrep_thd_exec_mode_str_func(T)
|
||||
#define wsrep_thd_get_conflict_state(T) wsrep_service->wsrep_thd_get_conflict_state_func(T)
|
||||
#define wsrep_thd_is_BF(T,S) wsrep_service->wsrep_thd_is_BF_func(T,S)
|
||||
#define wsrep_thd_is_wsrep(T) wsrep_service->wsrep_thd_is_wsrep_func(T)
|
||||
#define wsrep_thd_query(T) wsrep_service->wsrep_thd_query_func(T)
|
||||
#define wsrep_thd_query_state(T) wsrep_service->wsrep_thd_query_state_func(T)
|
||||
#define wsrep_thd_query_state_str(T) wsrep_service->wsrep_thd_query_state_str_func(T)
|
||||
#define wsrep_thd_retry_counter(T) wsrep_service->wsrep_thd_retry_counter_func(T)
|
||||
#define wsrep_thd_set_conflict_state(T,S) wsrep_service->wsrep_thd_set_conflict_state_func(T,S)
|
||||
#define wsrep_thd_ignore_table(T) wsrep_service->wsrep_thd_ignore_table_func(T)
|
||||
#define wsrep_thd_trx_seqno(T) wsrep_service->wsrep_thd_trx_seqno_func(T)
|
||||
#define wsrep_thd_ws_handle(T) wsrep_service->wsrep_thd_ws_handle_func(T)
|
||||
#define wsrep_trx_is_aborting(T) wsrep_service->wsrep_trx_is_aborting_func(T)
|
||||
#define wsrep_trx_order_before(T1,T2) wsrep_service->wsrep_trx_order_before_func(T1,T2)
|
||||
#define wsrep_unlock_rollback() wsrep_service->wsrep_unlock_rollback_func()
|
||||
#define wsrep_set_data_home_dir(A) wsrep_service->wsrep_set_data_home_dir_func(A)
|
||||
|
||||
#define wsrep_debug get_wsrep_debug()
|
||||
#define wsrep_log_conflicts get_wsrep_log_conflicts()
|
||||
#define wsrep_certify_nonPK get_wsrep_certify_nonPK()
|
||||
#define wsrep_load_data_splitting get_wsrep_load_data_splitting()
|
||||
#define wsrep_drupal_282555_workaround get_wsrep_drupal_282555_workaround()
|
||||
#define wsrep_recovery get_wsrep_recovery()
|
||||
#define wsrep_protocol_version get_wsrep_protocol_version()
|
||||
#define wsrep_thd_is_BF(T,S) wsrep_service->wsrep_thd_is_BF_func(T,S)
|
||||
#define wsrep_thd_is_aborting(T) wsrep_service->wsrep_thd_is_aborting_func(T)
|
||||
#define wsrep_thd_is_local(T) wsrep_service->wsrep_thd_is_local_func(T)
|
||||
#define wsrep_thd_self_abort(T) wsrep_service->wsrep_thd_self_abort_func(T)
|
||||
#define wsrep_thd_append_key(T,W,N,K) wsrep_service->wsrep_thd_append_key_func(T,W,N,K)
|
||||
#define wsrep_thd_client_state_str(T) wsrep_service->wsrep_thd_client_state_str_func(T)
|
||||
#define wsrep_thd_client_mode_str(T) wsrep_service->wsrep_thd_client_mode_str_func(T)
|
||||
#define wsrep_thd_transaction_state_str(T) wsrep_service->wsrep_thd_transaction_state_str_func(T)
|
||||
#define wsrep_thd_transaction_id(T) wsrep_service->wsrep_thd_transaction_id_func(T)
|
||||
#define wsrep_thd_bf_abort(T,T2,S) wsrep_service->wsrep_thd_bf_abort_func(T,T2,S)
|
||||
#define wsrep_thd_order_before(L,R) wsrep_service->wsrep_thd_order_before_func(L,R)
|
||||
#define wsrep_handle_SR_rollback(B,V) wsrep_service->wsrep_handle_SR_rollback_func(B,V)
|
||||
#define wsrep_thd_skip_locking(T) wsrep_service->wsrep_thd_skip_locking_func(T)
|
||||
#define wsrep_get_sr_table_name() wsrep_service->wsrep_get_sr_table_name_func()
|
||||
#define wsrep_get_debug() wsrep_service->wsrep_get_debug_func()
|
||||
|
||||
#else
|
||||
|
||||
#define MYSQL_SERVICE_WSREP_STATIC_INCLUDED
|
||||
extern my_bool wsrep_debug;
|
||||
extern my_bool wsrep_log_conflicts;
|
||||
extern my_bool wsrep_certify_nonPK;
|
||||
@ -176,54 +130,81 @@ extern my_bool wsrep_drupal_282555_workaround;
|
||||
extern my_bool wsrep_recovery;
|
||||
extern long wsrep_protocol_version;
|
||||
|
||||
bool wsrep_consistency_check(THD *thd);
|
||||
bool wsrep_prepare_key(const unsigned char* cache_key, size_t cache_key_len, const unsigned char* row_id, size_t row_id_len, struct wsrep_buf* key, size_t* key_len);
|
||||
char *wsrep_thd_query(THD *thd);
|
||||
const char *wsrep_thd_conflict_state_str(THD *thd);
|
||||
const char *wsrep_thd_exec_mode_str(THD *thd);
|
||||
const char *wsrep_thd_query_state_str(THD *thd);
|
||||
enum wsrep_conflict_state wsrep_thd_conflict_state(MYSQL_THD thd, my_bool sync);
|
||||
enum wsrep_conflict_state wsrep_thd_get_conflict_state(MYSQL_THD thd);
|
||||
enum wsrep_exec_mode wsrep_thd_exec_mode(THD *thd);
|
||||
enum wsrep_query_state wsrep_thd_query_state(THD *thd);
|
||||
enum wsrep_trx_status wsrep_run_wsrep_commit(THD *thd, bool all);
|
||||
int wsrep_is_wsrep_xid(const struct xid_t* xid);
|
||||
long long wsrep_xid_seqno(const struct xid_t* xid);
|
||||
extern "C" bool wsrep_consistency_check(MYSQL_THD thd);
|
||||
bool wsrep_prepare_key_for_innodb(MYSQL_THD thd, const unsigned char* cache_key, size_t cache_key_len, const unsigned char* row_id, size_t row_id_len, struct wsrep_buf* key, size_t* key_len);
|
||||
extern "C" const char *wsrep_thd_query(const MYSQL_THD thd);
|
||||
extern "C" int wsrep_is_wsrep_xid(const void* xid);
|
||||
extern "C" long long wsrep_xid_seqno(const struct xid_t* xid);
|
||||
const unsigned char* wsrep_xid_uuid(const struct xid_t* xid);
|
||||
int wsrep_on(MYSQL_THD thd);
|
||||
int wsrep_thd_retry_counter(THD *thd);
|
||||
int wsrep_trx_is_aborting(MYSQL_THD thd);
|
||||
int wsrep_trx_order_before(MYSQL_THD thd1, MYSQL_THD thd2);
|
||||
long get_wsrep_protocol_version();
|
||||
long long wsrep_thd_trx_seqno(THD *thd);
|
||||
my_bool get_wsrep_certify_nonPK();
|
||||
my_bool get_wsrep_debug();
|
||||
my_bool get_wsrep_drupal_282555_workaround();
|
||||
extern "C" long long wsrep_thd_trx_seqno(const MYSQL_THD thd);
|
||||
my_bool get_wsrep_recovery();
|
||||
my_bool get_wsrep_load_data_splitting();
|
||||
my_bool get_wsrep_log_conflicts();
|
||||
my_bool wsrep_aborting_thd_contains(THD *thd);
|
||||
my_bool wsrep_thd_is_BF(MYSQL_THD thd, my_bool sync);
|
||||
my_bool wsrep_thd_is_wsrep(MYSQL_THD thd);
|
||||
struct wsrep *get_wsrep();
|
||||
struct wsrep_ws_handle *wsrep_thd_ws_handle(THD *thd);
|
||||
void wsrep_aborting_thd_enqueue(THD *thd);
|
||||
void wsrep_lock_rollback();
|
||||
void wsrep_post_commit(THD* thd, bool all);
|
||||
void wsrep_thd_LOCK(THD *thd);
|
||||
void wsrep_thd_UNLOCK(THD *thd);
|
||||
void wsrep_thd_awake(THD *thd, my_bool signal);
|
||||
void wsrep_thd_set_conflict_state(THD *thd, enum wsrep_conflict_state state);
|
||||
bool wsrep_thd_ignore_table(THD *thd);
|
||||
void wsrep_unlock_rollback();
|
||||
bool wsrep_thd_ignore_table(MYSQL_THD thd);
|
||||
void wsrep_set_data_home_dir(const char *data_dir);
|
||||
|
||||
#endif
|
||||
/* from mysql wsrep-lib */
|
||||
#include "my_global.h"
|
||||
#include "my_pthread.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
/* Return true if wsrep is enabled for a thd. This means that
|
||||
wsrep is enabled globally and the thd has wsrep on */
|
||||
extern "C" my_bool wsrep_on(const MYSQL_THD thd);
|
||||
/* Lock thd wsrep lock */
|
||||
extern "C" void wsrep_thd_LOCK(const MYSQL_THD thd);
|
||||
/* Unlock thd wsrep lock */
|
||||
extern "C" void wsrep_thd_UNLOCK(const MYSQL_THD thd);
|
||||
|
||||
#define MYSQL_SERVICE_WSREP_INCLUDED
|
||||
#endif
|
||||
/* Return thd client state string */
|
||||
extern "C" const char* wsrep_thd_client_state_str(const MYSQL_THD thd);
|
||||
/* Return thd client mode string */
|
||||
extern "C" const char* wsrep_thd_client_mode_str(const MYSQL_THD thd);
|
||||
/* Return thd transaction state string */
|
||||
extern "C" const char* wsrep_thd_transaction_state_str(const MYSQL_THD thd);
|
||||
|
||||
/* Return current transaction id */
|
||||
extern "C" query_id_t wsrep_thd_transaction_id(const MYSQL_THD thd);
|
||||
/* Mark thd own transaction as aborted */
|
||||
extern "C" void wsrep_thd_self_abort(MYSQL_THD thd);
|
||||
/* Return true if thd is in replicating mode */
|
||||
extern "C" my_bool wsrep_thd_is_local(const MYSQL_THD thd);
|
||||
/* Return true if thd is in high priority mode */
|
||||
/* todo: rename to is_high_priority() */
|
||||
extern "C" my_bool wsrep_thd_is_applying(const MYSQL_THD thd);
|
||||
/* Return true if thd is in TOI mode */
|
||||
extern "C" my_bool wsrep_thd_is_toi(const MYSQL_THD thd);
|
||||
/* Return true if thd is in replicating TOI mode */
|
||||
extern "C" my_bool wsrep_thd_is_local_toi(const MYSQL_THD thd);
|
||||
/* Return true if thd is in RSU mode */
|
||||
extern "C" my_bool wsrep_thd_is_in_rsu(const MYSQL_THD thd);
|
||||
/* Return true if thd is in BF mode, either high_priority or TOI */
|
||||
extern "C" my_bool wsrep_thd_is_BF(const MYSQL_THD thd, my_bool sync);
|
||||
/* Return true if thd is streaming */
|
||||
extern "C" my_bool wsrep_thd_is_SR(const MYSQL_THD thd);
|
||||
extern "C" void wsrep_handle_SR_rollback(MYSQL_THD BF_thd, MYSQL_THD victim_thd);
|
||||
/* Return thd retry counter */
|
||||
extern "C" int wsrep_thd_retry_counter(const MYSQL_THD thd);
|
||||
/* BF abort victim_thd */
|
||||
extern "C" my_bool wsrep_thd_bf_abort(const MYSQL_THD bf_thd,
|
||||
MYSQL_THD victim_thd,
|
||||
my_bool signal);
|
||||
/* Return true if left thd is ordered before right thd */
|
||||
extern "C" my_bool wsrep_thd_order_before(const MYSQL_THD left, const MYSQL_THD right);
|
||||
/* Return true if thd should skip locking. This means that the thd
|
||||
is operating on shared resource inside commit order critical section. */
|
||||
extern "C" my_bool wsrep_thd_skip_locking(const MYSQL_THD thd);
|
||||
/* Return true if thd is aborting */
|
||||
extern "C" my_bool wsrep_thd_is_aborting(const MYSQL_THD thd);
|
||||
|
||||
struct wsrep_key;
|
||||
struct wsrep_key_array;
|
||||
extern "C" int wsrep_thd_append_key(MYSQL_THD thd,
|
||||
const struct wsrep_key* key,
|
||||
int n_keys,
|
||||
enum Wsrep_service_key_type);
|
||||
|
||||
extern const char* wsrep_sr_table_name_full;
|
||||
|
||||
extern "C" const char* wsrep_get_sr_table_name();
|
||||
|
||||
extern "C" my_bool wsrep_get_debug();
|
||||
#endif
|
||||
#endif /* MYSQL_SERVICE_WSREP_INCLUDED */
|
||||
|
@ -168,9 +168,9 @@ void thr_set_lock_wait_callback(void (*before_wait)(void),
|
||||
void (*after_wait)(void));
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
typedef my_bool (* wsrep_thd_is_brute_force_fun)(void *, my_bool);
|
||||
typedef int (* wsrep_abort_thd_fun)(void *, void *, my_bool);
|
||||
typedef int (* wsrep_on_fun)(void *);
|
||||
typedef my_bool (* wsrep_thd_is_brute_force_fun)(const MYSQL_THD, my_bool);
|
||||
typedef my_bool(* wsrep_abort_thd_fun)(const MYSQL_THD, MYSQL_THD, my_bool);
|
||||
typedef my_bool (* wsrep_on_fun)(const MYSQL_THD);
|
||||
void wsrep_thr_lock_init(
|
||||
wsrep_thd_is_brute_force_fun bf_fun, wsrep_abort_thd_fun abort_fun,
|
||||
my_bool debug, my_bool convert_LOCK_to_trx, wsrep_on_fun on_fun);
|
||||
|
@ -13,11 +13,11 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
|
||||
|
||||
#include <my_config.h>
|
||||
|
||||
#ifndef WSREP_INCLUDED
|
||||
#define WSREP_INCLUDED
|
||||
|
||||
#include <my_config.h>
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
#define IF_WSREP(A,B) A
|
||||
#define DBUG_ASSERT_IF_WSREP(A) DBUG_ASSERT(A)
|
||||
@ -28,12 +28,14 @@
|
||||
goto wsrep_error_label;
|
||||
|
||||
#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_) \
|
||||
if (WSREP_ON && WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_, \
|
||||
table_list_, alter_info_)) \
|
||||
if (WSREP(thd) && wsrep_thd_is_local(thd) && \
|
||||
wsrep_to_isolation_begin(thd, db_, table_, \
|
||||
table_list_, alter_info_)) \
|
||||
goto wsrep_error_label;
|
||||
|
||||
#define WSREP_TO_ISOLATION_END \
|
||||
if (WSREP_ON && (WSREP(thd) || (thd && thd->wsrep_exec_mode==TOTAL_ORDER))) \
|
||||
#define WSREP_TO_ISOLATION_END \
|
||||
if ((WSREP(thd) && wsrep_thd_is_local_toi(thd)) || \
|
||||
wsrep_thd_is_in_rsu(thd)) \
|
||||
wsrep_to_isolation_end(thd);
|
||||
|
||||
/*
|
||||
@ -54,19 +56,22 @@
|
||||
{ if (WSREP_CLIENT(thd_) && \
|
||||
wsrep_sync_wait(thd_, before_)) goto wsrep_error_label; }
|
||||
|
||||
#else
|
||||
#else /* !WITH_WSREP */
|
||||
|
||||
/* These macros are needed to compile MariaDB without WSREP support
|
||||
* (e.g. embedded) */
|
||||
|
||||
#define IF_WSREP(A,B) B
|
||||
#define DBUG_ASSERT_IF_WSREP(A)
|
||||
//#define DBUG_ASSERT_IF_WSREP(A)
|
||||
#define WSREP_DEBUG(...)
|
||||
#define WSREP_INFO(...)
|
||||
#define WSREP_WARN(...)
|
||||
//#define WSREP_INFO(...)
|
||||
//#define WSREP_WARN(...)
|
||||
#define WSREP_ERROR(...)
|
||||
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) do { } while(0)
|
||||
#define WSREP_TO_ISOLATION_BEGIN_ALTER(db_, table_, table_list_, alter_info_)
|
||||
#define WSREP_TO_ISOLATION_END
|
||||
#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_)
|
||||
#define WSREP_SYNC_WAIT(thd_, before_)
|
||||
|
||||
#endif /* WITH_WSREP */
|
||||
|
||||
#endif /* WSREP_INCLUDED */
|
||||
|
@ -103,5 +103,56 @@ cat_file $datadir.tempfiles.txt;
|
||||
remove_file $datadir.tempfiles.txt;
|
||||
list_files $datadir/mysql #sql*;
|
||||
|
||||
#
|
||||
# Check that SHOW ENGINE INNODB STATUS does not show any active transactions
|
||||
# We do this only if wsrep provider is loaded, to avoid disturbing any non-Galera MTR tests
|
||||
#
|
||||
if (`SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'wsrep' AND PLUGIN_STATUS='ACTIVE'`) {
|
||||
if (`SELECT @@wsrep_on`) {
|
||||
if (`SELECT COUNT(*) FROM information_schema.innodb_trx WHERE trx_mysql_thread_id != 0`) {
|
||||
if ($before) {
|
||||
--echo Before test start.
|
||||
}
|
||||
if (!$before) {
|
||||
--echo After test end.
|
||||
}
|
||||
--echo There is one or more active InnoDB transaction(s) when there should be none. Dumping some diagnostics.
|
||||
|
||||
--let $status_locks = `SELECT @@innodb_status_output_locks`
|
||||
--let $status_output = `SELECT @@innodb_status_output`
|
||||
--enable_query_log
|
||||
SET GLOBAL innodb_status_output_locks=ON;
|
||||
SHOW ENGINE INNODB STATUS;
|
||||
--disable_query_log
|
||||
--eval SET GLOBAL innodb_status_output_locks=$status_locks;
|
||||
--eval SET GLOBAL innodb_status_output=$status_output;
|
||||
--enable_query_log
|
||||
|
||||
--vertical_results
|
||||
if ($before) {
|
||||
--replace_regex /$/ /
|
||||
}
|
||||
SELECT * FROM information_schema.processlist;
|
||||
|
||||
if ($before) {
|
||||
--replace_regex /$/ /
|
||||
}
|
||||
SELECT * FROM information_schema.innodb_trx;
|
||||
|
||||
if ($before) {
|
||||
--replace_regex /$/ /
|
||||
}
|
||||
SELECT * FROM information_schema.innodb_locks;
|
||||
|
||||
if ($before) {
|
||||
--replace_regex /$/ /
|
||||
}
|
||||
SELECT * FROM information_schema.innodb_lock_waits;
|
||||
--horizontal_results
|
||||
--disable_query_log
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
--enable_query_log
|
||||
|
||||
|
@ -8,5 +8,11 @@
|
||||
|
||||
--let $galera_cluster_size = 2
|
||||
--source include/galera_init.inc
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/galera_wait_ready.inc
|
||||
|
||||
--connection node_2
|
||||
--source include/galera_wait_ready.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--connection node_1
|
||||
|
@ -1,6 +1,17 @@
|
||||
--let $wait_timeout = 10
|
||||
--let $wsrep_on_orig = `SELECT @@wsrep_on`
|
||||
SET SESSION wsrep_on = 0;
|
||||
|
||||
#
|
||||
# following is only for debugging purposes
|
||||
# should be commented out when test wporks as planned
|
||||
#
|
||||
#--sleep 1
|
||||
# SHOW PROCESSLIST;
|
||||
#SHOW STATUS LIKE 'wsrep_%';
|
||||
#--echo $galera_sync_point
|
||||
|
||||
--let $wait_condition = SELECT 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debug_sync_waiters' AND VARIABLE_VALUE = '$galera_sync_point'
|
||||
--source include/wait_condition.inc
|
||||
--eval SET SESSION wsrep_on = $wsrep_on_orig
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
# To be used in a test which requires wsrep plugin to be ACTIVE and enabled
|
||||
# (i.e. wsrep_on=ON). It includes have_wsrep.inc.
|
||||
|
||||
--source include/have_wsrep.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
if (`SELECT COUNT(*)=0 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_on' AND VARIABLE_VALUE='ON'`)
|
||||
|
20
mysql-test/include/kill_galera.inc
Normal file
20
mysql-test/include/kill_galera.inc
Normal file
@ -0,0 +1,20 @@
|
||||
--echo Killing server ...
|
||||
|
||||
# Write file to make mysql-test-run.pl expect the crash, but don't start it
|
||||
--let $_server_id= `SELECT @@server_id`
|
||||
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
|
||||
--exec echo "wait" > $_expect_file_name
|
||||
|
||||
# Kill the connected server
|
||||
--disable_reconnect
|
||||
--let KILL_NODE_PIDFILE = `SELECT @@pid_file`
|
||||
|
||||
--perl
|
||||
my $pid_filename = $ENV{'KILL_NODE_PIDFILE'};
|
||||
my $mysqld_pid = `cat $pid_filename`;
|
||||
chomp($mysqld_pid);
|
||||
system("kill -9 $mysqld_pid");
|
||||
exit(0);
|
||||
EOF
|
||||
|
||||
--source include/wait_until_disconnected.inc
|
20
mysql-test/include/wsrep_wait_disconnect.inc
Normal file
20
mysql-test/include/wsrep_wait_disconnect.inc
Normal file
@ -0,0 +1,20 @@
|
||||
let $wait_condition = SELECT 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready' AND VARIABLE_VALUE = 'OFF';
|
||||
# since this is called until AFTER provider disconnects,we need to allow
|
||||
# queries in non-prim
|
||||
#
|
||||
# We are also forced to use a hard-coded value for wsrep_sync_wait here because
|
||||
# we can not issue a SELECT query to obtain the original value and then restore
|
||||
# it
|
||||
disable_query_log;
|
||||
SET SESSION wsrep_sync_wait = 7;
|
||||
--let $restore_wsrep_on = `SHOW VARIABLES WHERE Variable_name = 'wsrep_on' AND Value = 'ON'`
|
||||
SET SESSION wsrep_on = OFF;
|
||||
|
||||
--source include/wait_condition.inc
|
||||
|
||||
if ($restore_wsrep_on != "")
|
||||
{
|
||||
--eval SET SESSION wsrep_on = ON
|
||||
}
|
||||
SET SESSION wsrep_sync_wait = 15;
|
||||
enable_query_log;
|
@ -2896,15 +2896,44 @@ sub mysql_server_start($) {
|
||||
# Save this test case information, so next can examine it
|
||||
$mysqld->{'started_tinfo'}= $tinfo;
|
||||
}
|
||||
|
||||
# If wsrep is on, we need to wait until the first
|
||||
# server starts and bootstraps the cluster before
|
||||
# starting other servers. The bootsrap server in the
|
||||
# configuration should always be the first which has
|
||||
# wsrep_on=ON
|
||||
if (wsrep_on($mysqld) && wsrep_is_bootstrap_server($mysqld))
|
||||
{
|
||||
mtr_verbose("Waiting for wsrep bootstrap server to start");
|
||||
if ($mysqld->{WAIT}->($mysqld))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub mysql_server_wait {
|
||||
my ($mysqld) = @_;
|
||||
my ($mysqld, $tinfo) = @_;
|
||||
|
||||
return not sleep_until_file_created($mysqld->value('pid-file'),
|
||||
$opt_start_timeout,
|
||||
$mysqld->{'proc'},
|
||||
$warn_seconds);
|
||||
if (!sleep_until_file_created($mysqld->value('pid-file'),
|
||||
$opt_start_timeout,
|
||||
$mysqld->{'proc'},
|
||||
$warn_seconds))
|
||||
{
|
||||
$tinfo->{comment}= "Failed to start ".$mysqld->name() . "\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (wsrep_on($mysqld))
|
||||
{
|
||||
mtr_verbose("Waiting for wsrep server " . $mysqld->name() . " to be ready");
|
||||
if (!wait_wsrep_ready($tinfo, $mysqld))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub create_config_file_for_extern {
|
||||
@ -5408,6 +5437,118 @@ sub stop_servers($$) {
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# run_query_output
|
||||
#
|
||||
# Run a query against a server using mysql client. The output of
|
||||
# the query will be written into outfile.
|
||||
#
|
||||
sub run_query_output {
|
||||
my ($mysqld, $query, $outfile)= @_;
|
||||
my $args;
|
||||
|
||||
mtr_init_args(\$args);
|
||||
mtr_add_arg($args, "--defaults-file=%s", $path_config_file);
|
||||
mtr_add_arg($args, "--defaults-group-suffix=%s", $mysqld->after('mysqld'));
|
||||
mtr_add_arg($args, "--silent");
|
||||
mtr_add_arg($args, "--execute=%s", $query);
|
||||
|
||||
my $res= My::SafeProcess->run
|
||||
(
|
||||
name => "run_query_output -> ".$mysqld->name(),
|
||||
path => $exe_mysql,
|
||||
args => \$args,
|
||||
output => $outfile,
|
||||
error => $outfile
|
||||
);
|
||||
|
||||
return $res
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# wsrep_wait_ready
|
||||
#
|
||||
# Wait until the server has been joined to the cluster and is
|
||||
# ready for operation.
|
||||
#
|
||||
# RETURN
|
||||
# 1 Server is ready
|
||||
# 0 Server didn't transition to ready state within start timeout
|
||||
#
|
||||
sub wait_wsrep_ready($$) {
|
||||
my ($tinfo, $mysqld)= @_;
|
||||
|
||||
my $sleeptime= 100; # Milliseconds
|
||||
my $loops= ($opt_start_timeout * 1000) / $sleeptime;
|
||||
|
||||
my $name= $mysqld->name();
|
||||
my $outfile= "$opt_vardir/tmp/$name.wsrep_ready";
|
||||
my $query= "SET SESSION wsrep_sync_wait = 0;
|
||||
SELECT VARIABLE_NAME, VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||
WHERE VARIABLE_NAME = 'wsrep_ready'";
|
||||
|
||||
for (my $loop= 1; $loop <= $loops; $loop++)
|
||||
{
|
||||
# Careful... if MTR runs with option 'verbose' then the
|
||||
# file contains also SafeProcess verbose output
|
||||
if (run_query_output($mysqld, $query, $outfile) == 0 &&
|
||||
mtr_grab_file($outfile) =~ /WSREP_READY\s+ON/)
|
||||
{
|
||||
unlink($outfile);
|
||||
return 1;
|
||||
}
|
||||
mtr_milli_sleep($sleeptime);
|
||||
}
|
||||
|
||||
$tinfo->{logfile}= "WSREP did not transition to state READY";
|
||||
return 0;
|
||||
}
|
||||
|
||||
#
|
||||
# wsrep_is_bootstrap_server
|
||||
#
|
||||
# Check if the server is the first one to be started in the
|
||||
# cluster.
|
||||
#
|
||||
# RETURN
|
||||
# 1 The server is a bootstrap server
|
||||
# 0 The server is not a bootstrap server
|
||||
#
|
||||
sub wsrep_is_bootstrap_server($) {
|
||||
my $mysqld= shift;
|
||||
|
||||
my $cluster_address= $mysqld->if_exist('wsrep-cluster-address') ||
|
||||
$mysqld->if_exist('wsrep_cluster_address');
|
||||
if (defined $cluster_address)
|
||||
{
|
||||
return $cluster_address eq "gcomm://" || $cluster_address eq "'gcomm://'";
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#
|
||||
# wsrep_on
|
||||
#
|
||||
# Check if wsrep has been enabled for a server.
|
||||
#
|
||||
# RETURN
|
||||
# 1 Wsrep has been enabled
|
||||
# 0 Wsrep is not enabled
|
||||
#
|
||||
sub wsrep_on($) {
|
||||
my $mysqld= shift;
|
||||
#check if wsrep_on= is set in configuration
|
||||
if ($mysqld->if_exist('wsrep-on')) {
|
||||
my $on= "".$mysqld->value('wsrep-on');
|
||||
if ($on eq "1" || $on eq "ON") {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# start_servers
|
||||
@ -5427,8 +5568,7 @@ sub start_servers($) {
|
||||
|
||||
for (all_servers()) {
|
||||
next unless $_->{WAIT} and started($_);
|
||||
if ($_->{WAIT}->($_)) {
|
||||
$tinfo->{comment}= "Failed to start ".$_->name() . "\n";
|
||||
if ($_->{WAIT}->($_, $tinfo)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -9,13 +9,14 @@
|
||||
# Do not use any TAB characters for whitespace.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
MW-360 : needs rewrite to be MariaDB gtid compatible
|
||||
galera_flush : MariaDB does not have global.thread_statistics
|
||||
galera_account_management : MariaDB 10.0 does not support ALTER USER
|
||||
galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events
|
||||
galera_migrate : MariaDB does not support START SLAVE USER
|
||||
galera_as_master_gtid : Requires MySQL GTID
|
||||
galera_as_master_gtid_change_master : Requires MySQL GTID
|
||||
galera_as_slave_gtid_replicate_do_db_cc : Requires MySQL GTID
|
||||
galera_as_slave_preordered : wsrep-preordered feature not merged to MariaDB
|
||||
GAL-419 : MDEV-13549 Galera test failures
|
||||
galera_var_notify_cmd : MDEV-13549 Galera test failures
|
||||
@ -52,3 +53,13 @@ galera.galera_var_reject_queries : assertion in inline_mysql_socket_send
|
||||
query_cache : MDEV-18137: Galera test failure on query_cache
|
||||
galera.galera_autoinc_sst_mariabackup : MDEV-18177 Galera test failure on galera_autoinc_sst_mariabackup
|
||||
galera_gcache_recover_manytrx : MDEV-15740
|
||||
galera.galera_ist_mariabackup : Leaves port open
|
||||
galera.galera_sst_rsync2 : MDEV-18178 Galera test failure on galera_sst_rsync2
|
||||
galera.galera_kill_largechanges : MDEV-18179 Galera test failure on galera.galera_kill_largechanges
|
||||
galera.galera_concurrent_ctas : MDEV-18180 Galera test failure on galera.galera_concurrent_ctas
|
||||
galera.galera_var_retry_autocommit: MDEV-18181 Galera test failure on galera.galera_var_retry_autocommit
|
||||
galera.galera_many_tables_nopk : MDEV-18182 Galera test failure on galera.galera_many_tables_nopk
|
||||
galera.galera_kill_nochanges : MDEV-18280 Galera test failure on galera_split_brain and galera_kill_nochanges
|
||||
galera.galera_split_brain : MDEV-18280 Galera test failure on galera_split_brain and galera_kill_nochanges
|
||||
galera.galera_bf_abort_group_commit : MDEV-18282 Galera test failure on galera.galera_bf_abort_group_commit
|
||||
galera.GCF-1081 : MDEV-18283 Galera test failure on galera.GCF-1081
|
||||
|
@ -2,7 +2,7 @@
|
||||
!include include/default_mysqld.cnf
|
||||
|
||||
[mysqld]
|
||||
wsrep-on=1
|
||||
loose-innodb
|
||||
binlog-format=row
|
||||
innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
@ -10,20 +10,35 @@ wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-sync-wait=15
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.1]
|
||||
loose-innodb
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep_causal_reads=ON
|
||||
wsrep_sync_wait = 15
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.2]
|
||||
loose-innodb
|
||||
# debug=d:t:i:o,/tmp/mysqld.2.trace
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
|
||||
|
||||
@ -34,8 +49,14 @@ wsrep_sync_wait = 15
|
||||
wsrep_node_address=127.0.0.1
|
||||
wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||
wsrep_sst_receive_address='127.0.0.2:@mysqld.2.#sst_port'
|
||||
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep_causal_reads=ON
|
||||
wsrep_sync_wait = 15
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[ENV]
|
||||
NODE_MYPORT_1= @mysqld.1.port
|
||||
@ -43,4 +64,3 @@ NODE_MYSOCK_1= @mysqld.1.socket
|
||||
|
||||
NODE_MYPORT_2= @mysqld.2.port
|
||||
NODE_MYSOCK_2= @mysqld.2.socket
|
||||
|
||||
|
@ -11,6 +11,9 @@ log-bin=mysqld-bin
|
||||
binlog-format=row
|
||||
innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.1]
|
||||
#galera_port=@OPT.port
|
||||
@ -30,6 +33,9 @@ wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.2]
|
||||
#galera_port=@OPT.port
|
||||
@ -49,9 +55,15 @@ wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.3]
|
||||
server-id=3
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[ENV]
|
||||
NODE_MYPORT_1= @mysqld.1.port
|
||||
@ -62,9 +74,3 @@ NODE_MYSOCK_2= @mysqld.2.socket
|
||||
|
||||
NODE_MYPORT_3= @mysqld.3.port
|
||||
NODE_MYSOCK_3= @mysqld.3.socket
|
||||
|
||||
NODE_GALERAPORT_1= @mysqld.1.#galera_port
|
||||
NODE_GALERAPORT_2= @mysqld.2.#galera_port
|
||||
|
||||
NODE_SSTPORT_1= @mysqld.1.#sst_port
|
||||
NODE_SSTPORT_2= @mysqld.2.#sst_port
|
||||
|
@ -9,17 +9,13 @@
|
||||
binlog-format=row
|
||||
|
||||
[mysqld.1]
|
||||
log-bin
|
||||
server-id=1
|
||||
|
||||
[mysqld.2]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
|
||||
wsrep-on=1
|
||||
|
||||
log-bin
|
||||
log-bin=master-bin
|
||||
log-bin-index=master-bin
|
||||
log-slave-updates
|
||||
|
||||
innodb-autoinc-lock-mode=2
|
||||
@ -27,6 +23,33 @@ default-storage-engine=innodb
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
server-id=1
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.2]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
|
||||
log-bin=master-bin
|
||||
log-bin-index=master-bin
|
||||
log-slave-updates
|
||||
|
||||
innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||
@ -35,30 +58,18 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
server-id=2
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.3]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
|
||||
wsrep-on=1
|
||||
|
||||
log-bin
|
||||
log-slave-updates
|
||||
|
||||
innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
|
||||
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
log-bin=master-bin
|
||||
log-bin-index=master-bin
|
||||
server-id=3
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
|
||||
[ENV]
|
||||
NODE_MYPORT_1= @mysqld.1.port
|
||||
@ -69,9 +80,3 @@ NODE_MYSOCK_2= @mysqld.2.socket
|
||||
|
||||
NODE_MYPORT_3= @mysqld.3.port
|
||||
NODE_MYSOCK_3= @mysqld.3.socket
|
||||
|
||||
NODE_GALERAPORT_2= @mysqld.2.#galera_port
|
||||
NODE_GALERAPORT_3= @mysqld.3.#galera_port
|
||||
|
||||
NODE_SSTPORT_2= @mysqld.2.#sst_port
|
||||
NODE_SSTPORT_3= @mysqld.3.#sst_port
|
||||
|
@ -8,14 +8,15 @@
|
||||
[mysqld]
|
||||
log-bin
|
||||
binlog-format=row
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.1]
|
||||
server-id=1
|
||||
|
||||
[mysqld.2]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
|
||||
log-slave-updates
|
||||
|
||||
@ -24,19 +25,23 @@ default-storage-engine=innodb
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.install_timeout = PT15S;evs.max_install_timeouts=1;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;evs.install_timeout = PT15S;evs.max_install_timeouts=1;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
server-id=2
|
||||
server-id=1
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.3]
|
||||
[mysqld.2]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
|
||||
log-slave-updates
|
||||
|
||||
@ -44,7 +49,32 @@ innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.install_timeout=PT15S;evs.max_install_timeouts=1;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
server-id=2
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.3]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
|
||||
log-slave-updates
|
||||
|
||||
innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.install_timeout=PT15S;evs.max_install_timeouts=1;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
|
||||
@ -53,27 +83,15 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
server-id=3
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.4]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
|
||||
log-slave-updates
|
||||
|
||||
innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.4.#galera_port;evs.install_timeout=PT15S;evs.max_install_timeouts=1;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port'
|
||||
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
server-id=4
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[ENV]
|
||||
NODE_MYPORT_1= @mysqld.1.port
|
||||
@ -87,11 +105,3 @@ NODE_MYSOCK_3= @mysqld.3.socket
|
||||
|
||||
NODE_MYPORT_4= @mysqld.4.port
|
||||
NODE_MYSOCK_4= @mysqld.4.socket
|
||||
|
||||
NODE_GALERAPORT_2= @mysqld.2.#galera_port
|
||||
NODE_GALERAPORT_3= @mysqld.3.#galera_port
|
||||
NODE_GALERAPORT_4= @mysqld.4.#galera_port
|
||||
|
||||
NODE_SSTPORT_2= @mysqld.2.#sst_port
|
||||
NODE_SSTPORT_3= @mysqld.3.#sst_port
|
||||
NODE_SSTPORT_4= @mysqld.4.#sst_port
|
||||
|
@ -5,50 +5,68 @@
|
||||
binlog-format=row
|
||||
innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
wsrep-on=1
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_node_address=127.0.0.1
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep-causal-reads=ON
|
||||
wsrep-sync-wait=15
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.1]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[mysqld.2]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
|
||||
[mysqld.3]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
|
||||
[mysqld.4]
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.4.#galera_port;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port'
|
||||
# lock schedule alg appears to be VATS by default, and it is not
|
||||
# yet compatible with galera
|
||||
innodb_lock_schedule_algorithm=FCFS
|
||||
|
||||
[ENV]
|
||||
NODE_MYPORT_1= @mysqld.1.port
|
||||
@ -62,13 +80,3 @@ NODE_MYSOCK_3= @mysqld.3.socket
|
||||
|
||||
NODE_MYPORT_4= @mysqld.4.port
|
||||
NODE_MYSOCK_4= @mysqld.4.socket
|
||||
|
||||
NODE_GALERAPORT_1= @mysqld.1.#galera_port
|
||||
NODE_GALERAPORT_2= @mysqld.2.#galera_port
|
||||
NODE_GALERAPORT_3= @mysqld.3.#galera_port
|
||||
NODE_GALERAPORT_4= @mysqld.4.#galera_port
|
||||
|
||||
NODE_SSTPORT_1= @mysqld.1.#sst_port
|
||||
NODE_SSTPORT_2= @mysqld.2.#sst_port
|
||||
NODE_SSTPORT_3= @mysqld.3.#sst_port
|
||||
NODE_SSTPORT_4= @mysqld.4.#sst_port
|
||||
|
8
mysql-test/suite/galera/include/galera_base_port.inc
Normal file
8
mysql-test/suite/galera/include/galera_base_port.inc
Normal file
@ -0,0 +1,8 @@
|
||||
#
|
||||
# Extract base_port from galera node.
|
||||
#
|
||||
|
||||
# Convert "... base_port = N; ..." to "N; ..."
|
||||
--let $s1 = `SELECT SUBSTR(@@wsrep_provider_options, LOCATE('base_port =', @@wsrep_provider_options) + LENGTH('base_port = '))`
|
||||
# Convert "N; ..." to "N"
|
||||
--let $_NODE_GALERAPORT = `SELECT SUBSTR('$s1', 1, LOCATE(';', '$s1') - 1)`
|
90
mysql-test/suite/galera/include/galera_concurrent_test.inc
Normal file
90
mysql-test/suite/galera/include/galera_concurrent_test.inc
Normal file
@ -0,0 +1,90 @@
|
||||
#
|
||||
# Perform a quick concurrent test on two nodes using a set of predefined statements.
|
||||
#
|
||||
# Such tests are not deterministic, so we are hoping to catch assertions, slave apply errors
|
||||
# and cases where the two nodes diverge
|
||||
#
|
||||
# Parameters:
|
||||
# - $wsrep_trx_fragment_size
|
||||
# - $count
|
||||
# - $query_node_1
|
||||
# - $query_node_1a (optional)
|
||||
# - $query_node_2
|
||||
#
|
||||
|
||||
if (!$count) {
|
||||
--let $count = 50;
|
||||
}
|
||||
|
||||
if (!$node_1a_connected) {
|
||||
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
--let $node_1a_connected = 1
|
||||
}
|
||||
|
||||
--echo Running a concurrent test with the following queries:
|
||||
--echo $query_node_1
|
||||
--echo $query_node_1a
|
||||
--echo $query_node_2
|
||||
|
||||
--connection node_1
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
|
||||
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
--eval SET SESSION wsrep_trx_fragment_size = $wsrep_trx_fragment_size;
|
||||
|
||||
--connection node_1a
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
--eval SET SESSION wsrep_trx_fragment_size = $wsrep_trx_fragment_size;
|
||||
|
||||
--connection node_2
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
--eval SET SESSION wsrep_trx_fragment_size = $wsrep_trx_fragment_size;
|
||||
|
||||
--disable_query_log
|
||||
--let $i = `SELECT $count`
|
||||
while ($i)
|
||||
{
|
||||
--connection node_1
|
||||
--send_eval $query_node_1
|
||||
|
||||
--connection node_1a
|
||||
if ($query_node_1a) {
|
||||
--send_eval $query_node_1a
|
||||
}
|
||||
|
||||
--connection node_2
|
||||
--send_eval $query_node_2
|
||||
|
||||
--connection node_1
|
||||
--error 0,ER_QUERY_INTERRUPTED,ER_LOCK_DEADLOCK,ER_DUP_ENTRY
|
||||
--reap
|
||||
|
||||
--connection node_1a
|
||||
if ($query_node_1a) {
|
||||
--error 0,ER_QUERY_INTERRUPTED,ER_LOCK_DEADLOCK,ER_DUP_ENTRY
|
||||
--reap
|
||||
}
|
||||
|
||||
--connection node_2
|
||||
--error 0,ER_QUERY_INTERRUPTED,ER_LOCK_DEADLOCK,ER_DUP_ENTRY
|
||||
--reap
|
||||
--dec $i
|
||||
}
|
||||
|
||||
SET SESSION wsrep_sync_wait = 15;
|
||||
--enable_query_log
|
||||
|
||||
--let $diff_servers = 1 2
|
||||
--source include/diff_servers.inc
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--let $query_node_1 = ""
|
||||
--let $query_node_1a = ""
|
||||
--let $query_node_2 = ""
|
||||
|
||||
--echo Concurrent test end
|
28
mysql-test/suite/galera/include/galera_dump_sr_table.inc
Normal file
28
mysql-test/suite/galera/include/galera_dump_sr_table.inc
Normal file
@ -0,0 +1,28 @@
|
||||
#
|
||||
# Dump the contents of the SR table using mysqldump
|
||||
#
|
||||
|
||||
--let $sr_min = `SELECT MIN(seqno) FROM mysql.wsrep_streaming_log`
|
||||
--let $sr_max = `SELECT MAX(seqno) FROM mysql.wsrep_streaming_log`
|
||||
|
||||
--let $seqno = $sr_min
|
||||
while ($seqno <= $sr_max)
|
||||
{
|
||||
--let $sr_fragment_file = $MYSQLTEST_VARDIR/tmp/sr_fragment.log
|
||||
--exec rm -rf $sr_fragment_file
|
||||
--disable_query_log
|
||||
--eval SELECT frag FROM mysql.wsrep_streaming_log WHERE seqno = $seqno INTO DUMPFILE '$sr_fragment_file'
|
||||
--enable_query_log
|
||||
|
||||
--let $sr_binlog_file = $MYSQLTEST_VARDIR/tmp/sr_binlog.log
|
||||
--exec rm -rf $sr_binlog_file
|
||||
|
||||
--exec cp std_data/binlog-header.log $sr_binlog_file
|
||||
--exec cat $sr_fragment_file >> $sr_binlog_file
|
||||
|
||||
--replace_regex /SET TIMESTAMP=[0-9]+/SET TIMESTAMP=<TIMESTAMP>/ /#[0-9]+ +[0-9]+:[0-9]+:[0-9]+/<ISO TIMESTAMP>/ /pseudo_thread_id=[0-9]+/pseudo_thread_id=<PSEUDO_THREAD_ID>/ /thread_id=[0-9]+/thread_id=<QUERY_THREAD_ID>/ /table id [0-9]+/table id <TABLE_ID>/ /mapped to number [0-9]+/mapped to number <TABLE_ID>/ /auto_increment_increment=[0-9]+/auto_increment_increment=<AUTO_INCREMENT_INCREMENT>/ /auto_increment_offset=[0-9]+/auto_increment_offset=<AUTO_INCREMENT_OFFSET>/ /exec_time=[0-9]+/exec_time=<EXEC_TIME>/
|
||||
--exec $MYSQL_BINLOG --skip-gtids $sr_binlog_file --base64-output=decode-rows --start-position=120 | grep -v 'SET @' 2>&1
|
||||
|
||||
--inc $seqno
|
||||
}
|
||||
|
@ -2,7 +2,75 @@
|
||||
|
||||
--disable_query_log
|
||||
--eval SET GLOBAL wsrep_provider = '$wsrep_provider_orig';
|
||||
|
||||
#
|
||||
# count occurences of successful node starts in error log
|
||||
#
|
||||
perl;
|
||||
use strict;
|
||||
my $test_log=$ENV{'LOG_FILE'} or die "LOG_FILE not set";
|
||||
my $test_log_copy=$test_log . '.copy';
|
||||
if (-e $test_log_copy) {
|
||||
unlink $test_log_copy;
|
||||
}
|
||||
|
||||
EOF
|
||||
--copy_file $LOG_FILE $LOG_FILE.copy
|
||||
|
||||
#
|
||||
# now join to the cluster
|
||||
#
|
||||
--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig';
|
||||
|
||||
--enable_query_log
|
||||
|
||||
#
|
||||
# Cluster address change above, will launch SST/IST
|
||||
# if mysqldump ST has been configured, mysqld will close all
|
||||
# client connections, and it will be hard for us to poll for
|
||||
# cluster status during SST process, therefore wait_until_connected_again.inc
|
||||
# and wait_until_ready.inc may fail in this phase
|
||||
# To workaround this, we do first lazy polling here just to see when
|
||||
# client connections will be possible, and after that check for node readyness
|
||||
#
|
||||
--disable_result_log
|
||||
--disable_query_log
|
||||
|
||||
--error 0,1
|
||||
perl;
|
||||
use strict;
|
||||
my $logfile = $ENV{'LOG_FILE'} or die ("no error log file set");
|
||||
|
||||
my $counter = 1000;
|
||||
#my $found = false
|
||||
|
||||
while ($counter > 0) {
|
||||
|
||||
open(FILE, "$logfile") or die("Unable to open $logfile : $!\n");
|
||||
my $new_sync_count = () = grep(/Synchronized with group/g,<FILE>);
|
||||
close(FILE);
|
||||
|
||||
open(FILEN, "$logfile.copy") or die("Unable to open $logfile.copy : $!\n");
|
||||
my $old_sync_count = () = grep(/Synchronized with group/g,<FILEN>);
|
||||
close(FILEN);
|
||||
|
||||
if ($new_sync_count > $old_sync_count ) {
|
||||
exit(0);
|
||||
}
|
||||
$counter--;
|
||||
sleep(5);
|
||||
}
|
||||
exit(1);
|
||||
EOF
|
||||
if ($errno)
|
||||
{
|
||||
--echo "SST failed $errno"
|
||||
}
|
||||
|
||||
--remove_file $LOG_FILE.copy
|
||||
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
#--eval SET GLOBAL log_error = $log_error_;
|
||||
|
||||
--source include/galera_wait_ready.inc
|
||||
|
@ -20,7 +20,7 @@ CALL mtr.add_suppression("Can't open and lock time zone table");
|
||||
CALL mtr.add_suppression("Can't open and lock privilege tables");
|
||||
CALL mtr.add_suppression("Info table is not ready to be used");
|
||||
CALL mtr.add_suppression("Native table .* has the wrong structure");
|
||||
|
||||
CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist");
|
||||
--disable_query_log
|
||||
--eval SET GLOBAL wsrep_sst_method = '$wsrep_sst_method_orig';
|
||||
--eval SET GLOBAL wsrep_sst_receive_address = '$wsrep_sst_receive_address_orig';
|
||||
|
@ -55,6 +55,14 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||
--connection node_2
|
||||
--source suite/galera/include/galera_load_provider.inc
|
||||
|
||||
#
|
||||
# client connections were killed by provider load, so have to re-open here
|
||||
#
|
||||
--disconnect node_2
|
||||
--connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2
|
||||
--connection node_2
|
||||
--enable_reconnect
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||
--source include/wait_condition.inc
|
||||
|
||||
|
@ -3,5 +3,13 @@
|
||||
--let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address`
|
||||
--let $wsrep_provider_orig = `SELECT @@wsrep_provider`
|
||||
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
|
||||
--let $wsrep_error_log_orig = `SELECT @@log_error`
|
||||
if(!$wsrep_log_error_orig)
|
||||
{
|
||||
# MySQL Server on windows is started with --console and thus
|
||||
# does not know the location of its .err log, use default location
|
||||
let $wsrep_log_error_orig = $MYSQLTEST_VARDIR/log/mysqld.2.err;
|
||||
}
|
||||
--let LOG_FILE= $wsrep_log_error_orig
|
||||
|
||||
SET GLOBAL wsrep_provider = 'none';
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
create table t1 (i int, j int, k int, primary key pk(i)) engine=innodb;
|
||||
insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3);
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
|
||||
connection node_2;
|
||||
SET @@global.wsrep_desync = 1;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 CHAR(10), f0 integer) ENGINE=InnoDB;
|
||||
FLUSH TABLE t1 FOR EXPORT;
|
||||
|
47
mysql-test/suite/galera/r/GCF-1081.result
Normal file
47
mysql-test/suite/galera/r/GCF-1081.result
Normal file
@ -0,0 +1,47 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 0), (3, 0);
|
||||
CREATE PROCEDURE proc_update ()
|
||||
BEGIN
|
||||
UPDATE t1 SET f2 = 1 where f1 > 0;
|
||||
END|
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
CALL proc_update ();;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
connection node_1a;
|
||||
SET GLOBAL DEBUG = 'd,sync.wsrep_before_BF_victim_unlock';
|
||||
Warnings:
|
||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||
connection node_2;
|
||||
INSERT INTO t1 VALUES (2, 2);;
|
||||
connection node_1a;
|
||||
SET SESSION DEBUG_SYNC = 'now WAIT_FOR sync.wsrep_before_BF_victim_unlock_reached';
|
||||
SET GLOBAL DEBUG = '';
|
||||
Warnings:
|
||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 1
|
||||
2 2
|
||||
3 1
|
||||
connection node_1;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 1
|
||||
2 2
|
||||
3 1
|
||||
wsrep_local_replays
|
||||
1
|
||||
DROP PROCEDURE proc_update;
|
||||
DROP TABLE t1;
|
13
mysql-test/suite/galera/r/GCF-939.result
Normal file
13
mysql-test/suite/galera/r/GCF-939.result
Normal file
@ -0,0 +1,13 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
ERROR 42S02: Unknown table 'test.t1'
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
GRA_.log
|
||||
GRA_.log
|
||||
DROP TABLE t1;
|
||||
CALL mtr.add_suppression("Ignoring error 'Unknown table 'test.t1'' on query");
|
||||
connection node_2;
|
||||
CALL mtr.add_suppression("Error 'Unknown table 'test.t1'' on query");
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_2;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER);
|
||||
LOCK TABLE t1 WRITE;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
@ -24,7 +26,9 @@ RESET SLAVE ALL;
|
||||
CALL mtr.add_suppression('failed registering on master');
|
||||
CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work');
|
||||
connection node_1;
|
||||
set global wsrep_on=OFF;
|
||||
RESET MASTER;
|
||||
set global wsrep_on=ON;
|
||||
CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member');
|
||||
connection node_2;
|
||||
CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member');
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE parent1 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB;
|
||||
CREATE TABLE parent2 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB;
|
||||
CREATE TABLE child (
|
||||
|
@ -1,15 +1,24 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE ten (f1 INTEGER) Engine=InnoDB;
|
||||
INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
|
||||
INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
|
||||
INSERT INTO t1 (f1) SELECT 100000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;;
|
||||
INSERT INTO t1 (f1) VALUES (1), (2), (3);
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_desync = TRUE;
|
||||
SET wsrep_on = FALSE;
|
||||
ALTER TABLE t1 ADD PRIMARY KEY (f1);
|
||||
SET SESSION debug_sync = "alter_table_inplace_after_lock_upgrade SIGNAL mdl_locked WAIT_FOR mdl_continue";
|
||||
ALTER TABLE t1 ADD PRIMARY KEY (f1);;
|
||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_2a;
|
||||
SET SESSION debug_sync = "now WAIT_FOR mdl_locked";
|
||||
connection node_1;
|
||||
INSERT INTO t1(f1) VALUES (11);
|
||||
connection node_2a;
|
||||
SET debug_sync = "now SIGNAL mdl_continue";
|
||||
SET debug_sync='RESET';
|
||||
connection node_2;
|
||||
ERROR 70100: Query execution was interrupted
|
||||
SET wsrep_on = TRUE;
|
||||
SET GLOBAL wsrep_desync = FALSE;
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE ten;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE rand_table (f1 FLOAT);
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
|
||||
INSERT INTO t1 VALUES (1, 'a');
|
||||
@ -10,19 +12,28 @@ SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
|
||||
f1 f2
|
||||
2 a
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET SESSION wsrep_sync_wait=0;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
|
||||
connection node_1a;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
SELECT TIMEDIFF(SYSDATE(), NOW()) < 2;
|
||||
TIMEDIFF(SYSDATE(), NOW()) < 2
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
|
||||
INSERT INTO t1 (f1) VALUES (1);
|
||||
CREATE TABLE t2 (f1 CHAR(20)) ENGINE=InnoDB;
|
||||
@ -14,10 +16,6 @@ connection node_1X;
|
||||
CALL proc_update();;
|
||||
connection node_2;
|
||||
SET SESSION wsrep_retry_autocommit = 0;
|
||||
have_successes
|
||||
1
|
||||
have_deadlocks
|
||||
1
|
||||
connection node_1;
|
||||
connection node_1X;
|
||||
Got one of the listed errors
|
||||
@ -25,3 +23,22 @@ connection node_1;
|
||||
DROP PROCEDURE proc_update;
|
||||
DROP TABLE t1, t2;
|
||||
CALL mtr.add_suppression("conflict state 3 after post commit");
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (i int primary key, j int) engine=innodb;
|
||||
INSERT INTO t1 values (1,0);
|
||||
BEGIN;
|
||||
UPDATE t1 SET j=1 WHERE i=1;
|
||||
connection node_2;
|
||||
UPDATE t1 SET j=2 WHERE i=1;
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT * FROM t1;
|
||||
i j
|
||||
1 2
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
i j
|
||||
1 2
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
|
||||
INSERT INTO t1 (f1) VALUES (1);
|
||||
CREATE TABLE t2 (f1 CHAR(20)) ENGINE=InnoDB;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
|
||||
INSERT INTO t1 (f1) VALUES (1);
|
||||
CREATE TABLE t2 (f1 CHAR(20)) ENGINE=InnoDB;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (i INT) ENGINE = InnoDB;
|
||||
INSERT INTO t1 (i) VALUES(1);
|
||||
CREATE TABLE t2 (i INT) ENGINE = InnoDB;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
create table t1 (i int primary key, j int) engine=innodb;
|
||||
create table t2 (i int primary key, j int) engine=innodb;
|
||||
insert into t1 values (1,0);
|
||||
|
@ -1,10 +1,6 @@
|
||||
CALL mtr.add_suppression("WSREP: .*conflict state . after post commit .*");
|
||||
CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
|
||||
INSERT INTO t1 (f1) VALUES (1),(65535);
|
||||
FLUSH STATUS;
|
||||
SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays';
|
||||
VARIABLE_VALUE = 0
|
||||
1
|
||||
CREATE PROCEDURE proc_insert ()
|
||||
BEGIN
|
||||
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
|
||||
@ -16,10 +12,7 @@ END|
|
||||
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1b;
|
||||
CALL proc_insert();;
|
||||
connection node_2;
|
||||
CALL mtr.add_suppression("WSREP: Failed to report last committed .*");
|
||||
SELECT VARIABLE_VALUE > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays';
|
||||
VARIABLE_VALUE > 0
|
||||
wsrep_local_replays
|
||||
1
|
||||
connection node_1;
|
||||
connection node_1b;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
|
||||
INSERT INTO t1 values(0);
|
||||
connection node_1;
|
||||
|
@ -1,4 +1,6 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_slave_threads = 0;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect wsrep_slave_threads value: '0'
|
||||
|
41
mysql-test/suite/galera/r/MW-360.result
Normal file
41
mysql-test/suite/galera/r/MW-360.result
Normal file
@ -0,0 +1,41 @@
|
||||
SET GLOBAL wsrep_on=OFF;
|
||||
RESET MASTER;
|
||||
SET GLOBAL wsrep_on=ON;
|
||||
SET GLOBAL wsrep_on=OFF;
|
||||
RESET MASTER;
|
||||
SET GLOBAL wsrep_on=ON;
|
||||
CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
DROP TABLE t1;
|
||||
CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES (2);
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES (2);
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES (2);
|
||||
CREATE TEMPORARY TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t3 VALUES (3);
|
||||
DROP TABLE t1, t2, t3;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t2 VALUES (2);
|
||||
CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t3 VALUES (3);
|
||||
DROP TABLE t1, t2, t3;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
CREATE TEMPORARY TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t1;
|
||||
gtid_executed_equal
|
||||
1
|
@ -1,25 +1,36 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
|
||||
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER,
|
||||
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ;
|
||||
INSERT INTO p VALUES (1, 0);
|
||||
INSERT INTO p VALUES (2, 0);
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
START TRANSACTION;
|
||||
DELETE FROM p WHERE f1 = 1;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
INSERT INTO c VALUES (1, 1);
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
connection node_1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
connection node_2;
|
||||
SELECT * FROM p;
|
||||
f1 f2
|
||||
1 0
|
||||
@ -29,6 +40,7 @@ f1 p_id
|
||||
1 1
|
||||
DROP TABLE c;
|
||||
DROP TABLE p;
|
||||
connection node_1;
|
||||
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
|
||||
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER,
|
||||
f2 INTEGER,
|
||||
@ -36,22 +48,30 @@ CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ;
|
||||
INSERT INTO p VALUES (1, 0);
|
||||
INSERT INTO p VALUES (2, 0);
|
||||
INSERT INTO c VALUES (1, 1, 0);
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
START TRANSACTION;
|
||||
UPDATE p SET f2 = 1 WHERE f1 = 1;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
UPDATE c SET f2 = 1 WHERE f1 = 1;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM p;
|
||||
f1 f2
|
||||
1 1
|
||||
@ -61,28 +81,37 @@ f1 p_id f2
|
||||
1 1 1
|
||||
DROP TABLE c;
|
||||
DROP TABLE p;
|
||||
connection node_1;
|
||||
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
|
||||
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER,
|
||||
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ;
|
||||
INSERT INTO p VALUES (1, 0);
|
||||
INSERT INTO p VALUES (2, 0);
|
||||
INSERT INTO c VALUES (1, 1);
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
START TRANSACTION;
|
||||
UPDATE p SET f2 = 1 WHERE f1 = 1;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
DELETE FROM c WHERE f1 = 1;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM p;
|
||||
f1 f2
|
||||
1 1
|
||||
@ -95,23 +124,31 @@ CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER UNIQUE KEY) ENGINE=INNODB;
|
||||
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER,
|
||||
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f2)) ;
|
||||
INSERT INTO p VALUES (1, 0);
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
START TRANSACTION;
|
||||
UPDATE p SET f2 = 1 WHERE f1 = 1;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
INSERT INTO c VALUES (1, 0);;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
connection node_1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
connection node_2;
|
||||
SELECT * FROM p;
|
||||
f1 f2
|
||||
1 0
|
||||
@ -127,23 +164,31 @@ ON DELETE CASCADE) ;
|
||||
INSERT INTO p VALUES (1, 0);
|
||||
INSERT INTO p VALUES (2, 0);
|
||||
INSERT INTO c VALUES (1, 1, 0);
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
START TRANSACTION;
|
||||
DELETE FROM p WHERE f1 = 1;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
UPDATE c SET f2 = 1 WHERE f1 = 1;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
connection node_1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
connection node_2;
|
||||
SELECT * FROM p;
|
||||
f1 f2
|
||||
1 0
|
||||
@ -153,3 +198,87 @@ f1 p_id f2
|
||||
1 1 1
|
||||
DROP TABLE c;
|
||||
DROP TABLE p;
|
||||
#
|
||||
# Start of 10.4 tests
|
||||
#
|
||||
connection node_1;
|
||||
CREATE TABLE pf (f1 INTEGER PRIMARY KEY) ENGINE=INNODB;
|
||||
CREATE TABLE cf (
|
||||
f1 INTEGER PRIMARY KEY,
|
||||
p_id INTEGER,
|
||||
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES pf (f1)
|
||||
);
|
||||
INSERT INTO pf VALUES (1);
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
START TRANSACTION;
|
||||
INSERT INTO cf (f1, p_id) VALUES (10, 1);
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
INSERT INTO cf (f1, p_id) VALUES (20, 1);
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM pf;
|
||||
f1
|
||||
1
|
||||
SELECT * FROM cf;
|
||||
f1 p_id
|
||||
10 1
|
||||
20 1
|
||||
DROP TABLE cf;
|
||||
DROP TABLE pf;
|
||||
connection node_1;
|
||||
CREATE TABLE pg (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
|
||||
CREATE TABLE cg (f1 INTEGER PRIMARY KEY, p_id INTEGER,
|
||||
f2 INTEGER,
|
||||
CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES pg (f1)) ;
|
||||
INSERT INTO pg VALUES (1, 0);
|
||||
INSERT INTO pg VALUES (2, 0);
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
START TRANSACTION;
|
||||
UPDATE pg SET f2 = 1 WHERE f1 = 1;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
INSERT INTO cg VALUES (1, 1, 0);
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT * FROM pg;
|
||||
f1 f2
|
||||
1 1
|
||||
2 0
|
||||
SELECT * FROM cg;
|
||||
f1 p_id f2
|
||||
1 1 0
|
||||
DROP TABLE cg;
|
||||
DROP TABLE pg;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(255)) Engine=InnoDB;
|
||||
CREATE PROCEDURE insert_proc ()
|
||||
@ -18,7 +20,7 @@ connection node_1a;
|
||||
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
||||
connection node_1;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION DEBUG_SYNC = 'wsrep_after_replication SIGNAL wsrep_after_replication_reached WAIT_FOR wsrep_after_replication_continue';
|
||||
SET SESSION DEBUG_SYNC = 'wsrep_after_certification SIGNAL wsrep_after_certification_reached WAIT_FOR wsrep_after_certification_continue';
|
||||
CALL insert_proc ();;
|
||||
connection node_1a;
|
||||
SET SESSION DEBUG_SYNC = "now WAIT_FOR wsrep_after_replication_reached";
|
||||
@ -29,7 +31,7 @@ connection node_2;
|
||||
connection node_1;
|
||||
SELECT @errno = 1213;
|
||||
@errno = 1213
|
||||
0
|
||||
1
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 node 2
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1;
|
||||
CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
|
||||
@ -20,14 +22,14 @@ connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
connection node_1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
@ -60,14 +62,14 @@ connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
connection node_1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
@ -102,14 +104,14 @@ connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
connection node_1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
@ -135,14 +137,14 @@ connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
connection node_1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
@ -159,8 +161,10 @@ DROP TABLE p;
|
||||
connection node_1;
|
||||
CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
|
||||
CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
|
||||
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER, f2 INTEGER,
|
||||
CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1) ON DELETE CASCADE,
|
||||
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
|
||||
f2 INTEGER,
|
||||
CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1)
|
||||
ON DELETE CASCADE,
|
||||
CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1));
|
||||
INSERT INTO p1 VALUES (1, 0);
|
||||
INSERT INTO p2 VALUES (1, 0);
|
||||
@ -179,14 +183,14 @@ connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
@ -197,4 +201,52 @@ f1 f2
|
||||
1 2
|
||||
SELECT * FROM c;
|
||||
f1 p1_id p2_id f2
|
||||
DROP TABLE c;
|
||||
DROP TABLE p1;
|
||||
DROP TABLE p2;
|
||||
connection node_1;
|
||||
CREATE TABLE p1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
|
||||
CREATE TABLE p2 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB;
|
||||
CREATE TABLE c (f1 INTEGER PRIMARY KEY, p1_id INTEGER, p2_id INTEGER,
|
||||
f2 INTEGER,
|
||||
CONSTRAINT fk_1 FOREIGN KEY (p1_id) REFERENCES p1 (f1)
|
||||
ON DELETE CASCADE,
|
||||
CONSTRAINT fk_2 FOREIGN KEY (p2_id) REFERENCES p2 (f1)
|
||||
ON DELETE CASCADE);
|
||||
INSERT INTO p1 VALUES (1, 0);
|
||||
INSERT INTO p2 VALUES (1, 0);
|
||||
INSERT INTO c VALUES (1, 1, 1, 0);
|
||||
connection node_1a;
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
START TRANSACTION;
|
||||
DELETE FROM p2 WHERE f1=1;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
DELETE FROM p1 WHERE f1=1;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
connection node_1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
connection node_2;
|
||||
SELECT * FROM p1;
|
||||
f1 f2
|
||||
SELECT * FROM p2;
|
||||
f1 f2
|
||||
1 0
|
||||
SELECT * FROM c;
|
||||
f1 p1_id p2_id f2
|
||||
DROP TABLE c,p1,p2;
|
||||
|
@ -109,6 +109,5 @@ mtr
|
||||
mysql
|
||||
performance_schema
|
||||
test
|
||||
SHOW GLOBAL STATUS LIKE 'wsrep_replicated';
|
||||
Variable_name Value
|
||||
wsrep_replicated 3
|
||||
wsrep_replicated_after_diff
|
||||
1
|
||||
|
@ -1,11 +1,13 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SET @orig_debug=@@debug;
|
||||
connection node_2;
|
||||
SELECT @@debug_sync;
|
||||
@@debug_sync
|
||||
ON - current signal: ''
|
||||
set debug_sync='RESET';
|
||||
SET SESSION wsrep_sync_wait = 1;
|
||||
SET GLOBAL debug = "+d,sync.wsrep_apply_cb";
|
||||
Warnings:
|
||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||
SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
|
||||
connection node_1;
|
||||
CREATE TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t_wait1 VALUES (1);
|
||||
@ -36,16 +38,11 @@ SHOW TABLES;
|
||||
SHOW TRIGGERS;
|
||||
SHOW GLOBAL VARIABLES LIKE 'foo_bar';
|
||||
SHOW WARNINGS;
|
||||
SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
|
||||
Warnings:
|
||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||
SET GLOBAL debug_dbug = @orig_debug;
|
||||
SET SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb";
|
||||
SET debug_sync='RESET';
|
||||
SET SESSION wsrep_sync_wait = default;
|
||||
DROP TABLE t_wait1;
|
||||
SET GLOBAL debug = NULL;
|
||||
Warnings:
|
||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||
SET debug_sync='RESET';
|
||||
SELECT @@debug_sync;
|
||||
@@debug_sync
|
||||
ON - current signal: ''
|
||||
|
@ -1,11 +1,12 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SET @orig_debug=@@debug;
|
||||
connection node_2;
|
||||
SELECT @@debug_sync;
|
||||
@@debug_sync
|
||||
ON - current signal: ''
|
||||
SET SESSION wsrep_sync_wait = 8;
|
||||
SET GLOBAL debug = "+d,sync.wsrep_apply_cb";
|
||||
Warnings:
|
||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||
SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
|
||||
connection node_1;
|
||||
CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t_wait8 VALUES (1);
|
||||
@ -38,16 +39,11 @@ SHOW TABLES;
|
||||
SHOW TRIGGERS;
|
||||
SHOW GLOBAL VARIABLES LIKE 'foo_bar';
|
||||
SHOW WARNINGS;
|
||||
SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
|
||||
Warnings:
|
||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||
SET GLOBAL debug_dbug = @orig_debug;
|
||||
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||
SET debug_sync='RESET';
|
||||
SET SESSION wsrep_sync_wait = default;
|
||||
DROP TABLE t_wait8;
|
||||
SET GLOBAL debug = NULL;
|
||||
Warnings:
|
||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||
SET debug_sync='RESET';
|
||||
SELECT @@debug_sync;
|
||||
@@debug_sync
|
||||
ON - current signal: ''
|
||||
|
78
mysql-test/suite/galera/r/MW-86.result
Normal file
78
mysql-test/suite/galera/r/MW-86.result
Normal file
@ -0,0 +1,78 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SET SESSION wsrep_sync_wait = 1;
|
||||
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
|
||||
Warnings:
|
||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||
connection node_1;
|
||||
CREATE DATABASE db1;
|
||||
CREATE TABLE bar (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO bar VALUES (1);
|
||||
connection node_2;
|
||||
SHOW BINARY LOGS;
|
||||
SHOW BINLOG EVENTS;
|
||||
SHOW COLUMNS FROM t1;
|
||||
SHOW CREATE DATABASE db1;
|
||||
SHOW CREATE EVENT e1;
|
||||
SHOW CREATE FUNCTION f1;
|
||||
SHOW CREATE PROCEDURE p1;
|
||||
SHOW CREATE TABLE t1;
|
||||
SHOW CREATE TRIGGER tr1;
|
||||
SHOW CREATE VIEW v1;
|
||||
SHOW DATABASES;
|
||||
SHOW ENGINE InnoDB STATUS;
|
||||
SHOW FUNCTION CODE f1;
|
||||
SHOW FUNCTION STATUS;
|
||||
SHOW GRANTS FOR 'root'@'localhost';
|
||||
SHOW INDEX FROM t1;
|
||||
SHOW OPEN TABLES;
|
||||
SHOW PROCEDURE CODE p1;
|
||||
SHOW PROCEDURE STATUS;
|
||||
SHOW PRIVILEGES;
|
||||
SHOW STATUS LIKE 'wsrep_cluster_size';
|
||||
SHOW TABLE STATUS;
|
||||
SHOW TABLES;
|
||||
SHOW TRIGGERS;
|
||||
SHOW GLOBAL VARIABLES LIKE 'foo_bar';
|
||||
SHOW WARNINGS;
|
||||
SET GLOBAL DEBUG = "";
|
||||
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||
SET SESSION wsrep_sync_wait = 8;
|
||||
DROP DATABASE db1;
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S";
|
||||
SET SESSION wsrep_sync_wait = 8;
|
||||
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
|
||||
connection node_1;
|
||||
CREATE TABLE q (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO q VALUES (1);
|
||||
connection node_2;
|
||||
SHOW BINARY LOGS;
|
||||
SHOW BINLOG EVENTS;
|
||||
SHOW COLUMNS FROM t1;
|
||||
SHOW CREATE DATABASE db1;
|
||||
SHOW CREATE EVENT e1;
|
||||
SHOW CREATE FUNCTION f1;
|
||||
SHOW CREATE PROCEDURE p1;
|
||||
SHOW CREATE TABLE t1;
|
||||
SHOW CREATE TRIGGER tr1;
|
||||
SHOW CREATE VIEW v1;
|
||||
SHOW DATABASES;
|
||||
SHOW ENGINE InnoDB STATUS;
|
||||
SHOW FUNCTION CODE f1;
|
||||
SHOW FUNCTION STATUS;
|
||||
SHOW GRANTS FOR 'root'@'localhost';
|
||||
SHOW INDEX FROM t1;
|
||||
SHOW OPEN TABLES;
|
||||
SHOW PROCEDURE CODE p1;
|
||||
SHOW PROCEDURE STATUS;
|
||||
SHOW PRIVILEGES;
|
||||
SHOW STATUS LIKE 'wsrep_cluster_size';
|
||||
SHOW TABLE STATUS;
|
||||
SHOW TABLES;
|
||||
SHOW TRIGGERS;
|
||||
SHOW GLOBAL VARIABLES LIKE 'foo_bar';
|
||||
SHOW WARNINGS;
|
||||
SET GLOBAL DEBUG = "";
|
||||
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
USE test;
|
||||
CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
# On node_1
|
||||
connection node_1;
|
||||
SET @binlog_checksum_saved= @@GLOBAL.BINLOG_CHECKSUM;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
#
|
||||
# MDEV-6924 : Server crashed on CREATE TABLE ... SELECT
|
||||
#
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
#
|
||||
# MDEV-8831 : enforce_storage_engine doesn't block table creation on
|
||||
# other nodes (galera cluster)
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
#
|
||||
# MDEV-9312: storage engine not enforced during galera cluster
|
||||
# replication
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
SAVEPOINT in a stored function should be forbidden
|
||||
CREATE FUNCTION f1 () RETURNS INT BEGIN
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
USE test;
|
||||
|
||||
# On node_1
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_2;
|
||||
|
@ -1,10 +1,18 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_2;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET GLOBAL wsrep_provider_options="gmcast.isolate=2";
|
||||
connection node_1;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SHOW STATUS LIKE 'wsrep_cluster_status';
|
||||
Variable_name Value
|
||||
wsrep_cluster_status non-Primary
|
||||
SET SESSION wsrep_sync_wait = default;
|
||||
SET GLOBAL wsrep_provider_options="pc.bootstrap=1";
|
||||
connection node_2;
|
||||
SET SESSION wsrep_on=0;
|
||||
connection node_2;
|
||||
CALL mtr.add_suppression("WSREP: exception from gcomm, backend must be restarted: Gcomm backend termination was requested by setting gmcast.isolate=2.");
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_sync_wait=0;
|
||||
SET SESSION wsrep_sync_wait=DEFAULT;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE user(id int primary key, j int) ENGINE=InnoDB;
|
||||
CREATE TABLE user_session(id int primary key, fk1 int, fk2 int) ENGINE=InnoDB;
|
||||
alter table user_session add foreign key (fk1) references user(id);
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
DROP TABLE IF EXISTS x1, x2;
|
||||
connection node_1;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
ALTER TABLE t1 ENGINE=InnoDB;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SET GLOBAL wsrep_replicate_myisam = TRUE;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
ALTER TABLE t1 FORCE;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION lock_wait_timeout = 60;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||
START SLAVE;
|
||||
connection node_1;
|
||||
@ -54,4 +56,6 @@ STOP SLAVE;
|
||||
RESET SLAVE ALL;
|
||||
CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work');
|
||||
connection node_1;
|
||||
set global wsrep_on=OFF;
|
||||
RESET MASTER;
|
||||
set global wsrep_on=ON;
|
||||
|
@ -5,55 +5,19 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
uuids_do_not_match
|
||||
1
|
||||
SHOW BINLOG EVENTS IN 'mysqld-bin.000002' FROM 120;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
mysqld-bin.000002 120 Previous_gtids 1 151
|
||||
mysqld-bin.000002 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= '<effective_uuid>:1'
|
||||
mysqld-bin.000002 199 Query 1 327 use `test`; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB
|
||||
mysqld-bin.000002 327 Gtid 1 375 SET @@SESSION.GTID_NEXT= '<effective_uuid>:2'
|
||||
mysqld-bin.000002 375 Query 1 452 BEGIN
|
||||
mysqld-bin.000002 452 Table_map 1 497 table_id: # (test.t1)
|
||||
mysqld-bin.000002 497 Write_rows 1 537 table_id: # flags: STMT_END_F
|
||||
mysqld-bin.000002 537 Xid 1 568 COMMIT /* xid=# */
|
||||
INSERT INTO t1 VALUES(2);
|
||||
uuids_do_not_match
|
||||
1
|
||||
uuids_match
|
||||
1
|
||||
SHOW BINLOG EVENTS IN 'mysqld-bin.000003' FROM 120;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
mysqld-bin.000003 120 Previous_gtids 2 151
|
||||
mysqld-bin.000003 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= '<effective_uuid>:1'
|
||||
mysqld-bin.000003 199 Query 1 327 use `test`; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB
|
||||
mysqld-bin.000003 327 Gtid 1 375 SET @@SESSION.GTID_NEXT= '<effective_uuid>:2'
|
||||
mysqld-bin.000003 375 Query 1 443 BEGIN
|
||||
mysqld-bin.000003 443 Table_map 1 488 table_id: # (test.t1)
|
||||
mysqld-bin.000003 488 Write_rows 1 528 table_id: # flags: STMT_END_F
|
||||
mysqld-bin.000003 528 Xid 1 559 COMMIT /* xid=# */
|
||||
mysqld-bin.000003 559 Gtid 2 607 SET @@SESSION.GTID_NEXT= '<effective_uuid>:3'
|
||||
mysqld-bin.000003 607 Query 2 684 BEGIN
|
||||
mysqld-bin.000003 684 Table_map 2 729 table_id: # (test.t1)
|
||||
mysqld-bin.000003 729 Write_rows 2 769 table_id: # flags: STMT_END_F
|
||||
mysqld-bin.000003 769 Xid 2 800 COMMIT /* xid=# */
|
||||
uuids_do_not_match
|
||||
1
|
||||
uuids_match
|
||||
1
|
||||
SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
mysqld-bin.000001 120 Previous_gtids 3 151
|
||||
mysqld-bin.000001 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= '<effective_uuid>:1'
|
||||
mysqld-bin.000001 199 Query 1 327 use `test`; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB
|
||||
mysqld-bin.000001 327 Gtid 1 375 SET @@SESSION.GTID_NEXT= '<effective_uuid>:2'
|
||||
mysqld-bin.000001 375 Query 1 443 BEGIN
|
||||
mysqld-bin.000001 443 Table_map 1 488 table_id: # (test.t1)
|
||||
mysqld-bin.000001 488 Write_rows 1 528 table_id: # flags: STMT_END_F
|
||||
mysqld-bin.000001 528 Xid 1 559 COMMIT /* xid=# */
|
||||
mysqld-bin.000001 559 Gtid 2 607 SET @@SESSION.GTID_NEXT= '<effective_uuid>:3'
|
||||
mysqld-bin.000001 607 Query 2 675 BEGIN
|
||||
mysqld-bin.000001 675 Table_map 2 720 table_id: # (test.t1)
|
||||
mysqld-bin.000001 720 Write_rows 2 760 table_id: # flags: STMT_END_F
|
||||
mysqld-bin.000001 760 Xid 2 791 COMMIT /* xid=# */
|
||||
DROP TABLE t1;
|
||||
gtid_executed_equal
|
||||
1
|
||||
gtid_executed_equal
|
||||
1
|
||||
STOP SLAVE;
|
||||
RESET SLAVE ALL;
|
||||
|
@ -2,6 +2,8 @@
|
||||
# MDEV-9044 : Getting binlog corruption on my Galera cluster (10.1.8)
|
||||
# making it impossible to async slave.
|
||||
#
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||
START SLAVE;
|
||||
connection node_1;
|
||||
|
@ -1,12 +1,14 @@
|
||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||
connection node_2;
|
||||
START SLAVE;
|
||||
connection node_1;
|
||||
connection node_3;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
connection node_2;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 2 FROM t1;
|
||||
COUNT(*) = 2
|
||||
1
|
||||
@ -15,10 +17,10 @@ connection node_2;
|
||||
SELECT COUNT(*) = 3 FROM t1;
|
||||
COUNT(*) = 3
|
||||
1
|
||||
connection node_1;
|
||||
connection node_3;
|
||||
DROP TABLE t1;
|
||||
connection node_2;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE ALL;
|
||||
connection node_1;
|
||||
connection node_3;
|
||||
RESET MASTER;
|
||||
|
@ -1,7 +1,9 @@
|
||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||
connection node_2;
|
||||
START SLAVE;
|
||||
connection node_1;
|
||||
connection node_3;
|
||||
SET SESSION binlog_format='STATEMENT';
|
||||
CREATE TABLE t1 (
|
||||
i int(11) NOT NULL AUTO_INCREMENT,
|
||||
@ -60,7 +62,7 @@ binlog_format ROW
|
||||
show variables like 'auto_increment_increment';
|
||||
Variable_name Value
|
||||
auto_increment_increment 2
|
||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||
connection node_1;
|
||||
select * from t1;
|
||||
i c
|
||||
1 dummy_text
|
||||
@ -79,10 +81,10 @@ binlog_format ROW
|
||||
show variables like 'auto_increment_increment';
|
||||
Variable_name Value
|
||||
auto_increment_increment 2
|
||||
connection node_1;
|
||||
connection node_3;
|
||||
DROP TABLE t1;
|
||||
connection node_2;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE ALL;
|
||||
connection node_1;
|
||||
connection node_3;
|
||||
RESET MASTER;
|
||||
|
@ -1,7 +1,9 @@
|
||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||
connection node_2;
|
||||
START SLAVE;
|
||||
connection node_1;
|
||||
connection node_3;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
SELECT LENGTH(@@global.gtid_binlog_state) > 1;
|
||||
@ -10,15 +12,15 @@ LENGTH(@@global.gtid_binlog_state) > 1
|
||||
connection node_2;
|
||||
gtid_binlog_state_equal
|
||||
1
|
||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
gtid_binlog_state_equal
|
||||
1
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
connection node_3;
|
||||
DROP TABLE t1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE ALL;
|
||||
|
@ -0,0 +1,159 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||
connection node_1;
|
||||
SET global wsrep_on=OFF;
|
||||
RESET MASTER;
|
||||
SET global wsrep_on=ON;
|
||||
connection node_3;
|
||||
RESET MASTER;
|
||||
connection node_2;
|
||||
SET global wsrep_on=OFF;
|
||||
RESET MASTER;
|
||||
SET global wsrep_on=ON;
|
||||
START SLAVE;
|
||||
connection node_3;
|
||||
CREATE SCHEMA test1;
|
||||
CREATE SCHEMA test2;
|
||||
USE test1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB;
|
||||
USE test2;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB;
|
||||
INSERT INTO test1.t1 (f1) VALUES (1);
|
||||
INSERT INTO test2.t1 (f1) VALUES (1);
|
||||
INSERT INTO test1.t1 (f1) VALUES (2);
|
||||
INSERT INTO test2.t1 (f1) VALUES (2);
|
||||
INSERT INTO test1.t1 (f1) VALUES (3);
|
||||
INSERT INTO test2.t1 (f1) VALUES (3);
|
||||
UPDATE test2.t1 SET test2.t1.f2 = 'cde';
|
||||
UPDATE test1.t1, test2.t1 SET test1.t1.f2 = 'klm', test2.t1.f2 = 'xyz';
|
||||
DELETE test1.t1, test2.t1 FROM test1.t1 INNER JOIN test2.t1 WHERE test1.t1.f1 = test2.t1.f1 AND test1.t1.f1 = 3;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO test2.t1 (f1) VALUES (999);
|
||||
INSERT INTO test2.t1 (f1) VALUES (9999);
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO test1.t1 (f1) VALUES (111);
|
||||
INSERT INTO test1.t1 (f1) VALUES (222);
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO test1.t1 (f1) VALUES (333);
|
||||
INSERT INTO test2.t1 (f1) VALUES (99999);
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SHOW BINLOG EVENTS IN 'master-bin.000001' FROM 256;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 256 Gtid_list 2 285 []
|
||||
master-bin.000001 285 Binlog_checkpoint 2 329 master-bin.000001
|
||||
master-bin.000001 329 Gtid 3 371 GTID 0-3-1
|
||||
master-bin.000001 371 Query 3 458 CREATE SCHEMA test1
|
||||
master-bin.000001 458 Gtid 3 500 GTID 0-3-3
|
||||
master-bin.000001 500 Query 3 647 use `test1`; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB
|
||||
master-bin.000001 647 Gtid 3 689 BEGIN GTID 0-3-5
|
||||
master-bin.000001 689 Annotate_rows 3 748 INSERT INTO test1.t1 (f1) VALUES (1)
|
||||
master-bin.000001 748 Table_map 3 797 table_id: ### (test1.t1)
|
||||
master-bin.000001 797 Write_rows_v1 3 839 table_id: ### flags: STMT_END_F
|
||||
master-bin.000001 839 Xid 3 870 COMMIT /* xid=### */
|
||||
master-bin.000001 870 Gtid 3 912 BEGIN GTID 0-3-7
|
||||
master-bin.000001 912 Annotate_rows 3 971 INSERT INTO test1.t1 (f1) VALUES (2)
|
||||
master-bin.000001 971 Table_map 3 1020 table_id: ### (test1.t1)
|
||||
master-bin.000001 1020 Write_rows_v1 3 1062 table_id: ### flags: STMT_END_F
|
||||
master-bin.000001 1062 Xid 3 1093 COMMIT /* xid=### */
|
||||
master-bin.000001 1093 Gtid 3 1135 BEGIN GTID 0-3-9
|
||||
master-bin.000001 1135 Annotate_rows 3 1194 INSERT INTO test1.t1 (f1) VALUES (3)
|
||||
master-bin.000001 1194 Table_map 3 1243 table_id: ### (test1.t1)
|
||||
master-bin.000001 1243 Write_rows_v1 3 1285 table_id: ### flags: STMT_END_F
|
||||
master-bin.000001 1285 Xid 3 1316 COMMIT /* xid=### */
|
||||
master-bin.000001 1316 Gtid 3 1358 BEGIN GTID 0-3-12
|
||||
master-bin.000001 1358 Annotate_rows 3 1451 UPDATE test1.t1, test2.t1 SET test1.t1.f2 = 'klm', test2.t1.f2 = 'xyz'
|
||||
master-bin.000001 1451 Table_map 3 1500 table_id: ### (test1.t1)
|
||||
master-bin.000001 1500 Update_rows_v1 3 1588 table_id: ### flags: STMT_END_F
|
||||
master-bin.000001 1588 Xid 3 1619 COMMIT /* xid=### */
|
||||
master-bin.000001 1619 Gtid 3 1661 BEGIN GTID 0-3-13
|
||||
master-bin.000001 1661 Annotate_rows 3 1795 DELETE test1.t1, test2.t1 FROM test1.t1 INNER JOIN test2.t1 WHERE test1.t1.f1 = test2.t1.f1 AND test1.t1.f1 = 3
|
||||
master-bin.000001 1795 Table_map 3 1844 table_id: ### (test1.t1)
|
||||
master-bin.000001 1844 Delete_rows_v1 3 1886 table_id: ### flags: STMT_END_F
|
||||
master-bin.000001 1886 Xid 3 1917 COMMIT /* xid=### */
|
||||
master-bin.000001 1917 Gtid 3 1959 BEGIN GTID 0-3-15
|
||||
master-bin.000001 1959 Annotate_rows 3 2020 INSERT INTO test1.t1 (f1) VALUES (111)
|
||||
master-bin.000001 2020 Table_map 3 2069 table_id: ### (test1.t1)
|
||||
master-bin.000001 2069 Write_rows_v1 3 2111 table_id: ### flags: STMT_END_F
|
||||
master-bin.000001 2111 Annotate_rows 3 2172 INSERT INTO test1.t1 (f1) VALUES (222)
|
||||
master-bin.000001 2172 Table_map 3 2221 table_id: ### (test1.t1)
|
||||
master-bin.000001 2221 Write_rows_v1 3 2263 table_id: ### flags: STMT_END_F
|
||||
master-bin.000001 2263 Xid 3 2294 COMMIT /* xid=### */
|
||||
master-bin.000001 2294 Gtid 3 2336 BEGIN GTID <effective_uuid>
|
||||
master-bin.000001 2336 Annotate_rows 3 2397 INSERT INTO test1.t1 (f1) VALUES (333)
|
||||
master-bin.000001 2397 Table_map 3 2446 table_id: ### (test1.t1)
|
||||
master-bin.000001 2446 Write_rows_v1 3 2488 table_id: ### flags: STMT_END_F
|
||||
master-bin.000001 2488 Xid 3 2519 COMMIT /* xid=### */
|
||||
connection node_1;
|
||||
gtid_executed_equal
|
||||
0
|
||||
SHOW BINLOG EVENTS IN 'master-bin.000001' FROM 256;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 256 Gtid_list 1 285 []
|
||||
master-bin.000001 285 Binlog_checkpoint 1 329 master-bin.000001
|
||||
master-bin.000001 329 Gtid 3 371 GTID 0-3-1
|
||||
master-bin.000001 371 Query 3 458 CREATE SCHEMA test1
|
||||
master-bin.000001 458 Gtid 3 500 GTID 0-3-2
|
||||
master-bin.000001 500 Query 3 647 use `test1`; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY,f2 CHAR(5) DEFAULT 'abc') ENGINE=InnoDB
|
||||
master-bin.000001 647 Gtid 3 689 BEGIN GTID 0-3-3
|
||||
master-bin.000001 689 Annotate_rows 3 748 INSERT INTO test1.t1 (f1) VALUES (1)
|
||||
master-bin.000001 748 Table_map 3 797 table_id: ### (test1.t1)
|
||||
master-bin.000001 797 Write_rows_v1 3 839 table_id: ### flags: STMT_END_F
|
||||
master-bin.000001 839 Xid 3 870 COMMIT /* xid=### */
|
||||
master-bin.000001 870 Gtid 3 912 BEGIN GTID 0-3-4
|
||||
master-bin.000001 912 Annotate_rows 3 971 INSERT INTO test1.t1 (f1) VALUES (2)
|
||||
master-bin.000001 971 Table_map 3 1020 table_id: ### (test1.t1)
|
||||
master-bin.000001 1020 Write_rows_v1 3 1062 table_id: ### flags: STMT_END_F
|
||||
master-bin.000001 1062 Xid 3 1093 COMMIT /* xid=### */
|
||||
master-bin.000001 1093 Gtid 3 1135 BEGIN GTID 0-3-5
|
||||
master-bin.000001 1135 Annotate_rows 3 1194 INSERT INTO test1.t1 (f1) VALUES (3)
|
||||
master-bin.000001 1194 Table_map 3 1243 table_id: ### (test1.t1)
|
||||
master-bin.000001 1243 Write_rows_v1 3 1285 table_id: ### flags: STMT_END_F
|
||||
master-bin.000001 1285 Xid 3 1316 COMMIT /* xid=### */
|
||||
master-bin.000001 1316 Gtid 3 1358 BEGIN GTID 0-3-6
|
||||
master-bin.000001 1358 Annotate_rows 3 1451 UPDATE test1.t1, test2.t1 SET test1.t1.f2 = 'klm', test2.t1.f2 = 'xyz'
|
||||
master-bin.000001 1451 Table_map 3 1500 table_id: ### (test1.t1)
|
||||
master-bin.000001 1500 Update_rows_v1 3 1588 table_id: ### flags: STMT_END_F
|
||||
master-bin.000001 1588 Xid 3 1619 COMMIT /* xid=### */
|
||||
master-bin.000001 1619 Gtid 3 1661 BEGIN GTID 0-3-7
|
||||
master-bin.000001 1661 Annotate_rows 3 1795 DELETE test1.t1, test2.t1 FROM test1.t1 INNER JOIN test2.t1 WHERE test1.t1.f1 = test2.t1.f1 AND test1.t1.f1 = 3
|
||||
master-bin.000001 1795 Table_map 3 1844 table_id: ### (test1.t1)
|
||||
master-bin.000001 1844 Delete_rows_v1 3 1886 table_id: ### flags: STMT_END_F
|
||||
master-bin.000001 1886 Xid 3 1917 COMMIT /* xid=### */
|
||||
master-bin.000001 1917 Gtid 3 1959 BEGIN GTID 0-3-8
|
||||
master-bin.000001 1959 Annotate_rows 3 2020 INSERT INTO test1.t1 (f1) VALUES (111)
|
||||
master-bin.000001 2020 Table_map 3 2069 table_id: ### (test1.t1)
|
||||
master-bin.000001 2069 Write_rows_v1 3 2111 table_id: ### flags: STMT_END_F
|
||||
master-bin.000001 2111 Annotate_rows 3 2172 INSERT INTO test1.t1 (f1) VALUES (222)
|
||||
master-bin.000001 2172 Table_map 3 2221 table_id: ### (test1.t1)
|
||||
master-bin.000001 2221 Write_rows_v1 3 2263 table_id: ### flags: STMT_END_F
|
||||
master-bin.000001 2263 Xid 3 2294 COMMIT /* xid=### */
|
||||
master-bin.000001 2294 Gtid 3 2336 BEGIN GTID 0-3-9
|
||||
master-bin.000001 2336 Annotate_rows 3 2397 INSERT INTO test1.t1 (f1) VALUES (333)
|
||||
master-bin.000001 2397 Table_map 3 2446 table_id: ### (test1.t1)
|
||||
master-bin.000001 2446 Write_rows_v1 3 2488 table_id: ### flags: STMT_END_F
|
||||
master-bin.000001 2488 Xid 3 2519 COMMIT /* xid=### */
|
||||
include/diff_servers.inc [servers=1 2]
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 2 FROM test1.t1 WHERE f1 IN (1,2);
|
||||
COUNT(*) = 2
|
||||
1
|
||||
SELECT COUNT(*) = 3 FROM test1.t1 WHERE f1 IN (111,222,333);
|
||||
COUNT(*) = 3
|
||||
1
|
||||
SELECT COUNT(*) = 2 FROM test1.t1 WHERE f2 = 'klm';
|
||||
COUNT(*) = 2
|
||||
1
|
||||
USE test2;
|
||||
ERROR 42000: Unknown database 'test2'
|
||||
connection node_3;
|
||||
DROP SCHEMA test1;
|
||||
DROP SCHEMA test2;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE ALL;
|
@ -0,0 +1,315 @@
|
||||
RESET MASTER;
|
||||
SET global wsrep_on=OFF;
|
||||
RESET MASTER;
|
||||
SET global wsrep_on=ON;
|
||||
SET global wsrep_on=OFF;
|
||||
RESET MASTER;
|
||||
SET global wsrep_on=ON;
|
||||
START SLAVE USER='root';
|
||||
Warnings:
|
||||
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
|
||||
CREATE SCHEMA test1;
|
||||
CREATE SCHEMA test2;
|
||||
USE test1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
USE test2;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO test1.t1 (f1) VALUES (1);
|
||||
INSERT INTO test2.t1 (f1) VALUES (1);
|
||||
INSERT INTO test1.t1 (f1) VALUES (2);
|
||||
INSERT INTO test2.t1 (f1) VALUES (2);
|
||||
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
|
||||
INSERT INTO test1.t1 (f1) VALUES (3);
|
||||
INSERT INTO test2.t1 (f1) VALUES (3);
|
||||
INSERT INTO test1.t1 (f1) VALUES (3);
|
||||
INSERT INTO test2.t1 (f1) VALUES (3);
|
||||
INSERT INTO test1.t1 (f1) VALUES (3);
|
||||
INSERT INTO test2.t1 (f1) VALUES (3);
|
||||
INSERT INTO test1.t1 (f1) VALUES (3);
|
||||
INSERT INTO test2.t1 (f1) VALUES (3);
|
||||
SET SESSION wsrep_on=OFF;
|
||||
include/wait_for_slave_sql_error.inc [errno=1047]
|
||||
INSERT INTO test1.t1 (f1) VALUES (4);
|
||||
INSERT INTO test2.t1 (f1) VALUES (4);
|
||||
INSERT INTO test1.t1 (f1) VALUES (4);
|
||||
INSERT INTO test2.t1 (f1) VALUES (4);
|
||||
INSERT INTO test1.t1 (f1) VALUES (4);
|
||||
INSERT INTO test2.t1 (f1) VALUES (4);
|
||||
INSERT INTO test1.t1 (f1) VALUES (4);
|
||||
INSERT INTO test2.t1 (f1) VALUES (4);
|
||||
INSERT INTO test1.t1 (f1) VALUES (4);
|
||||
INSERT INTO test2.t1 (f1) VALUES (4);
|
||||
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
|
||||
INSERT INTO test1.t1 (f1) VALUES (5);
|
||||
INSERT INTO test2.t1 (f1) VALUES (5);
|
||||
SET SESSION wsrep_on=ON;
|
||||
INSERT INTO test1.t1 (f1) VALUES (6);
|
||||
INSERT INTO test2.t1 (f1) VALUES (6);
|
||||
START SLAVE;
|
||||
SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
mysqld-bin.000001 120 Previous_gtids 2 151
|
||||
mysqld-bin.000001 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:1'
|
||||
mysqld-bin.000001 199 Query 1 294 CREATE SCHEMA test1
|
||||
mysqld-bin.000001 294 Gtid 1 342 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:2'
|
||||
mysqld-bin.000001 342 Query 1 415 BEGIN
|
||||
mysqld-bin.000001 415 Query 1 489 COMMIT
|
||||
mysqld-bin.000001 489 Gtid 1 537 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:3'
|
||||
mysqld-bin.000001 537 Query 1 655 use `test1`; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB
|
||||
mysqld-bin.000001 655 Gtid 1 703 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:4'
|
||||
mysqld-bin.000001 703 Query 1 776 BEGIN
|
||||
mysqld-bin.000001 776 Query 1 850 COMMIT
|
||||
mysqld-bin.000001 850 Gtid 1 898 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:5'
|
||||
mysqld-bin.000001 898 Query 1 961 BEGIN
|
||||
mysqld-bin.000001 961 Table_map 1 1007 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 1007 Write_rows 1 1047 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 1047 Xid 1 1078 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 1078 Gtid 1 1126 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:6'
|
||||
mysqld-bin.000001 1126 Query 1 1189 BEGIN
|
||||
mysqld-bin.000001 1189 Query 1 1253 COMMIT
|
||||
mysqld-bin.000001 1253 Gtid 1 1301 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:7'
|
||||
mysqld-bin.000001 1301 Query 1 1364 BEGIN
|
||||
mysqld-bin.000001 1364 Table_map 1 1410 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 1410 Write_rows 1 1450 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 1450 Xid 1 1481 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 1481 Gtid 1 1529 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:8'
|
||||
mysqld-bin.000001 1529 Query 1 1592 BEGIN
|
||||
mysqld-bin.000001 1592 Query 1 1656 COMMIT
|
||||
mysqld-bin.000001 1656 Gtid 2 1704 SET @@SESSION.GTID_NEXT= '<effective_uuid_2>:12'
|
||||
mysqld-bin.000001 1704 Query 2 1772 BEGIN
|
||||
mysqld-bin.000001 1772 Ignorable 2 1795 # Unrecognized ignorable event
|
||||
mysqld-bin.000001 1795 Query 2 1864 COMMIT
|
||||
mysqld-bin.000001 1864 Gtid 2 1912 SET @@SESSION.GTID_NEXT= '<effective_uuid_2>:13'
|
||||
mysqld-bin.000001 1912 Query 2 1980 BEGIN
|
||||
mysqld-bin.000001 1980 Ignorable 2 2003 # Unrecognized ignorable event
|
||||
mysqld-bin.000001 2003 Query 2 2072 COMMIT
|
||||
mysqld-bin.000001 2072 Gtid 1 2120 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:9'
|
||||
mysqld-bin.000001 2120 Query 1 2183 BEGIN
|
||||
mysqld-bin.000001 2183 Table_map 1 2229 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 2229 Write_rows 1 2269 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 2269 Xid 1 2300 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 2300 Gtid 1 2348 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:10'
|
||||
mysqld-bin.000001 2348 Query 1 2411 BEGIN
|
||||
mysqld-bin.000001 2411 Query 1 2475 COMMIT
|
||||
mysqld-bin.000001 2475 Gtid 1 2523 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:11'
|
||||
mysqld-bin.000001 2523 Query 1 2586 BEGIN
|
||||
mysqld-bin.000001 2586 Table_map 1 2632 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 2632 Write_rows 1 2672 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 2672 Xid 1 2703 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 2703 Gtid 1 2751 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:12'
|
||||
mysqld-bin.000001 2751 Query 1 2814 BEGIN
|
||||
mysqld-bin.000001 2814 Query 1 2878 COMMIT
|
||||
mysqld-bin.000001 2878 Gtid 1 2926 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:13'
|
||||
mysqld-bin.000001 2926 Query 1 2989 BEGIN
|
||||
mysqld-bin.000001 2989 Table_map 1 3035 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 3035 Write_rows 1 3075 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 3075 Xid 1 3106 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 3106 Gtid 1 3154 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:14'
|
||||
mysqld-bin.000001 3154 Query 1 3217 BEGIN
|
||||
mysqld-bin.000001 3217 Query 1 3281 COMMIT
|
||||
mysqld-bin.000001 3281 Gtid 1 3329 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:15'
|
||||
mysqld-bin.000001 3329 Query 1 3392 BEGIN
|
||||
mysqld-bin.000001 3392 Table_map 1 3438 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 3438 Write_rows 1 3478 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 3478 Xid 1 3509 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 3509 Gtid 1 3557 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:16'
|
||||
mysqld-bin.000001 3557 Query 1 3620 BEGIN
|
||||
mysqld-bin.000001 3620 Query 1 3684 COMMIT
|
||||
mysqld-bin.000001 3684 Gtid 1 3732 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:17'
|
||||
mysqld-bin.000001 3732 Query 1 3795 BEGIN
|
||||
mysqld-bin.000001 3795 Table_map 1 3841 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 3841 Write_rows 1 3881 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 3881 Xid 1 3912 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 3912 Gtid 1 3960 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:18'
|
||||
mysqld-bin.000001 3960 Query 1 4023 BEGIN
|
||||
mysqld-bin.000001 4023 Query 1 4087 COMMIT
|
||||
mysqld-bin.000001 4087 Gtid 1 4135 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:19'
|
||||
mysqld-bin.000001 4135 Query 1 4198 BEGIN
|
||||
mysqld-bin.000001 4198 Table_map 1 4244 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 4244 Write_rows 1 4284 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 4284 Xid 1 4315 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 4315 Gtid 1 4363 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:20'
|
||||
mysqld-bin.000001 4363 Query 1 4426 BEGIN
|
||||
mysqld-bin.000001 4426 Query 1 4490 COMMIT
|
||||
mysqld-bin.000001 4490 Gtid 1 4538 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:21'
|
||||
mysqld-bin.000001 4538 Query 1 4601 BEGIN
|
||||
mysqld-bin.000001 4601 Table_map 1 4647 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 4647 Write_rows 1 4687 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 4687 Xid 1 4718 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 4718 Gtid 1 4766 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:22'
|
||||
mysqld-bin.000001 4766 Query 1 4829 BEGIN
|
||||
mysqld-bin.000001 4829 Query 1 4893 COMMIT
|
||||
mysqld-bin.000001 4893 Gtid 1 4941 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:23'
|
||||
mysqld-bin.000001 4941 Query 1 5004 BEGIN
|
||||
mysqld-bin.000001 5004 Table_map 1 5050 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 5050 Write_rows 1 5090 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 5090 Xid 1 5121 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 5121 Gtid 1 5169 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:24'
|
||||
mysqld-bin.000001 5169 Query 1 5232 BEGIN
|
||||
mysqld-bin.000001 5232 Query 1 5296 COMMIT
|
||||
mysqld-bin.000001 5296 Gtid 1 5344 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:25'
|
||||
mysqld-bin.000001 5344 Query 1 5407 BEGIN
|
||||
mysqld-bin.000001 5407 Table_map 1 5453 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 5453 Write_rows 1 5493 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 5493 Xid 1 5524 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 5524 Gtid 1 5572 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:26'
|
||||
mysqld-bin.000001 5572 Query 1 5635 BEGIN
|
||||
mysqld-bin.000001 5635 Query 1 5699 COMMIT
|
||||
mysqld-bin.000001 5699 Gtid 1 5747 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:27'
|
||||
mysqld-bin.000001 5747 Query 1 5810 BEGIN
|
||||
mysqld-bin.000001 5810 Table_map 1 5856 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 5856 Write_rows 1 5896 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 5896 Xid 1 5927 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 5927 Gtid 1 5975 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:28'
|
||||
mysqld-bin.000001 5975 Query 1 6038 BEGIN
|
||||
mysqld-bin.000001 6038 Query 1 6102 COMMIT
|
||||
mysqld-bin.000001 6102 Gtid 1 6150 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:29'
|
||||
mysqld-bin.000001 6150 Query 1 6213 BEGIN
|
||||
mysqld-bin.000001 6213 Table_map 1 6259 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 6259 Write_rows 1 6299 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 6299 Xid 1 6330 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 6330 Gtid 1 6378 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:30'
|
||||
mysqld-bin.000001 6378 Query 1 6441 BEGIN
|
||||
mysqld-bin.000001 6441 Query 1 6505 COMMIT
|
||||
USE test2;
|
||||
ERROR 42000: Unknown database 'test2'
|
||||
gtid_executed_equal
|
||||
1
|
||||
USE test2;
|
||||
ERROR 42000: Unknown database 'test2'
|
||||
SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
mysqld-bin.000001 120 Previous_gtids 4 151
|
||||
mysqld-bin.000001 151 Gtid 1 199 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:1'
|
||||
mysqld-bin.000001 199 Query 1 294 CREATE SCHEMA test1
|
||||
mysqld-bin.000001 294 Gtid 1 342 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:2'
|
||||
mysqld-bin.000001 342 Query 1 415 BEGIN
|
||||
mysqld-bin.000001 415 Query 1 489 COMMIT
|
||||
mysqld-bin.000001 489 Gtid 1 537 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:3'
|
||||
mysqld-bin.000001 537 Query 1 655 use `test1`; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB
|
||||
mysqld-bin.000001 655 Gtid 1 703 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:4'
|
||||
mysqld-bin.000001 703 Query 1 776 BEGIN
|
||||
mysqld-bin.000001 776 Query 1 850 COMMIT
|
||||
mysqld-bin.000001 850 Gtid 1 898 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:5'
|
||||
mysqld-bin.000001 898 Query 1 961 BEGIN
|
||||
mysqld-bin.000001 961 Table_map 1 1007 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 1007 Write_rows 1 1047 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 1047 Xid 1 1078 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 1078 Gtid 1 1126 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:6'
|
||||
mysqld-bin.000001 1126 Query 1 1189 BEGIN
|
||||
mysqld-bin.000001 1189 Query 1 1253 COMMIT
|
||||
mysqld-bin.000001 1253 Gtid 1 1301 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:7'
|
||||
mysqld-bin.000001 1301 Query 1 1364 BEGIN
|
||||
mysqld-bin.000001 1364 Table_map 1 1410 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 1410 Write_rows 1 1450 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 1450 Xid 1 1481 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 1481 Gtid 1 1529 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:8'
|
||||
mysqld-bin.000001 1529 Query 1 1592 BEGIN
|
||||
mysqld-bin.000001 1592 Query 1 1656 COMMIT
|
||||
mysqld-bin.000001 1656 Gtid 4 1704 SET @@SESSION.GTID_NEXT= '<effective_uuid_2>:12'
|
||||
mysqld-bin.000001 1704 Query 4 1772 BEGIN
|
||||
mysqld-bin.000001 1772 Ignorable 4 1795 # Unrecognized ignorable event
|
||||
mysqld-bin.000001 1795 Query 4 1864 COMMIT
|
||||
mysqld-bin.000001 1864 Gtid 4 1912 SET @@SESSION.GTID_NEXT= '<effective_uuid_2>:13'
|
||||
mysqld-bin.000001 1912 Query 4 1980 BEGIN
|
||||
mysqld-bin.000001 1980 Ignorable 4 2003 # Unrecognized ignorable event
|
||||
mysqld-bin.000001 2003 Query 4 2072 COMMIT
|
||||
mysqld-bin.000001 2072 Gtid 1 2120 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:9'
|
||||
mysqld-bin.000001 2120 Query 1 2183 BEGIN
|
||||
mysqld-bin.000001 2183 Table_map 1 2229 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 2229 Write_rows 1 2269 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 2269 Xid 1 2300 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 2300 Gtid 1 2348 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:10'
|
||||
mysqld-bin.000001 2348 Query 1 2411 BEGIN
|
||||
mysqld-bin.000001 2411 Query 1 2475 COMMIT
|
||||
mysqld-bin.000001 2475 Gtid 1 2523 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:11'
|
||||
mysqld-bin.000001 2523 Query 1 2586 BEGIN
|
||||
mysqld-bin.000001 2586 Table_map 1 2632 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 2632 Write_rows 1 2672 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 2672 Xid 1 2703 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 2703 Gtid 1 2751 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:12'
|
||||
mysqld-bin.000001 2751 Query 1 2814 BEGIN
|
||||
mysqld-bin.000001 2814 Query 1 2878 COMMIT
|
||||
mysqld-bin.000001 2878 Gtid 1 2926 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:13'
|
||||
mysqld-bin.000001 2926 Query 1 2989 BEGIN
|
||||
mysqld-bin.000001 2989 Table_map 1 3035 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 3035 Write_rows 1 3075 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 3075 Xid 1 3106 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 3106 Gtid 1 3154 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:14'
|
||||
mysqld-bin.000001 3154 Query 1 3217 BEGIN
|
||||
mysqld-bin.000001 3217 Query 1 3281 COMMIT
|
||||
mysqld-bin.000001 3281 Gtid 1 3329 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:15'
|
||||
mysqld-bin.000001 3329 Query 1 3392 BEGIN
|
||||
mysqld-bin.000001 3392 Table_map 1 3438 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 3438 Write_rows 1 3478 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 3478 Xid 1 3509 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 3509 Gtid 1 3557 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:16'
|
||||
mysqld-bin.000001 3557 Query 1 3620 BEGIN
|
||||
mysqld-bin.000001 3620 Query 1 3684 COMMIT
|
||||
mysqld-bin.000001 3684 Gtid 1 3732 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:17'
|
||||
mysqld-bin.000001 3732 Query 1 3795 BEGIN
|
||||
mysqld-bin.000001 3795 Table_map 1 3841 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 3841 Write_rows 1 3881 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 3881 Xid 1 3912 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 3912 Gtid 1 3960 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:18'
|
||||
mysqld-bin.000001 3960 Query 1 4023 BEGIN
|
||||
mysqld-bin.000001 4023 Query 1 4087 COMMIT
|
||||
mysqld-bin.000001 4087 Gtid 1 4135 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:19'
|
||||
mysqld-bin.000001 4135 Query 1 4198 BEGIN
|
||||
mysqld-bin.000001 4198 Table_map 1 4244 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 4244 Write_rows 1 4284 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 4284 Xid 1 4315 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 4315 Gtid 1 4363 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:20'
|
||||
mysqld-bin.000001 4363 Query 1 4426 BEGIN
|
||||
mysqld-bin.000001 4426 Query 1 4490 COMMIT
|
||||
mysqld-bin.000001 4490 Gtid 1 4538 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:21'
|
||||
mysqld-bin.000001 4538 Query 1 4601 BEGIN
|
||||
mysqld-bin.000001 4601 Table_map 1 4647 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 4647 Write_rows 1 4687 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 4687 Xid 1 4718 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 4718 Gtid 1 4766 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:22'
|
||||
mysqld-bin.000001 4766 Query 1 4829 BEGIN
|
||||
mysqld-bin.000001 4829 Query 1 4893 COMMIT
|
||||
mysqld-bin.000001 4893 Gtid 1 4941 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:23'
|
||||
mysqld-bin.000001 4941 Query 1 5004 BEGIN
|
||||
mysqld-bin.000001 5004 Table_map 1 5050 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 5050 Write_rows 1 5090 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 5090 Xid 1 5121 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 5121 Gtid 1 5169 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:24'
|
||||
mysqld-bin.000001 5169 Query 1 5232 BEGIN
|
||||
mysqld-bin.000001 5232 Query 1 5296 COMMIT
|
||||
mysqld-bin.000001 5296 Gtid 1 5344 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:25'
|
||||
mysqld-bin.000001 5344 Query 1 5407 BEGIN
|
||||
mysqld-bin.000001 5407 Table_map 1 5453 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 5453 Write_rows 1 5493 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 5493 Xid 1 5524 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 5524 Gtid 1 5572 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:26'
|
||||
mysqld-bin.000001 5572 Query 1 5635 BEGIN
|
||||
mysqld-bin.000001 5635 Query 1 5699 COMMIT
|
||||
mysqld-bin.000001 5699 Gtid 1 5747 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:27'
|
||||
mysqld-bin.000001 5747 Query 1 5810 BEGIN
|
||||
mysqld-bin.000001 5810 Table_map 1 5856 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 5856 Write_rows 1 5896 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 5896 Xid 1 5927 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 5927 Gtid 1 5975 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:28'
|
||||
mysqld-bin.000001 5975 Query 1 6038 BEGIN
|
||||
mysqld-bin.000001 6038 Query 1 6102 COMMIT
|
||||
mysqld-bin.000001 6102 Gtid 1 6150 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:29'
|
||||
mysqld-bin.000001 6150 Query 1 6213 BEGIN
|
||||
mysqld-bin.000001 6213 Table_map 1 6259 table_id: ### (test1.t1)
|
||||
mysqld-bin.000001 6259 Write_rows 1 6299 table_id: ### flags: STMT_END_F
|
||||
mysqld-bin.000001 6299 Xid 1 6330 COMMIT /* xid=### */
|
||||
mysqld-bin.000001 6330 Gtid 1 6378 SET @@SESSION.GTID_NEXT= '<effective_uuid_1>:30'
|
||||
mysqld-bin.000001 6378 Query 1 6441 BEGIN
|
||||
mysqld-bin.000001 6441 Query 1 6505 COMMIT
|
||||
DROP SCHEMA test1;
|
||||
DROP SCHEMA test2;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE ALL;
|
||||
CALL mtr.add_suppression("GTID replication failed");
|
||||
CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed");
|
||||
CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");
|
||||
CALL mtr.add_suppression("TO isolation failed for");
|
||||
CALL mtr.add_suppression("Slave SQL: Error 'Deadlock found when trying to get lock; try restarting transaction' on query");
|
||||
CALL mtr.add_suppression("Slave SQL: Error 'WSREP has not yet prepared node for application use' on query");
|
||||
CALL mtr.add_suppression("Slave: WSREP has not yet prepared node for application use Error_code: 1047");
|
@ -1,13 +1,28 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4;
|
||||
connection node_2;
|
||||
START SLAVE;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
connection node_4;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
|
||||
connection node_1;
|
||||
connection node_4;
|
||||
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
expected_error
|
||||
1
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
START SLAVE;
|
||||
connection node_4;
|
||||
DROP TABLE t1;
|
||||
connection node_2;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE ALL;
|
||||
CALL mtr.add_suppression("Slave SQL: Error 'Unknown command' on query");
|
||||
@ -15,4 +30,5 @@ CALL mtr.add_suppression("Slave: Unknown command Error_code: 1047");
|
||||
CALL mtr.add_suppression("Transport endpoint is not connected");
|
||||
CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed, 'Deadlock found when trying to get lock; try restarting transaction', Error_code: 1213");
|
||||
CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");
|
||||
connection node_4;
|
||||
RESET MASTER;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(6)) ENGINE=InnoDB;
|
||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_2;
|
||||
@ -9,7 +11,7 @@ INSERT INTO t1 VALUES (1,'node_1');
|
||||
connection node_2a;
|
||||
connection node_2;
|
||||
INSERT INTO t1 VALUES (2, 'node_2');
|
||||
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
wsrep_local_aborts_increment
|
||||
1
|
||||
DROP TABLE t1;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 10);
|
||||
connection node_1;
|
||||
@ -10,7 +12,7 @@ UPDATE t1 SET f1 = 2;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
wsrep_local_bf_aborts_diff
|
||||
1
|
||||
connection node_1;
|
||||
@ -23,7 +25,7 @@ UPDATE t1 SET f2 = 20;
|
||||
connection node_1a;
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
wsrep_local_bf_aborts_diff
|
||||
1
|
||||
DROP TABLE t1;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
connection node_2a;
|
||||
SELECT GET_LOCK("foo", 1000);
|
||||
@ -10,7 +12,7 @@ SELECT GET_LOCK("foo", 1000);;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_2;
|
||||
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
wsrep_local_aborts_increment
|
||||
1
|
||||
DROP TABLE t1;
|
||||
|
685
mysql-test/suite/galera/r/galera_bf_abort_group_commit.result
Normal file
685
mysql-test/suite/galera/r/galera_bf_abort_group_commit.result
Normal file
@ -0,0 +1,685 @@
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
galera_sr_bf_abort_at_commit = 0
|
||||
after_replicate_sync
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync';
|
||||
INSERT INTO t1 VALUES (3);
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
ROLLBACK;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
local_monitor_master_enter_sync
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
INSERT INTO t1 VALUES (3);
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
ROLLBACK;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
apply_monitor_master_enter_sync
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_master_enter_sync';
|
||||
INSERT INTO t1 VALUES (3);
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_master_enter_sync';
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
ROLLBACK;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
commit_monitor_master_enter_sync
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
|
||||
INSERT INTO t1 VALUES (3);
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
ROLLBACK;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
galera_sr_bf_abort_at_commit = 1
|
||||
after_replicate_sync
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync';
|
||||
COMMIT;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
|
||||
ROLLBACK;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
local_monitor_master_enter_sync
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
COMMIT;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
ROLLBACK;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
apply_monitor_master_enter_sync
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_master_enter_sync';
|
||||
COMMIT;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_master_enter_sync';
|
||||
ROLLBACK;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
commit_monitor_master_enter_sync
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
|
||||
COMMIT;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
|
||||
ROLLBACK;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
galera_sr_bf_abort_at_commit = 1
|
||||
after_replicate_sync
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,after_replicate_sync';
|
||||
COMMIT;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=after_replicate_sync';
|
||||
ROLLBACK;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
local_monitor_master_enter_sync
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,local_monitor_master_enter_sync';
|
||||
COMMIT;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=local_monitor_master_enter_sync';
|
||||
ROLLBACK;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
apply_monitor_master_enter_sync
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_master_enter_sync';
|
||||
COMMIT;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_master_enter_sync';
|
||||
ROLLBACK;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
commit_monitor_master_enter_sync
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
f1
|
||||
1
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
SET AUTOCOMMIT=ON;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
|
||||
COMMIT;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
|
||||
ROLLBACK;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
2
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_trx_fragment_size = 0;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
CALL mtr.add_suppression("WSREP: fragment replication failed: 1");
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
|
12
mysql-test/suite/galera/r/galera_bf_abort_shutdown.result
Normal file
12
mysql-test/suite/galera/r/galera_bf_abort_shutdown.result
Normal file
@ -0,0 +1,12 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INT PRIMARY KEY);
|
||||
connection node_2;
|
||||
SET DEBUG_SYNC = 'wsrep_before_certification WAIT_FOR continue';
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
@ -6,7 +8,7 @@ SELECT SLEEP(1000);;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_2;
|
||||
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
wsrep_local_aborts_increment
|
||||
1
|
||||
DROP TABLE t1;
|
||||
|
@ -1,3 +1,5 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SELECT @@innodb_stats_persistent;
|
||||
@@innodb_stats_persistent
|
||||
1
|
||||
@ -27,7 +29,7 @@ SELECT SLEEP(1000);;
|
||||
connection node_1;
|
||||
ALTER TABLE t1 CHANGE f2 f2 INTEGER NOT NULL DEFAULT 1;
|
||||
connection node_2;
|
||||
ERROR 40001: Deadlock: wsrep aborted transaction
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
wsrep_local_aborts_increment
|
||||
1
|
||||
DROP TABLE t1;
|
||||
|
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