Merge 10.2 into bb-10.2-ext
This commit is contained in:
commit
6749d39a95
@ -574,15 +574,17 @@ struct st_replace *glob_replace= 0;
|
|||||||
void replace_strings_append(struct st_replace *rep, DYNAMIC_STRING* ds,
|
void replace_strings_append(struct st_replace *rep, DYNAMIC_STRING* ds,
|
||||||
const char *from, int len);
|
const char *from, int len);
|
||||||
|
|
||||||
static void cleanup_and_exit(int exit_code) __attribute__((noreturn));
|
ATTRIBUTE_NORETURN
|
||||||
|
static void cleanup_and_exit(int exit_code);
|
||||||
|
|
||||||
void really_die(const char *msg) __attribute__((noreturn));
|
ATTRIBUTE_NORETURN
|
||||||
|
void really_die(const char *msg);
|
||||||
void report_or_die(const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
|
void report_or_die(const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
|
||||||
void die(const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2)
|
ATTRIBUTE_NORETURN ATTRIBUTE_FORMAT(printf, 1, 2)
|
||||||
__attribute__((noreturn));
|
void die(const char *fmt, ...);
|
||||||
static void make_error_message(char *buf, size_t len, const char *fmt, va_list args);
|
static void make_error_message(char *buf, size_t len, const char *fmt, va_list args);
|
||||||
void abort_not_supported_test(const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2)
|
ATTRIBUTE_NORETURN ATTRIBUTE_FORMAT(printf, 1, 2)
|
||||||
__attribute__((noreturn));
|
void abort_not_supported_test(const char *fmt, ...);
|
||||||
void verbose_msg(const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
|
void verbose_msg(const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
|
||||||
void log_msg(const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
|
void log_msg(const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
|
||||||
|
|
||||||
@ -4022,7 +4024,25 @@ static int rmtree(const char *dir)
|
|||||||
strxnmov(path, sizeof(path), dir, sep, file->name, NULL);
|
strxnmov(path, sizeof(path), dir, sep, file->name, NULL);
|
||||||
|
|
||||||
if (!MY_S_ISDIR(file->mystat->st_mode))
|
if (!MY_S_ISDIR(file->mystat->st_mode))
|
||||||
|
{
|
||||||
err= my_delete(path, 0);
|
err= my_delete(path, 0);
|
||||||
|
#ifdef _WIN32
|
||||||
|
/*
|
||||||
|
On Windows, check and possible reset readonly attribute.
|
||||||
|
my_delete(), or DeleteFile does not remove theses files.
|
||||||
|
*/
|
||||||
|
if (err)
|
||||||
|
{
|
||||||
|
DWORD attr= GetFileAttributes(path);
|
||||||
|
if (attr != INVALID_FILE_ATTRIBUTES &&
|
||||||
|
(attr & FILE_ATTRIBUTE_READONLY))
|
||||||
|
{
|
||||||
|
SetFileAttributes(path, attr &~ FILE_ATTRIBUTE_READONLY);
|
||||||
|
err= my_delete(path, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
else
|
else
|
||||||
err= rmtree(path);
|
err= rmtree(path);
|
||||||
|
|
||||||
|
@ -82,7 +82,3 @@ EXECUTE_PROCESS (
|
|||||||
IF(NOT RESULT EQUAL 0)
|
IF(NOT RESULT EQUAL 0)
|
||||||
MESSAGE(FATAL_ERROR "Could not create initial database \n ${OUT} \n ${ERR}")
|
MESSAGE(FATAL_ERROR "Could not create initial database \n ${OUT} \n ${ERR}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
EXECUTE_PROCESS (
|
|
||||||
COMMAND "@CMAKE_COMMAND@" -E touch ${CMAKE_CURRENT_BINARY_DIR}/initdb.dep
|
|
||||||
)
|
|
||||||
|
@ -139,8 +139,8 @@ IF(MSVC)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
#TODO: update the code and remove the disabled warnings
|
#TODO: update the code and remove the disabled warnings
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996")
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996 /we4700")
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /wd4291 /wd4577 /we4099")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /wd4291 /wd4577 /we4099 /we4700")
|
||||||
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
@ -2,8 +2,9 @@
|
|||||||
IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
IF(GIT_EXECUTABLE AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
|
||||||
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" config --get cmake.update-submodules
|
EXECUTE_PROCESS(COMMAND "${GIT_EXECUTABLE}" config --get cmake.update-submodules
|
||||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||||
OUTPUT_VARIABLE cmake_update_submodules)
|
OUTPUT_VARIABLE cmake_update_submodules
|
||||||
IF(cmake_update_submodules MATCHES no)
|
RESULT_VARIABLE git_config_get_result)
|
||||||
|
IF(git_config_get_result EQUAL 128 OR cmake_update_submodules MATCHES no)
|
||||||
SET(update_result 0)
|
SET(update_result 0)
|
||||||
ELSEIF (cmake_update_submodules MATCHES force)
|
ELSEIF (cmake_update_submodules MATCHES force)
|
||||||
MESSAGE("-- Updating submodules (forced)")
|
MESSAGE("-- Updating submodules (forced)")
|
||||||
|
@ -26,7 +26,7 @@ ENDIF()
|
|||||||
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default})
|
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default})
|
||||||
|
|
||||||
# Set the patch version
|
# Set the patch version
|
||||||
SET(WSREP_PATCH_VERSION "19")
|
SET(WSREP_PATCH_VERSION "20")
|
||||||
|
|
||||||
# Obtain wsrep API version
|
# Obtain wsrep API version
|
||||||
FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION
|
FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION
|
||||||
|
@ -113,6 +113,11 @@ xb_mysql_connect()
|
|||||||
(char *) &opt_secure_auth);
|
(char *) &opt_secure_auth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (xb_plugin_dir && *xb_plugin_dir){
|
||||||
|
mysql_options(connection, MYSQL_PLUGIN_DIR, xb_plugin_dir);
|
||||||
|
}
|
||||||
|
mysql_options(connection, MYSQL_OPT_PROTOCOL, &opt_protocol);
|
||||||
|
|
||||||
msg_ts("Connecting to MySQL server host: %s, user: %s, password: %s, "
|
msg_ts("Connecting to MySQL server host: %s, user: %s, password: %s, "
|
||||||
"port: %s, socket: %s\n", opt_host ? opt_host : "localhost",
|
"port: %s, socket: %s\n", opt_host ? opt_host : "localhost",
|
||||||
opt_user ? opt_user : "not set",
|
opt_user ? opt_user : "not set",
|
||||||
|
@ -119,6 +119,7 @@ my_bool xtrabackup_export;
|
|||||||
|
|
||||||
longlong xtrabackup_use_memory;
|
longlong xtrabackup_use_memory;
|
||||||
|
|
||||||
|
uint opt_protocol;
|
||||||
long xtrabackup_throttle; /* 0:unlimited */
|
long xtrabackup_throttle; /* 0:unlimited */
|
||||||
static lint io_ticket;
|
static lint io_ticket;
|
||||||
static os_event_t wait_throttle;
|
static os_event_t wait_throttle;
|
||||||
@ -527,6 +528,7 @@ enum options_xtrabackup
|
|||||||
|
|
||||||
OPT_XTRA_TABLES_EXCLUDE,
|
OPT_XTRA_TABLES_EXCLUDE,
|
||||||
OPT_XTRA_DATABASES_EXCLUDE,
|
OPT_XTRA_DATABASES_EXCLUDE,
|
||||||
|
OPT_PROTOCOL
|
||||||
};
|
};
|
||||||
|
|
||||||
struct my_option xb_client_options[] =
|
struct my_option xb_client_options[] =
|
||||||
@ -759,6 +761,9 @@ struct my_option xb_client_options[] =
|
|||||||
0, 0, 0, GET_STR,
|
0, 0, 0, GET_STR,
|
||||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
|
||||||
|
{"protocol", OPT_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
|
||||||
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
|
||||||
{"socket", 'S', "This option specifies the socket to use when "
|
{"socket", 'S', "This option specifies the socket to use when "
|
||||||
"connecting to the local database server with a UNIX domain socket. "
|
"connecting to the local database server with a UNIX domain socket. "
|
||||||
"The option accepts a string argument. See mysql --help for details.",
|
"The option accepts a string argument. See mysql --help for details.",
|
||||||
@ -1290,8 +1295,13 @@ xb_get_one_option(int optid,
|
|||||||
start[1]=0 ;
|
start[1]=0 ;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case OPT_PROTOCOL:
|
||||||
|
if (argument)
|
||||||
|
{
|
||||||
|
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
|
||||||
|
opt->name);
|
||||||
|
}
|
||||||
|
break;
|
||||||
#include "sslopt-case.h"
|
#include "sslopt-case.h"
|
||||||
|
|
||||||
case '?':
|
case '?':
|
||||||
@ -2588,10 +2598,6 @@ xb_load_single_table_tablespace(
|
|||||||
|
|
||||||
ut_free(name);
|
ut_free(name);
|
||||||
|
|
||||||
if (fil_space_crypt_t* crypt_info = file->get_crypt_info()) {
|
|
||||||
fil_space_destroy_crypt_data(&crypt_info);
|
|
||||||
}
|
|
||||||
|
|
||||||
delete file;
|
delete file;
|
||||||
|
|
||||||
if (err != DB_SUCCESS && err != DB_CORRUPTION && xtrabackup_backup) {
|
if (err != DB_SUCCESS && err != DB_CORRUPTION && xtrabackup_backup) {
|
||||||
|
@ -43,6 +43,8 @@ extern char *xtrabackup_incremental_dir;
|
|||||||
extern char *xtrabackup_incremental_basedir;
|
extern char *xtrabackup_incremental_basedir;
|
||||||
extern char *innobase_data_home_dir;
|
extern char *innobase_data_home_dir;
|
||||||
extern char *innobase_buffer_pool_filename;
|
extern char *innobase_buffer_pool_filename;
|
||||||
|
extern char *xb_plugin_dir;
|
||||||
|
extern uint opt_protocol;
|
||||||
extern ds_ctxt_t *ds_meta;
|
extern ds_ctxt_t *ds_meta;
|
||||||
extern ds_ctxt_t *ds_data;
|
extern ds_ctxt_t *ds_data;
|
||||||
|
|
||||||
|
@ -148,6 +148,29 @@ struct my_aligned_storage
|
|||||||
#define MY_ALIGNED(size)
|
#define MY_ALIGNED(size)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
# define ATTRIBUTE_NORETURN __attribute__((noreturn))
|
||||||
|
# if MY_GNUC_PREREQ(4,3)
|
||||||
|
/** Starting with GCC 4.3, the "cold" attribute is used to inform the
|
||||||
|
compiler that a function is unlikely executed. The function is
|
||||||
|
optimized for size rather than speed and on many targets it is placed
|
||||||
|
into special subsection of the text section so all cold functions
|
||||||
|
appears close together improving code locality of non-cold parts of
|
||||||
|
program. The paths leading to call of cold functions within code are
|
||||||
|
marked as unlikely by the branch prediction mechanism. optimize a
|
||||||
|
rarely invoked function for size instead for speed. */
|
||||||
|
# define ATTRIBUTE_COLD __attribute__((cold))
|
||||||
|
# endif
|
||||||
|
#elif defined _WIN32
|
||||||
|
# define ATTRIBUTE_NORETURN __declspec(noreturn)
|
||||||
|
#else
|
||||||
|
# define ATTRIBUTE_NORETURN /* empty */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ATTRIBUTE_COLD
|
||||||
|
# define ATTRIBUTE_COLD /* empty */
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <my_attribute.h>
|
#include <my_attribute.h>
|
||||||
|
|
||||||
#endif /* MY_COMPILER_INCLUDED */
|
#endif /* MY_COMPILER_INCLUDED */
|
||||||
|
@ -45,6 +45,10 @@
|
|||||||
#define WSREP_WARN(...) WSREP_LOG(sql_print_warning, ##__VA_ARGS__)
|
#define WSREP_WARN(...) WSREP_LOG(sql_print_warning, ##__VA_ARGS__)
|
||||||
#define WSREP_ERROR(...) WSREP_LOG(sql_print_error, ##__VA_ARGS__)
|
#define WSREP_ERROR(...) WSREP_LOG(sql_print_error, ##__VA_ARGS__)
|
||||||
|
|
||||||
|
#define WSREP_SYNC_WAIT(thd_, before_) \
|
||||||
|
{ if (WSREP_CLIENT(thd_) && \
|
||||||
|
wsrep_sync_wait(thd_, before_)) goto error; }
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define IF_WSREP(A,B) B
|
#define IF_WSREP(A,B) B
|
||||||
#define DBUG_ASSERT_IF_WSREP(A)
|
#define DBUG_ASSERT_IF_WSREP(A)
|
||||||
@ -55,6 +59,8 @@
|
|||||||
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_)
|
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_)
|
||||||
#define WSREP_TO_ISOLATION_END
|
#define WSREP_TO_ISOLATION_END
|
||||||
#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_)
|
#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_)
|
||||||
#endif
|
#define WSREP_SYNC_WAIT(thd_, before_)
|
||||||
|
|
||||||
#endif /* WSERP_INCLUDED */
|
#endif /* WITH_WSREP */
|
||||||
|
|
||||||
|
#endif /* WSREP_INCLUDED */
|
||||||
|
18
mysql-test/include/fail_start_mysqld.inc
Normal file
18
mysql-test/include/fail_start_mysqld.inc
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# [--let $restart_parameters= --innodb-force-recovery=0 --innodb-read-only=1]
|
||||||
|
# [--let $mysqld_stub_cmd= $MYSQLD_LAST_CMD]
|
||||||
|
# [--let $error_log= $MYSQLTEST_VARDIR/log/mysqld.1.err]
|
||||||
|
# --source include/fail_restart_mysqld.inc
|
||||||
|
|
||||||
|
# Evaluate the default of $error_log
|
||||||
|
if (!$error_log)
|
||||||
|
{
|
||||||
|
--let $error_log= $MYSQLTEST_VARDIR/log/mysqld.1.err
|
||||||
|
}
|
||||||
|
|
||||||
|
--error 1
|
||||||
|
--exec $mysqld_stub_cmd $restart_parameters >> $error_log 2>&1
|
||||||
|
|
||||||
|
# As the server is stopped
|
||||||
|
--disable_reconnect
|
@ -8,3 +8,5 @@
|
|||||||
|
|
||||||
--let $galera_cluster_size = 2
|
--let $galera_cluster_size = 2
|
||||||
--source include/galera_init.inc
|
--source include/galera_init.inc
|
||||||
|
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
5
mysql-test/include/innodb_undo_tablespaces.combinations
Normal file
5
mysql-test/include/innodb_undo_tablespaces.combinations
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[undo0]
|
||||||
|
innodb-undo-tablespaces=0
|
||||||
|
|
||||||
|
[undo3]
|
||||||
|
innodb-undo-tablespaces=3
|
3
mysql-test/include/innodb_undo_tablespaces.inc
Normal file
3
mysql-test/include/innodb_undo_tablespaces.inc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# The goal of including this file is to enable innodb_undo_tablespaces combinations
|
||||||
|
# (see include/innodb_undo_tablespaces.combinations)
|
||||||
|
|
@ -1,3 +1,17 @@
|
|||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# [--let $shutdown_timeout= 30]
|
||||||
|
# [--let $allow_rpl_inited= 1]
|
||||||
|
# --source include/shutdown_mysqld.inc
|
||||||
|
|
||||||
|
# The default value is empty
|
||||||
|
--let $server_shutdown_timeout=
|
||||||
|
|
||||||
|
if ($shutdown_timeout)
|
||||||
|
{
|
||||||
|
--let $server_shutdown_timeout= $shutdown_timeout
|
||||||
|
}
|
||||||
|
|
||||||
# This is the first half of include/restart_mysqld.inc.
|
# This is the first half of include/restart_mysqld.inc.
|
||||||
if ($rpl_inited)
|
if ($rpl_inited)
|
||||||
{
|
{
|
||||||
|
@ -16,6 +16,9 @@ if (!$restart_parameters)
|
|||||||
# Call script that will poll the server waiting for it to be back online again
|
# Call script that will poll the server waiting for it to be back online again
|
||||||
--source include/wait_until_connected_again.inc
|
--source include/wait_until_connected_again.inc
|
||||||
|
|
||||||
|
# Wait for wsrep
|
||||||
|
--source include/wait_wsrep_ready.inc
|
||||||
|
|
||||||
# Turn off reconnect again
|
# Turn off reconnect again
|
||||||
--disable_reconnect
|
--disable_reconnect
|
||||||
|
|
||||||
|
18
mysql-test/include/wait_wsrep_ready.inc
Normal file
18
mysql-test/include/wait_wsrep_ready.inc
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#
|
||||||
|
# If the wsrep plugin is loaded, wait until the wsrep provider becomes
|
||||||
|
# ready for use.
|
||||||
|
#
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
--disable_result_log
|
||||||
|
|
||||||
|
if (`SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'wsrep' AND PLUGIN_STATUS='ACTIVE'`)
|
||||||
|
{
|
||||||
|
if (`SELECT @@GLOBAL.WSREP_ON`)
|
||||||
|
{
|
||||||
|
--source include/galera_wait_ready.inc
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--enable_query_log
|
||||||
|
--enable_result_log
|
@ -199,6 +199,7 @@ my @DEFAULT_SUITES= qw(
|
|||||||
unit-
|
unit-
|
||||||
vcol-
|
vcol-
|
||||||
wsrep-
|
wsrep-
|
||||||
|
galera-
|
||||||
);
|
);
|
||||||
my $opt_suites;
|
my $opt_suites;
|
||||||
|
|
||||||
@ -3092,14 +3093,16 @@ sub mysql_install_db {
|
|||||||
mtr_add_arg($args, "--bootstrap");
|
mtr_add_arg($args, "--bootstrap");
|
||||||
mtr_add_arg($args, "--basedir=%s", $install_basedir);
|
mtr_add_arg($args, "--basedir=%s", $install_basedir);
|
||||||
mtr_add_arg($args, "--datadir=%s", $install_datadir);
|
mtr_add_arg($args, "--datadir=%s", $install_datadir);
|
||||||
|
mtr_add_arg($args, "--plugin-dir=%s", $plugindir);
|
||||||
mtr_add_arg($args, "--default-storage-engine=myisam");
|
mtr_add_arg($args, "--default-storage-engine=myisam");
|
||||||
mtr_add_arg($args, "--skip-plugin-$_") for @optional_plugins;
|
mtr_add_arg($args, "--loose-skip-plugin-$_") for @optional_plugins;
|
||||||
# starting from 10.0 bootstrap scripts require InnoDB
|
# starting from 10.0 bootstrap scripts require InnoDB
|
||||||
mtr_add_arg($args, "--loose-innodb");
|
mtr_add_arg($args, "--loose-innodb");
|
||||||
mtr_add_arg($args, "--loose-innodb-log-file-size=5M");
|
mtr_add_arg($args, "--loose-innodb-log-file-size=5M");
|
||||||
mtr_add_arg($args, "--disable-sync-frm");
|
mtr_add_arg($args, "--disable-sync-frm");
|
||||||
mtr_add_arg($args, "--tmpdir=%s", "$opt_vardir/tmp/");
|
mtr_add_arg($args, "--tmpdir=%s", "$opt_vardir/tmp/");
|
||||||
mtr_add_arg($args, "--core-file");
|
mtr_add_arg($args, "--core-file");
|
||||||
|
mtr_add_arg($args, "--console");
|
||||||
|
|
||||||
if ( $opt_debug )
|
if ( $opt_debug )
|
||||||
{
|
{
|
||||||
@ -3118,13 +3121,6 @@ sub mysql_install_db {
|
|||||||
mtr_add_arg($args, $extra_opt);
|
mtr_add_arg($args, $extra_opt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# InnoDB options can come not only from the command line, but also
|
|
||||||
# from option files or combinations
|
|
||||||
foreach my $extra_opt ( @$extra_opts ) {
|
|
||||||
if ($extra_opt =~ /--innodb/) {
|
|
||||||
mtr_add_arg($args, $extra_opt);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# If DISABLE_GRANT_OPTIONS is defined when the server is compiled (e.g.,
|
# If DISABLE_GRANT_OPTIONS is defined when the server is compiled (e.g.,
|
||||||
# configure --disable-grant-options), mysqld will not recognize the
|
# configure --disable-grant-options), mysqld will not recognize the
|
||||||
@ -3139,13 +3135,22 @@ sub mysql_install_db {
|
|||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
$ENV{'MYSQLD_BOOTSTRAP_CMD'}= "$exe_mysqld_bootstrap " . join(" ", @$args);
|
$ENV{'MYSQLD_BOOTSTRAP_CMD'}= "$exe_mysqld_bootstrap " . join(" ", @$args);
|
||||||
|
|
||||||
|
# Extra options can come not only from the command line, but also
|
||||||
|
# from option files or combinations. We want them on a command line
|
||||||
|
# that is executed now, because otherwise the datadir might be
|
||||||
|
# incompatible with the test settings, but not on the general
|
||||||
|
# $MYSQLD_BOOTSTRAP_CMD line
|
||||||
|
foreach my $extra_opt ( @$extra_opts ) {
|
||||||
|
mtr_add_arg($args, $extra_opt);
|
||||||
|
}
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
# Create the bootstrap.sql file
|
# Create the bootstrap.sql file
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql";
|
my $bootstrap_sql_file= "$opt_vardir/log/bootstrap.sql";
|
||||||
|
|
||||||
|
if (! -e $bootstrap_sql_file)
|
||||||
|
{
|
||||||
if ($opt_boot_gdb) {
|
if ($opt_boot_gdb) {
|
||||||
gdb_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(),
|
gdb_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(),
|
||||||
$bootstrap_sql_file);
|
$bootstrap_sql_file);
|
||||||
@ -3230,6 +3235,7 @@ sub mysql_install_db {
|
|||||||
# Add procedures for checking server is restored after testcase
|
# Add procedures for checking server is restored after testcase
|
||||||
mtr_tofile($bootstrap_sql_file,
|
mtr_tofile($bootstrap_sql_file,
|
||||||
sql_to_bootstrap(mtr_grab_file("include/mtr_check.sql")));
|
sql_to_bootstrap(mtr_grab_file("include/mtr_check.sql")));
|
||||||
|
}
|
||||||
|
|
||||||
# Log bootstrap command
|
# Log bootstrap command
|
||||||
my $path_bootstrap_log= "$opt_vardir/log/bootstrap.log";
|
my $path_bootstrap_log= "$opt_vardir/log/bootstrap.log";
|
||||||
@ -5155,6 +5161,11 @@ sub mysqld_start ($$) {
|
|||||||
# Remember options used when starting
|
# Remember options used when starting
|
||||||
$mysqld->{'started_opts'}= $extra_opts;
|
$mysqld->{'started_opts'}= $extra_opts;
|
||||||
|
|
||||||
|
# "Dynamic" version of MYSQLD_CMD is reevaluated with each mysqld_start.
|
||||||
|
# Use it to restart the server at testing a failing server start (e.g
|
||||||
|
# due to incompatible options).
|
||||||
|
$ENV{'MYSQLD_LAST_CMD'}= "$exe @$args";
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2125,6 +2125,58 @@ t1 CREATE TABLE `t1` (
|
|||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-8960 Can't refer the same column twice in one ALTER TABLE
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
`a` int(11) DEFAULT NULL
|
||||||
|
) DEFAULT CHARSET=utf8;
|
||||||
|
ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL,
|
||||||
|
ALTER COLUMN `consultant_id` DROP DEFAULT;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` int(11) DEFAULT NULL,
|
||||||
|
`consultant_id` int(11) NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
`a` int(11) DEFAULT NULL
|
||||||
|
) DEFAULT CHARSET=utf8;
|
||||||
|
ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL,
|
||||||
|
ALTER COLUMN `consultant_id` SET DEFAULT 2;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` int(11) DEFAULT NULL,
|
||||||
|
`consultant_id` int(11) NOT NULL DEFAULT 2
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
`a` int(11) DEFAULT NULL
|
||||||
|
) DEFAULT CHARSET=utf8;
|
||||||
|
ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2,
|
||||||
|
ALTER COLUMN `consultant_id` DROP DEFAULT;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` int(11) DEFAULT NULL,
|
||||||
|
`consultant_id` int(11) NOT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
`a` int(11) DEFAULT NULL
|
||||||
|
) DEFAULT CHARSET=utf8;
|
||||||
|
ALTER TABLE t1 ADD COLUMN `consultant_id` integer NOT NULL DEFAULT 2,
|
||||||
|
ALTER COLUMN `consultant_id` DROP DEFAULT,
|
||||||
|
MODIFY COLUMN `consultant_id` BIGINT;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` int(11) DEFAULT NULL,
|
||||||
|
`consultant_id` bigint(20) DEFAULT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
# Start of 10.1 tests
|
# Start of 10.1 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -1234,7 +1234,7 @@ character-sets-dir MYSQL_CHARSETSDIR/
|
|||||||
chroot (No default value)
|
chroot (No default value)
|
||||||
completion-type NO_CHAIN
|
completion-type NO_CHAIN
|
||||||
concurrent-insert AUTO
|
concurrent-insert AUTO
|
||||||
console FALSE
|
console TRUE
|
||||||
date-format %Y-%m-%d
|
date-format %Y-%m-%d
|
||||||
datetime-format %Y-%m-%d %H:%i:%s
|
datetime-format %Y-%m-%d %H:%i:%s
|
||||||
deadlock-search-depth-long 15
|
deadlock-search-depth-long 15
|
||||||
|
39
mysql-test/r/tc_heuristic_recover.result
Normal file
39
mysql-test/r/tc_heuristic_recover.result
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
call mtr.add_suppression("Can't init tc log");
|
||||||
|
call mtr.add_suppression("Found 1 prepared transactions!");
|
||||||
|
call mtr.add_suppression("Aborting");
|
||||||
|
set debug_sync='RESET';
|
||||||
|
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
|
||||||
|
SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
||||||
|
FLUSH TABLES;
|
||||||
|
connect con1,localhost,root,,;
|
||||||
|
set debug_sync='ha_commit_trans_after_prepare WAIT_FOR go';
|
||||||
|
INSERT INTO t1 VALUES (1);;
|
||||||
|
connection default;
|
||||||
|
# Prove that no COMMIT or ROLLBACK occurred yet.
|
||||||
|
SELECT * FROM t1;
|
||||||
|
i
|
||||||
|
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
i
|
||||||
|
1
|
||||||
|
# Kill the server
|
||||||
|
FOUND 1 /was in the XA prepared state/ in mysqld.1.err
|
||||||
|
FOUND 1 /Found 1 prepared transactions!/ in mysqld.1.err
|
||||||
|
NOT FOUND /\[ERROR\] Can\'t init tc log/ in mysqld.1.err
|
||||||
|
FOUND 2 /was in the XA prepared state/ in mysqld.1.err
|
||||||
|
FOUND 1 /Found 1 prepared transactions!/ in mysqld.1.err
|
||||||
|
FOUND 1 /\[ERROR\] Can\'t init tc log/ in mysqld.1.err
|
||||||
|
FOUND 1 /Please restart mysqld without --tc-heuristic-recover/ in mysqld.1.err
|
||||||
|
FOUND 3 /was in the XA prepared state/ in mysqld.1.err
|
||||||
|
FOUND 1 /Found 1 prepared transactions!/ in mysqld.1.err
|
||||||
|
FOUND 2 /\[ERROR\] Can\'t init tc log/ in mysqld.1.err
|
||||||
|
FOUND 2 /Please restart mysqld without --tc-heuristic-recover/ in mysqld.1.err
|
||||||
|
FOUND 3 /was in the XA prepared state/ in mysqld.1.err
|
||||||
|
FOUND 1 /Found 1 prepared transactions!/ in mysqld.1.err
|
||||||
|
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
i
|
||||||
|
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
i
|
||||||
|
DROP TABLE t1;
|
@ -35,3 +35,9 @@ SELECT 3;
|
|||||||
SET @@global.wait_timeout= <start_value>;
|
SET @@global.wait_timeout= <start_value>;
|
||||||
disconnect con1;
|
disconnect con1;
|
||||||
connect default,localhost,root,,test,,;
|
connect default,localhost,root,,test,,;
|
||||||
|
set global log_warnings=2;
|
||||||
|
connect foo,localhost,root;
|
||||||
|
set @@wait_timeout=1;
|
||||||
|
connection default;
|
||||||
|
FOUND 1 /Aborted.*Got timeout reading communication packets/ in mysqld.1.err
|
||||||
|
set global log_warnings=@@log_warnings;
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
set global log_warnings=2;
|
|
||||||
connect foo,localhost,root;
|
|
||||||
set @@wait_timeout=1;
|
|
||||||
connection default;
|
|
||||||
FOUND 1 /Aborted.*Got timeout reading communication packets/ in mysqld.1.err
|
|
||||||
set global log_warnings=@@log_warnings;
|
|
@ -12,3 +12,4 @@
|
|||||||
|
|
||||||
innodb_scrub : MDEV-8139 scrubbing does not work reliably
|
innodb_scrub : MDEV-8139 scrubbing does not work reliably
|
||||||
innodb_scrub_background : MDEV-8139 scrubbing does not work reliably
|
innodb_scrub_background : MDEV-8139 scrubbing does not work reliably
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
SET GLOBAL innodb_file_format = `Barracuda`;
|
SET GLOBAL innodb_file_format = `Barracuda`;
|
||||||
SET GLOBAL innodb_file_per_table = ON;
|
SET GLOBAL innodb_file_per_table = ON;
|
||||||
|
FLUSH STATUS;
|
||||||
create database innodb_test;
|
create database innodb_test;
|
||||||
use innodb_test;
|
use innodb_test;
|
||||||
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
|
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
|
||||||
@ -50,40 +51,48 @@ insert into innodb_datadir1 select * from innodb_normal;
|
|||||||
insert into innodb_datadir2 select * from innodb_normal;
|
insert into innodb_datadir2 select * from innodb_normal;
|
||||||
insert into innodb_datadir3 select * from innodb_normal;
|
insert into innodb_datadir3 select * from innodb_normal;
|
||||||
commit;
|
commit;
|
||||||
|
FLUSH STATUS;
|
||||||
# Restart server and see how many page 0's are read
|
# Restart server and see how many page 0's are read
|
||||||
# result should be less than actual number of tables
|
# result should actual number of tables except remote tables could be read twice
|
||||||
# i.e. < 23 + 3 = 26
|
# i.e. < 23 + 3*2 = 29
|
||||||
show status like 'innodb_pages0_read%';
|
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
|
||||||
Variable_name Value
|
VARIABLE_VALUE <= 29
|
||||||
Innodb_pages0_read 26
|
1
|
||||||
use innodb_test;
|
use innodb_test;
|
||||||
show status like 'innodb_pages0_read%';
|
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
|
||||||
Variable_name Value
|
VARIABLE_VALUE <= 29
|
||||||
Innodb_pages0_read 26
|
1
|
||||||
use test;
|
use test;
|
||||||
show status like 'innodb_pages0_read%';
|
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
|
||||||
Variable_name Value
|
VARIABLE_VALUE <= 29
|
||||||
Innodb_pages0_read 26
|
1
|
||||||
set global innodb_encrypt_tables=OFF;
|
set global innodb_encrypt_tables=OFF;
|
||||||
# wait until tables are decrypted
|
# wait until tables are decrypted
|
||||||
show status like 'innodb_pages0_read%';
|
# result should be actual number of tables except remote tables could be read twice
|
||||||
Variable_name Value
|
# i.e. < 23 + 3*2 = 29
|
||||||
Innodb_pages0_read 26
|
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
|
||||||
|
VARIABLE_VALUE <= 29
|
||||||
|
1
|
||||||
use innodb_test;
|
use innodb_test;
|
||||||
show status like 'innodb_pages0_read%';
|
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
|
||||||
Variable_name Value
|
VARIABLE_VALUE <= 29
|
||||||
Innodb_pages0_read 26
|
1
|
||||||
use test;
|
use test;
|
||||||
|
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
|
||||||
|
VARIABLE_VALUE <= 29
|
||||||
|
1
|
||||||
|
FLUSH STATUS;
|
||||||
# restart and see number read page 0
|
# restart and see number read page 0
|
||||||
show status like 'innodb_pages0_read%';
|
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
|
||||||
Variable_name Value
|
VARIABLE_VALUE <= 29
|
||||||
Innodb_pages0_read 26
|
1
|
||||||
use innodb_test;
|
use innodb_test;
|
||||||
show status like 'innodb_pages0_read%';
|
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
|
||||||
Variable_name Value
|
VARIABLE_VALUE <= 29
|
||||||
Innodb_pages0_read 26
|
1
|
||||||
use test;
|
use test;
|
||||||
|
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
|
||||||
|
VARIABLE_VALUE <= 29
|
||||||
|
1
|
||||||
drop database innodb_test;
|
drop database innodb_test;
|
||||||
show status like 'innodb_pages0_read%';
|
FLUSH STATUS;
|
||||||
Variable_name Value
|
|
||||||
Innodb_pages0_read 26
|
|
||||||
|
@ -2,9 +2,6 @@ SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_
|
|||||||
NAME
|
NAME
|
||||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||||
NAME
|
NAME
|
||||||
mysql/innodb_table_stats
|
|
||||||
mysql/innodb_index_stats
|
|
||||||
innodb_system
|
|
||||||
create database enctests;
|
create database enctests;
|
||||||
use enctests;
|
use enctests;
|
||||||
create table t1(a int not null primary key, b char(200)) engine=innodb;
|
create table t1(a int not null primary key, b char(200)) engine=innodb;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
call mtr.add_suppression("Plugin 'file_key_management'");
|
call mtr.add_suppression("Plugin 'file_key_management'");
|
||||||
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
|
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
|
||||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file test/t[1-4] cannot be decrypted");
|
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file .*test/t[1-4]\\.ibd cannot be decrypted");
|
||||||
call mtr.add_suppression("InnoDB: Unable to decompress .*.test.t1\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
|
call mtr.add_suppression("InnoDB: Unable to decompress .*.test.t1\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
|
||||||
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page \\[page id: space=[1-9][0-9]*, page number=[0-9]*\\]");
|
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page \\[page id: space=[1-9][0-9]*, page number=[0-9]*\\]");
|
||||||
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
|
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
|
||||||
|
@ -6,25 +6,26 @@ innodb_encrypt_tables ON
|
|||||||
innodb_encryption_rotate_key_age 15
|
innodb_encryption_rotate_key_age 15
|
||||||
innodb_encryption_rotation_iops 100
|
innodb_encryption_rotation_iops 100
|
||||||
innodb_encryption_threads 4
|
innodb_encryption_threads 4
|
||||||
DESCRIBE INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
|
SET GLOBAL innodb_encrypt_tables = ON;
|
||||||
Field Type Null Key Default Extra
|
# Wait max 10 min for key encryption threads to encrypt all spaces
|
||||||
SPACE int(11) unsigned NO 0
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||||
NAME varchar(655) YES NULL
|
NAME
|
||||||
ENCRYPTION_SCHEME int(11) unsigned NO 0
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||||
KEYSERVER_REQUESTS int(11) unsigned NO 0
|
NAME
|
||||||
MIN_KEY_VERSION int(11) unsigned NO 0
|
mysql/innodb_table_stats
|
||||||
CURRENT_KEY_VERSION int(11) unsigned NO 0
|
mysql/innodb_index_stats
|
||||||
KEY_ROTATION_PAGE_NUMBER bigint(21) unsigned YES NULL
|
innodb_system
|
||||||
KEY_ROTATION_MAX_PAGE_NUMBER bigint(21) unsigned YES NULL
|
|
||||||
CURRENT_KEY_ID int(11) unsigned NO 0
|
|
||||||
ROTATING_OR_FLUSHING int(1) unsigned NO 0
|
|
||||||
# Wait max 5 min for key encryption threads to encrypt one space
|
|
||||||
# Success!
|
|
||||||
# Wait max 10 min for key encryption threads to encrypt all space
|
|
||||||
# Success!
|
# Success!
|
||||||
# Now turn off encryption and wait for threads to decrypt everything
|
# Now turn off encryption and wait for threads to decrypt everything
|
||||||
SET GLOBAL innodb_encrypt_tables = off;
|
SET GLOBAL innodb_encrypt_tables = off;
|
||||||
# Wait max 10 min for key encryption threads to decrypt all space
|
# Wait max 10 min for key encryption threads to encrypt all spaces
|
||||||
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||||
|
NAME
|
||||||
|
mysql/innodb_table_stats
|
||||||
|
mysql/innodb_index_stats
|
||||||
|
innodb_system
|
||||||
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||||
|
NAME
|
||||||
# Success!
|
# Success!
|
||||||
# Shutdown innodb_encryption_threads
|
# Shutdown innodb_encryption_threads
|
||||||
SET GLOBAL innodb_encryption_threads=0;
|
SET GLOBAL innodb_encryption_threads=0;
|
||||||
@ -32,16 +33,24 @@ SET GLOBAL innodb_encryption_threads=0;
|
|||||||
# since threads are off tables should remain unencrypted
|
# since threads are off tables should remain unencrypted
|
||||||
SET GLOBAL innodb_encrypt_tables = on;
|
SET GLOBAL innodb_encrypt_tables = on;
|
||||||
# Wait 15s to check that nothing gets encrypted
|
# Wait 15s to check that nothing gets encrypted
|
||||||
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||||
|
NAME
|
||||||
|
mysql/innodb_table_stats
|
||||||
|
mysql/innodb_index_stats
|
||||||
|
innodb_system
|
||||||
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||||
|
NAME
|
||||||
# Success!
|
# Success!
|
||||||
# Startup innodb_encryption_threads
|
# Startup innodb_encryption_threads
|
||||||
SET GLOBAL innodb_encryption_threads=@start_global_value;
|
SET GLOBAL innodb_encryption_threads=@start_global_value;
|
||||||
# Wait 1 min to check that it start encrypting again
|
# Wait max 10 min for key encryption threads to encrypt all spaces
|
||||||
# Success!
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||||
#
|
NAME
|
||||||
# Check that restart with encryption turned off works
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||||
# even if spaces are encrypted
|
NAME
|
||||||
#
|
mysql/innodb_table_stats
|
||||||
# First wait max 10 min for key encryption threads to encrypt all spaces
|
mysql/innodb_index_stats
|
||||||
|
innodb_system
|
||||||
# Success!
|
# Success!
|
||||||
# Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0
|
# Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0
|
||||||
SHOW VARIABLES LIKE 'innodb_encrypt%';
|
SHOW VARIABLES LIKE 'innodb_encrypt%';
|
||||||
@ -51,9 +60,10 @@ innodb_encrypt_tables OFF
|
|||||||
innodb_encryption_rotate_key_age 15
|
innodb_encryption_rotate_key_age 15
|
||||||
innodb_encryption_rotation_iops 100
|
innodb_encryption_rotation_iops 100
|
||||||
innodb_encryption_threads 0
|
innodb_encryption_threads 0
|
||||||
SELECT COUNT(*) > 0 as should_be_1
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||||
FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION
|
NAME
|
||||||
WHERE MIN_KEY_VERSION <> 0;
|
mysql/innodb_table_stats
|
||||||
should_be_1
|
mysql/innodb_index_stats
|
||||||
1
|
innodb_system
|
||||||
# Restart mysqld again...with default options
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||||
|
NAME
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -7,6 +7,8 @@ SET GLOBAL innodb_file_format = `Barracuda`;
|
|||||||
SET GLOBAL innodb_file_per_table = ON;
|
SET GLOBAL innodb_file_per_table = ON;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
|
||||||
|
FLUSH STATUS;
|
||||||
|
|
||||||
create database innodb_test;
|
create database innodb_test;
|
||||||
use innodb_test;
|
use innodb_test;
|
||||||
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
|
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
|
||||||
@ -63,16 +65,19 @@ insert into innodb_datadir2 select * from innodb_normal;
|
|||||||
insert into innodb_datadir3 select * from innodb_normal;
|
insert into innodb_datadir3 select * from innodb_normal;
|
||||||
commit;
|
commit;
|
||||||
|
|
||||||
|
FLUSH STATUS;
|
||||||
|
|
||||||
--echo # Restart server and see how many page 0's are read
|
--echo # Restart server and see how many page 0's are read
|
||||||
--source include/restart_mysqld.inc
|
--source include/restart_mysqld.inc
|
||||||
|
|
||||||
--echo # result should be less than actual number of tables
|
--echo # result should actual number of tables except remote tables could be read twice
|
||||||
--echo # i.e. < 23 + 3 = 26
|
--echo # i.e. < 23 + 3*2 = 29
|
||||||
show status like 'innodb_pages0_read%';
|
|
||||||
|
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
|
||||||
use innodb_test;
|
use innodb_test;
|
||||||
show status like 'innodb_pages0_read%';
|
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
|
||||||
use test;
|
use test;
|
||||||
show status like 'innodb_pages0_read%';
|
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
|
||||||
|
|
||||||
set global innodb_encrypt_tables=OFF;
|
set global innodb_encrypt_tables=OFF;
|
||||||
|
|
||||||
@ -80,18 +85,25 @@ set global innodb_encrypt_tables=OFF;
|
|||||||
--let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0
|
--let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0
|
||||||
--source include/wait_condition.inc
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
show status like 'innodb_pages0_read%';
|
--echo # result should be actual number of tables except remote tables could be read twice
|
||||||
|
--echo # i.e. < 23 + 3*2 = 29
|
||||||
|
|
||||||
|
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
|
||||||
use innodb_test;
|
use innodb_test;
|
||||||
show status like 'innodb_pages0_read%';
|
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
|
||||||
use test;
|
use test;
|
||||||
|
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
|
||||||
|
|
||||||
|
FLUSH STATUS;
|
||||||
|
|
||||||
--echo # restart and see number read page 0
|
--echo # restart and see number read page 0
|
||||||
-- source include/restart_mysqld.inc
|
-- source include/restart_mysqld.inc
|
||||||
|
|
||||||
show status like 'innodb_pages0_read%';
|
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
|
||||||
use innodb_test;
|
use innodb_test;
|
||||||
show status like 'innodb_pages0_read%';
|
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
|
||||||
use test;
|
use test;
|
||||||
|
SELECT VARIABLE_VALUE <= 29 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'innodb_pages0_read';
|
||||||
|
|
||||||
drop database innodb_test;
|
drop database innodb_test;
|
||||||
show status like 'innodb_pages0_read%';
|
FLUSH STATUS;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
call mtr.add_suppression("Plugin 'file_key_management'");
|
call mtr.add_suppression("Plugin 'file_key_management'");
|
||||||
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
|
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
|
||||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file test/t[1-4] cannot be decrypted");
|
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file .*test/t[1-4]\\.ibd cannot be decrypted");
|
||||||
call mtr.add_suppression("InnoDB: Unable to decompress .*.test.t1\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
|
call mtr.add_suppression("InnoDB: Unable to decompress .*.test.t1\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
|
||||||
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page \\[page id: space=[1-9][0-9]*, page number=[0-9]*\\]");
|
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page \\[page id: space=[1-9][0-9]*, page number=[0-9]*\\]");
|
||||||
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
|
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
-- source include/have_innodb.inc
|
-- source include/have_innodb.inc
|
||||||
-- source include/have_example_key_management_plugin.inc
|
-- source include/have_example_key_management_plugin.inc
|
||||||
|
-- source include/innodb_undo_tablespaces.inc
|
||||||
|
|
||||||
# embedded does not support restart
|
# embedded does not support restart
|
||||||
-- source include/not_embedded.inc
|
-- source include/not_embedded.inc
|
||||||
@ -11,78 +12,29 @@ SET @start_global_value = @@global.innodb_encryption_threads;
|
|||||||
|
|
||||||
SHOW VARIABLES LIKE 'innodb_encrypt%';
|
SHOW VARIABLES LIKE 'innodb_encrypt%';
|
||||||
|
|
||||||
DESCRIBE INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
|
SET GLOBAL innodb_encrypt_tables = ON;
|
||||||
|
|
||||||
--echo # Wait max 5 min for key encryption threads to encrypt one space
|
--echo # Wait max 10 min for key encryption threads to encrypt all spaces
|
||||||
let $cnt=300;
|
--let $wait_timeout= 600
|
||||||
while ($cnt)
|
--let $wait_condition=SELECT COUNT(*) >= 3 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||||
{
|
--source include/wait_condition.inc
|
||||||
let $success=`SELECT COUNT(*) > 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION > 0`;
|
|
||||||
if ($success)
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||||
{
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||||
let $cnt=0;
|
|
||||||
}
|
|
||||||
if (!$success)
|
|
||||||
{
|
|
||||||
real_sleep 1;
|
|
||||||
dec $cnt;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!$success)
|
|
||||||
{
|
|
||||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
|
|
||||||
SHOW STATUS LIKE 'innodb_encryption%';
|
|
||||||
-- die Timeout waiting for encryption threads
|
|
||||||
}
|
|
||||||
--echo # Success!
|
|
||||||
|
|
||||||
--echo # Wait max 10 min for key encryption threads to encrypt all space
|
|
||||||
let $cnt=600;
|
|
||||||
while ($cnt)
|
|
||||||
{
|
|
||||||
let $success=`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0`;
|
|
||||||
if ($success)
|
|
||||||
{
|
|
||||||
let $cnt=0;
|
|
||||||
}
|
|
||||||
if (!$success)
|
|
||||||
{
|
|
||||||
real_sleep 1;
|
|
||||||
dec $cnt;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!$success)
|
|
||||||
{
|
|
||||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
|
|
||||||
SHOW STATUS LIKE 'innodb_encryption%';
|
|
||||||
-- die Timeout waiting for encryption threads
|
|
||||||
}
|
|
||||||
--echo # Success!
|
--echo # Success!
|
||||||
|
|
||||||
--echo # Now turn off encryption and wait for threads to decrypt everything
|
--echo # Now turn off encryption and wait for threads to decrypt everything
|
||||||
SET GLOBAL innodb_encrypt_tables = off;
|
SET GLOBAL innodb_encrypt_tables = off;
|
||||||
|
|
||||||
--echo # Wait max 10 min for key encryption threads to decrypt all space
|
--echo # Wait max 10 min for key encryption threads to encrypt all spaces
|
||||||
let $cnt=600;
|
--let $wait_timeout= 600
|
||||||
while ($cnt)
|
--let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||||
{
|
--source include/wait_condition.inc
|
||||||
let $success=`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0`;
|
|
||||||
if ($success)
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||||
{
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||||
let $cnt=0;
|
|
||||||
}
|
|
||||||
if (!$success)
|
|
||||||
{
|
|
||||||
real_sleep 1;
|
|
||||||
dec $cnt;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!$success)
|
|
||||||
{
|
|
||||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
|
|
||||||
SHOW STATUS LIKE 'innodb_encryption%';
|
|
||||||
-- die Timeout waiting for encryption threads
|
|
||||||
}
|
|
||||||
--echo # Success!
|
--echo # Success!
|
||||||
|
|
||||||
--echo # Shutdown innodb_encryption_threads
|
--echo # Shutdown innodb_encryption_threads
|
||||||
@ -93,84 +45,32 @@ SET GLOBAL innodb_encryption_threads=0;
|
|||||||
SET GLOBAL innodb_encrypt_tables = on;
|
SET GLOBAL innodb_encrypt_tables = on;
|
||||||
|
|
||||||
--echo # Wait 15s to check that nothing gets encrypted
|
--echo # Wait 15s to check that nothing gets encrypted
|
||||||
let $cnt=15;
|
--let $wait_timeout= 15
|
||||||
while ($cnt)
|
--let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||||
{
|
--source include/wait_condition.inc
|
||||||
let $success=`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0`;
|
|
||||||
if ($success)
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||||
{
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||||
real_sleep 1;
|
|
||||||
dec $cnt;
|
|
||||||
}
|
|
||||||
if (!$success)
|
|
||||||
{
|
|
||||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
|
||||||
-- die Failure, tablespace getting encrypted even if innodb_encryption_threads=0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--echo # Success!
|
--echo # Success!
|
||||||
|
|
||||||
--echo # Startup innodb_encryption_threads
|
--echo # Startup innodb_encryption_threads
|
||||||
SET GLOBAL innodb_encryption_threads=@start_global_value;
|
SET GLOBAL innodb_encryption_threads=@start_global_value;
|
||||||
|
|
||||||
--echo # Wait 1 min to check that it start encrypting again
|
--echo # Wait max 10 min for key encryption threads to encrypt all spaces
|
||||||
let $cnt=60;
|
--let $wait_timeout= 600
|
||||||
while ($cnt)
|
--let $wait_condition=SELECT COUNT(*) >=3 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||||
{
|
--source include/wait_condition.inc
|
||||||
let $success=`SELECT COUNT(*) > 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 OR KEY_ROTATION_PAGE_NUMBER IS NOT NULL`;
|
|
||||||
if ($success)
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||||
{
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||||
let $cnt=0;
|
|
||||||
}
|
|
||||||
if (!$success)
|
|
||||||
{
|
|
||||||
real_sleep 1;
|
|
||||||
dec $cnt;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!$success)
|
|
||||||
{
|
|
||||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
|
|
||||||
SHOW STATUS LIKE 'innodb_encryption%';
|
|
||||||
-- die Timeout waiting for encryption threads
|
|
||||||
}
|
|
||||||
--echo # Success!
|
|
||||||
|
|
||||||
--echo #
|
|
||||||
--echo # Check that restart with encryption turned off works
|
|
||||||
--echo # even if spaces are encrypted
|
|
||||||
--echo #
|
|
||||||
--echo # First wait max 10 min for key encryption threads to encrypt all spaces
|
|
||||||
let $cnt=600;
|
|
||||||
while ($cnt)
|
|
||||||
{
|
|
||||||
let $success=`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0`;
|
|
||||||
if ($success)
|
|
||||||
{
|
|
||||||
let $cnt=0;
|
|
||||||
}
|
|
||||||
if (!$success)
|
|
||||||
{
|
|
||||||
real_sleep 1;
|
|
||||||
dec $cnt;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!$success)
|
|
||||||
{
|
|
||||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
|
|
||||||
SHOW STATUS LIKE 'innodb_encryption%';
|
|
||||||
-- die Timeout waiting for encryption threads
|
|
||||||
}
|
|
||||||
--echo # Success!
|
--echo # Success!
|
||||||
--echo # Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0
|
--echo # Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0
|
||||||
-- let $restart_parameters=--innodb_encrypt_tables=0 --innodb_encryption_threads=0
|
-- let $restart_parameters=--innodb_encrypt_tables=0 --innodb_encryption_threads=0
|
||||||
-- source include/restart_mysqld.inc
|
-- source include/restart_mysqld.inc
|
||||||
|
|
||||||
SHOW VARIABLES LIKE 'innodb_encrypt%';
|
SHOW VARIABLES LIKE 'innodb_encrypt%';
|
||||||
SELECT COUNT(*) > 0 as should_be_1
|
|
||||||
FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION
|
|
||||||
WHERE MIN_KEY_VERSION <> 0;
|
|
||||||
|
|
||||||
--echo # Restart mysqld again...with default options
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||||
-- let $restart_parameters=
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||||
-- source include/restart_mysqld.inc
|
|
||||||
|
@ -48,9 +48,8 @@ show status like 'innodb_pages0_read%';
|
|||||||
#
|
#
|
||||||
# Verify
|
# Verify
|
||||||
#
|
#
|
||||||
--echo # should be 100
|
--echo # should be empty
|
||||||
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE NAME LIKE 'innodb_encrypted%';
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE NAME LIKE 'innodb_encrypted%';
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# This will create 100 tables that are encrypted always
|
# This will create 100 tables that are encrypted always
|
||||||
@ -84,10 +83,10 @@ show status like 'innodb_pages0_read%';
|
|||||||
#
|
#
|
||||||
# Verify
|
# Verify
|
||||||
#
|
#
|
||||||
--echo # should be 100
|
--echo # should contain 100 tables
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%';
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||||
--echo # should be 100
|
--echo # should contain 0 tables
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%';
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||||
|
|
||||||
#
|
#
|
||||||
# This will create 100 tables that are not encrypted
|
# This will create 100 tables that are not encrypted
|
||||||
@ -121,45 +120,26 @@ show status like 'innodb_pages0_read%';
|
|||||||
#
|
#
|
||||||
# Verify
|
# Verify
|
||||||
#
|
#
|
||||||
--echo # should be 100
|
--echo # should contain 100 tables
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%';
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||||
--echo # should be 200
|
--echo # should contain 100 tables
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%';
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||||
|
|
||||||
use test;
|
use test;
|
||||||
show status like 'innodb_pages0_read%';
|
show status like 'innodb_pages0_read%';
|
||||||
|
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%';
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%';
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||||
|
|
||||||
SET GLOBAL innodb_encrypt_tables = on;
|
SET GLOBAL innodb_encrypt_tables = on;
|
||||||
SET GLOBAL innodb_encryption_threads=4;
|
SET GLOBAL innodb_encryption_threads=4;
|
||||||
|
|
||||||
--echo # Wait until all encrypted tables have been encrypted
|
--let $wait_timeout= 600
|
||||||
let $cnt=600;
|
--let $wait_condition=SELECT COUNT(*) = 100 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||||
while ($cnt)
|
--source include/wait_condition.inc
|
||||||
{
|
|
||||||
let $success=`SELECT COUNT(*) = 100 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0`;
|
|
||||||
if ($success)
|
|
||||||
{
|
|
||||||
let $cnt=0;
|
|
||||||
}
|
|
||||||
if (!$success)
|
|
||||||
{
|
|
||||||
real_sleep 1;
|
|
||||||
dec $cnt;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!$success)
|
|
||||||
{
|
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
|
||||||
SHOW STATUS LIKE 'innodb_encryption%';
|
|
||||||
-- die Timeout waiting for encryption threads
|
|
||||||
}
|
|
||||||
|
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%';
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%';
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||||
show status like 'innodb_pages0_read%';
|
show status like 'innodb_pages0_read%';
|
||||||
|
|
||||||
--echo # Success!
|
--echo # Success!
|
||||||
@ -226,40 +206,19 @@ while ($tables)
|
|||||||
|
|
||||||
show status like 'innodb_pages0_read%';
|
show status like 'innodb_pages0_read%';
|
||||||
|
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%';
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%';
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||||
|
|
||||||
SET GLOBAL innodb_encrypt_tables = off;
|
SET GLOBAL innodb_encrypt_tables = off;
|
||||||
SET GLOBAL innodb_encryption_threads=4;
|
SET GLOBAL innodb_encryption_threads=4;
|
||||||
|
|
||||||
--echo # Wait until all default encrypted tables have been decrypted
|
--let $wait_timeout= 600
|
||||||
let $cnt=600;
|
--let $wait_condition=SELECT COUNT(*) = 100 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||||
while ($cnt)
|
--source include/wait_condition.inc
|
||||||
{
|
|
||||||
let $success=`SELECT COUNT(*) = 100 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0`;
|
|
||||||
if ($success)
|
|
||||||
{
|
|
||||||
let $cnt=0;
|
|
||||||
}
|
|
||||||
if (!$success)
|
|
||||||
{
|
|
||||||
real_sleep 1;
|
|
||||||
dec $cnt;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!$success)
|
|
||||||
{
|
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
|
||||||
SHOW STATUS LIKE 'innodb_encryption%';
|
|
||||||
-- die Timeout waiting for encryption threads
|
|
||||||
}
|
|
||||||
|
|
||||||
--echo # should be 100
|
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%';
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||||
--echo # should be 200
|
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%' ORDER BY NAME;
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%';
|
|
||||||
show status like 'innodb_pages0_read%';
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Cleanup
|
# Cleanup
|
||||||
|
@ -1,47 +1,58 @@
|
|||||||
galera_wsrep_provider_unset_set : lp1379204 'Unsupported protocol downgrade: incremental data collection disabled. Expect abort.'
|
##############################################################################
|
||||||
galera_kill_nochanges : mysql-wsrep#24 Galera server does not restart properly if killed
|
#
|
||||||
galera_bf_abort_for_update : mysql-wsrep#26 SELECT FOR UPDATE sometimes allowed to proceed in the face of a concurrent update
|
# List the test cases that are to be disabled temporarily.
|
||||||
galera_toi_ddl_fk_insert : qa#39 galera_toi_ddl_fk_insert fails sporadically
|
#
|
||||||
galera_binlog_row_image : MDEV-7471 - Enable binlog_row_image parameter in MariaDB
|
# Separate the test case name and the comment with ':'.
|
||||||
galera_binlog_rows_query_log_events : Unknown system variable 'binlog_rows_query_log_events' (see annotate_rows_log_event)
|
#
|
||||||
|
# <testcasename> : MDEV-<xxxx> <comment>
|
||||||
galera_ist_mysqldump : Lost connection to MySQL server during query
|
#
|
||||||
galera_ist_xtrabackup-v2 : mysqltest failed but provided no output
|
# Do not use any TAB characters for whitespace.
|
||||||
galera_ist_innodb_flush_logs : mysqltest failed but provided no output
|
#
|
||||||
galera_sst_mysqldump : query 'show status' failed with wrong errno 1927
|
##############################################################################
|
||||||
galera_as_master_gtid : Needs to be re-worked
|
MW-336 : MDEV-13549 Galera test failures
|
||||||
galera_as_master_gtid_change_master : Needs to be re-worked
|
galera_gra_log : MDEV-13549 Galera test failures
|
||||||
galera_migrate : query 'let $success= `$wait_condition`' failed: 1146
|
galera_flush_local : MDEV-13549 Galera test failures
|
||||||
galera_var_notify_cmd : Result content mismatch
|
galera_flush : MDEV-13549 Galera test failures
|
||||||
query_cache : Fails intermittently due to content mismatch. Needs to be investigated
|
MW-329 : MDEV-13549 Galera test failures
|
||||||
basic : Fails intermittently without providing any output. Needs to be investigated
|
galera_account_management : MariaDB 10.0 does not support ALTER USER
|
||||||
galera_var_auto_inc_control_on : Failing sporadically with content mismatch
|
galera_binlog_row_image : MariaDB 10.0 does not support binlog_row_image
|
||||||
galera_parallel_simple : Failing sporadically
|
galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events
|
||||||
galera_bf_abort : Failing sporadically
|
GAL-419 : MDEV-13549 Galera test failures
|
||||||
galera_log_output_csv : Failing sporadically
|
galera_toi_ddl_fk_insert : MDEV-13549 Galera test failures
|
||||||
galera_as_slave_preordered : wsrep-preordered is not available in MariaDB Galera cluster
|
galera_var_notify_cmd : MDEV-13549 Galera test failures
|
||||||
galera_gra_log : TODO: investigate
|
galera_var_slave_threads : MDEV-13549 Galera test failures
|
||||||
galera_as_slave_replication_bundle : TODO: investigate
|
mysql-wsrep#90 : MDEV-13549 Galera test failures
|
||||||
galera_ssl_upgrade : TODO: investigate
|
galera_as_master_gtid : Requires MySQL GTID
|
||||||
mysql-wsrep#90 : TODO: investigate
|
galera_as_master_gtid_change_master : Requires MySQL GTID
|
||||||
galera_flush : mysql-wsrep/issues/229
|
galera_as_slave_replication_bundle : MDEV-13549 Galera test failures
|
||||||
galera_transaction_read_only : mysql-wsrep/issues/229
|
galera_as_slave_preordered : wsrep-preordered feature not merged to MariaDB
|
||||||
galera_gcs_fragment : Incorrect arguments to SET
|
galera_gcs_fragment : MDEV-13549 Galera test failures
|
||||||
galera_flush_local : Fails sporadically
|
galera_gcache_recover : MDEV-13549 Galera test failures
|
||||||
galera_binlog_stmt_autoinc : TODO: investigate
|
galera_gcache_recover_full_gcache : MDEV-13549 Galera test failures
|
||||||
galera_concurrent_ctas : Test times out, investigate
|
galera_gcache_recover_manytrx : MDEV-13549 Galera test failures
|
||||||
MW-286 : TODO: investigate
|
galera_ist_mysqldump : MDEV-13549 Galera test failures
|
||||||
galera_sst_xtrabackup-v2-options : TODO: Fix test case
|
mysql-wsrep#31 : MDEV-13549 Galera test failures
|
||||||
galera_sst_xtrabackup-v2 : MDEV-11208
|
galera_migrate : MariaDB 10.0 does not support START SLAVE USER
|
||||||
galera_sst_xtrabackup-v2_encrypt_with_key : MDEV-11208
|
galera_concurrent_ctas : MDEV-13549 Galera test failures
|
||||||
mysql-wsrep#33 : TODO: investigate
|
galera_bf_abort_for_update : MDEV-13549 Galera test failures
|
||||||
|
galera_wsrep_desync_wsrep_on : MDEV-13549 Galera test failures
|
||||||
|
galera_ssl_upgrade : MDEV-13549 Galera test failures
|
||||||
|
mysql-wsrep#33 : MDEV-13549 Galera test failures
|
||||||
|
galera_var_auto_inc_control_on : MDEV-13549 Galera test failures
|
||||||
|
MW-44 : MDEV-13549 Galera test failures
|
||||||
|
galera_var_retry_autocommit : MDEV-13549 Galera test failures
|
||||||
|
pxc-421 : MDEV-13549 Galera test failures
|
||||||
|
lp1376747-2 : MDEV-13549 Galera test failures
|
||||||
|
lp1376747 : MDEV-13549 Galera test failures
|
||||||
|
galera_toi_ddl_nonconflicting : MDEV-13549 Galera test failures
|
||||||
|
galera_parallel_simple : MDEV-13549 Galera test failures
|
||||||
|
galera_admin : MDEV-13549 Galera test failures
|
||||||
|
galera_var_max_ws_rows : MDEV-13549 Galera test failures 10.1
|
||||||
|
MW-286 : MDEV-13549 Galera test failures 10.1
|
||||||
|
galera_as_master: MDEV-13549 Galera test failures 10.1
|
||||||
|
galera_pc_ignore_sb : MDEV-13549 Galera test failures 10.1
|
||||||
|
galera_lock_table : MDEV-13549 Galera test failures 10.1
|
||||||
|
MW-284 : MDEV-13549 Galera test failures 10.1
|
||||||
|
galera_as_slave : MDEV-13549 Galera test failures 10.1
|
||||||
galera_var_innodb_disallow_writes : MDEV-10949
|
galera_var_innodb_disallow_writes : MDEV-10949
|
||||||
MW-258 : MDEV-11229
|
galera_kill_applier : race condition at the start of the test
|
||||||
galera_as_master : MDEV-11229
|
|
||||||
MW-44 : MDEV-11229
|
|
||||||
galera_gcs_fc_limit : MDEV-11229
|
|
||||||
galera_roles : MDEV-11229
|
|
||||||
galera_lock_table : MDEV-11229
|
|
||||||
GAL-480 : Investigate
|
|
||||||
galera_fk_no_pk :Investigate
|
|
||||||
galera_account_management : Investigate
|
|
||||||
|
@ -9,7 +9,7 @@ default-storage-engine=innodb
|
|||||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||||
wsrep_node_address=127.0.0.1
|
wsrep_node_address=127.0.0.1
|
||||||
# enforce read-committed characteristics across the cluster
|
# enforce read-committed characteristics across the cluster
|
||||||
wsrep-sync-wait=7
|
wsrep-sync-wait=15
|
||||||
|
|
||||||
[mysqld.1]
|
[mysqld.1]
|
||||||
#galera_port=@OPT.port
|
#galera_port=@OPT.port
|
||||||
@ -29,7 +29,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#gale
|
|||||||
|
|
||||||
# enforce read-committed characteristics across the cluster
|
# enforce read-committed characteristics across the cluster
|
||||||
wsrep_causal_reads=ON
|
wsrep_causal_reads=ON
|
||||||
wsrep_sync_wait = 7
|
wsrep_sync_wait = 15
|
||||||
|
|
||||||
wsrep_node_address=127.0.0.1
|
wsrep_node_address=127.0.0.1
|
||||||
wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
|
wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
|
||||||
|
@ -29,7 +29,7 @@ wsrep_node_address=127.0.0.1
|
|||||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||||
# enforce read-committed characteristics across the cluster
|
# enforce read-committed characteristics across the cluster
|
||||||
wsrep-causal-reads=ON
|
wsrep-causal-reads=ON
|
||||||
wsrep-sync-wait=7
|
wsrep-sync-wait=15
|
||||||
|
|
||||||
[mysqld.2]
|
[mysqld.2]
|
||||||
#galera_port=@OPT.port
|
#galera_port=@OPT.port
|
||||||
@ -48,7 +48,7 @@ wsrep_node_address=127.0.0.1
|
|||||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
||||||
# enforce read-committed characteristics across the cluster
|
# enforce read-committed characteristics across the cluster
|
||||||
wsrep-causal-reads=ON
|
wsrep-causal-reads=ON
|
||||||
wsrep-sync-wait=7
|
wsrep-sync-wait=15
|
||||||
|
|
||||||
[mysqld.3]
|
[mysqld.3]
|
||||||
server-id=3
|
server-id=3
|
||||||
|
@ -29,7 +29,7 @@ wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.install_timeout = P
|
|||||||
|
|
||||||
# enforce read-committed characteristics across the cluster
|
# enforce read-committed characteristics across the cluster
|
||||||
wsrep_causal_reads=ON
|
wsrep_causal_reads=ON
|
||||||
wsrep_sync_wait = 7
|
wsrep_sync_wait = 15
|
||||||
|
|
||||||
wsrep_node_address=127.0.0.1
|
wsrep_node_address=127.0.0.1
|
||||||
wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
|
wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
|
||||||
@ -49,7 +49,7 @@ wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.install_timeout = P
|
|||||||
|
|
||||||
# enforce read-committed characteristics across the cluster
|
# enforce read-committed characteristics across the cluster
|
||||||
wsrep_causal_reads=ON
|
wsrep_causal_reads=ON
|
||||||
wsrep_sync_wait = 7
|
wsrep_sync_wait = 15
|
||||||
|
|
||||||
wsrep_node_address=127.0.0.1
|
wsrep_node_address=127.0.0.1
|
||||||
wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port
|
wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port
|
||||||
|
@ -23,7 +23,7 @@ wsrep_provider_options='base_port=@mysqld.1.#galera_port'
|
|||||||
|
|
||||||
# enforce read-committed characteristics across the cluster
|
# enforce read-committed characteristics across the cluster
|
||||||
wsrep_causal_reads=ON
|
wsrep_causal_reads=ON
|
||||||
wsrep_sync_wait = 7
|
wsrep_sync_wait = 15
|
||||||
|
|
||||||
wsrep_node_address=127.0.0.1
|
wsrep_node_address=127.0.0.1
|
||||||
wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port
|
wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port
|
||||||
@ -49,7 +49,7 @@ wsrep_provider_options='base_port=@mysqld.2.#galera_port'
|
|||||||
|
|
||||||
# enforce read-committed characteristics across the cluster
|
# enforce read-committed characteristics across the cluster
|
||||||
wsrep_causal_reads=ON
|
wsrep_causal_reads=ON
|
||||||
wsrep_sync_wait = 7
|
wsrep_sync_wait = 15
|
||||||
|
|
||||||
wsrep_node_address=127.0.0.1
|
wsrep_node_address=127.0.0.1
|
||||||
wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
|
wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
|
||||||
|
@ -33,7 +33,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
|||||||
|
|
||||||
# enforce read-committed characteristics across the cluster
|
# enforce read-committed characteristics across the cluster
|
||||||
wsrep-causal-reads=ON
|
wsrep-causal-reads=ON
|
||||||
wsrep-sync-wait=7
|
wsrep-sync-wait=15
|
||||||
server-id=2
|
server-id=2
|
||||||
|
|
||||||
[mysqld.3]
|
[mysqld.3]
|
||||||
@ -57,7 +57,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
|
|||||||
|
|
||||||
# enforce read-committed characteristics across the cluster
|
# enforce read-committed characteristics across the cluster
|
||||||
wsrep-causal-reads=ON
|
wsrep-causal-reads=ON
|
||||||
wsrep-sync-wait=7
|
wsrep-sync-wait=15
|
||||||
server-id=3
|
server-id=3
|
||||||
|
|
||||||
[ENV]
|
[ENV]
|
||||||
|
@ -30,7 +30,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
|||||||
|
|
||||||
# enforce read-committed characteristics across the cluster
|
# enforce read-committed characteristics across the cluster
|
||||||
wsrep-causal-reads=ON
|
wsrep-causal-reads=ON
|
||||||
wsrep-sync-wait=7
|
wsrep-sync-wait=15
|
||||||
server-id=2
|
server-id=2
|
||||||
|
|
||||||
[mysqld.3]
|
[mysqld.3]
|
||||||
@ -51,7 +51,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
|
|||||||
|
|
||||||
# enforce read-committed characteristics across the cluster
|
# enforce read-committed characteristics across the cluster
|
||||||
wsrep-causal-reads=ON
|
wsrep-causal-reads=ON
|
||||||
wsrep-sync-wait=7
|
wsrep-sync-wait=15
|
||||||
server-id=3
|
server-id=3
|
||||||
|
|
||||||
[mysqld.4]
|
[mysqld.4]
|
||||||
@ -72,7 +72,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port'
|
|||||||
|
|
||||||
# enforce read-committed characteristics across the cluster
|
# enforce read-committed characteristics across the cluster
|
||||||
wsrep-causal-reads=ON
|
wsrep-causal-reads=ON
|
||||||
wsrep-sync-wait=7
|
wsrep-sync-wait=15
|
||||||
server-id=4
|
server-id=4
|
||||||
|
|
||||||
[ENV]
|
[ENV]
|
||||||
|
@ -10,7 +10,7 @@ wsrep-provider=@ENV.WSREP_PROVIDER
|
|||||||
wsrep_node_address=127.0.0.1
|
wsrep_node_address=127.0.0.1
|
||||||
# enforce read-committed characteristics across the cluster
|
# enforce read-committed characteristics across the cluster
|
||||||
wsrep-causal-reads=ON
|
wsrep-causal-reads=ON
|
||||||
wsrep-sync-wait=7
|
wsrep-sync-wait=15
|
||||||
|
|
||||||
[mysqld.1]
|
[mysqld.1]
|
||||||
#galera_port=@OPT.port
|
#galera_port=@OPT.port
|
||||||
|
@ -2,15 +2,18 @@ SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
|
|||||||
connection node_2;
|
connection node_2;
|
||||||
SET @@global.wsrep_desync = 1;
|
SET @@global.wsrep_desync = 1;
|
||||||
SET SESSION wsrep_dirty_reads=1;
|
SET SESSION wsrep_dirty_reads=1;
|
||||||
|
SET SESSION wsrep_sync_wait=0;
|
||||||
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
|
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
|
||||||
connection node_1;
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
|
||||||
connection node_2;
|
connection node_2;
|
||||||
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
|
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
|
||||||
|
SET wsrep_dirty_reads=0;
|
||||||
SHOW STATUS LIKE 'wsrep_desync_count';
|
SHOW STATUS LIKE 'wsrep_desync_count';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
wsrep_desync_count 0
|
wsrep_desync_count 0
|
||||||
SET @@global.wsrep_desync = 0;
|
SET @@global.wsrep_desync = 0;
|
||||||
|
SET SESSION wsrep_sync_wait=15;
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 CHAR(10), f0 integer) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 CHAR(10), f0 integer) ENGINE=InnoDB;
|
||||||
FLUSH TABLE t1 FOR EXPORT;
|
FLUSH TABLE t1 FOR EXPORT;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
@ -17,7 +17,7 @@ INSERT INTO t1 VALUES (1);
|
|||||||
connection node_3;
|
connection node_3;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SET global wsrep_sync_wait=7;
|
SET global wsrep_sync_wait=15;
|
||||||
connection node_3;
|
connection node_3;
|
||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
RESET SLAVE ALL;
|
RESET SLAVE ALL;
|
||||||
|
@ -26,3 +26,4 @@ connection node_1b;
|
|||||||
connection node_1;
|
connection node_1;
|
||||||
DROP PROCEDURE proc_insert;
|
DROP PROCEDURE proc_insert;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
CALL mtr.add_suppression("conflict state 3 after post commit");
|
||||||
|
42
mysql-test/suite/galera/r/MW-336.result
Normal file
42
mysql-test/suite/galera/r/MW-336.result
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
|
||||||
|
SET GLOBAL wsrep_slave_threads = 10;
|
||||||
|
SET GLOBAL wsrep_slave_threads = 1;
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
SET GLOBAL wsrep_slave_threads = 10;
|
||||||
|
SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
|
||||||
|
COUNT(*) = 11
|
||||||
|
1
|
||||||
|
SET GLOBAL wsrep_slave_threads = 20;
|
||||||
|
SELECT COUNT(*) = 21 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
|
||||||
|
COUNT(*) = 21
|
||||||
|
1
|
||||||
|
SET GLOBAL wsrep_slave_threads = 1;
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
INSERT INTO t1 VALUES (2);
|
||||||
|
INSERT INTO t1 VALUES (3);
|
||||||
|
INSERT INTO t1 VALUES (4);
|
||||||
|
INSERT INTO t1 VALUES (5);
|
||||||
|
INSERT INTO t1 VALUES (6);
|
||||||
|
INSERT INTO t1 VALUES (7);
|
||||||
|
INSERT INTO t1 VALUES (8);
|
||||||
|
INSERT INTO t1 VALUES (9);
|
||||||
|
SET GLOBAL wsrep_slave_threads = 10;
|
||||||
|
SET GLOBAL wsrep_slave_threads = 0;
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect wsrep_slave_threads value: '0'
|
||||||
|
INSERT INTO t1 VALUES (10);
|
||||||
|
INSERT INTO t1 VALUES (11);
|
||||||
|
INSERT INTO t1 VALUES (12);
|
||||||
|
INSERT INTO t1 VALUES (13);
|
||||||
|
INSERT INTO t1 VALUES (14);
|
||||||
|
INSERT INTO t1 VALUES (15);
|
||||||
|
INSERT INTO t1 VALUES (16);
|
||||||
|
INSERT INTO t1 VALUES (17);
|
||||||
|
INSERT INTO t1 VALUES (18);
|
||||||
|
INSERT INTO t1 VALUES (19);
|
||||||
|
INSERT INTO t1 VALUES (20);
|
||||||
|
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
|
||||||
|
COUNT(*) = 2
|
||||||
|
1
|
||||||
|
SET GLOBAL wsrep_slave_threads = 1;
|
||||||
|
DROP TABLE t1;
|
9
mysql-test/suite/galera/r/MW-357.result
Normal file
9
mysql-test/suite/galera/r/MW-357.result
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
connection node_2;
|
||||||
|
SET GLOBAL wsrep_slave_threads = 0;
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect wsrep_slave_threads value: '0'
|
||||||
|
connection node_1;
|
||||||
|
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
|
||||||
|
connection node_1;
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
DROP TABLE t1;
|
51
mysql-test/suite/galera/r/MW-86-wait1.result
Normal file
51
mysql-test/suite/galera/r/MW-86-wait1.result
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
connection node_2;
|
||||||
|
SELECT @@debug_sync;
|
||||||
|
@@debug_sync
|
||||||
|
ON - current signal: ''
|
||||||
|
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 TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t_wait1 VALUES (1);
|
||||||
|
connection node_2;
|
||||||
|
SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
||||||
|
SHOW BINARY LOGS;
|
||||||
|
SHOW BINLOG EVENTS;
|
||||||
|
SHOW COLUMNS FROM t1;
|
||||||
|
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 = "-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 SESSION debug_sync = "now SIGNAL signal.wsrep_apply_cb";
|
||||||
|
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: ''
|
53
mysql-test/suite/galera/r/MW-86-wait8.result
Normal file
53
mysql-test/suite/galera/r/MW-86-wait8.result
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
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
|
||||||
|
connection node_1;
|
||||||
|
CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t_wait8 VALUES (1);
|
||||||
|
connection node_2;
|
||||||
|
SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S";
|
||||||
|
SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
||||||
|
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 = "-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 DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||||
|
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: ''
|
@ -10,6 +10,7 @@ c1
|
|||||||
5
|
5
|
||||||
|
|
||||||
# On node_1
|
# On node_1
|
||||||
|
connection node_1;
|
||||||
SELECT * FROM test.t1;
|
SELECT * FROM test.t1;
|
||||||
c1
|
c1
|
||||||
1
|
1
|
||||||
@ -19,6 +20,7 @@ c1
|
|||||||
5
|
5
|
||||||
|
|
||||||
# On node_2
|
# On node_2
|
||||||
|
connection node_2;
|
||||||
SELECT * FROM test.t1;
|
SELECT * FROM test.t1;
|
||||||
c1
|
c1
|
||||||
1
|
1
|
||||||
@ -27,4 +29,6 @@ c1
|
|||||||
4
|
4
|
||||||
5
|
5
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
disconnect node_2;
|
||||||
|
disconnect node_1;
|
||||||
# End of test
|
# End of test
|
||||||
|
@ -13,7 +13,7 @@ COUNT(*) = 0
|
|||||||
1
|
1
|
||||||
connection node_1;
|
connection node_1;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
SET SESSION wsrep_sync_wait = 7;
|
SET SESSION wsrep_sync_wait = 15;
|
||||||
SELECT COUNT(*) = 2 FROM t1;
|
SELECT COUNT(*) = 2 FROM t1;
|
||||||
COUNT(*) = 2
|
COUNT(*) = 2
|
||||||
1
|
1
|
||||||
|
@ -15,7 +15,7 @@ SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system use
|
|||||||
COUNT(*) = 1
|
COUNT(*) = 1
|
||||||
1
|
1
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
SET SESSION wsrep_sync_wait = 7;
|
SET SESSION wsrep_sync_wait = 15;
|
||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
|
@ -38,11 +38,9 @@ i c
|
|||||||
show variables like 'binlog_format';
|
show variables like 'binlog_format';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
binlog_format STATEMENT
|
binlog_format STATEMENT
|
||||||
show variables like '%auto_increment%';
|
show variables like 'auto_increment_increment';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
auto_increment_increment 7
|
auto_increment_increment 7
|
||||||
auto_increment_offset 5
|
|
||||||
wsrep_auto_increment_control ON
|
|
||||||
connection node_2;
|
connection node_2;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
i c
|
i c
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(6)) ENGINE=InnoDB;
|
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;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES (1,'node_2');
|
INSERT INTO t1 VALUES (1,'node_2');
|
||||||
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES (1,'node_1');
|
INSERT INTO t1 VALUES (1,'node_1');
|
||||||
|
connection node_2a;
|
||||||
|
connection node_2;
|
||||||
INSERT INTO t1 VALUES (2, 'node_2');
|
INSERT INTO t1 VALUES (2, 'node_2');
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
wsrep_local_aborts_increment
|
wsrep_local_aborts_increment
|
||||||
1
|
1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
@ -9,7 +9,7 @@ SET SESSION wsrep_sync_wait = 0;
|
|||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
SET SESSION wsrep_sync_wait = 7;
|
SET SESSION wsrep_sync_wait = 15;
|
||||||
SELECT COUNT(*) = 1 FROM t1;
|
SELECT COUNT(*) = 1 FROM t1;
|
||||||
COUNT(*) = 1
|
COUNT(*) = 1
|
||||||
1
|
1
|
||||||
|
@ -10,7 +10,7 @@ SELECT GET_LOCK("foo", 1000);;
|
|||||||
connection node_1;
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
connection node_2;
|
connection node_2;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
wsrep_local_aborts_increment
|
wsrep_local_aborts_increment
|
||||||
1
|
1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
@ -6,7 +6,7 @@ SELECT SLEEP(1000);;
|
|||||||
connection node_1;
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
connection node_2;
|
connection node_2;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
wsrep_local_aborts_increment
|
wsrep_local_aborts_increment
|
||||||
1
|
1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
89
mysql-test/suite/galera/r/galera_ddl_multiline.result
Normal file
89
mysql-test/suite/galera/r/galera_ddl_multiline.result
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
connection node_1;
|
||||||
|
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||||
|
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`f1` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
|
SHOW CREATE TABLE t2;
|
||||||
|
Table Create Table
|
||||||
|
t2 CREATE TABLE `t2` (
|
||||||
|
`f1` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
|
connection node_2;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`f1` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
|
SHOW CREATE TABLE t2;
|
||||||
|
Table Create Table
|
||||||
|
t2 CREATE TABLE `t2` (
|
||||||
|
`f1` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
|
connection node_1;
|
||||||
|
CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB; CREATE TABLE t4 (f1 INTEGER) ENGINE=InnoDB;;
|
||||||
|
SHOW CREATE TABLE t3;
|
||||||
|
Table Create Table
|
||||||
|
t3 CREATE TABLE `t3` (
|
||||||
|
`f1` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
|
SHOW CREATE TABLE t4;
|
||||||
|
Table Create Table
|
||||||
|
t4 CREATE TABLE `t4` (
|
||||||
|
`f1` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
|
connection node_2;
|
||||||
|
SHOW CREATE TABLE t3;
|
||||||
|
Table Create Table
|
||||||
|
t3 CREATE TABLE `t3` (
|
||||||
|
`f1` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
|
SHOW CREATE TABLE t4;
|
||||||
|
Table Create Table
|
||||||
|
t4 CREATE TABLE `t4` (
|
||||||
|
`f1` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
|
connection node_1;
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
CREATE TABLE t5 (f1 INTEGER) ENGINE=InnoDB;
|
||||||
|
SELECT COUNT(*) = 1 FROM t1;
|
||||||
|
COUNT(*) = 1
|
||||||
|
1
|
||||||
|
SHOW CREATE TABLE t5;
|
||||||
|
Table Create Table
|
||||||
|
t5 CREATE TABLE `t5` (
|
||||||
|
`f1` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
|
connection node_2;
|
||||||
|
SELECT COUNT(*) = 1 FROM t1;
|
||||||
|
COUNT(*) = 1
|
||||||
|
1
|
||||||
|
SHOW CREATE TABLE t5;
|
||||||
|
Table Create Table
|
||||||
|
t5 CREATE TABLE `t5` (
|
||||||
|
`f1` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
|
connection node_1;
|
||||||
|
CREATE TABLE t6 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t2 VALUES (1);;
|
||||||
|
SELECT COUNT(*) = 1 FROM t2;
|
||||||
|
COUNT(*) = 1
|
||||||
|
1
|
||||||
|
SHOW CREATE TABLE t6;
|
||||||
|
Table Create Table
|
||||||
|
t6 CREATE TABLE `t6` (
|
||||||
|
`f1` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
|
connection node_2;
|
||||||
|
SELECT COUNT(*) = 1 FROM t2;
|
||||||
|
COUNT(*) = 1
|
||||||
|
1
|
||||||
|
SHOW CREATE TABLE t6;
|
||||||
|
Table Create Table
|
||||||
|
t6 CREATE TABLE `t6` (
|
||||||
|
`f1` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
|
include/diff_servers.inc [servers=1 2]
|
||||||
|
connection node_1;
|
||||||
|
DROP TABLE t1, t2, t3, t4, t5, t6;
|
@ -50,8 +50,8 @@ WSREP_SST_AUTH
|
|||||||
WSREP_SST_DONOR
|
WSREP_SST_DONOR
|
||||||
WSREP_SST_DONOR_REJECTS_QUERIES OFF
|
WSREP_SST_DONOR_REJECTS_QUERIES OFF
|
||||||
WSREP_SST_METHOD rsync
|
WSREP_SST_METHOD rsync
|
||||||
WSREP_SYNC_WAIT 7
|
WSREP_SYNC_WAIT 15
|
||||||
<BASE_DIR>; <BASE_HOST>; <BASE_PORT>; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.causal_keepalive_period = PT1S; evs.debug_log_mask = 0x1; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.info_log_mask = 0; evs.install_timeout = PT7.5S; evs.join_retrans_period = PT1S; evs.keepalive_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT10S; evs.use_aggregate = true; evs.user_send_window = 2; evs.version = 0; evs.view_forget_timeout = P1D; <GCACHE_DIR>; gcache.keep_pages_size = 0; gcache.mem_size = 0; <GCACHE_NAME>; gcache.page_size = 128M; gcache.recover = no; gcache.size = 10M; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; <GCS_RECV_Q_HARD_LIMIT>; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; <GMCAST_LISTEN_ADDR>; gmcast.mcast_addr = ; gmcast.mcast_ttl = 1; gmcast.peer_timeout = PT3S; gmcast.segment = 0; gmcast.time_wait = PT5S; gmcast.version = 0; <IST_RECV_ADDR>; pc.announce_timeout = PT3S; pc.checksum = false; pc.ignore_quorum = false; pc.ignore_sb = false; pc.linger = PT20S; pc.npvo = false; pc.recovery = true; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = PT30S; pc.weight = 1; protonet.backend = asio; protonet.version = 0; repl.causal_read_timeout = PT90S; repl.commit_order = 3; repl.key_format = FLAT8; repl.max_ws_size = 2147483647; repl.proto_max = 7; socket.checksum = 2; socket.recv_buf_size = 212992;
|
<BASE_DIR>; <BASE_HOST>; <BASE_PORT>; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.causal_keepalive_period = PT1S; evs.debug_log_mask = 0x1; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT30S; evs.info_log_mask = 0; evs.install_timeout = PT15S; evs.join_retrans_period = PT1S; evs.keepalive_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT10S; evs.use_aggregate = true; evs.user_send_window = 2; evs.version = 0; evs.view_forget_timeout = P1D; <GCACHE_DIR>; gcache.keep_pages_size = 0; gcache.mem_size = 0; <GCACHE_NAME>; gcache.page_size = 128M; gcache.recover = no; gcache.size = 10M; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; <GCS_RECV_Q_HARD_LIMIT>; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; <GMCAST_LISTEN_ADDR>; gmcast.mcast_addr = ; gmcast.mcast_ttl = 1; gmcast.peer_timeout = PT3S; gmcast.segment = 0; gmcast.time_wait = PT5S; gmcast.version = 0; <IST_RECV_ADDR>; pc.announce_timeout = PT3S; pc.checksum = false; pc.ignore_quorum = false; pc.ignore_sb = false; pc.linger = PT20S; pc.npvo = false; pc.recovery = true; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = PT30S; pc.weight = 1; protonet.backend = asio; protonet.version = 0; repl.causal_read_timeout = PT90S; repl.commit_order = 3; repl.key_format = FLAT8; repl.max_ws_size = 2147483647; repl.proto_max = 7; socket.checksum = 2; socket.recv_buf_size = 212992;
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||||
WHERE VARIABLE_NAME LIKE 'wsrep_%'
|
WHERE VARIABLE_NAME LIKE 'wsrep_%'
|
||||||
AND VARIABLE_NAME != 'wsrep_debug_sync_waiters';
|
AND VARIABLE_NAME != 'wsrep_debug_sync_waiters';
|
||||||
|
@ -38,7 +38,7 @@ connection node_1;
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
connection node_1;
|
connection node_1;
|
||||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 'three';
|
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 'three';
|
||||||
COUNT(*) = 1
|
COUNT(*) = 1
|
||||||
|
@ -22,6 +22,6 @@ connection node_1;
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
DROP TABLE child;
|
DROP TABLE child;
|
||||||
DROP TABLE parent;
|
DROP TABLE parent;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
SET GLOBAL wsrep_sync_wait = 7;
|
SET GLOBAL wsrep_sync_wait = 15;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
SET GLOBAL wsrep_sync_wait = 7;
|
SET GLOBAL wsrep_sync_wait = 15;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
|
@ -51,7 +51,7 @@ connection node_1;
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
INSERT INTO t1 VALUES (1), (2);
|
INSERT INTO t1 VALUES (1), (2);
|
||||||
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
||||||
|
19
mysql-test/suite/galera/r/galera_ist_progress.result
Normal file
19
mysql-test/suite/galera/r/galera_ist_progress.result
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
|
||||||
|
SET SESSION wsrep_on = OFF;
|
||||||
|
SET SESSION wsrep_on = ON;
|
||||||
|
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
INSERT INTO t1 VALUES (2);
|
||||||
|
INSERT INTO t1 VALUES (3);
|
||||||
|
INSERT INTO t1 VALUES (4);
|
||||||
|
INSERT INTO t1 VALUES (5);
|
||||||
|
INSERT INTO t1 VALUES (6);
|
||||||
|
INSERT INTO t1 VALUES (7);
|
||||||
|
INSERT INTO t1 VALUES (8);
|
||||||
|
INSERT INTO t1 VALUES (9);
|
||||||
|
INSERT INTO t1 VALUES (10);
|
||||||
|
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
|
||||||
|
include/assert_grep.inc [Receiving IST: 11 writesets, seqnos]
|
||||||
|
include/assert_grep.inc [Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete]
|
||||||
|
include/assert_grep.inc [Receiving IST\.\.\.100\.0% \(11/11 events\) complete]
|
||||||
|
DROP TABLE t1;
|
@ -9,20 +9,15 @@ connection node_1;
|
|||||||
UPDATE t1 SET f2 = 'b' WHERE f1 > 1;
|
UPDATE t1 SET f2 = 'b' WHERE f1 > 1;
|
||||||
UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
|
UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
SET GLOBAL wsrep_provider_options = 'dbug=d,recv_IST_after_apply_trx';
|
|
||||||
SET SESSION wsrep_sync_wait = 0;
|
|
||||||
Loading wsrep_provider ...
|
Loading wsrep_provider ...
|
||||||
SHOW STATUS LIKE 'wsrep_debug_sync_waiters';
|
SET SESSION wsrep_on=OFF;
|
||||||
Variable_name Value
|
SET SESSION wsrep_on=ON;
|
||||||
wsrep_debug_sync_waiters recv_IST_after_apply_trx
|
|
||||||
connection node_1;
|
connection node_1;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
UPDATE t1 SET f2 = 'd' WHERE f1 > 3;
|
UPDATE t1 SET f2 = 'd' WHERE f1 > 3;
|
||||||
CREATE TABLE t2 (f1 INTEGER);
|
|
||||||
connection node_2;
|
connection node_2;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
UPDATE t1 SET f2 = 'e' WHERE f1 > 4;
|
UPDATE t1 SET f2 = 'e' WHERE f1 > 4;
|
||||||
CREATE TABLE t3 (f1 INTEGER);
|
|
||||||
connection node_2;
|
connection node_2;
|
||||||
Performing --wsrep-recover ...
|
Performing --wsrep-recover ...
|
||||||
Starting server ...
|
Starting server ...
|
||||||
@ -46,13 +41,7 @@ f1 f2
|
|||||||
4 d
|
4 d
|
||||||
5 e
|
5 e
|
||||||
6 f
|
6 f
|
||||||
SELECT COUNT(*) = 0 FROM t2;
|
|
||||||
COUNT(*) = 0
|
|
||||||
1
|
|
||||||
SELECT COUNT(*) = 0 FROM t3;
|
|
||||||
COUNT(*) = 0
|
|
||||||
1
|
|
||||||
connection node_1;
|
connection node_1;
|
||||||
DROP TABLE t1, t2, t3;
|
DROP TABLE t1;
|
||||||
disconnect node_2;
|
disconnect node_2;
|
||||||
disconnect node_1;
|
disconnect node_1;
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
|
connection node_2;
|
||||||
Killing server ...
|
Killing server ...
|
||||||
|
connection node_2a;
|
||||||
SELECT COUNT(*) = 1 FROM t1;
|
SELECT COUNT(*) = 1 FROM t1;
|
||||||
COUNT(*) = 1
|
COUNT(*) = 1
|
||||||
1
|
1
|
||||||
|
@ -9,10 +9,12 @@ SELECT 1 = 1 FROM t1;
|
|||||||
SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 1 = 1 FROM t1';
|
SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 1 = 1 FROM t1';
|
||||||
COUNT(*) = 1
|
COUNT(*) = 1
|
||||||
1
|
1
|
||||||
|
connection node_2;
|
||||||
SELECT 2 = 2 FROM t1;
|
SELECT 2 = 2 FROM t1;
|
||||||
2 = 2
|
2 = 2
|
||||||
1
|
1
|
||||||
SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 2 = 2 FROM t1';
|
SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 2 = 2 FROM t1';
|
||||||
COUNT(*) = 1
|
COUNT(*) = 1
|
||||||
1
|
1
|
||||||
|
connection node_1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
@ -129,5 +129,5 @@ connection node_1;
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
@ -7,7 +7,7 @@ CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoD
|
|||||||
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
|
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
SET SESSION wsrep_sync_wait = 0;
|
SET SESSION wsrep_sync_wait = 0;
|
||||||
SET SESSION wsrep_sync_wait = 7;
|
SET SESSION wsrep_sync_wait = 15;
|
||||||
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H';
|
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H';
|
||||||
SELECT COUNT(*) = 100000 FROM t1;
|
SELECT COUNT(*) = 100000 FROM t1;
|
||||||
COUNT(*) = 100000
|
COUNT(*) = 100000
|
||||||
|
@ -28,7 +28,7 @@ SET DEBUG_SYNC = "now SIGNAL signal.wsrep_before_mdl_wait";
|
|||||||
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_after_BF_victim_lock";
|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_after_BF_victim_lock";
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
|
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
|
||||||
COUNT(*) = 1
|
COUNT(*) = 1
|
||||||
1
|
1
|
||||||
|
@ -28,6 +28,6 @@ connection node_1;
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
|
@ -28,6 +28,6 @@ connection node_1;
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
|
@ -31,6 +31,6 @@ connection node_1;
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
|
@ -19,7 +19,7 @@ connection node_1;
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
SELECT f1 = 'текст2' FROM t1;
|
SELECT f1 = 'текст2' FROM t1;
|
||||||
f1 = 'текст2'
|
f1 = 'текст2'
|
||||||
1
|
1
|
||||||
|
@ -23,7 +23,7 @@ COUNT(*) = 0
|
|||||||
connection node_2;
|
connection node_2;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
connection node_2a;
|
connection node_2a;
|
||||||
SET SESSION wsrep_sync_wait = 7;;
|
SET SESSION wsrep_sync_wait = 15;;
|
||||||
SELECT COUNT(*) = 1 FROM t1;
|
SELECT COUNT(*) = 1 FROM t1;
|
||||||
COUNT(*) = 1
|
COUNT(*) = 1
|
||||||
1
|
1
|
||||||
|
@ -16,7 +16,7 @@ INSERT INTO t1 VALUES (1);
|
|||||||
INSERT INTO t2 VALUES (1);
|
INSERT INTO t2 VALUES (1);
|
||||||
SET SESSION wsrep_sync_wait = 0;
|
SET SESSION wsrep_sync_wait = 0;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
SET SESSION wsrep_sync_wait = 7;
|
SET SESSION wsrep_sync_wait = 15;
|
||||||
SELECT COUNT(*) = 10 FROM t1;
|
SELECT COUNT(*) = 10 FROM t1;
|
||||||
COUNT(*) = 10
|
COUNT(*) = 10
|
||||||
0
|
0
|
||||||
|
@ -27,6 +27,6 @@ COMMIT;
|
|||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
@ -24,6 +24,6 @@ COMMIT;
|
|||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
@ -5,7 +5,6 @@ SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S";
|
|||||||
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
|
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||||
SET SESSION wsrep_sync_wait = 7;
|
|
||||||
SELECT MAX(id) FROM t1;
|
SELECT MAX(id) FROM t1;
|
||||||
MAX(id)
|
MAX(id)
|
||||||
1
|
1
|
||||||
@ -19,7 +18,6 @@ Warnings:
|
|||||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||||
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||||
FLUSH QUERY CACHE;
|
FLUSH QUERY CACHE;
|
||||||
SET SESSION wsrep_sync_wait = 7;
|
|
||||||
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
|
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||||
@ -36,11 +34,9 @@ SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
|||||||
connection node_1;
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES (4);
|
INSERT INTO t1 VALUES (4);
|
||||||
connection node_2;
|
connection node_2;
|
||||||
SET SESSION wsrep_sync_wait = 7;
|
|
||||||
SELECT MAX(id) FROM t1;
|
SELECT MAX(id) FROM t1;
|
||||||
MAX(id)
|
MAX(id)
|
||||||
4
|
4
|
||||||
SET SESSION wsrep_sync_wait = 7;
|
|
||||||
FLUSH STATUS;
|
FLUSH STATUS;
|
||||||
SELECT MAX(id) FROM t1;
|
SELECT MAX(id) FROM t1;
|
||||||
MAX(id)
|
MAX(id)
|
||||||
@ -54,7 +50,6 @@ Warning 1287 '@@debug' is deprecated and will be removed in a future release. Pl
|
|||||||
connection node_1;
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES (5);
|
INSERT INTO t1 VALUES (5);
|
||||||
connection node_2;
|
connection node_2;
|
||||||
SET SESSION wsrep_sync_wait = 7;
|
|
||||||
SELECT MAX(id) FROM t1 ;
|
SELECT MAX(id) FROM t1 ;
|
||||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||||
connection node_2a;
|
connection node_2a;
|
||||||
|
@ -9,7 +9,7 @@ connection node_2;
|
|||||||
INSERT INTO t1 VALUES (1,1);
|
INSERT INTO t1 VALUES (1,1);
|
||||||
connection node_1;
|
connection node_1;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
DELETE FROM t1;
|
DELETE FROM t1;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
@ -22,7 +22,7 @@ connection node_2;
|
|||||||
UPDATE t1 SET f2 = 2;
|
UPDATE t1 SET f2 = 2;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
UPDATE t1 SET f2 = 3;
|
UPDATE t1 SET f2 = 3;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
DELETE FROM t1;
|
DELETE FROM t1;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
@ -33,5 +33,5 @@ connection node_2;
|
|||||||
INSERT INTO t1 VALUES (1,2);
|
INSERT INTO t1 VALUES (1,2);
|
||||||
connection node_1;
|
connection node_1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
@ -6,7 +6,7 @@ connection node_2;
|
|||||||
Killing server ...
|
Killing server ...
|
||||||
connection node_1;
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: WSREP replication failed. Check your wsrep connection state and retry the query.
|
||||||
connection node_2;
|
connection node_2;
|
||||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||||
disconnect node_2;
|
disconnect node_2;
|
||||||
|
@ -9,9 +9,12 @@ Suspending node_2 ...
|
|||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
Got one of the listed errors
|
Got one of the listed errors
|
||||||
Resuming node_2 ...
|
Resuming node_2 ...
|
||||||
|
SET SESSION wsrep_sync_wait = 1;
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
connection node_2a;
|
connection node_2a;
|
||||||
|
SET SESSION wsrep_sync_wait = 1;
|
||||||
SELECT COUNT(*) = 1 FROM t1;
|
SELECT COUNT(*) = 1 FROM t1;
|
||||||
COUNT(*) = 1
|
COUNT(*) = 1
|
||||||
1
|
1
|
||||||
|
SET SESSION wsrep_sync_wait = 15;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
connection node_2;
|
connection node_2;
|
||||||
SET SESSION wsrep_sync_wait = 1;
|
SET SESSION wsrep_sync_wait = 8;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
CREATE DATABASE db1;
|
CREATE DATABASE db1;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
@ -35,7 +35,7 @@ CREATE FUNCTION f1 () RETURNS INTEGER RETURN 123;
|
|||||||
connection node_2;
|
connection node_2;
|
||||||
SHOW FUNCTION CODE f1;
|
SHOW FUNCTION CODE f1;
|
||||||
Pos Instruction
|
Pos Instruction
|
||||||
0 freturn 3 123
|
0 freturn int 123
|
||||||
DROP FUNCTION f1;
|
DROP FUNCTION f1;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||||
|
@ -14,9 +14,9 @@ INSERT INTO t2 (f1) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, te
|
|||||||
connection node_2;
|
connection node_2;
|
||||||
DROP DATABASE database1;;
|
DROP DATABASE database1;;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
connection node_1a;
|
connection node_1a;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
connection node_2;
|
connection node_2;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'database1';
|
SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'database1';
|
||||||
|
@ -8,7 +8,7 @@ connection node_2a;
|
|||||||
ALTER TABLE t1 ADD COLUMN f2 INTEGER, LOCK=EXCLUSIVE;
|
ALTER TABLE t1 ADD COLUMN f2 INTEGER, LOCK=EXCLUSIVE;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
connection node_1;
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES (2, 2);
|
INSERT INTO t1 VALUES (2, 2);
|
||||||
SELECT COUNT(*) = 2 FROM t1;
|
SELECT COUNT(*) = 2 FROM t1;
|
||||||
|
@ -9,7 +9,7 @@ connection node_1;
|
|||||||
TRUNCATE TABLE t1;;
|
TRUNCATE TABLE t1;;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
connection node_2;
|
connection node_2;
|
||||||
SELECT COUNT(*) = 0 FROM t1;
|
SELECT COUNT(*) = 0 FROM t1;
|
||||||
COUNT(*) = 0
|
COUNT(*) = 0
|
||||||
|
@ -1,21 +1,30 @@
|
|||||||
|
connection node_1;
|
||||||
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
connection node_2;
|
||||||
|
connection node_1;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_2;
|
||||||
wsrep_last_committed_diff
|
wsrep_last_committed_diff
|
||||||
1
|
1
|
||||||
|
connection node_2;
|
||||||
|
connection node_1;
|
||||||
START TRANSACTION READ ONLY;
|
START TRANSACTION READ ONLY;
|
||||||
SELECT COUNT(*) = 0 FROM t1;
|
SELECT COUNT(*) = 0 FROM t1;
|
||||||
COUNT(*) = 0
|
COUNT(*) = 0
|
||||||
1
|
1
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_2;
|
||||||
wsrep_last_committed_diff
|
wsrep_last_committed_diff
|
||||||
1
|
1
|
||||||
|
connection node_1;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
SELECT COUNT(*) = 0 FROM t1;
|
SELECT COUNT(*) = 0 FROM t1;
|
||||||
COUNT(*) = 0
|
COUNT(*) = 0
|
||||||
1
|
1
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_2;
|
||||||
wsrep_last_committed_diff
|
wsrep_last_committed_diff
|
||||||
1
|
1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
SET GLOBAL wsrep_sync_wait = 7;
|
SET GLOBAL wsrep_sync_wait = 15;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
SET GLOBAL wsrep_sync_wait = 7;
|
SET GLOBAL wsrep_sync_wait = 15;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
CREATE DATABASE `database with space`;
|
CREATE DATABASE `database with space`;
|
||||||
USE `database with space`;
|
USE `database with space`;
|
||||||
|
@ -18,7 +18,7 @@ connection node_1;
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
SELECT f1 = 'текст2' FROM t1;
|
SELECT f1 = 'текст2' FROM t1;
|
||||||
f1 = 'текст2'
|
f1 = 'текст2'
|
||||||
1
|
1
|
||||||
@ -35,6 +35,6 @@ connection node_2;
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
COMMIT;
|
COMMIT;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
@ -59,7 +59,7 @@ connection node_1a;
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
connection node_2a;
|
connection node_2a;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
connection node_1a;
|
connection node_1a;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
f1 node
|
f1 node
|
||||||
|
@ -6,10 +6,6 @@ INSERT INTO t1 VALUES(1);
|
|||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
i
|
i
|
||||||
1
|
1
|
||||||
create user user1;
|
|
||||||
grant all privileges on *.* to user1;
|
|
||||||
create user user2;
|
|
||||||
grant all privileges on *.* to user2;
|
|
||||||
SET @@global.wsrep_cluster_address = '';
|
SET @@global.wsrep_cluster_address = '';
|
||||||
SET @@session.wsrep_dirty_reads=OFF;
|
SET @@session.wsrep_dirty_reads=OFF;
|
||||||
SET SESSION wsrep_sync_wait=0;
|
SET SESSION wsrep_sync_wait=0;
|
||||||
@ -21,87 +17,36 @@ Variable_name Value
|
|||||||
wsrep_cluster_status non-Primary
|
wsrep_cluster_status non-Primary
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
ERROR 08S01: WSREP has not yet prepared node for application use
|
ERROR 08S01: WSREP has not yet prepared node for application use
|
||||||
SELECT @@wsrep_dirty_reads;
|
SELECT 1 FROM t1;
|
||||||
@@wsrep_dirty_reads
|
ERROR 08S01: WSREP has not yet prepared node for application use
|
||||||
0
|
|
||||||
SELECT 2;
|
|
||||||
2
|
|
||||||
2
|
|
||||||
SELECT 2+2 FROM DUAL;
|
|
||||||
2+2
|
|
||||||
4
|
|
||||||
SET @@session.wsrep_dirty_reads=ON;
|
SET @@session.wsrep_dirty_reads=ON;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
i
|
i
|
||||||
1
|
1
|
||||||
connect con1, localhost, user1,,test,$NODE_MYPORT_2,$NODE_MYSOCK_2;
|
SELECT 1 FROM t1;
|
||||||
SET SESSION wsrep_sync_wait=0;
|
1
|
||||||
set session wsrep_dirty_reads=1;
|
1
|
||||||
prepare stmt_show from 'select 1';
|
SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
|
||||||
prepare stmt_select from 'select * from t1';
|
i variable_name variable_value
|
||||||
prepare stmt_insert from 'insert into t1 values(1)';
|
1 WSREP_DIRTY_READS ON
|
||||||
set session wsrep_dirty_reads=0;
|
SET @@session.wsrep_dirty_reads=OFF;
|
||||||
execute stmt_show;
|
SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
|
||||||
ERROR 08S01: WSREP has not yet prepared node for application use
|
ERROR 08S01: WSREP has not yet prepared node for application use
|
||||||
execute stmt_select;
|
SELECT 1;
|
||||||
|
1
|
||||||
|
1
|
||||||
|
USE information_schema;
|
||||||
ERROR 08S01: WSREP has not yet prepared node for application use
|
ERROR 08S01: WSREP has not yet prepared node for application use
|
||||||
execute stmt_insert;
|
SELECT * FROM information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads";
|
||||||
ERROR 08S01: WSREP has not yet prepared node for application use
|
ERROR 08S01: WSREP has not yet prepared node for application use
|
||||||
SET wsrep_dirty_reads=ON;
|
SELECT COUNT(*) >= 10 FROM performance_schema.events_statements_history;
|
||||||
select @@session.wsrep_dirty_reads;
|
|
||||||
@@session.wsrep_dirty_reads
|
|
||||||
1
|
|
||||||
execute stmt_show;
|
|
||||||
1
|
|
||||||
1
|
|
||||||
execute stmt_select;
|
|
||||||
i
|
|
||||||
1
|
|
||||||
execute stmt_insert;
|
|
||||||
ERROR 08S01: WSREP has not yet prepared node for application use
|
ERROR 08S01: WSREP has not yet prepared node for application use
|
||||||
SET @@global.wsrep_dirty_reads=ON;
|
|
||||||
connect con2, localhost, user2,,test,$NODE_MYPORT_2,$NODE_MYSOCK_2;
|
|
||||||
select @@session.wsrep_dirty_reads;
|
|
||||||
@@session.wsrep_dirty_reads
|
|
||||||
1
|
|
||||||
prepare stmt_show from 'select 1';
|
|
||||||
prepare stmt_select from 'select * from t1';
|
|
||||||
prepare stmt_insert from 'insert into t1 values(1)';
|
|
||||||
execute stmt_show;
|
|
||||||
1
|
|
||||||
1
|
|
||||||
execute stmt_select;
|
|
||||||
i
|
|
||||||
1
|
|
||||||
execute stmt_insert;
|
|
||||||
ERROR 08S01: WSREP has not yet prepared node for application use
|
|
||||||
SET SESSION wsrep_sync_wait=1;
|
|
||||||
execute stmt_show;
|
|
||||||
1
|
|
||||||
1
|
|
||||||
execute stmt_select;
|
|
||||||
i
|
|
||||||
1
|
|
||||||
execute stmt_insert;
|
|
||||||
ERROR 08S01: WSREP has not yet prepared node for application use
|
|
||||||
SET SESSION wsrep_sync_wait=7;
|
|
||||||
execute stmt_show;
|
|
||||||
1
|
|
||||||
1
|
|
||||||
execute stmt_select;
|
|
||||||
i
|
|
||||||
1
|
|
||||||
execute stmt_insert;
|
|
||||||
ERROR 08S01: WSREP has not yet prepared node for application use
|
|
||||||
connection node_2;
|
|
||||||
SET @@global.wsrep_dirty_reads=OFF;
|
|
||||||
connection node_1;
|
connection node_1;
|
||||||
|
USE test;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
i
|
i
|
||||||
1
|
1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
drop user user1;
|
|
||||||
drop user user2;
|
|
||||||
disconnect node_2;
|
disconnect node_2;
|
||||||
disconnect node_1;
|
disconnect node_1;
|
||||||
# End of test
|
# End of test
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
call mtr.add_suppression("WSREP: Stray state UUID msg: .* current group state WAIT_STATE_UUID .*");
|
call mtr.add_suppression("WSREP: Stray state UUID msg: .* current group state WAIT_STATE_UUID .*");
|
||||||
|
call mtr.add_suppression("WSREP: Protocol violation. JOIN message sender .* is not in state transfer (.*). Message ignored.");
|
||||||
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||||
VARIABLE_VALUE = 4
|
VARIABLE_VALUE = 4
|
||||||
1
|
1
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
SELECT @@global.wsrep_sync_wait;
|
SELECT @@global.wsrep_sync_wait;
|
||||||
@@global.wsrep_sync_wait
|
@@global.wsrep_sync_wait
|
||||||
7
|
15
|
||||||
SELECT @@global.wsrep_causal_reads;
|
SELECT @@global.wsrep_causal_reads;
|
||||||
@@global.wsrep_causal_reads
|
@@global.wsrep_causal_reads
|
||||||
1
|
1
|
||||||
@ -11,9 +11,6 @@ connection node_1;
|
|||||||
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
|
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
SET GLOBAL wsrep_sync_wait = 1;
|
SET GLOBAL wsrep_sync_wait = 1;
|
||||||
SHOW TABLES LIKE '%t1';
|
|
||||||
Tables_in_test (%t1)
|
|
||||||
t1
|
|
||||||
SELECT COUNT(*) = 0 FROM t1;
|
SELECT COUNT(*) = 0 FROM t1;
|
||||||
COUNT(*) = 0
|
COUNT(*) = 0
|
||||||
1
|
1
|
||||||
@ -31,7 +28,7 @@ UPDATE t3 SET f1 = 2;
|
|||||||
affected rows: 1
|
affected rows: 1
|
||||||
info: Rows matched: 1 Changed: 1 Warnings: 0
|
info: Rows matched: 1 Changed: 1 Warnings: 0
|
||||||
connection node_2;
|
connection node_2;
|
||||||
SET GLOBAL wsrep_sync_wait = 7;
|
SET GLOBAL wsrep_sync_wait = 15;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
DROP TABLE t3;
|
DROP TABLE t3;
|
||||||
|
@ -20,6 +20,6 @@ connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
|||||||
connection node_2a;
|
connection node_2a;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
ERROR 40001: wsrep aborted transaction
|
||||||
include/assert_grep.inc [cluster conflict due to high priority abort for threads]
|
include/assert_grep.inc [cluster conflict due to high priority abort for threads]
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
@ -1,12 +1,20 @@
|
|||||||
|
connection node_1;
|
||||||
|
connection node_2;
|
||||||
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
|
connection node_2;
|
||||||
SET GLOBAL wsrep_provider='none';
|
SET GLOBAL wsrep_provider='none';
|
||||||
INSERT INTO t1 VALUES (2);
|
INSERT INTO t1 VALUES (2);
|
||||||
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES (3);
|
INSERT INTO t1 VALUES (3);
|
||||||
|
connection node_2;
|
||||||
|
SET SESSION wsrep_sync_wait = 0;
|
||||||
INSERT INTO t1 VALUES (4);
|
INSERT INTO t1 VALUES (4);
|
||||||
SELECT COUNT(*) = 4 FROM t1;
|
SELECT COUNT(*) = 4 FROM t1;
|
||||||
COUNT(*) = 4
|
COUNT(*) = 4
|
||||||
1
|
1
|
||||||
|
connection node_1;
|
||||||
SELECT COUNT(*) = 3 FROM t1;
|
SELECT COUNT(*) = 3 FROM t1;
|
||||||
COUNT(*) = 3
|
COUNT(*) = 3
|
||||||
1
|
1
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
connection node_2;
|
connection node_2;
|
||||||
|
SELECT 1 FROM DUAL;
|
||||||
|
1
|
||||||
|
1
|
||||||
LOCK TABLE t2 WRITE;
|
LOCK TABLE t2 WRITE;
|
||||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||||
connection node_2a;
|
connection node_2a;
|
||||||
|
@ -2,4 +2,3 @@ CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
|||||||
INSERT INTO t1 VALUES (DEFAULT);
|
INSERT INTO t1 VALUES (DEFAULT);
|
||||||
connection node_2;
|
connection node_2;
|
||||||
SET GLOBAL query_cache_size=1355776;
|
SET GLOBAL query_cache_size=1355776;
|
||||||
SET SESSION wsrep_sync_wait = 7;
|
|
||||||
|
@ -56,10 +56,10 @@ t1 CREATE TABLE `t1` (
|
|||||||
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
PRIMARY KEY (`i`)
|
PRIMARY KEY (`i`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1
|
||||||
PARTITION BY RANGE (i)
|
PARTITION BY RANGE (`i`)
|
||||||
(PARTITION p1 VALUES LESS THAN (10) ENGINE = InnoDB,
|
(PARTITION `p1` VALUES LESS THAN (10) ENGINE = InnoDB,
|
||||||
PARTITION p2 VALUES LESS THAN (20) ENGINE = InnoDB,
|
PARTITION `p2` VALUES LESS THAN (20) ENGINE = InnoDB,
|
||||||
PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
|
PARTITION `pMax` VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
|
||||||
SHOW CREATE TABLE p1;
|
SHOW CREATE TABLE p1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
p1 CREATE TABLE `p1` (
|
p1 CREATE TABLE `p1` (
|
||||||
@ -93,9 +93,9 @@ t1 CREATE TABLE `t1` (
|
|||||||
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
PRIMARY KEY (`i`)
|
PRIMARY KEY (`i`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
PARTITION BY RANGE (i)
|
PARTITION BY RANGE (`i`)
|
||||||
(PARTITION p1 VALUES LESS THAN (10) ENGINE = InnoDB,
|
(PARTITION `p1` VALUES LESS THAN (10) ENGINE = InnoDB,
|
||||||
PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
|
PARTITION `pMax` VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
|
||||||
|
|
||||||
# On node_2
|
# On node_2
|
||||||
connection node_2;
|
connection node_2;
|
||||||
@ -105,9 +105,9 @@ t1 CREATE TABLE `t1` (
|
|||||||
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
PRIMARY KEY (`i`)
|
PRIMARY KEY (`i`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
PARTITION BY RANGE (i)
|
PARTITION BY RANGE (`i`)
|
||||||
(PARTITION p1 VALUES LESS THAN (10) ENGINE = InnoDB,
|
(PARTITION `p1` VALUES LESS THAN (10) ENGINE = InnoDB,
|
||||||
PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
|
PARTITION `pMax` VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
|
||||||
DROP TABLE t1, p1;
|
DROP TABLE t1, p1;
|
||||||
#
|
#
|
||||||
# MDEV-5146: Bulk loads into partitioned table not working
|
# MDEV-5146: Bulk loads into partitioned table not working
|
||||||
|
@ -10,6 +10,7 @@ INSERT INTO t1 VALUES (2);
|
|||||||
connection node_1;
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES (3);
|
INSERT INTO t1 VALUES (3);
|
||||||
connection node_2;
|
connection node_2;
|
||||||
|
set SESSION wsrep_sync_wait=0;
|
||||||
INSERT INTO t1 VALUES (4);
|
INSERT INTO t1 VALUES (4);
|
||||||
set GLOBAL wsrep_slave_threads=5;
|
set GLOBAL wsrep_slave_threads=5;
|
||||||
SELECT COUNT(*) = 5 FROM t1;
|
SELECT COUNT(*) = 5 FROM t1;
|
||||||
@ -31,6 +32,7 @@ SET GLOBAL wsrep_slave_threads = 1;
|
|||||||
SELECT COUNT(*) FROM t1;
|
SELECT COUNT(*) FROM t1;
|
||||||
COUNT(*)
|
COUNT(*)
|
||||||
16
|
16
|
||||||
|
SET GLOBAL auto_increment_offset = 2;
|
||||||
connection node_1;
|
connection node_1;
|
||||||
SELECT COUNT(*) FROM t1;
|
SELECT COUNT(*) FROM t1;
|
||||||
COUNT(*)
|
COUNT(*)
|
||||||
@ -40,3 +42,4 @@ Variable_name Value
|
|||||||
wsrep_slave_threads 12
|
wsrep_slave_threads 12
|
||||||
SET GLOBAL wsrep_slave_threads = 1;
|
SET GLOBAL wsrep_slave_threads = 1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
SET GLOBAL auto_increment_offset = 1;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
# Execute FLUSH/RESET commands.
|
# Execute FLUSH/RESET commands.
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
SET @query_cache_size_saved=@@GLOBAL.query_cache_size;
|
SET @query_cache_size_saved=@@GLOBAL.query_cache_size;
|
||||||
SET @query_cache_type_saved=@@GLOBAL.query_cache_type;
|
SET @query_cache_type_saved=@@GLOBAL.query_cache_type;
|
||||||
set GLOBAL query_cache_size=1355776;
|
set GLOBAL query_cache_size=1355776;
|
||||||
@ -8,6 +9,7 @@ flush query cache;
|
|||||||
reset query cache;
|
reset query cache;
|
||||||
flush status;
|
flush status;
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
SET @query_cache_size_saved=@@GLOBAL.query_cache_size;
|
SET @query_cache_size_saved=@@GLOBAL.query_cache_size;
|
||||||
SET @query_cache_type_saved=@@GLOBAL.query_cache_type;
|
SET @query_cache_type_saved=@@GLOBAL.query_cache_type;
|
||||||
set GLOBAL query_cache_size=1355776;
|
set GLOBAL query_cache_size=1355776;
|
||||||
@ -15,6 +17,7 @@ flush query cache;
|
|||||||
reset query cache;
|
reset query cache;
|
||||||
flush status;
|
flush status;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
create table t1 (a int not null) engine=innodb;
|
create table t1 (a int not null) engine=innodb;
|
||||||
insert into t1 values (1),(2),(3);
|
insert into t1 values (1),(2),(3);
|
||||||
select * from t1;
|
select * from t1;
|
||||||
@ -47,6 +50,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 1
|
Qcache_hits 1
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
@ -77,6 +81,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 1
|
Qcache_hits 1
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
delete from t1 where a=1;
|
delete from t1 where a=1;
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
@ -85,6 +90,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 1
|
Qcache_hits 1
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_queries_in_cache 0
|
Qcache_queries_in_cache 0
|
||||||
@ -92,6 +98,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 1
|
Qcache_hits 1
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
2
|
2
|
||||||
@ -103,6 +110,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 1
|
Qcache_hits 1
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
2
|
2
|
||||||
@ -114,6 +122,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 1
|
Qcache_hits 1
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
update t1 set a=1 where a=3;
|
update t1 set a=1 where a=3;
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
@ -122,6 +131,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 1
|
Qcache_hits 1
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_queries_in_cache 0
|
Qcache_queries_in_cache 0
|
||||||
@ -129,6 +139,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 1
|
Qcache_hits 1
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
2
|
2
|
||||||
@ -140,6 +151,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 1
|
Qcache_hits 1
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
2
|
2
|
||||||
@ -151,6 +163,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 1
|
Qcache_hits 1
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
@ -159,6 +172,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 1
|
Qcache_hits 1
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_queries_in_cache 0
|
Qcache_queries_in_cache 0
|
||||||
@ -167,6 +181,7 @@ Variable_name Value
|
|||||||
Qcache_hits 1
|
Qcache_hits 1
|
||||||
|
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
create table t1 (a int not null) ENGINE=MyISAM;
|
create table t1 (a int not null) ENGINE=MyISAM;
|
||||||
insert into t1 values (1),(2),(3);
|
insert into t1 values (1),(2),(3);
|
||||||
create table t2 (a int not null) ENGINE=MyISAM;
|
create table t2 (a int not null) ENGINE=MyISAM;
|
||||||
@ -323,6 +338,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 3
|
Qcache_hits 3
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
select * from t3;
|
select * from t3;
|
||||||
a
|
a
|
||||||
select * from t3;
|
select * from t3;
|
||||||
@ -338,6 +354,7 @@ Variable_name Value
|
|||||||
Qcache_hits 2
|
Qcache_hits 2
|
||||||
drop table t1, t2, t3;
|
drop table t1, t2, t3;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
set query_cache_type=demand;
|
set query_cache_type=demand;
|
||||||
create table t1 (a int not null) engine=innodb;
|
create table t1 (a int not null) engine=innodb;
|
||||||
insert into t1 values (1),(2),(3);
|
insert into t1 values (1),(2),(3);
|
||||||
@ -371,6 +388,7 @@ Variable_name Value
|
|||||||
Qcache_queries_in_cache 1
|
Qcache_queries_in_cache 1
|
||||||
set query_cache_type=on;
|
set query_cache_type=on;
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
set query_cache_type=demand;
|
set query_cache_type=demand;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
@ -402,6 +420,7 @@ Variable_name Value
|
|||||||
Qcache_queries_in_cache 1
|
Qcache_queries_in_cache 1
|
||||||
set query_cache_type=on;
|
set query_cache_type=on;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
reset query cache;
|
reset query cache;
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
@ -410,6 +429,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 4
|
Qcache_hits 4
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
reset query cache;
|
reset query cache;
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
@ -418,6 +438,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 3
|
Qcache_hits 3
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
select sql_no_cache * from t1;
|
select sql_no_cache * from t1;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
@ -430,6 +451,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 4
|
Qcache_hits 4
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
select sql_no_cache * from t1;
|
select sql_no_cache * from t1;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
@ -443,6 +465,7 @@ Variable_name Value
|
|||||||
Qcache_hits 3
|
Qcache_hits 3
|
||||||
drop table t1;
|
drop table t1;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
create table t1 (a text not null) engine=innodb;
|
create table t1 (a text not null) engine=innodb;
|
||||||
select CONNECTION_ID() from t1;
|
select CONNECTION_ID() from t1;
|
||||||
CONNECTION_ID()
|
CONNECTION_ID()
|
||||||
@ -483,6 +506,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 4
|
Qcache_hits 4
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
select CONNECTION_ID() from t1;
|
select CONNECTION_ID() from t1;
|
||||||
CONNECTION_ID()
|
CONNECTION_ID()
|
||||||
select FOUND_ROWS();
|
select FOUND_ROWS();
|
||||||
@ -523,6 +547,7 @@ Variable_name Value
|
|||||||
Qcache_hits 3
|
Qcache_hits 3
|
||||||
drop table t1;
|
drop table t1;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
create database mysqltest;
|
create database mysqltest;
|
||||||
create table mysqltest.t1 (i int not null auto_increment, a int, primary key
|
create table mysqltest.t1 (i int not null auto_increment, a int, primary key
|
||||||
(i)) engine=innodb;
|
(i)) engine=innodb;
|
||||||
@ -548,6 +573,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 4
|
Qcache_hits 4
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
@ -574,10 +600,9 @@ Variable_name Value
|
|||||||
Qcache_hits 3
|
Qcache_hits 3
|
||||||
drop table t1;
|
drop table t1;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
create table t1 (a char(1) not null collate koi8r_general_ci) engine=innodb;
|
create table t1 (a char(1) not null collate koi8r_general_ci) engine=innodb;
|
||||||
insert into t1 values(_koi8r"á");
|
insert into t1 values(_koi8r 0xc3);
|
||||||
Warnings:
|
|
||||||
Warning 1265 Data truncated for column 'a' at row 1
|
|
||||||
set CHARACTER SET koi8r;
|
set CHARACTER SET koi8r;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
@ -594,6 +619,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 4
|
Qcache_hits 4
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
set CHARACTER SET koi8r;
|
set CHARACTER SET koi8r;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
@ -611,6 +637,7 @@ Variable_name Value
|
|||||||
Qcache_hits 3
|
Qcache_hits 3
|
||||||
drop table t1;
|
drop table t1;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
create database if not exists mysqltest;
|
create database if not exists mysqltest;
|
||||||
create table mysqltest.t1 (i int not null) engine=innodb;
|
create table mysqltest.t1 (i int not null) engine=innodb;
|
||||||
create table t1 (i int not null) engine=innodb;
|
create table t1 (i int not null) engine=innodb;
|
||||||
@ -637,6 +664,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 6
|
Qcache_hits 6
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
i
|
i
|
||||||
2
|
2
|
||||||
@ -660,6 +688,7 @@ Qcache_hits 5
|
|||||||
drop database mysqltest;
|
drop database mysqltest;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
create table t1 (i int not null) engine=innodb;
|
create table t1 (i int not null) engine=innodb;
|
||||||
insert into t1 (i) values (1),(2),(3),(4);
|
insert into t1 (i) values (1),(2),(3),(4);
|
||||||
select SQL_CALC_FOUND_ROWS * from t1 limit 2;
|
select SQL_CALC_FOUND_ROWS * from t1 limit 2;
|
||||||
@ -713,6 +742,7 @@ show status like "Qcache_queries_in_cache";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_queries_in_cache 2
|
Qcache_queries_in_cache 2
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
select SQL_CALC_FOUND_ROWS * from t1 limit 2;
|
select SQL_CALC_FOUND_ROWS * from t1 limit 2;
|
||||||
i
|
i
|
||||||
1
|
1
|
||||||
@ -765,9 +795,11 @@ Variable_name Value
|
|||||||
Qcache_queries_in_cache 2
|
Qcache_queries_in_cache 2
|
||||||
drop table t1;
|
drop table t1;
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
flush query cache;
|
flush query cache;
|
||||||
reset query cache;
|
reset query cache;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
flush query cache;
|
flush query cache;
|
||||||
reset query cache;
|
reset query cache;
|
||||||
create table t1 (a int not null) ENGINE=MYISAM;
|
create table t1 (a int not null) ENGINE=MYISAM;
|
||||||
@ -802,6 +834,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 9
|
Qcache_hits 9
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
select * from t1;
|
select * from t1;
|
||||||
@ -830,6 +863,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 8
|
Qcache_hits 8
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_queries_in_cache 0
|
Qcache_queries_in_cache 0
|
||||||
@ -837,6 +871,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 9
|
Qcache_hits 9
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
show global variables like "query_cache_min_res_unit";
|
show global variables like "query_cache_min_res_unit";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
query_cache_min_res_unit 4096
|
query_cache_min_res_unit 4096
|
||||||
@ -847,6 +882,7 @@ show global variables like "query_cache_min_res_unit";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
query_cache_min_res_unit 1000
|
query_cache_min_res_unit 1000
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
show global variables like "query_cache_min_res_unit";
|
show global variables like "query_cache_min_res_unit";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
query_cache_min_res_unit 4096
|
query_cache_min_res_unit 4096
|
||||||
@ -887,6 +923,7 @@ show status like "Qcache_queries_in_cache";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_queries_in_cache 2
|
Qcache_queries_in_cache 2
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
@ -935,6 +972,7 @@ show global variables like "query_cache_min_res_unit";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
query_cache_min_res_unit 4096
|
query_cache_min_res_unit 4096
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
select a from t2;
|
select a from t2;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
@ -957,6 +995,7 @@ show global variables like "query_cache_min_res_unit";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
query_cache_min_res_unit 4096
|
query_cache_min_res_unit 4096
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
create table t1 (a int not null) engine=innodb;
|
create table t1 (a int not null) engine=innodb;
|
||||||
insert into t1 values (1);
|
insert into t1 values (1);
|
||||||
select "aaa" from t1;
|
select "aaa" from t1;
|
||||||
@ -972,6 +1011,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 12
|
Qcache_hits 12
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
select "aaa" from t1;
|
select "aaa" from t1;
|
||||||
aaa
|
aaa
|
||||||
aaa
|
aaa
|
||||||
@ -986,6 +1026,7 @@ Variable_name Value
|
|||||||
Qcache_hits 11
|
Qcache_hits 11
|
||||||
drop table t1;
|
drop table t1;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
create table t1 (a int) engine=innodb;
|
create table t1 (a int) engine=innodb;
|
||||||
set GLOBAL query_cache_size=1000;
|
set GLOBAL query_cache_size=1000;
|
||||||
Warnings:
|
Warnings:
|
||||||
@ -1052,6 +1093,7 @@ query_cache_size 102400
|
|||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
set GLOBAL query_cache_size=1000;
|
set GLOBAL query_cache_size=1000;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1292 Truncated incorrect query_cache_size value: '1000'
|
Warning 1292 Truncated incorrect query_cache_size value: '1000'
|
||||||
@ -1118,6 +1160,7 @@ select * from t1;
|
|||||||
a
|
a
|
||||||
drop table t1;
|
drop table t1;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
set GLOBAL query_cache_size=1048576;
|
set GLOBAL query_cache_size=1048576;
|
||||||
create table t1 (i int not null) engine=innodb;
|
create table t1 (i int not null) engine=innodb;
|
||||||
create table t2 (i int not null) engine=innodb;
|
create table t2 (i int not null) engine=innodb;
|
||||||
@ -1149,6 +1192,7 @@ Qcache_hits 12
|
|||||||
update t1 set i=(select distinct 1 from (select * from t2) a);
|
update t1 set i=(select distinct 1 from (select * from t2) a);
|
||||||
drop table t3;
|
drop table t3;
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
set GLOBAL query_cache_size=1048576;
|
set GLOBAL query_cache_size=1048576;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
i
|
i
|
||||||
@ -1168,6 +1212,7 @@ Variable_name Value
|
|||||||
Qcache_hits 11
|
Qcache_hits 11
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
use mysql;
|
use mysql;
|
||||||
select * from db;
|
select * from db;
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
@ -1185,6 +1230,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 12
|
Qcache_hits 12
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
create table t1(id int auto_increment primary key) engine=innodb;
|
create table t1(id int auto_increment primary key) engine=innodb;
|
||||||
insert into t1 values (1), (2), (3);
|
insert into t1 values (1), (2), (3);
|
||||||
select * from t1;
|
select * from t1;
|
||||||
@ -1199,6 +1245,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 12
|
Qcache_hits 12
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
id
|
id
|
||||||
1
|
1
|
||||||
@ -1211,6 +1258,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 11
|
Qcache_hits 11
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
alter table t1 rename to t2;
|
alter table t1 rename to t2;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||||
@ -1221,6 +1269,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 12
|
Qcache_hits 12
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
@ -1231,6 +1280,7 @@ Variable_name Value
|
|||||||
Qcache_hits 11
|
Qcache_hits 11
|
||||||
drop table t2;
|
drop table t2;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
create table t1 (word char(20) not null) engine=innodb;
|
create table t1 (word char(20) not null) engine=innodb;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
word
|
word
|
||||||
@ -1251,6 +1301,7 @@ select count(*) from t1;
|
|||||||
count(*)
|
count(*)
|
||||||
70
|
70
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
select count(*) from t1;
|
select count(*) from t1;
|
||||||
count(*)
|
count(*)
|
||||||
70
|
70
|
||||||
@ -1272,6 +1323,7 @@ count(*)
|
|||||||
140
|
140
|
||||||
drop table t1;
|
drop table t1;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
create table t1 (a int) engine=innodb;
|
create table t1 (a int) engine=innodb;
|
||||||
insert into t1 values (1),(2),(3);
|
insert into t1 values (1),(2),(3);
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
@ -1292,6 +1344,7 @@ Variable_name Value
|
|||||||
Qcache_hits 12
|
Qcache_hits 12
|
||||||
drop table t1;
|
drop table t1;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
create table t1 (a int) engine=innodb;
|
create table t1 (a int) engine=innodb;
|
||||||
insert into t1 values (1),(2);
|
insert into t1 values (1),(2);
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
@ -1316,6 +1369,7 @@ Variable_name Value
|
|||||||
Qcache_hits 12
|
Qcache_hits 12
|
||||||
SET SQL_SELECT_LIMIT=DEFAULT;
|
SET SQL_SELECT_LIMIT=DEFAULT;
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_queries_in_cache 0
|
Qcache_queries_in_cache 0
|
||||||
@ -1339,6 +1393,7 @@ Qcache_hits 11
|
|||||||
SET SQL_SELECT_LIMIT=DEFAULT;
|
SET SQL_SELECT_LIMIT=DEFAULT;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
create table t1 (a int not null) engine=innodb;
|
create table t1 (a int not null) engine=innodb;
|
||||||
create table t2 (a int not null) engine=innodb;
|
create table t2 (a int not null) engine=innodb;
|
||||||
set query_cache_wlock_invalidate=1;
|
set query_cache_wlock_invalidate=1;
|
||||||
@ -1380,6 +1435,7 @@ unlock table;
|
|||||||
drop view v1;
|
drop view v1;
|
||||||
set query_cache_wlock_invalidate=default;
|
set query_cache_wlock_invalidate=default;
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
set query_cache_wlock_invalidate=1;
|
set query_cache_wlock_invalidate=1;
|
||||||
create view v1 as select * from t1;
|
create view v1 as select * from t1;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
@ -1420,6 +1476,7 @@ drop view v1;
|
|||||||
set query_cache_wlock_invalidate=default;
|
set query_cache_wlock_invalidate=default;
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
create table t1 (id int primary key) engine=innodb;
|
create table t1 (id int primary key) engine=innodb;
|
||||||
insert into t1 values (1),(2),(3);
|
insert into t1 values (1),(2),(3);
|
||||||
select * from t1;
|
select * from t1;
|
||||||
@ -1433,12 +1490,10 @@ a
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
SET NAMES koi8r;
|
SET NAMES koi8r;
|
||||||
CREATE TABLE t1 (a char(1) character set koi8r) engine=innodb;
|
CREATE TABLE t1 (a char(1) character set koi8r) engine=innodb;
|
||||||
INSERT INTO t1 VALUES (_koi8r'á'),(_koi8r'Á');
|
INSERT INTO t1 VALUES (_koi8r 0xc3),(_koi8r 0xc3);
|
||||||
Warnings:
|
|
||||||
Warning 1265 Data truncated for column 'a' at row 1
|
|
||||||
Warning 1265 Data truncated for column 'a' at row 2
|
|
||||||
SELECT a,'Â','â'='Â' FROM t1;
|
SELECT a,'Â','â'='Â' FROM t1;
|
||||||
a  'â'='Â'
|
a  'â'='Â'
|
||||||
à Â 0
|
à Â 0
|
||||||
@ -1484,6 +1539,7 @@ Variable_name Value
|
|||||||
Qcache_queries_in_cache 4
|
Qcache_queries_in_cache 4
|
||||||
SET NAMES default;
|
SET NAMES default;
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
SELECT a,'Â','â'='Â' FROM t1;
|
SELECT a,'Â','â'='Â' FROM t1;
|
||||||
a  'â'='Â'
|
a  'â'='Â'
|
||||||
? Â 0
|
? Â 0
|
||||||
@ -1529,6 +1585,7 @@ Variable_name Value
|
|||||||
Qcache_queries_in_cache 4
|
Qcache_queries_in_cache 4
|
||||||
drop table t1;
|
drop table t1;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
create table t1 (a int) engine=innodb;
|
create table t1 (a int) engine=innodb;
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
@ -1553,6 +1610,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 13
|
Qcache_hits 13
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
show status like "Qcache_queries_in_cache";
|
show status like "Qcache_queries_in_cache";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_queries_in_cache 0
|
Qcache_queries_in_cache 0
|
||||||
@ -1577,6 +1635,7 @@ Variable_name Value
|
|||||||
Qcache_hits 12
|
Qcache_hits 12
|
||||||
drop table t1;
|
drop table t1;
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
set session query_cache_type = 2;
|
set session query_cache_type = 2;
|
||||||
create table t1(a int) engine=innodb;
|
create table t1(a int) engine=innodb;
|
||||||
select table_name from information_schema.tables
|
select table_name from information_schema.tables
|
||||||
@ -1614,6 +1673,7 @@ show status like "Qcache_hits";
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_hits 14
|
Qcache_hits 14
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
select a from t1;
|
select a from t1;
|
||||||
a
|
a
|
||||||
select a from t1;
|
select a from t1;
|
||||||
@ -1636,10 +1696,12 @@ Qcache_hits 13
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
# Restore original settings.
|
# Restore original settings.
|
||||||
# On node-1
|
# On node-1
|
||||||
|
connection node_1;
|
||||||
SET GLOBAL query_cache_size=@query_cache_size_saved;
|
SET GLOBAL query_cache_size=@query_cache_size_saved;
|
||||||
SET GLOBAL query_cache_type=@query_cache_type_saved;
|
SET GLOBAL query_cache_type=@query_cache_type_saved;
|
||||||
|
|
||||||
# On node-2
|
# On node-2
|
||||||
|
connection node_2;
|
||||||
SET GLOBAL query_cache_size=@query_cache_size_saved;
|
SET GLOBAL query_cache_size=@query_cache_size_saved;
|
||||||
SET GLOBAL query_cache_type=@query_cache_type_saved;
|
SET GLOBAL query_cache_type=@query_cache_type_saved;
|
||||||
# End of test
|
# End of test
|
||||||
|
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