mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge 10.4 into 10.5
This commit is contained in:
@ -1182,7 +1182,7 @@ static int check_version_match(void)
|
||||
extract_variable_from_show(&ds_version, version_str))
|
||||
{
|
||||
print_error("Version check failed. Got the following error when calling "
|
||||
"the 'mysql' command line client", &ds_version);
|
||||
"the 'mysql_upgrade' command line client", &ds_version);
|
||||
dynstr_free(&ds_version);
|
||||
return 1; /* Query failed */
|
||||
}
|
||||
|
@ -1083,6 +1083,7 @@ write_slave_info(MYSQL *connection)
|
||||
char *master = NULL;
|
||||
char *filename = NULL;
|
||||
char *gtid_executed = NULL;
|
||||
char *using_gtid = NULL;
|
||||
char *position = NULL;
|
||||
char *gtid_slave_pos = NULL;
|
||||
char *ptr;
|
||||
@ -1093,6 +1094,7 @@ write_slave_info(MYSQL *connection)
|
||||
{"Relay_Master_Log_File", &filename},
|
||||
{"Exec_Master_Log_Pos", &position},
|
||||
{"Executed_Gtid_Set", >id_executed},
|
||||
{"Using_Gtid", &using_gtid},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
@ -1133,7 +1135,8 @@ write_slave_info(MYSQL *connection)
|
||||
ut_a(asprintf(&mysql_slave_position,
|
||||
"master host '%s', purge list '%s'",
|
||||
master, gtid_executed) != -1);
|
||||
} else if (gtid_slave_pos && *gtid_slave_pos) {
|
||||
} else if (gtid_slave_pos && *gtid_slave_pos &&
|
||||
!(using_gtid && !strncmp(using_gtid, "No", 2))) {
|
||||
/* MariaDB >= 10.0 with GTID enabled */
|
||||
result = backup_file_printf(XTRABACKUP_SLAVE_INFO,
|
||||
"SET GLOBAL gtid_slave_pos = '%s';\n"
|
||||
|
@ -753,7 +753,6 @@ enum options_xtrabackup
|
||||
OPT_INNODB_CHECKSUM_ALGORITHM,
|
||||
OPT_INNODB_UNDO_DIRECTORY,
|
||||
OPT_INNODB_UNDO_TABLESPACES,
|
||||
OPT_INNODB_LOG_CHECKSUMS,
|
||||
OPT_XTRA_INCREMENTAL_FORCE_SCAN,
|
||||
OPT_DEFAULTS_GROUP,
|
||||
OPT_CLOSE_FILES,
|
||||
@ -2698,6 +2697,7 @@ static bool xtrabackup_copy_logfile(bool last = false)
|
||||
ut_a(dst_log_file != NULL);
|
||||
ut_ad(recv_sys.is_initialised());
|
||||
|
||||
bool overwritten_block = false;
|
||||
lsn_t start_lsn;
|
||||
lsn_t end_lsn;
|
||||
|
||||
@ -2723,6 +2723,11 @@ static bool xtrabackup_copy_logfile(bool last = false)
|
||||
}
|
||||
|
||||
if (lsn == start_lsn) {
|
||||
overwritten_block= !recv_sys.found_corrupt_log
|
||||
&& log_block_calc_checksum_crc32(log_sys.buf) ==
|
||||
log_block_get_checksum(log_sys.buf)
|
||||
&& log_block_get_hdr_no(log_sys.buf) >
|
||||
log_block_convert_lsn_to_no(start_lsn);
|
||||
start_lsn = 0;
|
||||
} else {
|
||||
mutex_enter(&recv_sys.mutex);
|
||||
@ -2733,9 +2738,13 @@ static bool xtrabackup_copy_logfile(bool last = false)
|
||||
log_mutex_exit();
|
||||
|
||||
if (!start_lsn) {
|
||||
die(recv_sys.found_corrupt_log
|
||||
? "xtrabackup_copy_logfile() failed: corrupt log."
|
||||
: "xtrabackup_copy_logfile() failed.");
|
||||
const char *reason = recv_sys.found_corrupt_log
|
||||
? "corrupt log."
|
||||
: (overwritten_block
|
||||
? "redo log block is overwritten, please increase redo log size with innodb_log_file_size parameter."
|
||||
: "redo log block checksum does not match.");
|
||||
|
||||
die("xtrabackup_copy_logfile() failed: %s", reason);
|
||||
return true;
|
||||
}
|
||||
} while (start_lsn == end_lsn);
|
||||
|
@ -19,6 +19,8 @@ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64")
|
||||
MY_CHECK_C_COMPILER_FLAG(-maes)
|
||||
MY_CHECK_C_COMPILER_FLAG(-msse4)
|
||||
MY_CHECK_C_COMPILER_FLAG(-mpclmul)
|
||||
MY_CHECK_C_COMPILER_FLAG(-mrdrnd)
|
||||
MY_CHECK_C_COMPILER_FLAG(-mrdseed)
|
||||
IF(have_C__maes AND have_C__msse4 AND have_C__mpclmul)
|
||||
SET(WOLFSSL_INTELASM ON)
|
||||
ENDIF()
|
||||
@ -113,20 +115,27 @@ IF(WOLFSSL_INTELASM)
|
||||
LIST(APPEND WOLFCRYPT_SOURCES ${WOLFCRYPT_SRCDIR}/cpuid.c)
|
||||
IF(MSVC)
|
||||
LIST(APPEND WOLFCRYPT_SOURCES ${WOLFCRYPT_SRCDIR}/aes_asm.asm)
|
||||
IF(CMAKE_C_COMPILER_ID MATCHES Clang)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
|
||||
ELSE()
|
||||
SET(HAVE_INTEL_RDSEED 1)
|
||||
SET(WOLFSSL_X86_64_BUILD 1)
|
||||
SET(HAVE_INTEL_RDSEED 1)
|
||||
SET(HAVE_INTEL_RDRAND 1)
|
||||
IF(CMAKE_C_COMPILER_ID MATCHES Clang)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes -msse4.2 -mpclmul -mrdrnd -mrdseed")
|
||||
ENDIF()
|
||||
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64")
|
||||
SET(HAVE_INTEL_RDSEED 1)
|
||||
SET(USE_INTEL_SPEEDUP 1)
|
||||
LIST(APPEND WOLFCRYPT_SOURCES
|
||||
${WOLFCRYPT_SRCDIR}/aes_asm.S
|
||||
${WOLFCRYPT_SRCDIR}/sha512_asm.S
|
||||
${WOLFCRYPT_SRCDIR}/sha256_asm.S)
|
||||
ADD_DEFINITIONS(-maes -msse4 -mpclmul)
|
||||
IF(have_C__mrdrnd)
|
||||
SET(HAVE_INTEL_RDRAND 1)
|
||||
ADD_DEFINITIONS(-mrdrnd)
|
||||
ENDIF()
|
||||
IF(have_C__mrdseed)
|
||||
SET(HAVE_INTEL_RDSEED 1)
|
||||
ADD_DEFINITIONS(-mrdseed)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
@ -32,6 +32,7 @@
|
||||
#cmakedefine USE_FAST_MATH
|
||||
#cmakedefine TFM_TIMING_RESISTANT
|
||||
#cmakedefine HAVE_INTEL_RDSEED
|
||||
#cmakedefine HAVE_INTEL_RDRAND
|
||||
#cmakedefine USE_INTEL_SPEEDUP
|
||||
#cmakedefine USE_FAST_MATH
|
||||
#cmakedefine WOLFSSL_X86_64_BUILD
|
||||
|
@ -88,6 +88,8 @@ extern struct wsrep_service_st {
|
||||
my_bool (*wsrep_thd_has_ignored_error_func)(const MYSQL_THD thd);
|
||||
void (*wsrep_thd_set_ignored_error_func)(MYSQL_THD thd, my_bool val);
|
||||
bool (*wsrep_thd_set_wsrep_aborter_func)(MYSQL_THD bf_thd, MYSQL_THD thd);
|
||||
void (*wsrep_report_bf_lock_wait_func)(const MYSQL_THD thd,
|
||||
unsigned long long trx_id);
|
||||
} *wsrep_service;
|
||||
|
||||
#define MYSQL_SERVICE_WSREP_INCLUDED
|
||||
@ -132,6 +134,7 @@ extern struct wsrep_service_st {
|
||||
#define wsrep_thd_has_ignored_error(T) wsrep_service->wsrep_thd_has_ignored_error_func(T)
|
||||
#define wsrep_thd_set_ignored_error(T,V) wsrep_service->wsrep_thd_set_ignored_error_func(T,V)
|
||||
#define wsrep_thd_set_wsrep_aborter(T) wsrep_service->wsrep_thd_set_wsrep_aborter_func(T1, T2)
|
||||
#define wsrep_report_bf_lock_wait(T,I) wsrep_service->wsrep_report_bf_lock_wait(T,I)
|
||||
#else
|
||||
|
||||
#define MYSQL_SERVICE_WSREP_STATIC_INCLUDED
|
||||
@ -229,5 +232,7 @@ extern "C" ulong wsrep_OSU_method_get(const MYSQL_THD thd);
|
||||
extern "C" my_bool wsrep_thd_has_ignored_error(const MYSQL_THD thd);
|
||||
extern "C" void wsrep_thd_set_ignored_error(MYSQL_THD thd, my_bool val);
|
||||
extern "C" bool wsrep_thd_set_wsrep_aborter(MYSQL_THD bf_thd, MYSQL_THD victim_thd);
|
||||
extern "C" void wsrep_report_bf_lock_wait(const THD *thd,
|
||||
unsigned long long trx_id);
|
||||
#endif
|
||||
#endif /* MYSQL_SERVICE_WSREP_INCLUDED */
|
||||
|
@ -10537,6 +10537,18 @@ SELECT CONVERT(1, CHAR) IN ('100', '10', '1');
|
||||
CONVERT(1, CHAR) IN ('100', '10', '1')
|
||||
1
|
||||
#
|
||||
# MDEV-23535 SIGSEGV, SIGABRT and SIGILL in typeinfo for Item_func_set_collation (on optimized builds)
|
||||
#
|
||||
SET NAMES utf8;
|
||||
CREATE OR REPLACE TABLE t1(a DATETIME) ENGINE=MYISAM;
|
||||
INSERT INTO t1 VALUES ('2019-03-10 02:55:05');
|
||||
CREATE OR REPLACE TABLE t2(a VARCHAR(50) CHARACTER SET latin1) ENGINE=MYISAM;
|
||||
INSERT INTO t2 VALUES ('2019-03-10 02:55:05');
|
||||
SELECT * FROM t1 WHERE (SELECT 1,CONCAT(a) FROM t1) = (SELECT 1,CONCAT(a) FROM t2);
|
||||
a
|
||||
2019-03-10 02:55:05
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# End of 10.1 tests
|
||||
#
|
||||
#
|
||||
|
@ -2052,6 +2052,18 @@ SELECT CONVERT(1, CHAR) IN ('100', 10, '101');
|
||||
SELECT CONVERT(1, CHAR) IN ('100', 10, '1');
|
||||
SELECT CONVERT(1, CHAR) IN ('100', '10', '1');
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-23535 SIGSEGV, SIGABRT and SIGILL in typeinfo for Item_func_set_collation (on optimized builds)
|
||||
--echo #
|
||||
|
||||
SET NAMES utf8;
|
||||
CREATE OR REPLACE TABLE t1(a DATETIME) ENGINE=MYISAM;
|
||||
INSERT INTO t1 VALUES ('2019-03-10 02:55:05');
|
||||
CREATE OR REPLACE TABLE t2(a VARCHAR(50) CHARACTER SET latin1) ENGINE=MYISAM;
|
||||
INSERT INTO t2 VALUES ('2019-03-10 02:55:05');
|
||||
SELECT * FROM t1 WHERE (SELECT 1,CONCAT(a) FROM t1) = (SELECT 1,CONCAT(a) FROM t2);
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.1 tests
|
||||
|
@ -145,7 +145,7 @@ test
|
||||
Phase 7/7: Running 'FLUSH PRIVILEGES'
|
||||
OK
|
||||
DROP USER mysqltest1@'%';
|
||||
Version check failed. Got the following error when calling the 'mysql' command line client
|
||||
Version check failed. Got the following error when calling the 'mysql_upgrade' command line client
|
||||
ERROR 1045 (28000): Access denied for user 'mysqltest1'@'localhost' (using password: YES)
|
||||
FATAL ERROR: Upgrade failed
|
||||
Run mysql_upgrade with a non existing server socket
|
||||
@ -412,7 +412,7 @@ OK
|
||||
# Bug #21489398: MYSQL_UPGRADE: FATAL ERROR: UPGRADE FAILED - IMPROVE ERROR
|
||||
#
|
||||
Run mysql_upgrade with unauthorized access
|
||||
Version check failed. Got the following error when calling the 'mysql' command line client
|
||||
Version check failed. Got the following error when calling the 'mysql_upgrade' command line client
|
||||
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
|
||||
FATAL ERROR: Upgrade failed
|
||||
#
|
||||
|
@ -616,6 +616,20 @@ Warnings:
|
||||
Note 1003 select `test`.`t1`.`f1` AS `f1`,`test`.`t2`.`f2` AS `f2`,`test`.`t3`.`f3` AS `f3` from `test`.`t1` join `test`.`t2` semi join (`test`.`t4`) join `test`.`t3` where `test`.`t4`.`f4` = 1 and `test`.`t1`.`f1` >= `test`.`t2`.`f2`
|
||||
DROP TABLE t1,t2,t3,t4;
|
||||
#
|
||||
# MDEV-23535: SIGSEGV, SIGABRT and SIGILL in typeinfo for Item_func_set_collation (on optimized builds)
|
||||
#
|
||||
set @save_character_set_connection=@@character_set_connection;
|
||||
set character_set_connection='utf8';
|
||||
CREATE TABLE t1(a DATETIME, b VARCHAR(50)) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES ('2019-03-10 02:55:05', '2019-03-10 02:55:05');
|
||||
CREATE TABLE t2(a VARCHAR(50)) ENGINE=INNODB;
|
||||
INSERT INTO t2 VALUES ('2019-03-10 02:55:05');
|
||||
SELECT * FROM t1 WHERE (SELECT 1,CONCAT(a) FROM t1) = (SELECT 1,CONCAT(a) FROM t2);
|
||||
a b
|
||||
2019-03-10 02:55:05 2019-03-10 02:55:05
|
||||
DROP TABLE t1,t2;
|
||||
set character_set_connection=@save_character_set_connection;
|
||||
#
|
||||
# MDEV-17362: SIGSEGV in JOIN::optimize_inner or Assertion `fixed == 0'
|
||||
# failed in Item_equal::fix_fields, server crashes after 2nd execution
|
||||
# of PS
|
||||
@ -648,3 +662,4 @@ a b
|
||||
execute stmt;
|
||||
a b
|
||||
drop table t1,t2;
|
||||
# End of 10.4 tests
|
||||
|
@ -611,6 +611,23 @@ FROM t1
|
||||
|
||||
DROP TABLE t1,t2,t3,t4;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-23535: SIGSEGV, SIGABRT and SIGILL in typeinfo for Item_func_set_collation (on optimized builds)
|
||||
--echo #
|
||||
|
||||
set @save_character_set_connection=@@character_set_connection;
|
||||
set character_set_connection='utf8';
|
||||
|
||||
CREATE TABLE t1(a DATETIME, b VARCHAR(50)) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES ('2019-03-10 02:55:05', '2019-03-10 02:55:05');
|
||||
CREATE TABLE t2(a VARCHAR(50)) ENGINE=INNODB;
|
||||
INSERT INTO t2 VALUES ('2019-03-10 02:55:05');
|
||||
SELECT * FROM t1 WHERE (SELECT 1,CONCAT(a) FROM t1) = (SELECT 1,CONCAT(a) FROM t2);
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
set character_set_connection=@save_character_set_connection;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-17362: SIGSEGV in JOIN::optimize_inner or Assertion `fixed == 0'
|
||||
--echo # failed in Item_equal::fix_fields, server crashes after 2nd execution
|
||||
@ -643,3 +660,5 @@ execute stmt;
|
||||
execute stmt;
|
||||
|
||||
drop table t1,t2;
|
||||
|
||||
--echo # End of 10.4 tests
|
||||
|
4
mysql-test/main/windows_debug.result
Normal file
4
mysql-test/main/windows_debug.result
Normal file
@ -0,0 +1,4 @@
|
||||
# mdev-23741 sharing violation when renaming .frm file in ALTER
|
||||
CREATE TABLE t(i int);
|
||||
SET STATEMENT debug_dbug='+d,rename_sharing_violation' FOR ALTER TABLE t ADD PRIMARY KEY (i);
|
||||
DROP TABLE t;
|
11
mysql-test/main/windows_debug.test
Normal file
11
mysql-test/main/windows_debug.test
Normal file
@ -0,0 +1,11 @@
|
||||
# Windows-specific tests , debug mode
|
||||
|
||||
--source include/have_debug.inc
|
||||
--source include/windows.inc
|
||||
|
||||
--echo # mdev-23741 sharing violation when renaming .frm file in ALTER
|
||||
CREATE TABLE t(i int);
|
||||
SET STATEMENT debug_dbug='+d,rename_sharing_violation' FOR ALTER TABLE t ADD PRIMARY KEY (i);
|
||||
DROP TABLE t;
|
||||
|
||||
#End of 10.3 tests
|
@ -9,4 +9,7 @@ INSERT INTO t1 VALUES (repeat('a', 255), repeat('a', 255),repeat('a', 255),repea
|
||||
INSERT INTO t1 VALUES (repeat('a', 255), repeat('a', 255),repeat('a', 255),repeat('a', 255),repeat('a', 255));
|
||||
UPDATE t1 SET c1=repeat('b',255);
|
||||
INSERT INTO t1 VALUES (repeat('a', 255), repeat('a', 255),repeat('a', 255),repeat('a', 255),repeat('a', 255));
|
||||
SHOW BINLOG EVENTS FROM POS;
|
||||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Invalid pos specified. Requested from pos:POS is greater than actual file size:MAX_POS
|
||||
|
||||
DROP TABLE t1;
|
||||
|
@ -34,4 +34,9 @@ while ($pos <= $max_pos)
|
||||
--enable_query_log
|
||||
}
|
||||
|
||||
# Testing a case where input position is greater than actual binlog file size.
|
||||
--replace_result $pos POS $max_pos MAX_POS
|
||||
--error 1220
|
||||
eval SHOW BINLOG EVENTS FROM $pos;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
@ -1,8 +1,5 @@
|
||||
SET @save_threads = @@GLOBAL.innodb_encryption_threads;
|
||||
SET default_storage_engine = InnoDB;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, c VARCHAR(256));
|
||||
CREATE TABLE t2 AS SELECT * FROM t1;
|
||||
drop table t1,t2;
|
||||
SET GLOBAL innodb_encryption_threads = 0;
|
||||
SET GLOBAL innodb_encryption_threads = 4;
|
||||
CREATE TABLE `table10_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int, key (`col_int_key` ),primary key (pk)) engine=innodb;
|
||||
INSERT /*! IGNORE */ INTO table10_int_autoinc VALUES (NULL, NULL, -474021888) , (1, NULL, NULL) , (1141047296, NULL, NULL) , (NULL, NULL, NULL) , (NULL, NULL, 1) , (NULL, NULL, 9) , (0, NULL, 1225785344) , (NULL, NULL, 1574174720) , (2, NULL, NULL) , (6, NULL, 3);
|
||||
@ -14,14 +11,9 @@ INSERT IGNORE INTO `table1_int_autoinc` ( `col_int` ) VALUES ( 1 ), ( 0 ), ( 7 )
|
||||
INSERT IGNORE INTO `table10_int_autoinc` ( `col_int` ) VALUES ( 6 ), ( 2 ), ( 3 ), ( 6 );
|
||||
connect con1,localhost,root,,test;
|
||||
connect con2,localhost,root,,test;
|
||||
connection default;
|
||||
drop table if exists create_or_replace_t, table1_int_autoinc, table0_int_autoinc, table10_int_autoinc;
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
SET GLOBAL innodb_encrypt_tables = OFF;
|
||||
SET GLOBAL innodb_encryption_threads = 4;
|
||||
# Wait max 10 min for key encryption threads to decrypt all spaces
|
||||
# Success!
|
||||
SET GLOBAL innodb_encryption_threads = 0;
|
||||
SET GLOBAL innodb_encrypt_tables = OFF;
|
||||
# restart
|
||||
connection default;
|
||||
drop table create_or_replace_t, table1_int_autoinc, table0_int_autoinc,
|
||||
table10_int_autoinc;
|
||||
SET GLOBAL innodb_encryption_threads = @save_threads;
|
||||
|
20
mysql-test/suite/encryption/r/create_or_replace_big.result
Normal file
20
mysql-test/suite/encryption/r/create_or_replace_big.result
Normal file
@ -0,0 +1,20 @@
|
||||
SET default_storage_engine = InnoDB;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, c VARCHAR(256));
|
||||
CREATE TABLE t2 AS SELECT * FROM t1;
|
||||
drop table t1,t2;
|
||||
SET GLOBAL innodb_encryption_threads = 0;
|
||||
SET GLOBAL innodb_encryption_threads = 4;
|
||||
CREATE TABLE `table10_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int, key (`col_int_key` ),primary key (pk)) engine=innodb;
|
||||
INSERT /*! IGNORE */ INTO table10_int_autoinc VALUES (NULL, NULL, -474021888) , (1, NULL, NULL) , (1141047296, NULL, NULL) , (NULL, NULL, NULL) , (NULL, NULL, 1) , (NULL, NULL, 9) , (0, NULL, 1225785344) , (NULL, NULL, 1574174720) , (2, NULL, NULL) , (6, NULL, 3);
|
||||
CREATE TABLE `table1_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int,key (`col_int_key` ), primary key (pk)) engine=innodb;
|
||||
CREATE TABLE `table0_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int, key (`col_int_key` ),primary key (pk)) engine=innodb;
|
||||
INSERT /*! IGNORE */ INTO table1_int_autoinc VALUES (4, NULL, NULL);
|
||||
INSERT IGNORE INTO `table0_int_autoinc` ( `col_int_key` ) VALUES ( 1 ), ( 3 ), ( 4 ), ( 1 );
|
||||
INSERT IGNORE INTO `table1_int_autoinc` ( `col_int` ) VALUES ( 1 ), ( 0 ), ( 7 ), ( 9 );
|
||||
INSERT IGNORE INTO `table10_int_autoinc` ( `col_int` ) VALUES ( 6 ), ( 2 ), ( 3 ), ( 6 );
|
||||
# Wait max 10 min for key encryption threads to decrypt all spaces
|
||||
# Success!
|
||||
SET GLOBAL innodb_encryption_threads = 0;
|
||||
SET GLOBAL innodb_encrypt_tables = OFF;
|
||||
DROP TABLE table0_int_autoinc, table1_int_autoinc, table10_int_autoinc;
|
||||
# restart
|
@ -1 +1 @@
|
||||
--innodb-tablespaces-encryption
|
||||
--innodb-encrypt-tables
|
||||
|
@ -1,42 +1,11 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_file_key_management_plugin.inc
|
||||
--source include/not_embedded.inc
|
||||
# This is needed for longer testcase timeout at least P7/P8
|
||||
--source include/big_test.inc
|
||||
--source include/count_sessions.inc
|
||||
|
||||
SET @save_threads = @@GLOBAL.innodb_encryption_threads;
|
||||
|
||||
#
|
||||
# MDEV-8164: Server crashes in pfs_mutex_enter_func after fil_crypt_is_closing or alike
|
||||
#
|
||||
SET default_storage_engine = InnoDB;
|
||||
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, c VARCHAR(256));
|
||||
CREATE TABLE t2 AS SELECT * FROM t1;
|
||||
|
||||
--disable_abort_on_error
|
||||
--disable_warnings
|
||||
--disable_query_log
|
||||
|
||||
let $i = 40;
|
||||
while ($i)
|
||||
{
|
||||
SET GLOBAL innodb_encrypt_tables = ON;
|
||||
SET GLOBAL innodb_encryption_threads = 1;
|
||||
CREATE OR REPLACE TABLE t1 AS SELECT * FROM t2;
|
||||
CREATE OR REPLACE TABLE t2 AS SELECT * FROM t1;
|
||||
SET GLOBAL innodb_encryption_rotation_iops = 100;
|
||||
SET GLOBAL innodb_encrypt_tables = OFF;
|
||||
CREATE OR REPLACE TABLE t2 AS SELECT * FROM t1;
|
||||
CREATE OR REPLACE TABLE t1 AS SELECT * FROM t2;
|
||||
dec $i;
|
||||
}
|
||||
|
||||
--enable_abort_on_error
|
||||
--enable_warnings
|
||||
--enable_query_log
|
||||
|
||||
drop table t1,t2;
|
||||
SET GLOBAL innodb_encryption_threads = 0;
|
||||
|
||||
#
|
||||
# MDEV-8173: InnoDB; Failing assertion: crypt_data->type == 1
|
||||
#
|
||||
@ -58,11 +27,9 @@ INSERT IGNORE INTO `table10_int_autoinc` ( `col_int` ) VALUES ( 6 ), ( 2 ), ( 3
|
||||
--connect (con1,localhost,root,,test)
|
||||
--connect (con2,localhost,root,,test)
|
||||
|
||||
--disable_abort_on_error
|
||||
--disable_warnings
|
||||
--disable_query_log
|
||||
|
||||
let $i = 500;
|
||||
let $i = 100;
|
||||
while ($i)
|
||||
{
|
||||
connection con1;
|
||||
@ -101,42 +68,11 @@ dec $i;
|
||||
}
|
||||
|
||||
--enable_query_log
|
||||
disconnect con1;
|
||||
disconnect con2;
|
||||
connection default;
|
||||
drop table if exists create_or_replace_t, table1_int_autoinc, table0_int_autoinc, table10_int_autoinc;
|
||||
--disconnect con1
|
||||
--disconnect con2
|
||||
--enable_abort_on_error
|
||||
--enable_warnings
|
||||
drop table create_or_replace_t, table1_int_autoinc, table0_int_autoinc,
|
||||
table10_int_autoinc;
|
||||
|
||||
SET GLOBAL innodb_encrypt_tables = OFF;
|
||||
SET GLOBAL innodb_encryption_threads = 4;
|
||||
|
||||
--echo # Wait max 10 min for key encryption threads to decrypt 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!
|
||||
|
||||
SET GLOBAL innodb_encryption_threads = 0;
|
||||
SET GLOBAL innodb_encrypt_tables = OFF;
|
||||
|
||||
# Make sure that all dirty pages are flushed
|
||||
|
||||
-- source include/restart_mysqld.inc
|
||||
SET GLOBAL innodb_encryption_threads = @save_threads;
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
1
mysql-test/suite/encryption/t/create_or_replace_big.opt
Normal file
1
mysql-test/suite/encryption/t/create_or_replace_big.opt
Normal file
@ -0,0 +1 @@
|
||||
--innodb-tablespaces-encryption
|
86
mysql-test/suite/encryption/t/create_or_replace_big.test
Normal file
86
mysql-test/suite/encryption/t/create_or_replace_big.test
Normal file
@ -0,0 +1,86 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_file_key_management_plugin.inc
|
||||
--source include/not_embedded.inc
|
||||
# This is needed for longer testcase timeout at least P7/P8
|
||||
--source include/big_test.inc
|
||||
|
||||
#
|
||||
# MDEV-8164: Server crashes in pfs_mutex_enter_func after fil_crypt_is_closing or alike
|
||||
#
|
||||
SET default_storage_engine = InnoDB;
|
||||
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, c VARCHAR(256));
|
||||
CREATE TABLE t2 AS SELECT * FROM t1;
|
||||
|
||||
--disable_abort_on_error
|
||||
--disable_warnings
|
||||
--disable_query_log
|
||||
|
||||
let $i = 40;
|
||||
while ($i)
|
||||
{
|
||||
SET GLOBAL innodb_encrypt_tables = ON;
|
||||
SET GLOBAL innodb_encryption_threads = 1;
|
||||
CREATE OR REPLACE TABLE t1 AS SELECT * FROM t2;
|
||||
CREATE OR REPLACE TABLE t2 AS SELECT * FROM t1;
|
||||
SET GLOBAL innodb_encryption_rotation_iops = 100;
|
||||
SET GLOBAL innodb_encrypt_tables = OFF;
|
||||
CREATE OR REPLACE TABLE t2 AS SELECT * FROM t1;
|
||||
CREATE OR REPLACE TABLE t1 AS SELECT * FROM t2;
|
||||
dec $i;
|
||||
}
|
||||
|
||||
--enable_abort_on_error
|
||||
--enable_warnings
|
||||
--enable_query_log
|
||||
|
||||
drop table t1,t2;
|
||||
SET GLOBAL innodb_encryption_threads = 0;
|
||||
|
||||
#
|
||||
# MDEV-8173: InnoDB; Failing assertion: crypt_data->type == 1
|
||||
#
|
||||
|
||||
SET GLOBAL innodb_encryption_threads = 4;
|
||||
|
||||
CREATE TABLE `table10_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int, key (`col_int_key` ),primary key (pk)) engine=innodb;
|
||||
INSERT /*! IGNORE */ INTO table10_int_autoinc VALUES (NULL, NULL, -474021888) , (1, NULL, NULL) , (1141047296, NULL, NULL) , (NULL, NULL, NULL) , (NULL, NULL, 1) , (NULL, NULL, 9) , (0, NULL, 1225785344) , (NULL, NULL, 1574174720) , (2, NULL, NULL) , (6, NULL, 3);
|
||||
|
||||
CREATE TABLE `table1_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int,key (`col_int_key` ), primary key (pk)) engine=innodb;
|
||||
|
||||
CREATE TABLE `table0_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int, key (`col_int_key` ),primary key (pk)) engine=innodb;
|
||||
|
||||
INSERT /*! IGNORE */ INTO table1_int_autoinc VALUES (4, NULL, NULL);
|
||||
INSERT IGNORE INTO `table0_int_autoinc` ( `col_int_key` ) VALUES ( 1 ), ( 3 ), ( 4 ), ( 1 );
|
||||
INSERT IGNORE INTO `table1_int_autoinc` ( `col_int` ) VALUES ( 1 ), ( 0 ), ( 7 ), ( 9 );
|
||||
INSERT IGNORE INTO `table10_int_autoinc` ( `col_int` ) VALUES ( 6 ), ( 2 ), ( 3 ), ( 6 );
|
||||
|
||||
--echo # Wait max 10 min for key encryption threads to decrypt 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!
|
||||
|
||||
SET GLOBAL innodb_encryption_threads = 0;
|
||||
SET GLOBAL innodb_encrypt_tables = OFF;
|
||||
|
||||
DROP TABLE table0_int_autoinc, table1_int_autoinc, table10_int_autoinc;
|
||||
|
||||
-- source include/restart_mysqld.inc
|
@ -4,48 +4,45 @@ connection node_1;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
CREATE PROCEDURE p1 ()
|
||||
BEGIN
|
||||
DECLARE x INT DEFAULT 1;
|
||||
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
|
||||
WHILE 1 DO
|
||||
INSERT INTO t1 VALUES (DEFAULT);
|
||||
COMMIT;
|
||||
END WHILE;
|
||||
END|
|
||||
CALL p1();;
|
||||
connection node_2;
|
||||
CALL p1();;
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_2a;
|
||||
Killing server ...
|
||||
INSERT INTO t1 VALUES (DEFAULT);
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
connection node_2a;
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1a;
|
||||
INSERT INTO t1 VALUES (DEFAULT);
|
||||
connection node_1;
|
||||
Got one of the listed errors
|
||||
connection node_2;
|
||||
Got one of the listed errors
|
||||
connection node_1a;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
132
|
||||
connection node_2a;
|
||||
count_equal
|
||||
1
|
||||
CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member 0");
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE
|
||||
2
|
||||
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE = 2
|
||||
1
|
||||
connection node_1a;
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE
|
||||
2
|
||||
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE = 2
|
||||
1
|
||||
DROP PROCEDURE p1;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
132
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
CALL mtr.add_suppression("gcs_caused\\(\\) returned -1 \\(Operation not permitted\\)");
|
||||
CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member 0");
|
||||
disconnect node_1a;
|
||||
disconnect node_2a;
|
||||
|
@ -46,6 +46,7 @@ ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO parent VALUES (1);
|
||||
INSERT INTO child VALUES (1,0,1);
|
||||
connection node_2;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
|
||||
connection node_2;
|
||||
|
@ -6,11 +6,11 @@ connection node_1;
|
||||
connection node_2;
|
||||
connection node_3;
|
||||
connection node_4;
|
||||
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE = 4
|
||||
1
|
||||
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
EXPECT_4
|
||||
4
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER);
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_2;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
@ -22,60 +22,78 @@ connection node_3;
|
||||
INSERT INTO t1 VALUES (13);
|
||||
Shutting down server ...
|
||||
connection node_1;
|
||||
SELECT VARIABLE_VALUE AS EXPECT_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
EXPECT_3
|
||||
3
|
||||
INSERT INTO t1 VALUES (11);
|
||||
connection node_2;
|
||||
INSERT INTO t1 VALUES (12);
|
||||
connection node_4;
|
||||
INSERT INTO t1 VALUES (14);
|
||||
connection node_3;
|
||||
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
EXPECT_4
|
||||
4
|
||||
INSERT INTO t1 VALUES (131);
|
||||
connection node_2;
|
||||
INSERT INTO t1 VALUES (22);
|
||||
Shutting down server ...
|
||||
connection node_1;
|
||||
SELECT VARIABLE_VALUE AS EXPECT_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
EXPECT_3
|
||||
3
|
||||
INSERT INTO t1 VALUES (21);
|
||||
connection node_3;
|
||||
INSERT INTO t1 VALUES (23);
|
||||
connection node_4;
|
||||
INSERT INTO t1 VALUES (24);
|
||||
connection node_2;
|
||||
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
EXPECT_4
|
||||
4
|
||||
INSERT INTO t1 VALUES (221);
|
||||
connection node_4;
|
||||
INSERT INTO t1 VALUES (34);
|
||||
Shutting down server ...
|
||||
connection node_1;
|
||||
SELECT VARIABLE_VALUE AS EXPECT_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
EXPECT_3
|
||||
3
|
||||
INSERT INTO t1 VALUES (31);
|
||||
connection node_2;
|
||||
INSERT INTO t1 VALUES (32);
|
||||
connection node_3;
|
||||
INSERT INTO t1 VALUES (33);
|
||||
connection node_4;
|
||||
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
EXPECT_4
|
||||
4
|
||||
INSERT INTO t1 VALUES (341);
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 19 FROM t1;
|
||||
COUNT(*) = 19
|
||||
1
|
||||
SELECT COUNT(*) AS EXPECT_19 FROM t1;
|
||||
EXPECT_19
|
||||
19
|
||||
connection node_2;
|
||||
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE = 4
|
||||
1
|
||||
SELECT COUNT(*) = 19 FROM t1;
|
||||
COUNT(*) = 19
|
||||
1
|
||||
SELECT COUNT(*) AS EXPECT_19 FROM t1;
|
||||
EXPECT_19
|
||||
19
|
||||
connection node_3;
|
||||
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE = 4
|
||||
1
|
||||
SELECT COUNT(*) = 19 FROM t1;
|
||||
COUNT(*) = 19
|
||||
1
|
||||
SELECT COUNT(*) AS EXPECT_19 FROM t1;
|
||||
EXPECT_19
|
||||
19
|
||||
connection node_4;
|
||||
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE = 4
|
||||
1
|
||||
SELECT COUNT(*) = 19 FROM t1;
|
||||
COUNT(*) = 19
|
||||
1
|
||||
SELECT COUNT(*) AS EXPECT_19 FROM t1;
|
||||
EXPECT_19
|
||||
19
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
|
||||
@ -86,5 +104,6 @@ CALL mtr.add_suppression("There are no nodes in the same segment that will ever
|
||||
CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
|
||||
connection node_4;
|
||||
CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
|
||||
disconnect node_2;
|
||||
disconnect node_1;
|
||||
connection node_1;
|
||||
disconnect node_3;
|
||||
disconnect node_4;
|
||||
|
@ -2,93 +2,62 @@
|
||||
# Test that autoincrement works correctly while the cluster membership
|
||||
# is changing and SST takes place.
|
||||
#
|
||||
|
||||
--source include/big_test.inc
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_mariabackup.inc
|
||||
--source include/force_restart.inc
|
||||
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
--source include/auto_increment_offset_save.inc
|
||||
|
||||
--connection node_1
|
||||
--let $connection_id = `SELECT CONNECTION_ID()`
|
||||
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
|
||||
# Issue an endless stream of autoincrement inserts
|
||||
|
||||
DELIMITER |;
|
||||
CREATE PROCEDURE p1 ()
|
||||
BEGIN
|
||||
DECLARE x INT DEFAULT 1;
|
||||
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
|
||||
|
||||
WHILE 1 DO
|
||||
INSERT INTO t1 VALUES (DEFAULT);
|
||||
COMMIT;
|
||||
END WHILE;
|
||||
END|
|
||||
DELIMITER ;|
|
||||
|
||||
--send CALL p1();
|
||||
--sleep 1
|
||||
|
||||
--connection node_2
|
||||
--send CALL p1();
|
||||
--sleep 1
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
|
||||
# Kill and restart node #2
|
||||
|
||||
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
|
||||
--connection node_2a
|
||||
--source include/kill_galera.inc
|
||||
|
||||
--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
|
||||
|
||||
--connection node_1
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
|
||||
--connection node_2a
|
||||
--source include/start_mysqld.inc
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
INSERT INTO t1 VALUES (DEFAULT);
|
||||
|
||||
# Terminate the stored procedure
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
|
||||
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
--connection node_1a
|
||||
--disable_query_log
|
||||
--eval KILL CONNECTION $connection_id
|
||||
--enable_query_log
|
||||
INSERT INTO t1 VALUES (DEFAULT);
|
||||
|
||||
--connection node_1
|
||||
# CR_SERVER_LOST
|
||||
--error 2013,2006
|
||||
--reap
|
||||
|
||||
--connection node_2
|
||||
# CR_SERVER_LOST
|
||||
--error 2013,2006
|
||||
--reap
|
||||
|
||||
# Confirm that the count is correct and that the cluster is intact
|
||||
|
||||
--connection node_1a
|
||||
--let $count = `SELECT COUNT(*) FROM t1`
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
||||
--connection node_2a
|
||||
--disable_query_log
|
||||
--eval SELECT COUNT(*) = $count AS count_equal FROM t1
|
||||
--enable_query_log
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
||||
CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member 0");
|
||||
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
|
||||
--connection node_1a
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
|
||||
DROP PROCEDURE p1;
|
||||
--connection node_1
|
||||
DROP TABLE t1;
|
||||
|
||||
CALL mtr.add_suppression("gcs_caused\\(\\) returned -1 \\(Operation not permitted\\)");
|
||||
@ -97,3 +66,6 @@ CALL mtr.add_suppression("WSREP: Action message in non-primary configuration fro
|
||||
--let $node_1=node_1a
|
||||
--let $node_2=node_2a
|
||||
--source include/auto_increment_offset_restore.inc
|
||||
|
||||
--disconnect node_1a
|
||||
--disconnect node_2a
|
||||
|
@ -61,20 +61,21 @@ CREATE TABLE child (
|
||||
INSERT INTO parent VALUES (1);
|
||||
INSERT INTO child VALUES (1,0,1);
|
||||
|
||||
--connection node_2
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM child;
|
||||
--source include/wait_condition.inc
|
||||
|
||||
# block applier before applying
|
||||
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
|
||||
|
||||
--connection node_2
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM child;
|
||||
--source include/wait_condition.inc
|
||||
DELETE FROM parent;
|
||||
|
||||
--connection node_1a
|
||||
# wait until applier has reached the sync point
|
||||
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
||||
|
||||
|
||||
--connection node_1
|
||||
# issue conflicting write to child table, it should fail in certification
|
||||
--error ER_LOCK_DEADLOCK
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
--source include/big_test.inc
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/force_restart.inc
|
||||
|
||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||
--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
|
||||
@ -22,10 +22,13 @@
|
||||
--let $node_4=node_4
|
||||
--source include/auto_increment_offset_save.inc
|
||||
|
||||
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
|
||||
--connection node_1
|
||||
CREATE TABLE t1 (f1 INTEGER);
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--connection node_2
|
||||
@ -46,9 +49,13 @@ INSERT INTO t1 VALUES (13);
|
||||
|
||||
--echo Shutting down server ...
|
||||
--source include/shutdown_mysqld.inc
|
||||
--sleep 5
|
||||
|
||||
|
||||
--connection node_1
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||
--source include/wait_condition.inc
|
||||
SELECT VARIABLE_VALUE AS EXPECT_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
|
||||
INSERT INTO t1 VALUES (11);
|
||||
|
||||
--connection node_2
|
||||
@ -59,9 +66,12 @@ INSERT INTO t1 VALUES (14);
|
||||
|
||||
--connection node_3
|
||||
--source include/start_mysqld.inc
|
||||
--sleep 5
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||
--source include/wait_condition.inc
|
||||
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
|
||||
INSERT INTO t1 VALUES (131);
|
||||
|
||||
#
|
||||
@ -73,9 +83,12 @@ INSERT INTO t1 VALUES (22);
|
||||
|
||||
--echo Shutting down server ...
|
||||
--source include/shutdown_mysqld.inc
|
||||
--sleep 5
|
||||
|
||||
--connection node_1
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||
--source include/wait_condition.inc
|
||||
SELECT VARIABLE_VALUE AS EXPECT_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
|
||||
INSERT INTO t1 VALUES (21);
|
||||
|
||||
--connection node_3
|
||||
@ -86,9 +99,12 @@ INSERT INTO t1 VALUES (24);
|
||||
|
||||
--connection node_2
|
||||
--source include/start_mysqld.inc
|
||||
--sleep 5
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||
--source include/wait_condition.inc
|
||||
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
|
||||
INSERT INTO t1 VALUES (221);
|
||||
|
||||
#
|
||||
@ -100,9 +116,12 @@ INSERT INTO t1 VALUES (34);
|
||||
|
||||
--echo Shutting down server ...
|
||||
--source include/shutdown_mysqld.inc
|
||||
--sleep 5
|
||||
|
||||
--connection node_1
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||
--source include/wait_condition.inc
|
||||
SELECT VARIABLE_VALUE AS EXPECT_3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
|
||||
INSERT INTO t1 VALUES (31);
|
||||
|
||||
--connection node_2
|
||||
@ -113,9 +132,12 @@ INSERT INTO t1 VALUES (33);
|
||||
|
||||
--connection node_4
|
||||
--source include/start_mysqld.inc
|
||||
--sleep 5
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||
--source include/wait_condition.inc
|
||||
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
|
||||
INSERT INTO t1 VALUES (341);
|
||||
|
||||
|
||||
@ -124,22 +146,44 @@ INSERT INTO t1 VALUES (341);
|
||||
#
|
||||
|
||||
--connection node_1
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||
--source include/wait_condition.inc
|
||||
--let $wait_condition = SELECT COUNT(*) = 19 FROM t1
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT COUNT(*) = 19 FROM t1;
|
||||
SELECT COUNT(*) AS EXPECT_19 FROM t1;
|
||||
|
||||
--connection node_2
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||
--source include/wait_condition.inc
|
||||
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
SELECT COUNT(*) = 19 FROM t1;
|
||||
|
||||
--let $wait_condition = SELECT COUNT(*) = 19 FROM t1
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT COUNT(*) AS EXPECT_19 FROM t1;
|
||||
|
||||
|
||||
--connection node_3
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||
--source include/wait_condition.inc
|
||||
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
SELECT COUNT(*) = 19 FROM t1;
|
||||
|
||||
--let $wait_condition = SELECT COUNT(*) = 19 FROM t1
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT COUNT(*) AS EXPECT_19 FROM t1;
|
||||
|
||||
--connection node_4
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
SELECT COUNT(*) = 19 FROM t1;
|
||||
|
||||
--let $wait_condition = SELECT COUNT(*) = 19 FROM t1
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT COUNT(*) AS EXPECT_19 FROM t1;
|
||||
|
||||
|
||||
--connection node_1
|
||||
DROP TABLE t1;
|
||||
@ -158,4 +202,6 @@ CALL mtr.add_suppression("Action message in non-primary configuration from membe
|
||||
# Restore original auto_increment_offset values.
|
||||
--source include/auto_increment_offset_restore.inc
|
||||
|
||||
--source include/galera_end.inc
|
||||
--connection node_1
|
||||
--disconnect node_3
|
||||
--disconnect node_4
|
||||
|
@ -10,6 +10,7 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
galera_gtid_2_cluster : MDEV-23775 Galera test failure on galera_3nodes.galera_gtid_2_cluster
|
||||
galera_ist_gcache_rollover : MDEV-23578 WSREP: exception caused by message: {v=0,t=1,ut=255,o=4,s=0,sr=0,as=1,f=6,src=50524cfe,srcvid=view_id(REG,50524cfe,4),insvid=view_id(UNKNOWN,00000000,0),ru=00000000,r=[-1,-1],fs=75,nl=(}
|
||||
galera_slave_options_do :MDEV-8798
|
||||
galera_slave_options_ignore : MDEV-8798
|
||||
|
@ -10,11 +10,11 @@ VARIABLE_VALUE = 3
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
EXPECT_1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
|
@ -9,16 +9,16 @@ VARIABLE_VALUE = 3
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
EXPECT_1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
connection node_1;
|
||||
include/assert_grep.inc [Streaming the backup to joiner at \[::1\]]
|
||||
include/assert_grep.inc [async IST sender starting to serve tcp://\[::1\]:]
|
||||
include/assert_grep.inc [IST receiver addr using tcp://\[::1\]]
|
||||
include/assert_grep.inc [Prepared IST receiver for 3-6, listening at: tcp://\[::1\]]
|
||||
include/assert_grep.inc [, listening at: tcp://\[::1\]]
|
||||
|
@ -9,12 +9,12 @@ VARIABLE_VALUE = 3
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
EXPECT_1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
connection node_1;
|
||||
@ -22,4 +22,4 @@ include/assert_grep.inc [Streaming the backup to joiner at \[::1\]]
|
||||
include/assert_grep.inc [async IST sender starting to serve tcp://\[::1\]:]
|
||||
connection node_2;
|
||||
include/assert_grep.inc [IST receiver addr using tcp://\[::1\]]
|
||||
include/assert_grep.inc [Prepared IST receiver for 3-6, listening at: tcp://\[::1\]]
|
||||
include/assert_grep.inc [, listening at: tcp://\[::1\]]
|
||||
|
@ -14,12 +14,12 @@ SET GLOBAL wsrep_sst_method = 'mysqldump';
|
||||
Shutting down server ...
|
||||
connection node_1;
|
||||
Cleaning var directory ...
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_2;
|
||||
Starting server ...
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
EXPECT_1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
|
||||
|
@ -9,11 +9,11 @@ VARIABLE_VALUE = 3
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
EXPECT_1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
|
@ -9,11 +9,11 @@ VARIABLE_VALUE = 3
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
EXPECT_1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
|
@ -4,7 +4,8 @@ connection node_1;
|
||||
connection node_2;
|
||||
connection node_3;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
|
||||
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
|
||||
include/assert_grep.inc [grastate.dat does not have 'safe_to_bootstrap: 0']
|
||||
@ -62,6 +63,7 @@ CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg()");
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f1` int(11) DEFAULT NULL
|
||||
`f1` int(11) NOT NULL,
|
||||
PRIMARY KEY (`f1`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
|
@ -4,7 +4,7 @@ connection node_1;
|
||||
connection node_2;
|
||||
connection node_3;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER);
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
|
||||
|
@ -10,6 +10,7 @@ wsrep_node_address=[::1]
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.1.port'
|
||||
bind-address=::
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
@ -17,6 +18,7 @@ wsrep_node_address=[::1]
|
||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
|
||||
bind-address=::
|
||||
|
||||
[mysqld.3]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
@ -24,3 +26,4 @@ wsrep_node_address=[::1]
|
||||
wsrep_provider_options='base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.3.port'
|
||||
bind-address=::
|
||||
|
@ -1 +0,0 @@
|
||||
--bind-address=::
|
@ -6,6 +6,7 @@
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
--source include/check_ipv6.inc
|
||||
--source include/force_restart.inc
|
||||
|
||||
--let $galera_connection_name = node_3
|
||||
--let $galera_server_number = 3
|
||||
@ -27,7 +28,7 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--connection node_2
|
||||
@ -39,6 +40,6 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
@ -11,6 +11,7 @@ wsrep_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.1.port'
|
||||
wsrep_node_name=node_1
|
||||
bind-address=::
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
@ -19,6 +20,7 @@ wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
|
||||
wsrep_node_name=node_2
|
||||
wsrep_sst_donor=node_1
|
||||
bind-address=::
|
||||
|
||||
[mysqld.3]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
@ -27,6 +29,7 @@ wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.3.port'
|
||||
wsrep_node_name=node_3
|
||||
wsrep_sst_donor=node_1
|
||||
bind-address=::
|
||||
|
||||
[SST]
|
||||
transferfmt=@ENV.MTR_GALERA_TFMT
|
||||
|
@ -1 +0,0 @@
|
||||
--bind-address=::
|
@ -18,7 +18,7 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--connection node_2
|
||||
@ -30,7 +30,7 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
@ -63,8 +63,8 @@ DROP TABLE t1;
|
||||
--let $assert_select = IST receiver addr using tcp://\[::1\]
|
||||
--source include/assert_grep.inc
|
||||
|
||||
# The receiver expects seqnos 3-6 only once.
|
||||
--let $assert_count = 1
|
||||
--let $assert_text = Prepared IST receiver for 3-6, listening at: tcp://\[::1\]
|
||||
--let $assert_select = Prepared IST receiver for 3-6, listening at: tcp://\[::1\]
|
||||
# The receiver expects IST
|
||||
--let $assert_count = 2
|
||||
--let $assert_text = , listening at: tcp://\[::1\]
|
||||
--let $assert_select = , listening at: tcp://\[::1\]
|
||||
--source include/assert_grep.inc
|
||||
|
@ -3,35 +3,37 @@
|
||||
# decoy value - should not be read by mysqld or sst scripts
|
||||
[mysqld]
|
||||
innodb-data-home-dir=/tmp
|
||||
|
||||
[galera]
|
||||
bind-address=::
|
||||
innodb-data-home-dir=
|
||||
wsrep_sst_method=mariabackup
|
||||
wsrep_sst_auth="root:"
|
||||
wsrep_node_address=::1
|
||||
|
||||
[galera.1]
|
||||
[mysqld.1]
|
||||
wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.1.port'
|
||||
wsrep_node_name=node_1
|
||||
bind-address=::
|
||||
|
||||
[galera.2]
|
||||
[mysqld.2]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
|
||||
wsrep_node_name=node_2
|
||||
wsrep_sst_donor=node_1
|
||||
bind-address=::
|
||||
|
||||
[galera.3]
|
||||
[mysqld.3]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.3.port'
|
||||
wsrep_node_name=node_3
|
||||
wsrep_sst_donor=node_1
|
||||
bind-address=::
|
||||
|
||||
[SST]
|
||||
transferfmt=@ENV.MTR_GALERA_TFMT
|
||||
|
@ -1 +0,0 @@
|
||||
--bind-address=::
|
@ -18,7 +18,7 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--connection node_2
|
||||
@ -30,7 +30,7 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
@ -65,8 +65,8 @@ DROP TABLE t1;
|
||||
--let $assert_select = IST receiver addr using tcp://\[::1\]
|
||||
--source include/assert_grep.inc
|
||||
|
||||
# The receiver expects seqnos 3-6 only once.
|
||||
--let $assert_count = 1
|
||||
--let $assert_text = Prepared IST receiver for 3-6, listening at: tcp://\[::1\]
|
||||
--let $assert_select = Prepared IST receiver for 3-6, listening at: tcp://\[::1\]
|
||||
# The receiver expects IST
|
||||
--let $assert_count = 2
|
||||
--let $assert_text = , listening at: tcp://\[::1\]
|
||||
--let $assert_select = , listening at: tcp://\[::1\]
|
||||
--source include/assert_grep.inc
|
||||
|
@ -9,18 +9,21 @@ wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.1.port'
|
||||
bind-address=::
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
|
||||
bind-address=::
|
||||
|
||||
[mysqld.3]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.3.port'
|
||||
bind-address=::
|
||||
|
||||
[SST]
|
||||
sockopt=",pf=ip6"
|
||||
|
@ -1 +0,0 @@
|
||||
--bind-address=::
|
@ -54,7 +54,7 @@ SET GLOBAL wsrep_sst_method = 'mysqldump';
|
||||
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data/mysql
|
||||
--remove_files_wildcard $MYSQLTEST_VARDIR/mysqld.2/data
|
||||
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--connection node_2
|
||||
@ -71,7 +71,7 @@ let $restart_noprint=2;
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
@ -9,18 +9,21 @@ wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.1.port'
|
||||
bind-address=::
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
|
||||
bind-address=::
|
||||
|
||||
[mysqld.3]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.3.port'
|
||||
bind-address=::
|
||||
|
||||
[SST]
|
||||
sockopt=",pf=ip6"
|
||||
|
@ -1 +0,0 @@
|
||||
--bind-address=::
|
@ -16,7 +16,7 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--connection node_2
|
||||
@ -28,6 +28,6 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
@ -4,28 +4,31 @@
|
||||
[mysqld]
|
||||
innodb-data-home-dir=/tmp
|
||||
|
||||
[mariadb]
|
||||
[mysqld]
|
||||
innodb-data-home-dir=
|
||||
wsrep_sst_method=rsync
|
||||
wsrep_node_address=::1
|
||||
|
||||
[mariadb.1]
|
||||
[mysqld.1]
|
||||
wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.1.port'
|
||||
bind-address=::
|
||||
|
||||
[mariadb.2]
|
||||
[mysqld.2]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
|
||||
bind-address=::
|
||||
|
||||
[mariadb.3]
|
||||
[mysqld.3]
|
||||
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_host=[::1];base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
|
||||
wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
|
||||
wsrep_node_incoming_address='[::1]:@mysqld.3.port'
|
||||
bind-address=::
|
||||
|
||||
[SST]
|
||||
sockopt=",pf=ip6"
|
||||
|
@ -1 +0,0 @@
|
||||
--bind-address=::
|
@ -16,7 +16,7 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--connection node_2
|
||||
@ -28,6 +28,6 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
SELECT COUNT(*) AS EXPECT_1 FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
@ -0,0 +1,10 @@
|
||||
!include ../galera_3nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_debug=1
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_debug=1
|
||||
|
||||
[mysqld.3]
|
||||
wsrep_debug=1
|
@ -2,6 +2,7 @@
|
||||
# Test the safe_to_bootstrap in grastate.dat
|
||||
#
|
||||
--source include/galera_cluster.inc
|
||||
--source include/force_restart.inc
|
||||
|
||||
#
|
||||
# Create connection node_3 and save auto increment variables.
|
||||
@ -17,8 +18,11 @@
|
||||
--source ../galera/include/auto_increment_offset_save.inc
|
||||
|
||||
--connection node_1
|
||||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
#
|
||||
# At start, all grastate.dat files have safe_to_boostrap: 0
|
||||
@ -157,11 +161,19 @@ let $restart_noprint=2;
|
||||
--source include/start_mysqld.inc
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
|
||||
--connection node_2
|
||||
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
|
||||
let $restart_noprint=2;
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
|
||||
--connection node_3
|
||||
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.3.expect
|
||||
let $restart_noprint=2;
|
||||
|
@ -16,10 +16,13 @@
|
||||
--source ../galera/include/auto_increment_offset_save.inc
|
||||
|
||||
--connection node_1
|
||||
CREATE TABLE t1 (f1 INTEGER);
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--connection node_2
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
|
||||
|
||||
--connection node_1
|
||||
@ -28,15 +31,11 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
|
||||
|
||||
--connection node_2
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SET SESSION wsrep_dirty_reads = 1;
|
||||
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
|
||||
--source include/wait_condition.inc
|
||||
|
||||
# Those statements should succeed
|
||||
|
||||
--error 0
|
||||
|
@ -10,8 +10,6 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
GCF-1018B : MDEV-21613 galera_sr.GCF-1018B MTR failed: Failed to open table mysql.wsrep_streaming_log for writing
|
||||
GCF-1043A : MDEV-21170 Galera test failure on galera_sr.GCF-1043A
|
||||
GCF-1060 : MDEV-20848 galera_sr.GCF_1060
|
||||
galera-features#56 : MDEV-18542 galera_sr.galera-features#56
|
||||
|
||||
|
@ -1,21 +0,0 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
Running a concurrent test with the following queries:
|
||||
DELETE FROM t1
|
||||
REPLACE INTO t1 VALUES (1,'y'),(2,'x')
|
||||
REPLACE INTO t1 VALUES (1,'y'),(2,'y'),(3,'y')
|
||||
connection node_1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;;;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;;;
|
||||
connection node_2;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;;;
|
||||
include/diff_servers.inc [servers=1 2]
|
||||
DROP TABLE t1;
|
||||
Concurrent test end
|
@ -1,21 +0,0 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
Running a concurrent test with the following queries:
|
||||
DELETE FROM t1
|
||||
INSERT INTO t1 VALUES (1,'y'),(2,'x')
|
||||
UPDATE t1 SET f2 = 'y' WHERE f1 = 1 OR f1 = 2;
|
||||
connection node_1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;;;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;;;
|
||||
connection node_2;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_trx_fragment_size = 1;;;
|
||||
include/diff_servers.inc [servers=1 2]
|
||||
DROP TABLE t1;
|
||||
Concurrent test end
|
@ -11,10 +11,11 @@ INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connection node_2;
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
connection node_1;
|
||||
ROLLBACK;
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
@ -23,11 +24,11 @@ INSERT INTO t1 VALUES (3);
|
||||
INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
COMMIT;
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
COUNT(*) = 5
|
||||
1
|
||||
SELECT COUNT(*) AS EXPECT_5 FROM t1;
|
||||
EXPECT_5
|
||||
5
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
COUNT(*) = 5
|
||||
1
|
||||
SELECT COUNT(*) AS EXPECT_5 FROM t1;
|
||||
EXPECT_5
|
||||
5
|
||||
DROP TABLE t1;
|
||||
|
@ -1,13 +0,0 @@
|
||||
#
|
||||
# Assertion `retval == WSREP_OK || retval == WSREP_TRX_FAIL || retval == WSREP_BF_ABORT || retval == WSREP_CONN_FAIL' failed with SR
|
||||
#
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
|
||||
--let $count = 1000;
|
||||
--let $wsrep_trx_fragment_size = 1;
|
||||
--let $query_node_1 = DELETE FROM t1
|
||||
--let $query_node_1a = REPLACE INTO t1 VALUES (1,'y'),(2,'x')
|
||||
--let $query_node_2 = REPLACE INTO t1 VALUES (1,'y'),(2,'y'),(3,'y')
|
||||
|
||||
--source suite/galera/include/galera_concurrent_test.inc
|
@ -1,13 +0,0 @@
|
||||
#
|
||||
# Assertion `retval == WSREP_OK || retval == WSREP_TRX_FAIL || retval == WSREP_BF_ABORT || retval == WSREP_CONN_FAIL' failed with SR
|
||||
#
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
|
||||
--let $count = 1000;
|
||||
--let $wsrep_trx_fragment_size = 1;
|
||||
--let $query_node_1 = DELETE FROM t1
|
||||
--let $query_node_1a = INSERT INTO t1 VALUES (1,'y'),(2,'x')
|
||||
--let $query_node_2 = UPDATE t1 SET f2 = 'y' WHERE f1 = 1 OR f1 = 2;
|
||||
|
||||
--source suite/galera/include/galera_concurrent_test.inc
|
@ -19,8 +19,7 @@ INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
|
||||
--connection node_2
|
||||
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
--let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
|
||||
--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--connection node_1
|
||||
@ -33,6 +32,7 @@ ROLLBACK;
|
||||
--connection node_2
|
||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM t1;
|
||||
--source include/wait_condition.inc
|
||||
SELECT * FROM t1;
|
||||
|
||||
#
|
||||
# It should be possible to reissue the same transaction against node #2
|
||||
@ -47,9 +47,11 @@ INSERT INTO t1 VALUES (4);
|
||||
INSERT INTO t1 VALUES (5);
|
||||
COMMIT;
|
||||
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
SELECT COUNT(*) AS EXPECT_5 FROM t1;
|
||||
|
||||
--connection node_1
|
||||
SELECT COUNT(*) = 5 FROM t1;
|
||||
--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
|
||||
--source include/wait_condition.inc
|
||||
SELECT COUNT(*) AS EXPECT_5 FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
@ -740,3 +740,32 @@ t1 CREATE TABLE `t1` (
|
||||
KEY `v4` (`v4`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-20396 Server crashes after DELETE with SEL NULL Foreign key and a
|
||||
# virtual column in index
|
||||
#
|
||||
CREATE TABLE parent
|
||||
(
|
||||
ID int unsigned NOT NULL,
|
||||
PRIMARY KEY (ID)
|
||||
);
|
||||
CREATE TABLE child
|
||||
(
|
||||
ID int unsigned NOT NULL,
|
||||
ParentID int unsigned NULL,
|
||||
Value int unsigned NOT NULL DEFAULT 0,
|
||||
Flag int unsigned AS (Value) VIRTUAL,
|
||||
PRIMARY KEY (ID),
|
||||
KEY (ParentID, Flag),
|
||||
FOREIGN KEY (ParentID) REFERENCES parent (ID) ON DELETE SET NULL
|
||||
ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO parent (ID) VALUES (100);
|
||||
INSERT INTO child (ID,ParentID,Value) VALUES (123123,100,1);
|
||||
DELETE FROM parent WHERE ID=100;
|
||||
select * from child;
|
||||
ID ParentID Value Flag
|
||||
123123 NULL 1 1
|
||||
INSERT INTO parent (ID) VALUES (100);
|
||||
UPDATE child SET ParentID=100 WHERE ID=123123;
|
||||
DROP TABLE child, parent;
|
||||
|
@ -605,3 +605,35 @@ ALTER TABLE t1 ADD CONSTRAINT fk FOREIGN KEY (v4) REFERENCES nosuch(col);
|
||||
SHOW CREATE TABLE t1;
|
||||
# Cleanup
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-20396 Server crashes after DELETE with SEL NULL Foreign key and a
|
||||
--echo # virtual column in index
|
||||
--echo #
|
||||
CREATE TABLE parent
|
||||
(
|
||||
ID int unsigned NOT NULL,
|
||||
PRIMARY KEY (ID)
|
||||
);
|
||||
|
||||
CREATE TABLE child
|
||||
(
|
||||
ID int unsigned NOT NULL,
|
||||
ParentID int unsigned NULL,
|
||||
Value int unsigned NOT NULL DEFAULT 0,
|
||||
Flag int unsigned AS (Value) VIRTUAL,
|
||||
PRIMARY KEY (ID),
|
||||
KEY (ParentID, Flag),
|
||||
FOREIGN KEY (ParentID) REFERENCES parent (ID) ON DELETE SET NULL
|
||||
ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
INSERT INTO parent (ID) VALUES (100);
|
||||
INSERT INTO child (ID,ParentID,Value) VALUES (123123,100,1);
|
||||
DELETE FROM parent WHERE ID=100;
|
||||
select * from child;
|
||||
INSERT INTO parent (ID) VALUES (100);
|
||||
UPDATE child SET ParentID=100 WHERE ID=123123;
|
||||
|
||||
# Cleanup
|
||||
DROP TABLE child, parent;
|
||||
|
@ -60,6 +60,16 @@ CREATE TABLE t1(a INT NOT NULL UNIQUE) ENGINE=InnoDB;
|
||||
INSERT INTO t1 SELECT * FROM seq_1_to_128;
|
||||
ALTER TABLE t1 ADD b TINYINT AUTO_INCREMENT PRIMARY KEY, DROP KEY a;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-22939 Server crashes in row_make_new_pathname()
|
||||
#
|
||||
CREATE TABLE t (a INT) ENGINE=INNODB;
|
||||
ALTER TABLE t DISCARD TABLESPACE;
|
||||
ALTER TABLE t ENGINE INNODB;
|
||||
ERROR HY000: Tablespace has been discarded for table `t`
|
||||
ALTER TABLE t FORCE;
|
||||
ERROR HY000: Tablespace has been discarded for table `t`
|
||||
DROP TABLE t;
|
||||
create table t1 (a int) transactional=1 engine=aria;
|
||||
create table t2 (a int) transactional=1 engine=innodb;
|
||||
show create table t1;
|
||||
|
@ -6,8 +6,7 @@ SET GLOBAL innodb_file_per_table=1;
|
||||
#
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
create table t1 (a int not null, d varchar(15) not null, b
|
||||
varchar(198) not null, c char(156),
|
||||
fulltext ftsic(c)) engine=InnoDB
|
||||
varchar(198) not null, c char(156)) engine=InnoDB
|
||||
row_format=redundant;
|
||||
insert into t1 values(123, 'abcdef', 'jghikl', 'mnop');
|
||||
insert into t1 values(456, 'abcdef', 'jghikl', 'mnop');
|
||||
@ -76,7 +75,7 @@ DROP TABLE t1;
|
||||
Warnings:
|
||||
Warning 1932 Table 'test.t1' doesn't exist in engine
|
||||
DROP TABLE t2,t3;
|
||||
FOUND 49 /\[ERROR\] InnoDB: Table `test`\.`t1` in InnoDB data dictionary contains invalid flags\. SYS_TABLES\.TYPE=1 SYS_TABLES\.MIX_LEN=511\b/ in mysqld.1.err
|
||||
FOUND 5 /\[ERROR\] InnoDB: Table `test`\.`t1` in InnoDB data dictionary contains invalid flags\. SYS_TABLES\.TYPE=1 SYS_TABLES\.MIX_LEN=511\b/ in mysqld.1.err
|
||||
# restart
|
||||
ib_buffer_pool
|
||||
ib_logfile0
|
||||
|
@ -200,3 +200,13 @@ CREATE TABLE t1(f1 INT, f2 VARCHAR(1), KEY k1(f2),
|
||||
FULLTEXT KEY(f2),
|
||||
FOREIGN KEY (f2) REFERENCES t1(f3))ENGINE=InnoDB;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
#
|
||||
# MDEV-23199 page_compression flag is missing
|
||||
# for full_crc32 tablespace
|
||||
#
|
||||
CREATE TABLE t1(f1 BIGINT PRIMARY KEY)ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
ALTER TABLE t1 PAGE_COMPRESSED = 1;
|
||||
INSERT INTO t1 VALUES(2);
|
||||
# restart
|
||||
DROP TABLE t1;
|
||||
|
@ -39,3 +39,14 @@ TRUNCATE t1;
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
DROP TEMPORARY TABLE t1;
|
||||
#
|
||||
# MDEV-23705 Assertion 'table->data_dir_path || !space'
|
||||
#
|
||||
CREATE TABLE t(c INT) ENGINE=InnoDB;
|
||||
ALTER TABLE t DISCARD TABLESPACE;
|
||||
RENAME TABLE t TO u;
|
||||
TRUNCATE u;
|
||||
Warnings:
|
||||
Warning 1814 Tablespace has been discarded for table `u`
|
||||
TRUNCATE u;
|
||||
DROP TABLE u;
|
||||
|
@ -69,6 +69,17 @@ INSERT INTO t1 SELECT * FROM seq_1_to_128;
|
||||
ALTER TABLE t1 ADD b TINYINT AUTO_INCREMENT PRIMARY KEY, DROP KEY a;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-22939 Server crashes in row_make_new_pathname()
|
||||
--echo #
|
||||
CREATE TABLE t (a INT) ENGINE=INNODB;
|
||||
ALTER TABLE t DISCARD TABLESPACE;
|
||||
--error ER_TABLESPACE_DISCARDED
|
||||
ALTER TABLE t ENGINE INNODB;
|
||||
--error ER_TABLESPACE_DISCARDED
|
||||
ALTER TABLE t FORCE;
|
||||
DROP TABLE t;
|
||||
|
||||
#
|
||||
# Check that innodb supports transactional=1
|
||||
#
|
||||
|
@ -32,8 +32,7 @@ SET GLOBAL innodb_file_per_table=1;
|
||||
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
create table t1 (a int not null, d varchar(15) not null, b
|
||||
varchar(198) not null, c char(156),
|
||||
fulltext ftsic(c)) engine=InnoDB
|
||||
varchar(198) not null, c char(156)) engine=InnoDB
|
||||
row_format=redundant;
|
||||
|
||||
insert into t1 values(123, 'abcdef', 'jghikl', 'mnop');
|
||||
|
@ -16,6 +16,7 @@ call mtr.add_suppression("InnoDB: Operating system error number .* in a file ope
|
||||
call mtr.add_suppression("InnoDB: The error means the system cannot find the path specified");
|
||||
call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself");
|
||||
call mtr.add_suppression("InnoDB: adjusting FSP_SPACE_FLAGS of file ");
|
||||
call mtr.add_suppression("InnoDB: Parent table of FTS auxiliary table .* not found.");
|
||||
FLUSH TABLES;
|
||||
--enable_query_log
|
||||
|
||||
@ -237,3 +238,16 @@ call mtr.add_suppression("ERROR HY000: Can't create table `test`.`t1`");
|
||||
CREATE TABLE t1(f1 INT, f2 VARCHAR(1), KEY k1(f2),
|
||||
FULLTEXT KEY(f2),
|
||||
FOREIGN KEY (f2) REFERENCES t1(f3))ENGINE=InnoDB;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-23199 page_compression flag is missing
|
||||
--echo # for full_crc32 tablespace
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(f1 BIGINT PRIMARY KEY)ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
ALTER TABLE t1 PAGE_COMPRESSED = 1;
|
||||
INSERT INTO t1 VALUES(2);
|
||||
let $shutdown_timeout = 0;
|
||||
--source include/restart_mysqld.inc
|
||||
DROP TABLE t1;
|
||||
|
@ -50,3 +50,13 @@ INSERT INTO t1 VALUES(1);
|
||||
TRUNCATE t1;
|
||||
SELECT * FROM t1;
|
||||
DROP TEMPORARY TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-23705 Assertion 'table->data_dir_path || !space'
|
||||
--echo #
|
||||
CREATE TABLE t(c INT) ENGINE=InnoDB;
|
||||
ALTER TABLE t DISCARD TABLESPACE;
|
||||
RENAME TABLE t TO u;
|
||||
TRUNCATE u;
|
||||
TRUNCATE u;
|
||||
DROP TABLE u;
|
||||
|
@ -84,7 +84,8 @@ drop PROCEDURE populate_t2;
|
||||
# Truncation will normally not occur with innodb_page_size=64k,
|
||||
# and occasionally not with innodb_page_size=32k,
|
||||
# because the undo log will not grow enough.
|
||||
if (`select @@innodb_page_size IN (4096,8192,16384)`)
|
||||
# TODO: For some reason this does not occur on 4k either!
|
||||
if (`select @@innodb_page_size IN (8192,16384)`)
|
||||
{
|
||||
let $wait_condition = (SELECT variable_value!=@trunc_start
|
||||
FROM information_schema.global_status
|
||||
@ -109,7 +110,7 @@ EOF
|
||||
if ($size1 == $size2)
|
||||
{
|
||||
# This fails for innodb_page_size=64k, occasionally also for 32k.
|
||||
if (`select @@innodb_page_size IN (4096,8192,16384)`)
|
||||
if (`select @@innodb_page_size IN (8192,16384)`)
|
||||
{
|
||||
echo Truncation did not happen: $size1;
|
||||
}
|
||||
|
1
mysql-test/suite/mariabackup/innodb_redo_overwrite.opt
Normal file
1
mysql-test/suite/mariabackup/innodb_redo_overwrite.opt
Normal file
@ -0,0 +1 @@
|
||||
--loose-innodb-log-file-size=2m
|
27
mysql-test/suite/mariabackup/innodb_redo_overwrite.result
Normal file
27
mysql-test/suite/mariabackup/innodb_redo_overwrite.result
Normal file
@ -0,0 +1,27 @@
|
||||
CREATE TABLE t(i INT) ENGINE=INNODB;
|
||||
INSERT INTO t VALUES
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
|
||||
# Generate enough data to overwrite innodb redo log
|
||||
# on the next "INSERT INTO t SELECT * FROM t" execution.
|
||||
INSERT INTO t SELECT * FROM t;
|
||||
INSERT INTO t SELECT * FROM t;
|
||||
INSERT INTO t SELECT * FROM t;
|
||||
INSERT INTO t SELECT * FROM t;
|
||||
INSERT INTO t SELECT * FROM t;
|
||||
INSERT INTO t SELECT * FROM t;
|
||||
INSERT INTO t SELECT * FROM t;
|
||||
INSERT INTO t SELECT * FROM t;
|
||||
INSERT INTO t SELECT * FROM t;
|
||||
# xtrabackup backup
|
||||
FOUND 1 /failed: redo log block is overwritten/ in backup.log
|
||||
FOUND 1 /failed: redo log block checksum does not match/ in backup.log
|
||||
DROP TABLE t;
|
57
mysql-test/suite/mariabackup/innodb_redo_overwrite.test
Normal file
57
mysql-test/suite/mariabackup/innodb_redo_overwrite.test
Normal file
@ -0,0 +1,57 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_debug_sync.inc
|
||||
|
||||
CREATE TABLE t(i INT) ENGINE=INNODB;
|
||||
|
||||
INSERT INTO t VALUES
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
|
||||
--echo # Generate enough data to overwrite innodb redo log
|
||||
--echo # on the next "INSERT INTO t SELECT * FROM t" execution.
|
||||
--let $i = 0
|
||||
while ($i < 9) {
|
||||
INSERT INTO t SELECT * FROM t;
|
||||
--inc $i
|
||||
}
|
||||
|
||||
--echo # xtrabackup backup
|
||||
--let $targetdir=$MYSQLTEST_VARDIR/tmp/backup
|
||||
--let $backuplog=$MYSQLTEST_VARDIR/tmp/backup.log
|
||||
|
||||
--let before_innodb_log_copy_thread_started=INSERT INTO test.t SELECT * FROM test.t
|
||||
|
||||
--disable_result_log
|
||||
--error 1
|
||||
--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events > $backuplog
|
||||
--enable_result_log
|
||||
|
||||
--let SEARCH_PATTERN=failed: redo log block is overwritten
|
||||
--let SEARCH_FILE=$backuplog
|
||||
--source include/search_pattern_in_file.inc
|
||||
--remove_file $backuplog
|
||||
--rmdir $targetdir
|
||||
|
||||
--let before_innodb_log_copy_thread_started=INSERT INTO test.t VALUES (0), (1), (2), (3), (4), (5), (6), (7), (8), (9)
|
||||
|
||||
--disable_result_log
|
||||
--error 1
|
||||
--exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events,log_checksum_mismatch > $backuplog
|
||||
--enable_result_log
|
||||
|
||||
--let SEARCH_PATTERN=failed: redo log block checksum does not match
|
||||
--let SEARCH_FILE=$backuplog
|
||||
--source include/search_pattern_in_file.inc
|
||||
--remove_file $backuplog
|
||||
--rmdir $targetdir
|
||||
|
||||
--let before_innodb_log_copy_thread_started=
|
||||
|
||||
DROP TABLE t;
|
37
mysql-test/suite/mariabackup/rpl_slave_info.result
Normal file
37
mysql-test/suite/mariabackup/rpl_slave_info.result
Normal file
@ -0,0 +1,37 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
connection slave;
|
||||
###############
|
||||
# If Using_Gtid != 'No', backup gtid_slave_pos
|
||||
########################
|
||||
include/stop_slave.inc
|
||||
change master to master_use_gtid=slave_pos;
|
||||
include/start_slave.inc
|
||||
connection master;
|
||||
CREATE TABLE t(i INT);
|
||||
connection slave;
|
||||
"using_gtid: Slave_Pos"
|
||||
FOUND 1 /gtid_slave_pos/ in xtrabackup_slave_info
|
||||
NOT FOUND /MASTER_LOG_FILE/ in xtrabackup_slave_info
|
||||
###############
|
||||
# If Using_Gtid != 'No' and !gtid_slave_pos, backup master position
|
||||
########################
|
||||
include/stop_slave.inc
|
||||
SET GLOBAL gtid_slave_pos="";
|
||||
NOT FOUND /gtid_slave_pos/ in xtrabackup_slave_info
|
||||
FOUND 1 /MASTER_LOG_FILE/ in xtrabackup_slave_info
|
||||
###############
|
||||
# If Using_Gtid == 'No', backup Exec_Master_Log_Pos
|
||||
########################
|
||||
change master to master_use_gtid=no;
|
||||
include/start_slave.inc
|
||||
connection master;
|
||||
INSERT INTO t VALUES(1);
|
||||
connection slave;
|
||||
"using_gtid: No"
|
||||
NOT FOUND /gtid_slave_pos/ in xtrabackup_slave_info
|
||||
FOUND 1 /MASTER_LOG_FILE/ in xtrabackup_slave_info
|
||||
connection master;
|
||||
DROP TABLE t;
|
||||
connection slave;
|
||||
include/rpl_end.inc
|
84
mysql-test/suite/mariabackup/rpl_slave_info.test
Normal file
84
mysql-test/suite/mariabackup/rpl_slave_info.test
Normal file
@ -0,0 +1,84 @@
|
||||
--source include/master-slave.inc
|
||||
|
||||
--connection slave
|
||||
|
||||
--echo ###############
|
||||
--echo # If Using_Gtid != 'No', backup gtid_slave_pos
|
||||
--echo ########################
|
||||
|
||||
--source include/stop_slave.inc
|
||||
change master to master_use_gtid=slave_pos;
|
||||
--source include/start_slave.inc
|
||||
|
||||
--connection master
|
||||
CREATE TABLE t(i INT);
|
||||
--sync_slave_with_master
|
||||
|
||||
--let $using_gtid=query_get_value(SHOW SLAVE STATUS,Using_Gtid,1)
|
||||
--echo "using_gtid: $using_gtid"
|
||||
|
||||
--let $targetdir=$MYSQLTEST_VARDIR/tmp/backup
|
||||
--disable_result_log
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group-suffix=.2 --slave-info --backup --target-dir=$targetdir;
|
||||
--enable_result_log
|
||||
|
||||
--let SEARCH_FILE=$targetdir/xtrabackup_slave_info
|
||||
--let SEARCH_PATTERN=gtid_slave_pos
|
||||
--source include/search_pattern_in_file.inc
|
||||
--let SEARCH_PATTERN=MASTER_LOG_FILE
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
rmdir $targetdir;
|
||||
|
||||
--echo ###############
|
||||
--echo # If Using_Gtid != 'No' and !gtid_slave_pos, backup master position
|
||||
--echo ########################
|
||||
|
||||
--source include/stop_slave.inc
|
||||
SET GLOBAL gtid_slave_pos="";
|
||||
|
||||
--let $targetdir=$MYSQLTEST_VARDIR/tmp/backup
|
||||
--disable_result_log
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group-suffix=.2 --slave-info --backup --target-dir=$targetdir;
|
||||
--enable_result_log
|
||||
|
||||
--let SEARCH_FILE=$targetdir/xtrabackup_slave_info
|
||||
--let SEARCH_PATTERN=gtid_slave_pos
|
||||
--source include/search_pattern_in_file.inc
|
||||
--let SEARCH_PATTERN=MASTER_LOG_FILE
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
rmdir $targetdir;
|
||||
|
||||
--echo ###############
|
||||
--echo # If Using_Gtid == 'No', backup Exec_Master_Log_Pos
|
||||
--echo ########################
|
||||
|
||||
change master to master_use_gtid=no;
|
||||
--source include/start_slave.inc
|
||||
|
||||
--connection master
|
||||
INSERT INTO t VALUES(1);
|
||||
--sync_slave_with_master
|
||||
|
||||
--let $using_gtid=query_get_value(SHOW SLAVE STATUS,Using_Gtid,1)
|
||||
--echo "using_gtid: $using_gtid"
|
||||
|
||||
--let $targetdir=$MYSQLTEST_VARDIR/tmp/backup
|
||||
--disable_result_log
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group-suffix=.2 --slave-info --backup --target-dir=$targetdir;
|
||||
--enable_result_log
|
||||
|
||||
--let SEARCH_FILE=$targetdir/xtrabackup_slave_info
|
||||
--let SEARCH_PATTERN=gtid_slave_pos
|
||||
--source include/search_pattern_in_file.inc
|
||||
--let SEARCH_PATTERN=MASTER_LOG_FILE
|
||||
--source include/search_pattern_in_file.inc
|
||||
|
||||
rmdir $targetdir;
|
||||
|
||||
# Cleanup
|
||||
--connection master
|
||||
DROP TABLE t;
|
||||
--sync_slave_with_master
|
||||
--source include/rpl_end.inc
|
@ -7,13 +7,20 @@ CREATE TABLE t1 (a INT);
|
||||
FLUSH BINARY LOGS;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection slave;
|
||||
include/stop_slave.inc
|
||||
connection master;
|
||||
# Shutdown master
|
||||
include/rpl_stop_server.inc [server_number=1]
|
||||
# Move the master binlog files and the index file to a new place
|
||||
# Restart master with log-bin option set to the new path
|
||||
# Master has restarted successfully
|
||||
connection slave;
|
||||
include/start_slave.inc
|
||||
connection master;
|
||||
# Create the master-bin.index file with the old format
|
||||
connection slave;
|
||||
include/stop_slave.inc
|
||||
connection master;
|
||||
# Shutdown master
|
||||
include/rpl_stop_server.inc [server_number=1]
|
||||
# Move back the master binlog files
|
||||
@ -21,6 +28,9 @@ include/rpl_stop_server.inc [server_number=1]
|
||||
# Restart master with log-bin option set to default
|
||||
# Master has restarted successfully
|
||||
connection slave;
|
||||
include/start_slave.inc
|
||||
connection master;
|
||||
connection slave;
|
||||
# stop slave
|
||||
include/stop_slave.inc
|
||||
include/rpl_stop_server.inc [server_number=2]
|
||||
|
@ -9,6 +9,9 @@ ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 0);
|
||||
connection server_2;
|
||||
SET sql_log_bin=0;
|
||||
call mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again');
|
||||
SET sql_log_bin=1;
|
||||
include/stop_slave.inc
|
||||
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT,
|
||||
MASTER_USE_GTID=CURRENT_POS;
|
||||
|
@ -43,7 +43,7 @@ FLUSH BINARY LOGS;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
sync_slave_with_master;
|
||||
|
||||
--source include/stop_slave.inc
|
||||
#
|
||||
# Test on master
|
||||
#
|
||||
@ -58,13 +58,15 @@ source include/rpl_stop_server.inc;
|
||||
--move_file $master_datadir/master-bin.index $tmpdir/master-bin.index
|
||||
|
||||
--echo # Restart master with log-bin option set to the new path
|
||||
--let $rpl_server_parameters=--log-bin=$tmpdir/master-bin
|
||||
--let $rpl_server_parameters=--log-bin=$tmpdir/master-bin --log-bin-index=$tmpdir/master-bin
|
||||
--let $keep_include_silent=1
|
||||
source include/rpl_start_server.inc;
|
||||
--let $keep_include_silent=0
|
||||
|
||||
--echo # Master has restarted successfully
|
||||
|
||||
--connection slave
|
||||
--source include/start_slave.inc
|
||||
--connection master
|
||||
#
|
||||
# Test master can handle old format with directory path in index file
|
||||
#
|
||||
@ -85,7 +87,10 @@ if (!$is_windows)
|
||||
--disable_query_log
|
||||
source include/write_var_to_file.inc;
|
||||
--enable_query_log
|
||||
--sync_slave_with_master
|
||||
--source include/stop_slave.inc
|
||||
|
||||
--connection master
|
||||
--echo # Shutdown master
|
||||
--let $rpl_server_number=1
|
||||
source include/rpl_stop_server.inc;
|
||||
@ -99,14 +104,17 @@ source include/rpl_stop_server.inc;
|
||||
--remove_file $tmpdir/master-bin.index
|
||||
|
||||
--echo # Restart master with log-bin option set to default
|
||||
--let $rpl_server_parameters=--log-bin=$master_datadir/master-bin
|
||||
--let $rpl_server_parameters=--log-bin=$master_datadir/master-bin --log-bin-index=$master_datadir/master-bin
|
||||
--let $keep_include_silent=1
|
||||
source include/rpl_start_server.inc;
|
||||
--let $keep_include_silent=0
|
||||
|
||||
--echo # Master has restarted successfully
|
||||
--connection slave
|
||||
--source include/start_slave.inc
|
||||
|
||||
connection slave;
|
||||
--connection master
|
||||
--sync_slave_with_master
|
||||
--echo # stop slave
|
||||
--source include/stop_slave.inc
|
||||
--let $rpl_server_number= 2
|
||||
|
@ -21,6 +21,9 @@ INSERT INTO t1 VALUES (1, 0);
|
||||
|
||||
--connection server_2
|
||||
--sync_with_master
|
||||
SET sql_log_bin=0;
|
||||
call mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again');
|
||||
SET sql_log_bin=1;
|
||||
--source include/stop_slave.inc
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT,
|
||||
|
@ -10,7 +10,7 @@ call mtr.add_suppression("Master is configured to log replication events");
|
||||
|
||||
# If everything is okay, the test will end in several seconds; maybe a minute.
|
||||
# If the problem shows up, it will hang until testcase timeout is exceeded.
|
||||
--exec $MYSQL_SLAP --silent --socket=$SLAVE_MYSOCK -q "START SLAVE; STOP SLAVE; SHOW GLOBAL STATUS" -c 2 --number-of-queries=100 --create-schema=test
|
||||
--exec $MYSQL_SLAP --silent --host=127.0.0.1 -P $SLAVE_MYPORT -q "START SLAVE; STOP SLAVE; SHOW GLOBAL STATUS" -c 2 --number-of-queries=100 --create-schema=test
|
||||
|
||||
# All done.
|
||||
|
||||
|
@ -10,4 +10,3 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
variables : MDEV-17585,MDEV-20581 Crash on wsrep.variables test case
|
||||
|
@ -163,7 +163,7 @@ SET GLOBAL wsrep_provider=none;
|
||||
call mtr.add_suppression("WSREP: Failed to get provider options");
|
||||
SELECT @@global.wsrep_provider;
|
||||
@@global.wsrep_provider
|
||||
/usr/lib/libgalera_4_smm.so
|
||||
libgalera_smm.so
|
||||
SELECT @@global.wsrep_slave_threads;
|
||||
@@global.wsrep_slave_threads
|
||||
1
|
||||
@ -182,7 +182,7 @@ wsrep_thread_count 0
|
||||
|
||||
SELECT @@global.wsrep_provider;
|
||||
@@global.wsrep_provider
|
||||
/usr/lib/libgalera_4_smm.so
|
||||
libgalera_smm.so
|
||||
SELECT @@global.wsrep_cluster_address;
|
||||
@@global.wsrep_cluster_address
|
||||
|
||||
@ -212,7 +212,7 @@ EXPECT_2
|
||||
2
|
||||
SELECT @@global.wsrep_provider;
|
||||
@@global.wsrep_provider
|
||||
/usr/lib/libgalera_4_smm.so
|
||||
libgalera_smm.so
|
||||
SELECT @@global.wsrep_cluster_address;
|
||||
@@global.wsrep_cluster_address
|
||||
gcomm://
|
||||
@ -268,7 +268,4 @@ SELECT @@global.wsrep_sst_auth;
|
||||
@@global.wsrep_sst_auth
|
||||
NULL
|
||||
SET @@global.wsrep_sst_auth= @wsrep_sst_auth_saved;
|
||||
SET GLOBAL wsrep_slave_threads= @wsrep_slave_threads_saved;
|
||||
SET GLOBAL wsrep_cluster_address= @wsrep_cluster_address_saved;
|
||||
SET GLOBAL wsrep_provider_options= @wsrep_provider_options_saved;
|
||||
# End of test.
|
||||
|
@ -160,12 +160,14 @@ SELECT @@global.wsrep_sst_auth;
|
||||
SET @@global.wsrep_sst_auth= @wsrep_sst_auth_saved;
|
||||
|
||||
# Reset (for mtr internal checks)
|
||||
|
||||
--disable_query_log
|
||||
SET GLOBAL wsrep_slave_threads= @wsrep_slave_threads_saved;
|
||||
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
|
||||
SET GLOBAL wsrep_cluster_address= @wsrep_cluster_address_saved;
|
||||
SET GLOBAL wsrep_provider_options= @wsrep_provider_options_saved;
|
||||
--disable_query_log
|
||||
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
|
||||
--enable_query_log
|
||||
|
||||
--echo # End of test.
|
||||
--source include/galera_wait_ready.inc
|
||||
|
||||
--echo # End of test.
|
||||
|
@ -19,8 +19,62 @@
|
||||
#include "m_string.h"
|
||||
#undef my_rename
|
||||
|
||||
/* On unix rename deletes to file if it exists */
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#define RENAME_MAX_RETRIES 50
|
||||
|
||||
/*
|
||||
On Windows, bad 3rd party programs (backup or anitivirus, or something else)
|
||||
can have file open with a sharing mode incompatible with renaming, i.e they
|
||||
won't use FILE_SHARE_DELETE when opening file.
|
||||
|
||||
The following function will do a couple of retries, in case MoveFileEx returns
|
||||
ERROR_SHARING_VIOLATION.
|
||||
*/
|
||||
static BOOL win_rename_with_retries(const char *from, const char *to)
|
||||
{
|
||||
#ifndef DBUG_OFF
|
||||
FILE *fp = NULL;
|
||||
DBUG_EXECUTE_IF("rename_sharing_violation",
|
||||
{
|
||||
fp= fopen(from, "r");
|
||||
DBUG_ASSERT(fp);
|
||||
}
|
||||
);
|
||||
#endif
|
||||
|
||||
for (int retry= RENAME_MAX_RETRIES; retry--;)
|
||||
{
|
||||
DWORD ret = MoveFileEx(from, to,
|
||||
MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING);
|
||||
|
||||
DBUG_ASSERT(fp == NULL || (ret == FALSE && GetLastError() == ERROR_SHARING_VIOLATION));
|
||||
|
||||
if (!ret && (GetLastError() == ERROR_SHARING_VIOLATION))
|
||||
{
|
||||
#ifndef DBUG_OFF
|
||||
/*
|
||||
If error was injected in via DBUG_EXECUTE_IF, close the file
|
||||
that is causing ERROR_SHARING_VIOLATION, so that retry succeeds.
|
||||
*/
|
||||
if (fp)
|
||||
{
|
||||
fclose(fp);
|
||||
fp= NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
Sleep(10);
|
||||
}
|
||||
else
|
||||
return ret;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* On unix rename deletes to file if it exists */
|
||||
int my_rename(const char *from, const char *to, myf MyFlags)
|
||||
{
|
||||
int error = 0;
|
||||
@ -28,8 +82,7 @@ int my_rename(const char *from, const char *to, myf MyFlags)
|
||||
DBUG_PRINT("my",("from %s to %s MyFlags %lu", from, to, MyFlags));
|
||||
|
||||
#if defined(__WIN__)
|
||||
if (!MoveFileEx(from, to, MOVEFILE_COPY_ALLOWED |
|
||||
MOVEFILE_REPLACE_EXISTING))
|
||||
if (!win_rename_with_retries(from, to))
|
||||
{
|
||||
my_osmaperr(GetLastError());
|
||||
#elif defined(HAVE_RENAME)
|
||||
|
@ -173,7 +173,7 @@ ELSE()
|
||||
SET(CHECK_PID "kill -s SIGCONT $PID > /dev/null 2> /dev/null")
|
||||
ENDIF()
|
||||
|
||||
SET(HOSTNAME "hostname")
|
||||
SET(HOSTNAME "uname -n")
|
||||
SET(MYSQLD_USER "mysql")
|
||||
ENDIF(UNIX)
|
||||
|
||||
|
@ -2576,8 +2576,6 @@ bool Type_std_attributes::agg_item_set_converter(const DTCollation &coll,
|
||||
Item* conv= (*arg)->safe_charset_converter(thd, coll.collation);
|
||||
if (conv == *arg)
|
||||
continue;
|
||||
if (!conv && ((*arg)->collation.repertoire == MY_REPERTOIRE_ASCII))
|
||||
conv= new (thd->mem_root) Item_func_conv_charset(thd, *arg, coll.collation, 1);
|
||||
|
||||
if (!conv)
|
||||
{
|
||||
|
@ -1434,11 +1434,19 @@ public:
|
||||
/*
|
||||
Conversion from and to "binary" is safe.
|
||||
Conversion to Unicode is safe.
|
||||
Conversion from an expression with the ASCII repertoire
|
||||
to any character set that can store characters U+0000..U+007F
|
||||
is safe:
|
||||
- All supported multibyte character sets can store U+0000..U+007F
|
||||
- All supported 7bit character sets can store U+0000..U+007F
|
||||
except those marked with MY_CS_NONASCII (e.g. swe7).
|
||||
Other kind of conversions are potentially lossy.
|
||||
*/
|
||||
safe= (args[0]->collation.collation == &my_charset_bin ||
|
||||
cs == &my_charset_bin ||
|
||||
(cs->state & MY_CS_UNICODE));
|
||||
(cs->state & MY_CS_UNICODE) ||
|
||||
(args[0]->collation.repertoire == MY_REPERTOIRE_ASCII &&
|
||||
(cs->mbmaxlen > 1 || !(cs->state & MY_CS_NONASCII))));
|
||||
}
|
||||
}
|
||||
bool is_json_type() { return args[0]->is_json_type(); }
|
||||
|
@ -373,3 +373,26 @@ extern "C" bool wsrep_thd_set_wsrep_aborter(THD *bf_thd, THD *victim_thd)
|
||||
victim_thd->wsrep_aborter = bf_thd->thread_id;
|
||||
return false;
|
||||
}
|
||||
|
||||
extern "C" void wsrep_report_bf_lock_wait(const THD *thd,
|
||||
unsigned long long trx_id)
|
||||
{
|
||||
if (thd)
|
||||
{
|
||||
WSREP_ERROR("Thread %s trx_id: %llu thread: %ld "
|
||||
"seqno: %lld client_state: %s client_mode: %s transaction_mode: %s "
|
||||
"applier: %d toi: %d local: %d "
|
||||
"query: %s",
|
||||
wsrep_thd_is_BF(thd, false) ? "BF" : "normal",
|
||||
trx_id,
|
||||
thd_get_thread_id(thd),
|
||||
wsrep_thd_trx_seqno(thd),
|
||||
wsrep_thd_client_state_str(thd),
|
||||
wsrep_thd_client_mode_str(thd),
|
||||
wsrep_thd_transaction_state_str(thd),
|
||||
wsrep_thd_is_applying(thd),
|
||||
wsrep_thd_is_toi(thd),
|
||||
wsrep_thd_is_local(thd),
|
||||
wsrep_thd_query(thd));
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Copyright (c) 2009, 2010, Oracle and/or its affiliates.
|
||||
Copyright (c) 2012, 2019, MariaDB Corporation.
|
||||
Copyright (c) 2012, 2020, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -178,7 +178,8 @@ static struct wsrep_service_st wsrep_handler = {
|
||||
wsrep_OSU_method_get,
|
||||
wsrep_thd_has_ignored_error,
|
||||
wsrep_thd_set_ignored_error,
|
||||
wsrep_thd_set_wsrep_aborter
|
||||
wsrep_thd_set_wsrep_aborter,
|
||||
wsrep_report_bf_lock_wait
|
||||
};
|
||||
|
||||
static struct thd_specifics_service_st thd_specifics_handler=
|
||||
|
@ -3983,6 +3983,7 @@ bool mysql_show_binlog_events(THD* thd)
|
||||
{
|
||||
Protocol *protocol= thd->protocol;
|
||||
List<Item> field_list;
|
||||
char errmsg_buf[MYSYS_ERRMSG_SIZE];
|
||||
const char *errmsg = 0;
|
||||
bool ret = TRUE;
|
||||
/*
|
||||
@ -3997,6 +3998,9 @@ bool mysql_show_binlog_events(THD* thd)
|
||||
Master_info *mi= 0;
|
||||
LOG_INFO linfo;
|
||||
LEX_MASTER_INFO *lex_mi= &thd->lex->mi;
|
||||
enum enum_binlog_checksum_alg checksum_alg;
|
||||
my_off_t binlog_size;
|
||||
MY_STAT s;
|
||||
|
||||
DBUG_ENTER("mysql_show_binlog_events");
|
||||
|
||||
@ -4045,10 +4049,6 @@ bool mysql_show_binlog_events(THD* thd)
|
||||
mi= 0;
|
||||
}
|
||||
|
||||
/* Validate user given position using checksum */
|
||||
if (lex_mi->pos == pos && !opt_master_verify_checksum)
|
||||
verify_checksum_once= true;
|
||||
|
||||
unit->set_limit(thd->lex->current_select);
|
||||
|
||||
name= search_file_name;
|
||||
@ -4070,6 +4070,17 @@ bool mysql_show_binlog_events(THD* thd)
|
||||
if ((file=open_binlog(&log, linfo.log_file_name, &errmsg)) < 0)
|
||||
goto err;
|
||||
|
||||
my_stat(linfo.log_file_name, &s, MYF(0));
|
||||
binlog_size= s.st_size;
|
||||
if (lex_mi->pos > binlog_size)
|
||||
{
|
||||
sprintf(errmsg_buf, "Invalid pos specified. Requested from pos:%llu is "
|
||||
"greater than actual file size:%lu\n", lex_mi->pos,
|
||||
(ulong)s.st_size);
|
||||
errmsg= errmsg_buf;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
to account binlog event header size
|
||||
*/
|
||||
@ -4121,7 +4132,43 @@ bool mysql_show_binlog_events(THD* thd)
|
||||
}
|
||||
}
|
||||
|
||||
if (lex_mi->pos > BIN_LOG_HEADER_SIZE)
|
||||
{
|
||||
checksum_alg= description_event->checksum_alg;
|
||||
/* Validate user given position using checksum */
|
||||
if (checksum_alg != BINLOG_CHECKSUM_ALG_OFF &&
|
||||
checksum_alg != BINLOG_CHECKSUM_ALG_UNDEF)
|
||||
{
|
||||
if (!opt_master_verify_checksum)
|
||||
verify_checksum_once= true;
|
||||
my_b_seek(&log, pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
my_off_t cur_pos= my_b_tell(&log);
|
||||
ulong next_event_len= 0;
|
||||
uchar buff[IO_SIZE];
|
||||
while (cur_pos < pos)
|
||||
{
|
||||
my_b_seek(&log, cur_pos + EVENT_LEN_OFFSET);
|
||||
if (my_b_read(&log, (uchar *)buff, sizeof(next_event_len)))
|
||||
{
|
||||
mysql_mutex_unlock(log_lock);
|
||||
errmsg = "Could not read event_length";
|
||||
goto err;
|
||||
}
|
||||
next_event_len= uint4korr(buff);
|
||||
cur_pos= cur_pos + next_event_len;
|
||||
}
|
||||
if (cur_pos > pos)
|
||||
{
|
||||
mysql_mutex_unlock(log_lock);
|
||||
errmsg= "Invalid input pos specified please provide valid one.";
|
||||
goto err;
|
||||
}
|
||||
my_b_seek(&log, cur_pos);
|
||||
}
|
||||
}
|
||||
|
||||
for (event_count = 0;
|
||||
(ev = Log_event::read_log_event(&log,
|
||||
|
@ -152,3 +152,7 @@ ulong wsrep_OSU_method_get(const THD*)
|
||||
{ return 0;}
|
||||
bool wsrep_thd_set_wsrep_aborter(THD*, THD*)
|
||||
{ return 0;}
|
||||
|
||||
void wsrep_report_bf_lock_wait(const THD*,
|
||||
unsigned long long)
|
||||
{}
|
||||
|
@ -251,6 +251,11 @@ static int open_table(THD* thd,
|
||||
NULL, lock_type);
|
||||
|
||||
if (!open_n_lock_single_table(thd, &tables, tables.lock_type, flags)) {
|
||||
if (thd->is_error()) {
|
||||
WSREP_WARN("Can't lock table %s.%s : %d (%s)",
|
||||
schema_name->str, table_name->str,
|
||||
thd->get_stmt_da()->sql_errno(), thd->get_stmt_da()->message());
|
||||
}
|
||||
close_thread_tables(thd);
|
||||
my_error(ER_NO_SUCH_TABLE, MYF(0), schema_name->str, table_name->str);
|
||||
DBUG_RETURN(1);
|
||||
|
@ -2632,7 +2632,7 @@ static const char* dict_load_table_low(const table_name_t& name,
|
||||
name.m_name, NULL, n_cols + n_v_col, n_v_col, flags, flags2);
|
||||
(*table)->space_id = space_id;
|
||||
(*table)->id = table_id;
|
||||
(*table)->file_unreadable = false;
|
||||
(*table)->file_unreadable = !!(flags2 & DICT_TF2_DISCARDED);
|
||||
|
||||
return(NULL);
|
||||
}
|
||||
@ -2686,28 +2686,22 @@ dict_get_and_save_data_dir_path(
|
||||
ut_ad(!table->is_temporary());
|
||||
ut_ad(!table->space || table->space->id == table->space_id);
|
||||
|
||||
if (!table->data_dir_path && table->space_id) {
|
||||
if (!table->data_dir_path && table->space_id && table->space) {
|
||||
if (!dict_mutex_own) {
|
||||
dict_mutex_enter_for_mysql();
|
||||
}
|
||||
|
||||
if (const char* p = table->space
|
||||
? table->space->chain.start->name : NULL) {
|
||||
table->flags |= 1 << DICT_TF_POS_DATA_DIR
|
||||
& ((1U << DICT_TF_BITS) - 1);
|
||||
dict_save_data_dir_path(table, p);
|
||||
} else if (char* path = dict_get_first_path(table->space_id)) {
|
||||
table->flags |= 1 << DICT_TF_POS_DATA_DIR
|
||||
& ((1U << DICT_TF_BITS) - 1);
|
||||
dict_save_data_dir_path(table, path);
|
||||
ut_free(path);
|
||||
}
|
||||
dict_save_data_dir_path(table,
|
||||
table->space->chain.start->name);
|
||||
|
||||
if (table->data_dir_path == NULL) {
|
||||
/* Since we did not set the table data_dir_path,
|
||||
unset the flag. This does not change SYS_DATAFILES
|
||||
or SYS_TABLES or FSP_FLAGS on the header page of the
|
||||
tablespace, but it makes dict_table_t consistent. */
|
||||
or SYS_TABLES or FSP_SPACE_FLAGS on the header page
|
||||
of the tablespace, but it makes dict_table_t
|
||||
consistent. */
|
||||
table->flags &= ~DICT_TF_MASK_DATA_DIR
|
||||
& ((1U << DICT_TF_BITS) - 1);
|
||||
}
|
||||
|
@ -1557,6 +1557,11 @@ static bool fil_crypt_find_space_to_rotate(
|
||||
{
|
||||
/* we need iops to start rotating */
|
||||
while (!state->should_shutdown() && !fil_crypt_alloc_iops(state)) {
|
||||
if (state->space && state->space->is_stopping()) {
|
||||
state->space->release();
|
||||
state->space = NULL;
|
||||
}
|
||||
|
||||
os_event_reset(fil_crypt_threads_event);
|
||||
os_event_wait_time(fil_crypt_threads_event, 100000);
|
||||
}
|
||||
@ -2413,6 +2418,7 @@ fil_space_crypt_close_tablespace(
|
||||
|
||||
/* wakeup throttle (all) sleepers */
|
||||
os_event_set(fil_crypt_throttle_sleep_event);
|
||||
os_event_set(fil_crypt_threads_event);
|
||||
|
||||
os_thread_sleep(20000);
|
||||
dict_mutex_enter_for_mysql();
|
||||
|
@ -858,14 +858,14 @@ fil_mutex_enter_and_prepare_for_io(
|
||||
this tablespace (multiple threads trying to extend
|
||||
this tablespace).
|
||||
|
||||
Also, fil_space_set_recv_size() may have been invoked
|
||||
again during the file extension while fil_system.mutex
|
||||
was not being held by us.
|
||||
Also, fil_space_set_recv_size_and_flags() may have been
|
||||
invoked again during the file extension while
|
||||
fil_system.mutex was not being held by us.
|
||||
|
||||
Only if space->recv_size matches what we read
|
||||
originally, reset the field. In this way, a
|
||||
subsequent I/O request will handle any pending
|
||||
fil_space_set_recv_size(). */
|
||||
fil_space_set_recv_size_and_flags(). */
|
||||
|
||||
if (size == space->recv_size) {
|
||||
space->recv_size = 0;
|
||||
@ -1320,21 +1320,17 @@ fil_space_get_space(
|
||||
return(space);
|
||||
}
|
||||
|
||||
/** Set the recovered size of a tablespace in pages.
|
||||
@param id tablespace ID
|
||||
@param size recovered size in pages */
|
||||
UNIV_INTERN
|
||||
void
|
||||
fil_space_set_recv_size(ulint id, ulint size)
|
||||
void fil_space_set_recv_size_and_flags(ulint id, ulint size, uint32_t flags)
|
||||
{
|
||||
mutex_enter(&fil_system.mutex);
|
||||
ut_ad(size);
|
||||
ut_ad(id < SRV_SPACE_ID_UPPER_BOUND);
|
||||
|
||||
if (fil_space_t* space = fil_space_get_space(id)) {
|
||||
space->recv_size = size;
|
||||
mutex_enter(&fil_system.mutex);
|
||||
if (fil_space_t *space= fil_space_get_space(id))
|
||||
{
|
||||
if (size)
|
||||
space->recv_size= size;
|
||||
if (flags != FSP_FLAGS_FCRC32_MASK_MARKER)
|
||||
space->flags= flags;
|
||||
}
|
||||
|
||||
mutex_exit(&fil_system.mutex);
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user