1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge branch '10.6' into '10.11'

This commit is contained in:
Julius Goryavsky
2024-09-02 03:42:02 +02:00
51 changed files with 680 additions and 137 deletions

View File

@@ -12,10 +12,6 @@
galera_as_slave_ctas : MDEV-28378 timeout
galera_pc_recovery : MDEV-25199 cluster fails to start up
galera_bf_kill_debug : timeout after 900 seconds
galera_ssl_upgrade : [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 130: Incorrect file format 'gtid_slave_pos'
galera_parallel_simple : timeout related to wsrep_sync_wait
galera_insert_bulk : MDEV-30536 no expected deadlock in galera_insert_bulk test
galera_sequences : MDEV-32561 WSREP FSM failure: no such a transition REPLICATING -> COMMITTED
galera_concurrent_ctas : MDEV-32779 galera_concurrent_ctas: assertion in the galera::ReplicatorSMM::finish_cert()
galera_as_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback()

View File

@@ -10,8 +10,8 @@ if (!$wsrep_recover_additional)
--perl
use strict;
my $wsrep_start_position_str = "grep 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'";
my $wsrep_start_position = `grep 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'`;
my $wsrep_start_position_str = "grep -a 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'";
my $wsrep_start_position = `grep -a 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'`;
chomp($wsrep_start_position);
die if $wsrep_start_position eq '';

View File

@@ -39,7 +39,7 @@ id val
7 d
9 d
11 d
set global wsrep_mode=REPLICATE_MYISAM;
set global wsrep_mode='REPLICATE_MYISAM,REPLICATE_ARIA';
create table t4(id serial, val varchar(100)) engine=myisam;
insert into t4 values(null, 'a');
insert into t4 values(null, 'b');
@@ -95,6 +95,7 @@ id val
4 d
5 d
6 d
set global wsrep_mode=default;
connection node_1;
drop table t1,t2,t3,t4,t5;
set global wsrep_mode=default;

View File

@@ -22,16 +22,19 @@ update t1 set b= 1 where a=1;
connection node_2b;
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.before_wsrep_thd_abort_reached";
connection node_2;
SET DEBUG_SYNC= 'before_awake_no_mutex SIGNAL awake_reached WAIT_FOR continue_kill';
SET DEBUG_SYNC= 'wsrep_kill_before_awake_no_mutex SIGNAL awake_reached WAIT_FOR continue_kill';
connection node_2b;
SET DEBUG_SYNC='now WAIT_FOR awake_reached';
SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.before_wsrep_thd_abort";
connection node_1;
COMMIT;
connection node_2b;
SET DEBUG_SYNC = "now SIGNAL continue_kill";
connection node_2;
connection node_2a;
select * from t1;
connection node_2;
connection node_2b;
SET DEBUG_SYNC = "RESET";
drop table t1;
disconnect node_2a;

View File

@@ -2,6 +2,8 @@ connection node_2;
connection node_1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
connection node_1;
SET foreign_key_checks = 0;
SET unique_checks = 0;
START TRANSACTION;
@@ -10,11 +12,20 @@ SET foreign_key_checks = 1;
SET unique_checks = 1;
INSERT INTO t1 VALUES (1001);
connection node_1;
SET DEBUG_SYNC = 'wsrep_before_certification WAIT_FOR sync.wsrep_apply_cb_reached';
SET DEBUG_SYNC = 'wsrep_after_certification SIGNAL signal.wsrep_apply_cb';
COMMIT;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE t1;
SET GLOBAL DEBUG_DBUG = '';
SET DEBUG_SYNC = 'RESET';
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
connection node_1;
SET foreign_key_checks = 0;
SET unique_checks = 0;
START TRANSACTION;
connection node_2;
SET foreign_key_checks = 1;
@@ -23,8 +34,14 @@ START TRANSACTION;
INSERT INTO t1 VALUES (1001);
connection node_1;
COMMIT;
2
3
connection node_2;
SET DEBUG_SYNC = 'wsrep_before_certification WAIT_FOR sync.wsrep_apply_cb_reached';
SET DEBUG_SYNC = 'wsrep_after_certification SIGNAL signal.wsrep_apply_cb';
COMMIT;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE t1;
SET GLOBAL DEBUG_DBUG = '';
SET DEBUG_SYNC = 'RESET';
disconnect node_2;
disconnect node_1;

View File

@@ -0,0 +1,70 @@
connection node_2;
connection node_1;
connection node_1;
SET @@global.wsrep_ignore_apply_errors = 7;
connection node_2;
SET @@global.wsrep_ignore_apply_errors = 7;
connection node_1;
CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY);
connection node_1;
DROP TABLE nonexistent;
ERROR 42S02: Unknown table 'test.nonexistent'
INSERT INTO t1 VALUES (DEFAULT);
connection node_2;
connection node_1;
TRUNCATE TABLE nonexistent;
ERROR 42S02: Table 'test.nonexistent' doesn't exist
INSERT INTO t1 VALUES (DEFAULT);
connection node_2;
connection node_1;
CREATE TABLE nonexistent.t1 (s INT);
ERROR 42000: Unknown database 'nonexistent'
INSERT INTO t1 VALUES (DEFAULT);
connection node_2;
connection node_1;
CREATE TABLE t1 (s INT);
ERROR 42S01: Table 't1' already exists
INSERT INTO t1 VALUES (DEFAULT);
connection node_2;
connection node_1;
ALTER TABLE nonexistent ADD COLUMN (c INT);
ERROR 42S02: Table 'test.nonexistent' doesn't exist
INSERT INTO t1 VALUES (DEFAULT);
connection node_2;
DROP TABLE t1;
connection node_1;
SET @@global.wsrep_ignore_apply_errors = 0;
connection node_2;
SET @@global.wsrep_ignore_apply_errors = 0;
connection node_1;
CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY);
connection node_1;
DROP TABLE nonexistent;
ERROR 42S02: Unknown table 'test.nonexistent'
INSERT INTO t1 VALUES (DEFAULT);
connection node_2;
connection node_1;
TRUNCATE TABLE nonexistent;
ERROR 42S02: Table 'test.nonexistent' doesn't exist
INSERT INTO t1 VALUES (DEFAULT);
connection node_2;
connection node_1;
CREATE TABLE nonexistent.t1 (s INT);
ERROR 42000: Unknown database 'nonexistent'
INSERT INTO t1 VALUES (DEFAULT);
connection node_2;
connection node_1;
CREATE TABLE t1 (s INT);
ERROR 42S01: Table 't1' already exists
INSERT INTO t1 VALUES (DEFAULT);
connection node_2;
connection node_1;
ALTER TABLE nonexistent ADD COLUMN (c INT);
ERROR 42S02: Table 'test.nonexistent' doesn't exist
INSERT INTO t1 VALUES (DEFAULT);
connection node_2;
DROP TABLE t1;
connection node_1;
SET @@global.wsrep_ignore_apply_errors = 7;
connection node_2;
SET @@global.wsrep_ignore_apply_errors = 7;

View File

@@ -0,0 +1,27 @@
connection node_2;
connection node_1;
connection node_1;
connection node_2;
connection node_1;
call mtr.add_suppression("WSREP: async IST sender failed to serve.*");
SET @wsrep_provider_options_orig = @@GLOBAL.wsrep_provider_options;
connection node_2;
SET @wsrep_cluster_address_orig = @@GLOBAL.wsrep_cluster_address;
SET GLOBAL WSREP_ON=0;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
EXPECT_0
0
SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_cluster;
EXPECT_1
1
SELECT COUNT(*) AS EXPECT_2 FROM mysql.wsrep_cluster_members;
EXPECT_2
2
connection node_1;
SET GLOBAL wsrep_provider_options ='pc.ignore_sb=true';
connection node_2;
Killing server ...
connection node_1;
connection node_2;
connection node_1;
SET GLOBAL wsrep_provider_options ='pc.ignore_sb=false';

View File

@@ -17,12 +17,14 @@ SELECT * FROM s;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
1 1 9223372036854775806 1 1 1000 0 0
connection node_2;
SET GLOBAL WSREP_MODE='REPLICATE_ARIA,REPLICATE_MYISAM';
SELECT * FROM t1;
a
SELECT * FROM s;
next_not_cached_value minimum_value maximum_value start_value increment cache_size cycle_option cycle_count
1 1 9223372036854775806 1 1 1000 0 0
connection node_1;
SET GLOBAL WSREP_MODE='REPLICATE_ARIA,REPLICATE_MYISAM';
DROP TABLE t1;
DROP SEQUENCE s;
# Case 2 REPLACE INTO ... SELECT with error
@@ -240,3 +242,5 @@ pk
DROP TABLE t1;
DROP VIEW view_t1;
SET GLOBAL wsrep_mode=DEFAULT;
connection node_2;
SET GLOBAL wsrep_mode=DEFAULT;

View File

@@ -22,7 +22,7 @@ insert into t3 select null, 'c';
insert into t3 select null, 'd' from t3;
select * from t3;
set global wsrep_mode=REPLICATE_MYISAM;
set global wsrep_mode='REPLICATE_MYISAM,REPLICATE_ARIA';
create table t4(id serial, val varchar(100)) engine=myisam;
insert into t4 values(null, 'a');
@@ -45,9 +45,8 @@ select * from t2;
select * from t3;
select * from t4;
select * from t5;
set global wsrep_mode=default;
--connection node_1
drop table t1,t2,t3,t4,t5;
set global wsrep_mode=default;

View File

@@ -66,7 +66,7 @@ SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.before_wsrep_thd_abort_reached";
#
# pause KILL execution before awake
#
SET DEBUG_SYNC= 'before_awake_no_mutex SIGNAL awake_reached WAIT_FOR continue_kill';
SET DEBUG_SYNC= 'wsrep_kill_before_awake_no_mutex SIGNAL awake_reached WAIT_FOR continue_kill';
--disable_query_log
--send_eval KILL $k_thread
--enable_query_log
@@ -78,6 +78,11 @@ SET DEBUG_SYNC='now WAIT_FOR awake_reached';
# release applier and KILL operator
SET GLOBAL debug_dbug = "";
SET DEBUG_SYNC = "now SIGNAL signal.before_wsrep_thd_abort";
--connection node_1
COMMIT;
--connection node_2b
SET DEBUG_SYNC = "now SIGNAL continue_kill";
--connection node_2
@@ -87,7 +92,7 @@ SET DEBUG_SYNC = "now SIGNAL continue_kill";
--error 0,1213,2013,2026
select * from t1;
--connection node_2
--connection node_2b
SET DEBUG_SYNC = "RESET";
drop table t1;

View File

@@ -5,6 +5,8 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug_sync.inc
--source include/have_debug.inc
#
# Make bulk insert BF-abort, but regular insert succeed.
@@ -13,6 +15,10 @@
--connection node_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
# Delay applying of the single insert from the other node.
SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
--connection node_1
# Disable foreign and unique key checks to allow bulk insert.
SET foreign_key_checks = 0;
SET unique_checks = 0;
@@ -30,7 +36,7 @@ while ($count < 1000)
--connection node_2
# Disable bulk insert.
# Disable bulk insert on this node.
SET foreign_key_checks = 1;
SET unique_checks = 1;
@@ -38,10 +44,20 @@ SET unique_checks = 1;
INSERT INTO t1 VALUES (1001);
--connection node_1
# We need to trigger Galera-level certification conflict. For this:
# - start applying single insert from the other node before bulk insert certifies
# - certifying bulk insert will lead to the conflict
# - keep applying single insert
SET DEBUG_SYNC = 'wsrep_before_certification WAIT_FOR sync.wsrep_apply_cb_reached';
SET DEBUG_SYNC = 'wsrep_after_certification SIGNAL signal.wsrep_apply_cb';
--error ER_LOCK_DEADLOCK
COMMIT;
DROP TABLE t1;
SET GLOBAL DEBUG_DBUG = '';
SET DEBUG_SYNC = 'RESET';
#
# Make bulk insert succeed, but regular insert BF-abort.
@@ -50,8 +66,17 @@ DROP TABLE t1;
--connection node_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
--connection node_2
# Delay applying of the bulk insert from the other node.
SET GLOBAL DEBUG_DBUG = 'd,sync.wsrep_apply_cb';
--connection node_1
--let $before_bulk_keys = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_repl_keys'`
# Disable foreign and unique key checks to allow bulk insert.
SET foreign_key_checks = 0;
SET unique_checks = 0;
START TRANSACTION;
--let $count=0
@@ -64,8 +89,7 @@ while ($count < 1000)
--enable_query_log
--connection node_2
# Disable bulk insert.
# Disable bulk insert on this node.
SET foreign_key_checks = 1;
SET unique_checks = 1;
@@ -77,12 +101,23 @@ INSERT INTO t1 VALUES (1001);
--connection node_1
COMMIT;
# Expect two keys to be added for bulk insert: DB-level shared key and table-level exclusive key.
# Expect three keys to be added for bulk insert: "zero-level" key, DB-level shared key and table-level exclusive key.
--let $bulk_keys_count = `SELECT VARIABLE_VALUE - $before_bulk_keys FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_repl_keys'`
--echo $bulk_keys_count
--connection node_2
# We need to trigger Galera-level certification conflict. For this:
# - start applying bulk insert from the other node before local insert certifies
# - certifying local insert will lead to the conflict
# - keep applying bulk insert
SET DEBUG_SYNC = 'wsrep_before_certification WAIT_FOR sync.wsrep_apply_cb_reached';
SET DEBUG_SYNC = 'wsrep_after_certification SIGNAL signal.wsrep_apply_cb';
--error ER_LOCK_DEADLOCK
COMMIT;
DROP TABLE t1;
SET GLOBAL DEBUG_DBUG = '';
SET DEBUG_SYNC = 'RESET';
--source include/galera_end.inc

View File

@@ -38,10 +38,10 @@ SELECT COUNT(*) = 1 FROM t1;
--perl
use strict;
my $wsrep_start_position1 = `grep 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.1.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'`;
my $wsrep_start_position1 = `grep -a 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.1.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'`;
chomp($wsrep_start_position1);
my $wsrep_start_position2 = `grep 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.2.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'`;
my $wsrep_start_position2 = `grep -a 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.2.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'`;
chomp($wsrep_start_position2);
die if $wsrep_start_position1 eq '' || $wsrep_start_position2 eq '';

View File

@@ -1,5 +1,9 @@
!include ../galera_2nodes.cnf
[mysqld]
loose-galera-ssl-upgrade=1
wsrep-debug=1
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem'

View File

@@ -7,6 +7,8 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_ssl_communication.inc
--source include/have_openssl.inc
--source include/force_restart.inc
# Save original auto_increment_offset values.
--let $node_1=node_1

View File

@@ -0,0 +1,54 @@
--connection node_1
CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY);
--connection node_1
--error 1051
DROP TABLE nonexistent;
# Verify cluster is intact
INSERT INTO t1 VALUES (DEFAULT);
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
--source include/wait_condition.inc
--connection node_1
--error 1146
TRUNCATE TABLE nonexistent;
# Verify cluster is intact
INSERT INTO t1 VALUES (DEFAULT);
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 2 FROM t1;
--source include/wait_condition.inc
--connection node_1
--error 1049
CREATE TABLE nonexistent.t1 (s INT);
# Verify cluster is intact
INSERT INTO t1 VALUES (DEFAULT);
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 3 FROM t1;
--source include/wait_condition.inc
--connection node_1
--error 1050
CREATE TABLE t1 (s INT);
# Verify cluster is intact
INSERT INTO t1 VALUES (DEFAULT);
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 4 FROM t1;
--source include/wait_condition.inc
--connection node_1
--error 1146
ALTER TABLE nonexistent ADD COLUMN (c INT);
# Verify cluster is intact
INSERT INTO t1 VALUES (DEFAULT);
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
--source include/wait_condition.inc
DROP TABLE t1;

View File

@@ -0,0 +1,34 @@
#
# Test voting on identical DDL errors (error messages should match)
#
--source include/galera_cluster.inc
--source include/have_binlog_format_row.inc
#
# 1. Ignore all DDL errors (avoids voting)
#
--connection node_1
--let $wsrep_ignore_apply_errors_saved1 = `SELECT @@global.wsrep_ignore_apply_errors`
SET @@global.wsrep_ignore_apply_errors = 7;
--connection node_2
--let $wsrep_ignore_apply_errors_saved2 = `SELECT @@global.wsrep_ignore_apply_errors`
SET @@global.wsrep_ignore_apply_errors = 7;
--source galera_vote_ddl.inc
#
# 2. Don't ignore any errors (forces voting)
#
--connection node_1
SET @@global.wsrep_ignore_apply_errors = 0;
--connection node_2
SET @@global.wsrep_ignore_apply_errors = 0;
--source galera_vote_ddl.inc
--connection node_1
--eval SET @@global.wsrep_ignore_apply_errors = $wsrep_ignore_apply_errors_saved1
--connection node_2
--eval SET @@global.wsrep_ignore_apply_errors = $wsrep_ignore_apply_errors_saved2

View File

@@ -0,0 +1,39 @@
--source include/galera_cluster.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
--connection node_1
call mtr.add_suppression("WSREP: async IST sender failed to serve.*");
SET @wsrep_provider_options_orig = @@GLOBAL.wsrep_provider_options;
--connection node_2
SET @wsrep_cluster_address_orig = @@GLOBAL.wsrep_cluster_address;
SET GLOBAL WSREP_ON=0;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) AS EXPECT_1 FROM mysql.wsrep_cluster;
SELECT COUNT(*) AS EXPECT_2 FROM mysql.wsrep_cluster_members;
--connection node_1
SET GLOBAL wsrep_provider_options ='pc.ignore_sb=true';
--connection node_2
--source include/kill_galera.inc
--connection node_1
--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
--source include/start_mysqld.inc
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
SET GLOBAL wsrep_provider_options ='pc.ignore_sb=false';
# Cleanup
--source include/auto_increment_offset_restore.inc

View File

@@ -16,6 +16,7 @@ SELECT * FROM t1;
SELECT * FROM s;
--connection node_2
SET GLOBAL WSREP_MODE='REPLICATE_ARIA,REPLICATE_MYISAM';
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 's'
@@ -27,6 +28,7 @@ SELECT * FROM t1;
SELECT * FROM s;
--connection node_1
SET GLOBAL WSREP_MODE='REPLICATE_ARIA,REPLICATE_MYISAM';
DROP TABLE t1;
DROP SEQUENCE s;
@@ -183,3 +185,6 @@ SELECT * FROM t1;
DROP TABLE t1;
DROP VIEW view_t1;
SET GLOBAL wsrep_mode=DEFAULT;
--connection node_2
SET GLOBAL wsrep_mode=DEFAULT;

View File

@@ -11,11 +11,6 @@
##############################################################################
galera_2_cluster : MDEV-32631 galera_2_cluster: before_rollback(): Assertion `0' failed
galera_gtid_2_cluster : MDEV-32633 galera_gtid_2_cluster: Assertion `thd->wsrep_next_trx_id() != (0x7fffffffffffffffLL * 2ULL + 1)'
galera_ssl_reload : MDEV-32778 galera_ssl_reload failed with warning message
galera_pc_bootstrap : temporarily disabled at the request of Codership
galera_ipv6_mariabackup_section : temporarily disabled at the request of Codership
# Opensuse/suse/rocky9/rocky84/rhel9/rhel8-ppc64le .. - all same IPv6 isn't configured right or skipping or galera
galera_ipv6_rsync : Can't connect to server on '::1' (115)
galera_ipv6_rsync_section : Can't connect to server on '::1' (115)
GCF-354 : MDEV-25614 Galera test failure on GCF-354
galera_ipv6_rsync : MDEV-34842 Can't connect to server on '::1' (115)
galera_ipv6_rsync_section : MDEV-34842 Can't connect to server on '::1' (115)
galera_ipv6_mariabackup_section : MDEV-34842 Can't connect to server on '::1' (115)

View File

@@ -1,6 +1,9 @@
connection node_2;
connection node_1;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_1;
connection node_2;
connection node_3;
connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
set wsrep_sync_wait=0;
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
@@ -44,9 +47,9 @@ connection node_1b;
connection node_1;
connection node_3;
connection node_1;
CALL insert_row('node1', 500);
CALL insert_row('node1', 100);
connection node_3;
CALL insert_row('node3', 500);
CALL insert_row('node3', 100);
CREATE TABLE t2(i int primary key) engine=innodb;
connection node_2;
# Restart node_2
@@ -60,7 +63,7 @@ Variable_name Value
wsrep_gtid_domain_id 1111
show variables like '%gtid_binlog_pos%';
Variable_name Value
gtid_binlog_pos 1111-1-2503
gtid_binlog_pos 1111-1-1703
connection node_2;
# GTID in node2
show variables like 'wsrep_gtid_domain_id';
@@ -68,7 +71,7 @@ Variable_name Value
wsrep_gtid_domain_id 1111
show variables like '%gtid_binlog_pos%';
Variable_name Value
gtid_binlog_pos 1111-1-2503
gtid_binlog_pos 1111-1-1703
connection node_3;
# GTID in node3
show variables like 'wsrep_gtid_domain_id';
@@ -76,7 +79,7 @@ Variable_name Value
wsrep_gtid_domain_id 1111
show variables like '%gtid_binlog_pos%';
Variable_name Value
gtid_binlog_pos 1111-1-2503
gtid_binlog_pos 1111-1-1703
# Shutdown node_3
connection node_3;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
@@ -98,7 +101,7 @@ Variable_name Value
wsrep_gtid_domain_id 1111
show variables like '%gtid_binlog_pos%';
Variable_name Value
gtid_binlog_pos 1111-1-2554
gtid_binlog_pos 1111-1-1754
connection node_2;
# GTID in node2
show variables like 'wsrep_gtid_domain_id';
@@ -106,7 +109,7 @@ Variable_name Value
wsrep_gtid_domain_id 1111
show variables like '%gtid_binlog_pos%';
Variable_name Value
gtid_binlog_pos 1111-1-2554
gtid_binlog_pos 1111-1-1754
connection node_3;
# GTID in node3
show variables like 'wsrep_gtid_domain_id';
@@ -114,7 +117,7 @@ Variable_name Value
wsrep_gtid_domain_id 1111
show variables like '%gtid_binlog_pos%';
Variable_name Value
gtid_binlog_pos 1111-1-2554
gtid_binlog_pos 1111-1-1754
# One by one shutdown all nodes
connection node_3;
# shutdown node_3
@@ -132,7 +135,7 @@ Variable_name Value
wsrep_gtid_domain_id 1111
show variables like '%gtid_binlog_pos%';
Variable_name Value
gtid_binlog_pos 1111-1-2554
gtid_binlog_pos 1111-1-1754
ANALYZE TABLE t2;
Table Op Msg_type Msg_text
test.t2 analyze status Engine-independent statistics collected
@@ -163,7 +166,7 @@ Variable_name Value
wsrep_gtid_domain_id 1111
show variables like '%gtid_binlog_pos%';
Variable_name Value
gtid_binlog_pos 1111-1-2756
gtid_binlog_pos 1111-1-1956
connection node_2;
node2 GTID
show variables like 'wsrep_gtid_domain_id';
@@ -171,7 +174,7 @@ Variable_name Value
wsrep_gtid_domain_id 1111
show variables like '%gtid_binlog_pos%';
Variable_name Value
gtid_binlog_pos 1111-1-2756
gtid_binlog_pos 1111-1-1956
connection node_3;
node3 GTID
show variables like 'wsrep_gtid_domain_id';
@@ -179,22 +182,22 @@ Variable_name Value
wsrep_gtid_domain_id 1111
show variables like '%gtid_binlog_pos%';
Variable_name Value
gtid_binlog_pos 1111-1-2756
gtid_binlog_pos 1111-1-1956
connection node_1;
table size in node1
SELECT COUNT(*) FROM t1;
COUNT(*)
2750
1950
connection node_2;
table size in node2
SELECT COUNT(*) FROM t1;
COUNT(*)
2750
1950
connection node_3;
table size in node3
SELECT COUNT(*) FROM t1;
COUNT(*)
2750
1950
connection node_2;
call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node");
call mtr.add_suppression("Sending JOIN failed: ");

View File

@@ -7,8 +7,9 @@ connection node_3;
SET SESSION wsrep_on=OFF;
DROP SCHEMA test;
connection node_1;
SET SESSION lc_messages='fr_FR';
CREATE SCHEMA test;
ERROR HY000: Can't create database 'test'; database exists
ERROR HY000: Ne peut cr<63>er la base 'test'; elle existe d<>j<EFBFBD>
connection node_1;
SET SESSION wsrep_sync_wait=0;
connection node_2;

View File

@@ -1,38 +1,31 @@
!include ../galera_3nodes.cnf
[mysqld]
loose-galera-gtid-consistency=1
wsrep_sst_auth="root:"
wsrep_sst_method=mariabackup
log_slave_updates=ON
log_bin=mariadb-bin-log
binlog-format=row
wsrep-gtid-mode=ON
wsrep-debug=1
gtid-strict-mode=1
[mysqld.1]
wsrep-node-name="node1"
wsrep_gtid_domain_id=1111
gtid_domain_id=2
server_id=10999
wsrep_sst_auth="root:"
wsrep_sst_method=mariabackup
log_slave_updates=ON
log_bin=mariadb-bin-log
binlog-format=row
wsrep-gtid-mode=ON
wsrep_gtid_domain_id=1111
[mysqld.2]
wsrep-node-name="node2"
wsrep_gtid_domain_id=1112
gtid_domain_id=3
wsrep_sst_auth="root:"
wsrep_sst_method=mariabackup
log_slave_updates=ON
log_bin=mariadb-bin-log
binlog-format=row
wsrep-gtid-mode=ON
wsrep_gtid_domain_id=1112
[mysqld.3]
wsrep-node-name="node3"
wsrep_gtid_domain_id=1113
gtid_domain_id=4
wsrep_sst_auth="root:"
wsrep_sst_method=mariabackup
log_slave_updates=ON
log_bin=mariadb-bin-log
binlog-format=row
wsrep-gtid-mode=ON
wsrep_gtid_domain_id=1113
[sst]
transferfmt=@ENV.MTR_GALERA_TFMT

View File

@@ -2,7 +2,6 @@
--source include/big_test.inc
--source include/force_restart.inc
#
# Testing gtid consistency in 3 node cluster when nodes drop
# and join back to cluster.
@@ -13,6 +12,13 @@
# from the bootstrap node (node_1), and use it
#
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--let $node_3=node_3
--source ../galera/include/auto_increment_offset_save.inc
--connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2
set wsrep_sync_wait=0;
--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
@@ -98,10 +104,10 @@ show variables like '%gtid_binlog_pos%';
# while node 2 is absent
#
--connection node_1
CALL insert_row('node1', 500);
CALL insert_row('node1', 100);
--connection node_3
CALL insert_row('node3', 500);
CALL insert_row('node3', 100);
CREATE TABLE t2(i int primary key) engine=innodb;
@@ -225,12 +231,19 @@ show variables like '%gtid_binlog_pos%';
# bootstap cluster in order node1 - node2 - node3
# send some inserts and DDL after each node started
#
--sleep 5
--echo # Bootstrap from node_1
--connection node_1
--let $restart_parameters = --wsrep_new_cluster
--source include/start_mysqld.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
--source include/wait_condition.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'
--source include/wait_condition.inc
show variables like 'wsrep_gtid_domain_id';
show variables like '%gtid_binlog_pos%';
@@ -243,6 +256,13 @@ ANALYZE TABLE t2;
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
--source include/start_mysqld.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
--source include/wait_condition.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'
--source include/wait_condition.inc
#
# connection node_1b may not be functional anymore, after node was
# shutdown, open node_1c for controlling node 1 state
@@ -265,6 +285,14 @@ ALTER TABLE t2 ADD COLUMN (k int);
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.3.expect
--source include/start_mysqld.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
--source include/wait_condition.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'
--source include/wait_condition.inc
--connection node_1c
--echo # wait until all nodes are back in cluster
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
@@ -335,12 +363,16 @@ DROP TABLE t2;
DROP TABLE t3;
--connection node_3
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2'
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't3'
--source include/wait_condition.inc
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2'
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't3'
--source include/wait_condition.inc
# Restore original auto_increment_offset values.
--let $galera_cluster_size=3
--source ../galera/include/auto_increment_offset_restore.inc
--disconnect node_3
--disconnect node_2b
--disconnect node_1b

View File

@@ -24,6 +24,9 @@ DROP SCHEMA test;
# This should fail on nodes 1 and 2 and succeed on node 3
--connection node_1
# Make error message on source node different by changing locale
# It should still agree with node 2
SET SESSION lc_messages='fr_FR';
--error ER_DB_CREATE_EXISTS
CREATE SCHEMA test;

View File

@@ -0,0 +1,38 @@
SET SESSION wsrep_osu_method=RSU;
SET autocommit=0;
CREATE TABLE t (c INT) ENGINE=INNODB PARTITION BY KEY(c) PARTITIONS 2;
INSERT INTO t VALUES (1);
INSERT INTO t SELECT 1 ;
COMMIT;
SELECT * FROM t;
c
1
1
DROP TABLE t;
SET autocommit=1;
SET SESSION wsrep_osu_method=RSU;
CREATE TABLE t (c INT) ENGINE=INNODB PARTITION BY KEY(c) PARTITIONS 2;
INSERT INTO t SELECT 1 ;
SELECT * FROM t;
c
1
DROP TABLE t;
SET autocommit=1;
SET SESSION wsrep_osu_method=RSU;
CREATE TABLE t (c INT) ENGINE=MYISAM PARTITION BY KEY(c) PARTITIONS 2;
INSERT INTO t SELECT 1 ;
ERROR 42000: This version of MariaDB doesn't yet support 'RSU on this table engine'
SELECT * FROM t;
c
DROP TABLE t;
SET SESSION wsrep_osu_method=RSU;
SET autocommit=0;
CREATE TABLE t (c INT) ENGINE=MYISAM PARTITION BY KEY(c) PARTITIONS 2;
INSERT INTO t VALUES (1);
INSERT INTO t SELECT 1 ;
ERROR 42000: This version of MariaDB doesn't yet support 'RSU on this table engine'
COMMIT;
SELECT * FROM t;
c
1
DROP TABLE t;

View File

@@ -0,0 +1,9 @@
!include ../my.cnf
[mysqld.1]
wsrep-on=ON
binlog-format=ROW
innodb-flush-log-at-trx-commit=1
wsrep-cluster-address=gcomm://
wsrep-provider=@ENV.WSREP_PROVIDER
innodb-autoinc-lock-mode=2

View File

@@ -0,0 +1,4 @@
[binlogon]
log-bin
[binlogoff]

View File

@@ -0,0 +1,49 @@
--source include/have_wsrep.inc
--source include/have_innodb.inc
--source include/have_wsrep_provider.inc
--source include/have_partition.inc
#
# MDEV-33997: Assertion `((WSREP_PROVIDER_EXISTS_ && this->variables.wsrep_on) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()' failed in int THD::binlog_write_row(TABLE*, bool, const uchar*)
#
SET SESSION wsrep_osu_method=RSU;
SET autocommit=0;
CREATE TABLE t (c INT) ENGINE=INNODB PARTITION BY KEY(c) PARTITIONS 2;
INSERT INTO t VALUES (1);
INSERT INTO t SELECT 1 ;
COMMIT;
SELECT * FROM t;
DROP TABLE t;
#
# MDEV-27296 : Assertion `((thd && (WSREP_PROVIDER_EXISTS_ && thd->variables.wsrep_on)) && wsrep_emulate_bin_log) || mysql_bin_log.is_open()' failed
# Second test case
#
SET autocommit=1;
SET SESSION wsrep_osu_method=RSU;
CREATE TABLE t (c INT) ENGINE=INNODB PARTITION BY KEY(c) PARTITIONS 2;
INSERT INTO t SELECT 1 ;
SELECT * FROM t;
DROP TABLE t;
#
# We should not allow RSU for MyISAM
#
SET autocommit=1;
SET SESSION wsrep_osu_method=RSU;
CREATE TABLE t (c INT) ENGINE=MYISAM PARTITION BY KEY(c) PARTITIONS 2;
--error ER_NOT_SUPPORTED_YET
INSERT INTO t SELECT 1 ;
SELECT * FROM t;
DROP TABLE t;
SET SESSION wsrep_osu_method=RSU;
SET autocommit=0;
CREATE TABLE t (c INT) ENGINE=MYISAM PARTITION BY KEY(c) PARTITIONS 2;
INSERT INTO t VALUES (1);
--error ER_NOT_SUPPORTED_YET
INSERT INTO t SELECT 1 ;
COMMIT;
SELECT * FROM t;
DROP TABLE t;

View File

@@ -18,7 +18,7 @@
--perl
use strict;
my $wsrep_start_position = `grep 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'`;
my $wsrep_start_position = `grep -a 'WSREP: Recovered position:' $ENV{MYSQL_TMP_DIR}/galera_wsrep_recover.log | sed 's/.*WSREP\:\ Recovered\ position://' | sed 's/^[ \t]*//'`;
chomp($wsrep_start_position);
die if $wsrep_start_position eq '';
open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/galera_wsrep_start_position.inc") or die;