summaryrefslogtreecommitdiff
path: root/mysql-test/suite/wsrep/t/wsrep_rpl.test
blob: 1cc7214325dc0c83dbab697636a08dd0291649a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
--source include/have_wsrep.inc
--source include/have_innodb.inc
--source include/master-slave.inc

--echo #
--echo # MDEV-10714: Could not execute Delete_rows event on table;
--echo # wsrep_max_ws_rows exceeded. Error_Code 1180
--echo #
# Save wsrep_max_ws_rows on master and slave.
connection master;
let $wsrep_max_ws_rows_master = `SELECT @@GLOBAL.wsrep_max_ws_rows`;
connection slave;
let $wsrep_max_ws_rows_slave = `SELECT @@GLOBAL.wsrep_max_ws_rows`;

connection master;
CREATE TABLE t1(i INT) ENGINE = INNODB;

# Setting wsrep_max_ws_rows should have no impact on replication master
# unless its a cluster node.
SET @@GLOBAL.wsrep_max_ws_rows = 1;
INSERT INTO t1 VALUES(1), (2);

sync_slave_with_master;
SELECT COUNT(*) = 2 FROM t1;

connection slave;
# Setting wsrep_max_ws_rows should have no impact on replication slave
# unless its a cluster node.
SET @@GLOBAL.wsrep_max_ws_rows = 1;

connection master;
DELETE FROM t1;

sync_slave_with_master;
SELECT COUNT(*) = 0 FROM t1;

connection master;
DROP TABLE t1;

sync_slave_with_master;

# Restore wsrep_max_ws_rows on master and slave
connection master;
eval SET @@GLOBAL.wsrep_max_ws_rows = $wsrep_max_ws_rows_master;
connection slave;
eval SET @@GLOBAL.wsrep_max_ws_rows = $wsrep_max_ws_rows_slave;

--source include/rpl_end.inc
--echo # End of test.