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

Merge branch '10.5' into '10.6'

This commit is contained in:
Julius Goryavsky
2025-04-02 04:43:24 +02:00
137 changed files with 1336 additions and 163 deletions

View File

@@ -2635,6 +2635,15 @@ my_bool regex_list_check_match(
const regex_list_t& list,
const char* name)
{
if (list.empty()) return (FALSE);
/*
regexec/pcre2_regexec is not threadsafe, also documented.
Serialize access from multiple threads to compiled regexes.
*/
static std::mutex regex_match_mutex;
std::lock_guard<std::mutex> lock(regex_match_mutex);
regmatch_t tables_regmatch[1];
for (regex_list_t::const_iterator i = list.begin(), end = list.end();
i != end; ++i) {

View File

@@ -259,3 +259,24 @@ CHECK TABLE `t1` EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
#
# MDEV-31122 Server crash in get_lock_data / mysql_lock_abort_for_thread
#
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (b INT, c varchar(5))
PARTITION BY RANGE COLUMNS(c)
SUBPARTITION by key(b) SUBPARTITIONS 2 (
PARTITION p0 VALUES LESS THAN ('m'),
PARTITION p1 VALUES LESS THAN ('z')
);
connect con1,localhost,root,,;
HANDLER t1 OPEN;
SELECT b FROM t2 PARTITION (p0);
connection default;
SET lock_wait_timeout= 1;
ALTER TABLE t1 FORCE;
connection con1;
b
disconnect con1;
connection default;
DROP TABLE t2, t1;

View File

@@ -249,3 +249,31 @@ ALTER TABLE `t1` ADD PRIMARY KEY (`a`);
ALTER TABLE `t1` REMOVE PARTITIONING;
CHECK TABLE `t1` EXTENDED;
DROP TABLE t1;
--echo #
--echo # MDEV-31122 Server crash in get_lock_data / mysql_lock_abort_for_thread
--echo #
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (b INT, c varchar(5))
PARTITION BY RANGE COLUMNS(c)
SUBPARTITION by key(b) SUBPARTITIONS 2 (
PARTITION p0 VALUES LESS THAN ('m'),
PARTITION p1 VALUES LESS THAN ('z')
);
--connect (con1,localhost,root,,)
HANDLER t1 OPEN;
--send
SELECT b FROM t2 PARTITION (p0);
--connection default
SET lock_wait_timeout= 1;
--error 0,ER_STATEMENT_TIMEOUT,ER_LOCK_WAIT_TIMEOUT
ALTER TABLE t1 FORCE;
--connection con1
--reap
--disconnect con1
--connection default
DROP TABLE t2, t1;

View File

@@ -10,7 +10,6 @@
#
##############################################################################
galera_sequences : MDEV-35934/MDEV-33850 For Galera, create sequence with low cache got signal 6 error: [ERROR] WSREP: FSM: no such a transition REPLICATING -> COMMITTED
galera_wan : MDEV-35940 Unallowed state transition: donor -> synced in galera_wan
galera_vote_rejoin_ddl : MDEV-35940 Unallowed state transition: donor -> synced in galera_wan
MW-329 : MDEV-35951 Complete freeze during MW-329 test

View File

@@ -42,4 +42,3 @@ if ($node_4)
--connection $node_4
let $auto_increment_offset_node_4 = `SELECT @@global.auto_increment_offset`;
}

View File

@@ -25,4 +25,3 @@ while ($seqno <= $sr_max)
--inc $seqno
}

View File

@@ -118,4 +118,3 @@ SELECT * from t1;
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
DROP TABLE t1;
COMMIT;

View File

@@ -41,9 +41,9 @@ perl;
my $counter = 1000;
#my $found = false
while ($counter > 0) {
open(FILE, "$logfile") or die("Unable to open $logfile : $!\n");
my $new_sync_count = () = grep(/Synchronized with group/g,<FILE>);
close(FILE);

View File

@@ -9,14 +9,14 @@ if (!$wsrep_recover_additional)
}
--perl
use strict;
use strict;
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 '';
open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/galera_wsrep_start_position.inc") or die;
open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/galera_wsrep_start_position.inc") or die;
print FILE "--let \$galera_wsrep_start_position = $wsrep_start_position\n";
close FILE;
EOF

View File

@@ -24,6 +24,6 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`f1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
DROP TABLE t1;
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender .+ ?is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
connection node_1;
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=false';

View File

@@ -66,7 +66,7 @@ SHOW STATUS LIKE 'wsrep_desync_count';
Variable_name Value
wsrep_desync_count 0
SET @@global.wsrep_desync = 0;
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender .+ ?is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
connection node_1;
# Wait until both nodes are back to cluster
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=false';

View File

@@ -13,4 +13,4 @@ SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME
VARIABLE_VALUE
Primary
SET SESSION wsrep_sync_wait=DEFAULT;
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender .+ ?is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");

View File

@@ -0,0 +1,22 @@
connection node_2;
connection node_1;
connect con1,127.0.0.1,root,,test,$NODE_MYPORT_1;
connection node_1;
CALL mtr.add_suppression("CREATE TABLE isolation failure");
SET DEBUG_SYNC = 'wsrep_kill_thd_before_enter_toi SIGNAL may_kill WAIT_FOR continue';
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
connection con1;
SET DEBUG_SYNC = 'now WAIT_FOR may_kill';
SET DEBUG_SYNC = 'now SIGNAL continue';
connection node_1;
ERROR HY000: Lost connection to MySQL server during query
connection node_2;
SHOW TABLES LIKE 't1';
Tables_in_test (t1)
connection con1;
SHOW TABLES LIKE 't1';
Tables_in_test (t1)
SET DEBUG_SYNC = 'RESET';
disconnect con1;
disconnect node_2;
disconnect node_1;

View File

@@ -13,7 +13,7 @@ connection node_3;
SELECT @@wsrep_on;
@@wsrep_on
0
call mtr.add_suppression("Error reading packet from server: WSREP has not yet prepared node for application use (server_errno=1047)");
call mtr.add_suppression("Error reading packet from server: WSREP has not yet prepared node for application use \\(server_errno ?= ?1047\\)");
START SLAVE;
include/wait_for_slave_param.inc [Slave_IO_Running]
connection node_1;

View File

@@ -13,10 +13,13 @@ grant all on *.* to repl2@'%';
connect replica, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection replica;
connection node_2;
connection primary1;
connection primary2;
connection replica;
# Galera replica changing master to primary1
SET @@default_master_connection='stream2';
SET @@default_master_connection='stream1';
# Primary node changing master to primary2
SET @@default_master_connection='stream2';
START ALL SLAVES;
Warnings:
Note 1937 SLAVE 'stream1' started

View File

@@ -27,4 +27,5 @@ i
1
connection node_1;
DROP TABLE t1;
SET @@global.wsrep_mode=DEFAULT;
# End of tests.

View File

@@ -12,6 +12,7 @@ ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
connection replica1;
connection node_2;
connection primary2;
connection primary1;
connection replica1;
# Galera replica changing master to primary1
START SLAVE;

View File

@@ -1,5 +1,8 @@
connection node_2;
connection node_1;
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to ");
connection node_1;
connection node_2;
Setting SST method to mysqldump ...
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'");
call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos");
@@ -9,9 +12,6 @@ GRANT ALL PRIVILEGES ON *.* TO 'sst';
SET GLOBAL wsrep_sst_auth = 'sst:';
connection node_2;
SET GLOBAL wsrep_sst_method = 'mysqldump';
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to ");
connection node_1;
connection node_2;
Performing State Transfer on a server that has been shut down cleanly and restarted
connection node_1;
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;

View File

@@ -7,6 +7,7 @@ grant all on *.* to repl@'%';
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
connection node_1;
connection replica;
connection primary;
connection replica;
START SLAVE;
connection primary;

View File

@@ -47,6 +47,9 @@ select NEXT VALUE FOR Seq1_1;
NEXT VALUE FOR Seq1_1
4
connection node_1;
SHOW CREATE SEQUENCE Seq1_1;
Table Create Table
Seq1_1 CREATE SEQUENCE `Seq1_1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 nocache nocycle ENGINE=InnoDB
DROP SEQUENCE Seq1_1;
connection node_1;
CREATE TABLE t2 (d CHAR(1)KEY);

View File

@@ -0,0 +1,152 @@
connection node_2;
connection node_1;
connection node_1;
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, 0), (3, 0);
connection node_1;
START TRANSACTION;
INSERT INTO t1 VALUES (4, next value for s);
INSERT INTO t1 VALUES (5, next value for s);
INSERT INTO t1 VALUES (6, next value for s);
INSERT INTO t1 VALUES (7, next value for s);
INSERT INTO t1 VALUES (8, next value for s);
INSERT INTO t1 VALUES (9, next value for s);
INSERT INTO t1 VALUES (10, next value for s);
INSERT INTO t1 VALUES (11, next value for s);
INSERT INTO t1 VALUES (12, next value for s);
INSERT INTO t1 VALUES (13, next value for s);
INSERT INTO t1 VALUES (14, next value for s);
SELECT * FROM t1 WHERE f1 > 0 FOR UPDATE;
f1 f2
1 0
3 0
4 1
5 3
6 5
7 7
8 9
9 11
10 13
11 15
12 17
13 19
14 21
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET SESSION wsrep_sync_wait=0;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
connection node_2;
INSERT INTO t1 VALUES (2, 2);
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
connection node_1;
COMMIT;
connection node_1a;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'dbug=d,abort_trx_end';
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'signal=abort_trx_end';
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
connection node_1;
wsrep_local_replays
1
INSERT INTO t1 VALUES (22, next value for s);
INSERT INTO t1 VALUES (23, next value for s);
INSERT INTO t1 VALUES (24, next value for s);
INSERT INTO t1 VALUES (25, next value for s);
INSERT INTO t1 VALUES (26, next value for s);
INSERT INTO t1 VALUES (27, next value for s);
INSERT INTO t1 VALUES (28, next value for s);
INSERT INTO t1 VALUES (29, next value for s);
INSERT INTO t1 VALUES (30, next value for s);
INSERT INTO t1 VALUES (31, next value for s);
INSERT INTO t1 VALUES (32, next value for s);
INSERT INTO t1 VALUES (33, next value for s);
INSERT INTO t1 VALUES (34, next value for s);
INSERT INTO t1 VALUES (35, next value for s);
connection node_1;
SELECT * FROM t1;
f1 f2
1 0
2 2
3 0
4 1
5 3
6 5
7 7
8 9
9 11
10 13
11 15
12 17
13 19
14 21
22 31
23 33
24 35
25 37
26 39
27 41
28 43
29 45
30 47
31 49
32 51
33 53
34 55
35 57
SELECT LASTVAL(s);
LASTVAL(s)
57
connection node_2;
SELECT * FROM t1;
f1 f2
1 0
2 2
3 0
4 1
5 3
6 5
7 7
8 9
9 11
10 13
11 15
12 17
13 19
14 21
22 31
23 33
24 35
25 37
26 39
27 41
28 43
29 45
30 47
31 49
32 51
33 53
34 55
35 57
SELECT LASTVAL(s);
LASTVAL(s)
NULL
connection node_1;
SELECT NEXTVAL(s);
NEXTVAL(s)
59
connection node_2;
SELECT NEXTVAL(s);
NEXTVAL(s)
62
DROP SEQUENCE s;
DROP TABLE t1;

View File

@@ -0,0 +1,350 @@
connection node_2;
connection node_1;
connection node_1;
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
CREATE TABLE t1 (f1 INT PRIMARY KEY DEFAULT NEXTVAL(s), f2 INT) ENGINE=InnoDB;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_1;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
COMMIT;
connection node_2;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
COMMIT;
connection node_2a;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
COMMIT;
connection node_1a;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
COMMIT;
connection node_2;
SELECT LASTVAL(s);
LASTVAL(s)
40
connection node_1;
SELECT LASTVAL(s);
LASTVAL(s)
19
connection node_2a;
SELECT LASTVAL(s);
LASTVAL(s)
60
connection node_1a;
SELECT LASTVAL(s);
LASTVAL(s)
79
connection node_1;
SELECT * FROM t1;
f1 f2
1 1
3 1
5 1
7 1
9 1
11 1
13 1
15 1
17 1
19 1
22 1
24 1
26 1
28 1
30 1
32 1
34 1
36 1
38 1
40 1
42 1
44 1
46 1
48 1
50 1
52 1
54 1
56 1
58 1
60 1
61 1
63 1
65 1
67 1
69 1
71 1
73 1
75 1
77 1
79 1
connection node_2;
SELECT * FROM t1;
f1 f2
1 1
3 1
5 1
7 1
9 1
11 1
13 1
15 1
17 1
19 1
22 1
24 1
26 1
28 1
30 1
32 1
34 1
36 1
38 1
40 1
42 1
44 1
46 1
48 1
50 1
52 1
54 1
56 1
58 1
60 1
61 1
63 1
65 1
67 1
69 1
71 1
73 1
75 1
77 1
79 1
connection node_1;
DROP TABLE t1;
DROP SEQUENCE s;
connection node_1;
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
CREATE TABLE t1 (f1 INT PRIMARY KEY DEFAULT NEXTVAL(s), f2 INT) ENGINE=InnoDB;
connection node_1;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
ROLLBACK;
connection node_2;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
ROLLBACK;
connection node_2a;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
ROLLBACK;
connection node_1a;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
ROLLBACK;
connection node_2;
SELECT LASTVAL(s);
LASTVAL(s)
20
connection node_1;
SELECT LASTVAL(s);
LASTVAL(s)
19
connection node_2a;
SELECT LASTVAL(s);
LASTVAL(s)
40
connection node_1a;
SELECT LASTVAL(s);
LASTVAL(s)
39
connection node_1;
SELECT * FROM t1;
f1 f2
connection node_2;
SELECT * FROM t1;
f1 f2
connection node_1;
DROP TABLE t1;
DROP SEQUENCE s;
connection node_1;
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
CREATE TABLE t1 (f1 INT PRIMARY KEY DEFAULT NEXTVAL(s), f2 INT) ENGINE=InnoDB;
connection node_1;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
connection node_1a;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
connection node_2a;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
connection node_2;
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
connection node_1;
COMMIT;
connection node_1a;
ROLLBACK;
connection node_2;
COMMIT;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2a;
ROLLBACK;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
connection node_2;
SELECT LASTVAL(s);
LASTVAL(s)
40
connection node_1;
SELECT LASTVAL(s);
LASTVAL(s)
19
connection node_2a;
SELECT LASTVAL(s);
LASTVAL(s)
20
connection node_1a;
SELECT LASTVAL(s);
LASTVAL(s)
39
connection node_1;
SELECT * FROM t1;
f1 f2
1 1
3 1
5 1
7 1
9 1
11 1
13 1
15 1
17 1
19 1
connection node_2;
SELECT * FROM t1;
f1 f2
1 1
3 1
5 1
7 1
9 1
11 1
13 1
15 1
17 1
19 1
connection node_1;
DROP TABLE t1;
DROP SEQUENCE s;

View File

@@ -1,7 +1,7 @@
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2a;
connection node_2;
connection node_1;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2a;
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_3;

View File

@@ -2,6 +2,7 @@ connection node_2;
connection node_1;
connection node_1;
connection node_2;
connection node_2;
call mtr.add_suppression("WSREP: TO isolation failed for: ");
connection node_1;
call mtr.add_suppression("CREATE TABLE isolation failure");

View File

@@ -1,5 +1,8 @@
connection node_2;
connection node_1;
SELECT COUNT(*) `expect 0` FROM performance_schema.socket_instances WHERE EVENT_NAME LIKE '%wsrep%';
expect 0
0
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1

View File

@@ -1,5 +1,8 @@
connection node_2;
connection node_1;
SELECT COUNT(*) `expect 0` FROM performance_schema.socket_instances WHERE EVENT_NAME LIKE '%wsrep%';
expect 0
0
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1

View File

@@ -1,5 +1,8 @@
connection node_2;
connection node_1;
SELECT COUNT(*) `expect 0` FROM performance_schema.socket_instances WHERE EVENT_NAME LIKE '%wsrep%';
expect 0
0
connection node_1;
connection node_2;
connection node_1;

View File

@@ -52,8 +52,8 @@ EXPECT_0
0
DROP TABLE t1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=MyISAM;
CREATE TABLE t2 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES (1);
@@ -224,15 +224,26 @@ id b
DROP TRIGGER tr1;
DROP TRIGGER tr2;
DROP TRIGGER tr3;
DROP TABLE t1,t2;
DROP TABLE t1, t2;
CREATE TABLE t1 (a INT, b INT, UNIQUE(a)) ENGINE=MyISAM;
CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.a=1;
INSERT INTO t1 (a,b) VALUES (10,20);
connection node_2;
SELECT * from t1;
a b
1 20
connection node_1;
DROP TABLE t1;
#
# MDEV-11152: wsrep_replicate_myisam: SELECT gets replicated using TO
#
connection node_1;
CREATE TABLE t1 (i INT) ENGINE=INNODB;
CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE=INNODB;
INSERT INTO t1 VALUES(1);
SELECT * FROM t1;
i
1
DROP TABLE t1;
connection node_1;
SET GLOBAL wsrep_mode = DEFAULT;
connection node_2;
SET GLOBAL wsrep_mode = DEFAULT;

View File

@@ -2,7 +2,7 @@ connection node_2;
connection node_1;
CALL mtr.add_suppression("WSREP: Stray state UUID msg: ");
CALL mtr.add_suppression("WSREP: .*Sending JOIN failed: ");
CALL mtr.add_suppression("WSREP: .*sending install message failed: Socket is not connected");
CALL mtr.add_suppression("WSREP: .*sending install message failed: (Transport endpoint|Socket) is not connected");
CALL mtr.add_suppression("WSREP: .*There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4

View File

@@ -48,7 +48,7 @@ SET @@global.wsrep_desync = 0;
SET SESSION wsrep_sync_wait=15;
SHOW CREATE TABLE t1;
DROP TABLE t1;
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender .+ ?is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';

View File

@@ -3,6 +3,7 @@
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--exec rm -rf $MYSQLTEST_VARDIR/mysqld.2/data/GRA_*.log
@@ -30,5 +31,6 @@ SELECT * FROM t1;
DROP TABLE t1;
CALL mtr.add_suppression("Ignoring error 'Unknown table 'test\\.t1'' on query");
--connection node_2
CALL mtr.add_suppression("Error 'Unknown table 'test\\.t1'' on query");

View File

@@ -77,7 +77,7 @@ SET @@global.wsrep_desync = 0;
--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
--source include/wait_condition.inc
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender .+ ?is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
--connection node_1
--echo # Wait until both nodes are back to cluster

View File

@@ -33,5 +33,4 @@ INSERT INTO t2 VALUES (4);
INSERT INTO t2 VALUES (5);
--error ER_LOCK_DEADLOCK
CREATE VIEW v1 AS SELECT c1 FROM t1 WHERE c1 IN (SELECT a FROM t2) GROUP BY c1;
DROP TABLE t1,t2;

View File

@@ -39,6 +39,7 @@ while ($counter) {
--disable_result_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
START SLAVE;
--eval SELECT MASTER_GTID_WAIT('$gtid', 600)
--enable_result_log
--enable_query_log

View File

@@ -25,7 +25,6 @@ SET SESSION wsrep_sync_wait=DEFAULT;
--error ER_LOCK_WAIT_TIMEOUT
DELETE FROM mysql.wsrep_streaming_log;
#
# Reconnect to the cluster
#
@@ -36,6 +35,5 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
SET SESSION wsrep_sync_wait=DEFAULT;
--source include/auto_increment_offset_restore.inc
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender .+ ?is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");

View File

@@ -0,0 +1,43 @@
#
# MDEV-36116: TOI crashes in debug assert if executing thread is killed.
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug_sync.inc
--source include/have_debug.inc
--connect con1,127.0.0.1,root,,test,$NODE_MYPORT_1
# Start TOI operation and wait for the thread to be killed.
--connection node_1
CALL mtr.add_suppression("CREATE TABLE isolation failure");
--let $connection_id = `SELECT CONNECTION_ID()`
SET DEBUG_SYNC = 'wsrep_kill_thd_before_enter_toi SIGNAL may_kill WAIT_FOR continue';
--send
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
# Kill the thread and let it continue.
--connection con1
SET DEBUG_SYNC = 'now WAIT_FOR may_kill';
--disable_query_log
--eval KILL CONNECTION $connection_id
--enable_query_log
SET DEBUG_SYNC = 'now SIGNAL continue';
--connection node_1
--error 2013
--reap
# Verify no tables created on either nodes.
--connection node_2
SHOW TABLES LIKE 't1';
--connection con1
SHOW TABLES LIKE 't1';
# Cleanup
SET DEBUG_SYNC = 'RESET';
--disconnect con1
--source include/galera_end.inc

View File

@@ -4,7 +4,7 @@
--connection node_2
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3, MASTER_USE_GTID=slave_pos;
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3, master_use_gtid=slave_pos;
--enable_query_log
START SLAVE;

View File

@@ -2,15 +2,16 @@
# MW-284 Slave I/O retry on ER_COM_UNKNOWN_ERROR
#
--source include/have_log_bin.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_log_bin.inc
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use ");
call mtr.add_suppression("WSREP has not yet prepared node for application use");
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1, MASTER_USER='root', MASTER_CONNECT_RETRY=1;
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1, master_connect_retry=1;
--enable_query_log
--connection node_1
@@ -29,7 +30,7 @@ SET global wsrep_sync_wait=0;
--connection node_3
SELECT @@wsrep_on;
--sleep 1
call mtr.add_suppression("Error reading packet from server: WSREP has not yet prepared node for application use (server_errno=1047)");
call mtr.add_suppression("Error reading packet from server: WSREP has not yet prepared node for application use \\(server_errno ?= ?1047\\)");
START SLAVE;
--let $slave_param= Slave_IO_Running
--let $slave_param_value= Connecting

View File

@@ -41,17 +41,19 @@ grant all on *.* to repl2@'%';
--let $node_1 = replica
--let $node_2 = node_2
--let $node_3 = primary1
--let $node_4 = primary2
--source include/auto_increment_offset_save.inc
--connection replica
--echo # Galera replica changing master to primary1
--disable_query_log
SET @@default_master_connection='stream1';
--disable_query_log
--eval CHANGE MASTER 'stream1' TO master_host='127.0.0.1', master_user='repl', master_password='repl', master_port=$NODE_MYPORT_3, master_use_gtid=slave_pos;
--enable_query_log
SET @@default_master_connection='stream2';
--echo # Primary node changing master to primary2
SET @@default_master_connection='stream2';
--disable_query_log
--eval CHANGE MASTER 'stream2' TO master_host='127.0.0.1', master_user='repl2', master_password='repl2', master_port=$NODE_MYPORT_4, master_use_gtid=slave_pos;
--enable_query_log

View File

@@ -17,9 +17,10 @@
--connection node_2
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_4, MASTER_USER='root';
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_4;
--enable_query_log
START SLAVE;
SET SESSION wsrep_sync_wait = 0;
--connection node_4

View File

@@ -38,8 +38,6 @@ SELECT * FROM t1;
--connection node_1
DROP TABLE t1;
--disable_query_log
SET @@global.wsrep_mode=DEFAULT;
--enable_query_log
--echo # End of tests.

View File

@@ -45,6 +45,7 @@ ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
--let $node_1 = replica1
--let $node_2 = node_2
--let $node_3 = primary2
--let $node_4 = primary1
--source include/auto_increment_offset_save.inc
--connection replica1

View File

@@ -13,7 +13,7 @@
--source include/force_restart.inc
# Make sure that the test is operating on the right version of galera library.
--let $galera_version=26.4.11
--let $galera_version=26.4.21
source ../wsrep/include/check_galera_version.inc;
# Global Variables

View File

@@ -0,0 +1,9 @@
!include ../galera_2nodes.cnf
[mysqld.1]
auto_increment_offset=1
auto_increment_increment=1
[mysqld.2]
auto_increment_offset=2
auto_increment_increment=1

View File

@@ -3,6 +3,7 @@
# PXC-391
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_query_cache.inc
--disable_warnings
@@ -72,7 +73,6 @@ SELECT COUNT(*) AS EXPECT_10 FROM x1;
SELECT COUNT(*) AS EXPECT_10000 FROM t2;
SELECT COUNT(*) AS EXPECT_10 FROM x2;
--connection node_1
DROP TABLE t1, t2, x1, x2;
CREATE TABLE t1 (f1 INTEGER);
@@ -144,4 +144,3 @@ DROP TABLE t1, t2, x1, x2;
--disable_query_log
SET GLOBAL wsrep_mode = DEFAULT;
--enable_query_log

View File

@@ -1,7 +1,7 @@
!include ../galera_2nodes.cnf
[mysqld.1]
wsrep_provider_options='gcache.recover=yes;pc.ignore_sb=true;repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S'
wsrep_provider_options='gcache.recover=yes;gcache.size=128M;pc.ignore_sb=true;repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;pc.wait_prim_timeout=PT60S'
[mysqld.2]
wsrep_provider_options='gcache.recover=yes;repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S'
wsrep_provider_options='gcache.recover=yes;gcache.size=128M;repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;pc.wait_prim_timeout=PT60S'

View File

@@ -3,6 +3,7 @@
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;

View File

@@ -3,7 +3,7 @@
[mysqld.1]
max_allowed_packet=10M
innodb_log_file_size=220M
wsrep_provider_options='gcache.recover=yes;pc.ignore_sb=true;repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S;gcache.size=10M'
wsrep_provider_options='gcache.recover=yes;gcache.size=10M;pc.ignore_sb=true;repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;pc.wait_prim_timeout=PT60S'
[mysqld.2]
wsrep_provider_options='gcache.recover=yes;pc.ignore_sb=true;repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S;gcache.size=10M'
wsrep_provider_options='gcache.recover=yes;gcache.size=10M;pc.ignore_sb=true;repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;pc.wait_prim_timeout=PT60S'

View File

@@ -3,6 +3,7 @@
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
SET SESSION wsrep_sync_wait = 0;

View File

@@ -2,8 +2,8 @@
[mysqld.1]
innodb_log_file_size=220M
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.recover=yes;pc.ignore_sb=true;'
wsrep_provider_options='gcache.recover=yes;gcache.size=128M;pc.ignore_sb=true;repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;pc.wait_prim_timeout=PT60S'
[mysqld.2]
innodb_log_file_size=220M
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.recover=yes;pc.ignore_sb=true;'
wsrep_provider_options='gcache.recover=yes;gcache.size=128M;pc.ignore_sb=true;repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;pc.wait_prim_timeout=PT60S'

View File

@@ -5,6 +5,7 @@
--source include/galera_cluster.inc
--source include/big_test.inc
--source include/have_innodb.inc
--source include/have_log_bin.inc
SET SESSION wsrep_sync_wait = 0;

View File

@@ -13,6 +13,7 @@
# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
# we open the node_3 connection here
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--echo #Connection 2
--connection node_2
--disable_query_log
@@ -30,6 +31,7 @@ INSERT INTO t2 VALUES(3,33);
SELECT @@global.gtid_binlog_state;
--source include/save_master_gtid.inc
--echo #Connection 2
--connection node_2
--source include/sync_with_master_gtid.inc
@@ -39,6 +41,7 @@ INSERT INTO t2 VALUES(4,44);
INSERT INTO t2 VALUES(5,55);
INSERT INTO t2 VALUES(6,66);
SELECT @@global.gtid_binlog_state;
--echo #Connection 1
--connection node_1
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME= 't2';
@@ -60,6 +63,7 @@ INSERT INTO t1 VALUES ('node1_committed_before');
INSERT INTO t1 VALUES ('node1_committed_before');
COMMIT;
--source include/save_master_gtid.inc
--echo #Connection 2
--connection node_2
--source include/sync_with_master_gtid.inc
@@ -68,6 +72,7 @@ START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT;
--echo #Connection 1
--connection node_1
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME= 't1';
@@ -77,10 +82,12 @@ COMMIT;
--let $node_1= node_1
--let $node_2= node_2
--source include/auto_increment_offset_save.inc
--echo #Connection 2
--connection node_2
--echo Shutting down server ...
--source include/shutdown_mysqld.inc
--echo #Connection 1
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
@@ -90,6 +97,7 @@ START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_during');
INSERT INTO t1 VALUES ('node1_committed_during');
COMMIT;
--echo #Connection 2
--connection node_2
--echo Starting server ...
@@ -103,11 +111,13 @@ START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_after');
INSERT INTO t1 VALUES ('node2_committed_after');
COMMIT;
--echo #Connection 1
--connection node_1
--let $wait_condition = SELECT COUNT(*) = 8 FROM t1;
--source include/wait_condition.inc
Select * from t1 order by f1;
--echo #Connection 2
--connection node_2
Select * from t1 order by f1;
@@ -153,12 +163,14 @@ start slave;
INSERT INTO t1 VALUES ('node2_slave_started');
SELECT count(*) from t1;
SELECT @@global.gtid_binlog_state;
--echo #Connection 1
--connection node_1
--let $wait_condition = SELECT COUNT(*) = 12 FROM t1;
--source include/wait_condition.inc
SELECT count(*) from t1;
SELECT @@global.gtid_binlog_state;
--echo #Connection 3
--connection node_3
DROP TABLE t2,t1;
@@ -173,10 +185,12 @@ DROP TABLE t2,t1;
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
--source include/wait_condition.inc
--echo #Connection 1
--connection node_1
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
--echo #Connection 2
--connection node_2
STOP SLAVE;
@@ -194,6 +208,7 @@ set global gtid_slave_pos="";
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
--echo #Connection 3
--connection node_3
reset master;

View File

@@ -2,14 +2,14 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source suite/galera/include/galera_sst_set_mysqldump.inc
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to ");
--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
--source suite/galera/include/galera_sst_set_mysqldump.inc
# mysql-wsrep#33 - nnoDB: Failing assertion: xid_seqno > trx_sys_cur_xid_seqno in trx_sys_update_wsrep_checkpoint with mysqldump IST
# --source suite/galera/include/galera_st_disconnect_slave.inc

View File

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

View File

@@ -1,5 +1,6 @@
--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
# Save original auto_increment_offset values.
--let $node_1=node_1

View File

@@ -29,7 +29,7 @@ call mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
--connection node_3
--disable_query_log
--eval CHANGE MASTER TO master_host='127.0.0.1', master_user='root', MASTER_PORT=$NODE_MYPORT_1, master_use_gtid=current_pos
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1, master_use_gtid=current_pos;
--enable_query_log
START SLAVE;
--source include/wait_for_slave_to_start.inc

View File

@@ -40,6 +40,7 @@ ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
--let $node_1 = node_1
--let $node_2 = replica
--let $node_3 = primary
--source include/auto_increment_offset_save.inc
--connection replica

View File

@@ -3,6 +3,7 @@
--source include/have_sequence.inc
--source include/have_aria.inc
--disable_ps2_protocol
#
# MDEV-19353 : Alter Sequence do not replicate to another nodes with in Galera Cluster
#
@@ -47,6 +48,7 @@ SHOW CREATE SEQUENCE Seq1_1;
select NEXT VALUE FOR Seq1_1;
--connection node_1
SHOW CREATE SEQUENCE Seq1_1;
DROP SEQUENCE Seq1_1;
#

View File

@@ -0,0 +1,9 @@
!include ../galera_2nodes.cnf
[mysqld.1]
auto-increment-increment=2
auto-increment-offset=1
[mysqld.2]
auto-increment-increment=2
auto-increment-offset=2

View File

@@ -0,0 +1,5 @@
[binlogon]
log-bin
log-slave-updates
[binlogoff]

View File

@@ -0,0 +1,115 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/galera_have_debug_sync.inc
--disable_ps2_protocol
#
# We create InnoDB seqeuence with small cache that is then
# used as default value for column in table.
#
--connection node_1
--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, 0), (3, 0);
--connection node_1
START TRANSACTION;
INSERT INTO t1 VALUES (4, next value for s); # No conflict in cert
INSERT INTO t1 VALUES (5, next value for s); # No conflict in cert
INSERT INTO t1 VALUES (6, next value for s); # No conflict in cert
INSERT INTO t1 VALUES (7, next value for s); # No conflict in cert
INSERT INTO t1 VALUES (8, next value for s); # No conflict in cert
INSERT INTO t1 VALUES (9, next value for s); # No conflict in cert
INSERT INTO t1 VALUES (10, next value for s); # No conflict in cert
INSERT INTO t1 VALUES (11, next value for s); # No conflict in cert
INSERT INTO t1 VALUES (12, next value for s); # No conflict in cert
INSERT INTO t1 VALUES (13, next value for s); # No conflict in cert
INSERT INTO t1 VALUES (14, next value for s); # No conflict in cert
SELECT * FROM t1 WHERE f1 > 0 FOR UPDATE; # Should cause GAP lock between 1 and 3
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
SET SESSION wsrep_sync_wait=0;
# Block the applier on node #1 and issue a conflicting update on node #2
--let $galera_sync_point = apply_monitor_slave_enter_sync
--source include/galera_set_sync_point.inc
#
# Send conflicting INSERT
#
--connection node_2
INSERT INTO t1 VALUES (2, 2); # This should BF abort because of GAP lock
--connection node_1a
--source include/galera_wait_sync_point.inc
--source include/galera_clear_sync_point.inc
# Block the commit, send the COMMIT and wait until it gets blocked
--let $galera_sync_point = commit_monitor_master_enter_sync
--source include/galera_set_sync_point.inc
--connection node_1
--send COMMIT
--connection node_1a
--let $galera_sync_point = apply_monitor_slave_enter_sync commit_monitor_master_enter_sync
--source include/galera_wait_sync_point.inc
--source include/galera_clear_sync_point.inc
--let $galera_sync_point = abort_trx_end
--source include/galera_set_sync_point.inc
--let $galera_sync_point = apply_monitor_slave_enter_sync
--source include/galera_signal_sync_point.inc
--let $galera_sync_point = abort_trx_end commit_monitor_master_enter_sync
--source include/galera_wait_sync_point.inc
# Let the transactions proceed
--source include/galera_clear_sync_point.inc
--let $galera_sync_point = abort_trx_end
--source include/galera_signal_sync_point.inc
--let $galera_sync_point = commit_monitor_master_enter_sync
--source include/galera_signal_sync_point.inc
# Commit succeeds
--connection node_1
--reap
# wsrep_local_replays has increased by 1
--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
--disable_query_log
--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays;
--enable_query_log
INSERT INTO t1 VALUES (22, next value for s);
INSERT INTO t1 VALUES (23, next value for s);
INSERT INTO t1 VALUES (24, next value for s);
INSERT INTO t1 VALUES (25, next value for s);
INSERT INTO t1 VALUES (26, next value for s);
INSERT INTO t1 VALUES (27, next value for s);
INSERT INTO t1 VALUES (28, next value for s);
INSERT INTO t1 VALUES (29, next value for s);
INSERT INTO t1 VALUES (30, next value for s);
INSERT INTO t1 VALUES (31, next value for s);
INSERT INTO t1 VALUES (32, next value for s);
INSERT INTO t1 VALUES (33, next value for s);
INSERT INTO t1 VALUES (34, next value for s);
INSERT INTO t1 VALUES (35, next value for s);
--connection node_1
SELECT * FROM t1;
SELECT LASTVAL(s);
--connection node_2
SELECT * FROM t1;
SELECT LASTVAL(s);
--connection node_1
SELECT NEXTVAL(s);
--connection node_2
SELECT NEXTVAL(s);
DROP SEQUENCE s;
DROP TABLE t1;

View File

@@ -0,0 +1,9 @@
!include ../galera_2nodes.cnf
[mysqld.1]
auto-increment-increment=2
auto-increment-offset=1
[mysqld.2]
auto-increment-increment=2
auto-increment-offset=2

View File

@@ -0,0 +1,5 @@
[binlogon]
log-bin
log-slave-updates
[binlogoff]

View File

@@ -0,0 +1,255 @@
--source include/galera_cluster.inc
--source include/have_sequence.inc
--disable_ps2_protocol
#
# Case 1: Separate transactions from few connections
#
--connection node_1
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
CREATE TABLE t1 (f1 INT PRIMARY KEY DEFAULT NEXTVAL(s), f2 INT) ENGINE=InnoDB;
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connection node_1
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
COMMIT;
--connection node_2
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
COMMIT;
--connection node_2a
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
COMMIT;
--connection node_1a
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
COMMIT;
--connection node_2
SELECT LASTVAL(s);
--connection node_1
SELECT LASTVAL(s);
--connection node_2a
SELECT LASTVAL(s);
--connection node_1a
SELECT LASTVAL(s);
--connection node_1
SELECT * FROM t1;
--connection node_2
SELECT * FROM t1;
--connection node_1
DROP TABLE t1;
DROP SEQUENCE s;
#
# Case 2: All rollback
#
--connection node_1
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
CREATE TABLE t1 (f1 INT PRIMARY KEY DEFAULT NEXTVAL(s), f2 INT) ENGINE=InnoDB;
--connection node_1
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
ROLLBACK;
--connection node_2
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
ROLLBACK;
--connection node_2a
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
ROLLBACK;
--connection node_1a
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
ROLLBACK;
--connection node_2
SELECT LASTVAL(s);
--connection node_1
SELECT LASTVAL(s);
--connection node_2a
SELECT LASTVAL(s);
--connection node_1a
SELECT LASTVAL(s);
--connection node_1
SELECT * FROM t1;
--connection node_2
SELECT * FROM t1;
--connection node_1
DROP TABLE t1;
DROP SEQUENCE s;
#
# Case 3: Mixed transactions
#
--connection node_1
CREATE SEQUENCE s INCREMENT=0 CACHE=5 ENGINE=InnoDB;
CREATE TABLE t1 (f1 INT PRIMARY KEY DEFAULT NEXTVAL(s), f2 INT) ENGINE=InnoDB;
--connection node_1
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
--connection node_1a
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
--connection node_2a
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
--connection node_2
BEGIN;
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
INSERT INTO t1(f2) values (1);
--connection node_1
COMMIT;
--connection node_1a
ROLLBACK;
--connection node_2
--error ER_LOCK_DEADLOCK
COMMIT;
--connection node_2a
--error ER_LOCK_DEADLOCK
ROLLBACK;
--connection node_2
SELECT LASTVAL(s);
--connection node_1
SELECT LASTVAL(s);
--connection node_2a
SELECT LASTVAL(s);
--connection node_1a
SELECT LASTVAL(s);
--connection node_1
SELECT * FROM t1;
--connection node_2
SELECT * FROM t1;
--connection node_1
DROP TABLE t1;
DROP SEQUENCE s;

View File

@@ -6,6 +6,7 @@
# or rollback and replay (depending on the nature of lock conflict).
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_log_bin.inc
--source include/have_debug.inc
@@ -13,9 +14,7 @@
--source include/galera_have_debug_sync.inc
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connection node_2a
--source include/galera_cluster.inc
ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;

View File

@@ -13,6 +13,7 @@
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
--connection node_2
call mtr.add_suppression("WSREP: TO isolation failed for: ");
--connection node_1

View File

@@ -9,6 +9,10 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
--source include/have_perfschema.inc
# Verify that SSL is handled by the provider.
SELECT COUNT(*) `expect 0` FROM performance_schema.socket_instances WHERE EVENT_NAME LIKE '%wsrep%';
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';

View File

@@ -8,6 +8,10 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
--source include/have_perfschema.inc
# Verify that SSL is handled by the provider.
SELECT COUNT(*) `expect 0` FROM performance_schema.socket_instances WHERE EVENT_NAME LIKE '%wsrep%';
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';

View File

@@ -10,6 +10,9 @@
--source include/have_openssl.inc
--source include/force_restart.inc
# Verify that SSL is handled by the provider.
SELECT COUNT(*) `expect 0` FROM performance_schema.socket_instances WHERE EVENT_NAME LIKE '%wsrep%';
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2

View File

@@ -3,6 +3,7 @@
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug.inc
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;

View File

@@ -5,7 +5,6 @@
--let $node_1 = node_1
--let $node_2 = node_2
--source ../galera/include/auto_increment_offset_save.inc
#

View File

@@ -77,8 +77,8 @@ DROP TABLE t1;
#
--connection node_1
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=MyISAM;
CREATE TABLE t2 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES (1);
@@ -126,6 +126,7 @@ INSERT INTO t1 VALUES (1);
--connection node_1
COMMIT;
DROP TABLE t1, t2;
#
# Test prepared staments
#
@@ -200,21 +201,28 @@ SELECT * FROM t2 ORDER BY id;
DROP TRIGGER tr1;
DROP TRIGGER tr2;
DROP TRIGGER tr3;
DROP TABLE t1,t2;
DROP TABLE t1, t2;
CREATE TABLE t1 (a INT, b INT, UNIQUE(a)) ENGINE=MyISAM;
CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.a=1;
INSERT INTO t1 (a,b) VALUES (10,20);
--connection node_2
SELECT * from t1;
--connection node_1
DROP TABLE t1;
--echo #
--echo # MDEV-11152: wsrep_replicate_myisam: SELECT gets replicated using TO
--echo #
--connection node_1
CREATE TABLE t1 (i INT) ENGINE=INNODB;
CREATE TABLE t1 (i INT NOT NULL PRIMARY KEY) ENGINE=INNODB;
INSERT INTO t1 VALUES(1);
# This command should not get replicated.
SELECT * FROM t1;
DROP TABLE t1;
--connection node_1
--disable_query_log
SET GLOBAL wsrep_mode = DEFAULT;
--connection node_2
SET GLOBAL wsrep_mode = DEFAULT;
--enable_query_log

View File

@@ -12,7 +12,7 @@
CALL mtr.add_suppression("WSREP: Stray state UUID msg: ");
CALL mtr.add_suppression("WSREP: .*Sending JOIN failed: ");
CALL mtr.add_suppression("WSREP: .*sending install message failed: Socket is not connected");
CALL mtr.add_suppression("WSREP: .*sending install message failed: (Transport endpoint|Socket) is not connected");
CALL mtr.add_suppression("WSREP: .*There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';

View File

@@ -20,7 +20,7 @@ LOCK TABLE t2 WRITE;
--connection node_2
SET SESSION wsrep_sync_wait = 0;
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock%' OR STATE LIKE 'Waiting to execute in isolation%';
--let $wait_condition = SELECT COUNT(*) BETWEEN 1 AND 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock%' OR STATE LIKE 'Waiting to execute in isolation%';
--let $wait_condition_on_error_output = SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
--source include/wait_condition_with_debug_and_kill.inc

View File

@@ -2,8 +2,6 @@ connection node_2;
connection node_1;
connection node_1;
connection node_2;
connection node_1;
connection node_2;
connection node_3;
Killing node #3 to free ports for garbd ...
connection node_3;
@@ -26,8 +24,8 @@ DROP TABLE t1;
Restarting node #3 to satisfy MTR's end-of-test checks
connection node_3;
connection node_1;
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
connection node_2;
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
connection node_3;
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");

View File

@@ -1,7 +1,6 @@
connection node_2;
connection node_1;
connection node_1;
connection node_1;
connection node_2;
connection node_3;
connection node_1;
@@ -12,7 +11,6 @@ CREATE TABLE t1 (f1 INTEGER, f2 varchar(1024)) Engine=InnoDB;
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
INSERT INTO t1 (f2) SELECT REPEAT('x', 1024) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
connection node_2;
Killing node #3 to free ports for garbd ...
connection node_3;
connection node_1;
@@ -34,8 +32,8 @@ Restarting node #3 to satisfy MTR's end-of-test checks
connection node_3;
connection node_1;
connection node_1;
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
connection node_2;
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
connection node_3;
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");

View File

@@ -57,7 +57,6 @@ Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
CALL mtr.add_suppression("is inconsistent with group");
connection node_3;
SHOW CREATE TABLE t1;
Table Create Table
@@ -80,4 +79,5 @@ CALL mtr.add_suppression("Native table .* has the wrong structure");
CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist");
connection node_2;
# restart
CALL mtr.add_suppression("WSREP: .+ is inconsistent with group");
connection node_1;

View File

@@ -9,14 +9,9 @@
--source include/big_test.inc
# Save galera ports
--connection node_1
--source suite/galera/include/galera_base_port.inc
--let $NODE_GALERAPORT_1 = $_NODE_GALERAPORT
--connection node_2
--source suite/galera/include/galera_base_port.inc
--let $NODE_GALERAPORT_2 = $_NODE_GALERAPORT
--let $galera_connection_name = node_3
--let $galera_server_number = 3
--source include/galera_connect.inc
@@ -81,10 +76,10 @@ let $restart_noprint=2;
# Workaround for galera#101
--connection node_1
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
--connection node_2
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
--connection node_3
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");

View File

@@ -10,11 +10,9 @@
--source include/have_debug.inc
--source include/have_debug_sync.inc
--connection node_1
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--let $node_3=node_3
# Save galera ports
--source suite/galera/include/galera_base_port.inc
--let $NODE_GALERAPORT_1 = $_NODE_GALERAPORT
--let $galera_connection_name = node_3
--let $galera_server_number = 3
@@ -22,12 +20,13 @@
--source suite/galera/include/galera_base_port.inc
--let $NODE_GALERAPORT_3 = $_NODE_GALERAPORT
# 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
# Save galera ports
--connection node_1
--source suite/galera/include/galera_base_port.inc
--let $NODE_GALERAPORT_1 = $_NODE_GALERAPORT
--let $datadir= `SELECT @@datadir`
--let $innodb_max_dirty_pages_pct = `SELECT @@innodb_max_dirty_pages_pct`
@@ -41,10 +40,6 @@ CREATE TABLE t1 (f1 INTEGER, f2 varchar(1024)) Engine=InnoDB;
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
INSERT INTO t1 (f2) SELECT REPEAT('x', 1024) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
--connection node_2
--source suite/galera/include/galera_base_port.inc
--let $NODE_GALERAPORT_2 = $_NODE_GALERAPORT
--echo Killing node #3 to free ports for garbd ...
--connection node_3
@@ -124,13 +119,16 @@ let $restart_noprint=2;
--eval SET GLOBAL innodb_max_dirty_pages_pct_lwm = $innodb_max_dirty_pages_pct_lwm
--enable_query_log
# Restore original auto_increment_offset values.
--source ../galera/include/auto_increment_offset_restore.inc
# Workaround for galera#101
--connection node_1
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
--connection node_2
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
--connection node_3
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)");
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0( \\(.*\\))? is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");

View File

@@ -17,7 +17,6 @@ call mtr.add_suppression("WSREP: gcs/src/gcs_core\\.cpp:core_handle_uuid_msg\\(\
--let $node_1 = node_1
--let $node_2 = node_2
--let $node_3 = node_3
--source ../galera/include/auto_increment_offset_save.inc
--connection node_1

View File

@@ -14,7 +14,6 @@
--let $node_1 = node_1
--let $node_2 = node_2
--let $node_3 = node_3
--source ../galera/include/auto_increment_offset_save.inc
--connection node_1

View File

@@ -69,7 +69,6 @@ SHOW CREATE TABLE t1;
--connection node_2
SHOW CREATE TABLE t1;
CALL mtr.add_suppression("is inconsistent with group");
--connection node_3
SHOW CREATE TABLE t1;
@@ -83,6 +82,7 @@ CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'PRIMARY'; check that col
# restart node so we don't fail on WSREP_START_POSITION internal check
--source include/restart_mysqld.inc
--source include/wait_until_connected_again.inc
CALL mtr.add_suppression("WSREP: .+ is inconsistent with group");
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';

View File

@@ -9,6 +9,7 @@
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_1
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2

View File

@@ -10,6 +10,7 @@
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_1
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2

View File

@@ -2,7 +2,7 @@ connection node_2;
connection node_1;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_1;
connection node_2;
@@ -74,15 +74,15 @@ connection node_3a;
SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_sync_wait = DEFAULT;
connection node_1a;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
EXPECT_0
0
connection node_2a;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
EXPECT_0
0
connection node_3a;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
EXPECT_0
0
connection node_1;

View File

@@ -5,6 +5,7 @@
--source include/galera_cluster.inc
--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

View File

@@ -7,6 +7,7 @@
--source include/force_restart.inc
--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

View File

@@ -21,7 +21,7 @@
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3
# Save original auto_increment_offset values.
@@ -158,15 +158,15 @@ SET SESSION wsrep_sync_wait = DEFAULT;
--connection node_1a
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
--source include/wait_condition.inc
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
--connection node_2a
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
--source include/wait_condition.inc
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
--connection node_3a
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log
--source include/wait_condition.inc
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;
--connection node_1

View File

@@ -6,6 +6,7 @@
# Test the effect of gmcast.isolate on master during an SR transaction
#
--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

View File

@@ -9,6 +9,7 @@
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_1
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2

View File

@@ -6,6 +6,7 @@
--source include/have_innodb.inc
--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

View File

@@ -9,6 +9,7 @@
--source include/have_innodb.inc
--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

View File

@@ -8,6 +8,7 @@
--source include/have_innodb.inc
--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

View File

@@ -9,6 +9,7 @@
--source include/force_restart.inc
--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

View File

@@ -7,6 +7,7 @@
--source include/have_innodb.inc
--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

View File

@@ -37,9 +37,6 @@ f1 f2
SET SESSION wsrep_trx_fragment_size = 10000;
START TRANSACTION;
INSERT INTO t1 VALUE (10, 'node1');
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
COUNT(*)
0
connection node_1a;
INSERT INTO t1 VALUES(15, 'node2');
connection node_1;

View File

@@ -2,6 +2,7 @@ connection node_2;
connection node_1;
connection node_1;
connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_trx_fragment_size = 1;
SET AUTOCOMMIT=OFF;

View File

@@ -61,7 +61,6 @@ SET SESSION wsrep_trx_fragment_size = 10000;
START TRANSACTION;
INSERT INTO t1 VALUE (10, 'node1');
SELECT COUNT(*) FROM mysql.wsrep_streaming_log;
--connection node_1a
INSERT INTO t1 VALUES(15, 'node2');

View File

@@ -11,6 +11,8 @@
--let $node_2=node_2
--source ../../galera/include/auto_increment_offset_save.inc
--connection node_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_trx_fragment_size = 1;
SET AUTOCOMMIT=OFF;
@@ -26,7 +28,6 @@ INSERT INTO t1 VALUES (5);
--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log;
--source include/wait_condition.inc
#
# Kill the entire cluster and restart
#

View File

@@ -8,6 +8,7 @@
--let $node_1=node_1
--let $node_2=node_2
--source ../galera/include/auto_increment_offset_save.inc
--connection node_2
call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: ");

Some files were not shown because too many files have changed in this diff Show More