summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera_sr/t/galera_var_ignore_apply_errors_sr.test
blob: ea40f58db73a0d7b27b6c6805f0b3030accbfc32 (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
#
# Test option wsrep_ignore_apply_errors
#

--source include/galera_cluster.inc
--source include/have_innodb.inc

#
# Delete row that does not exist using SR transaction
#

--connection node_2
SET GLOBAL wsrep_ignore_apply_errors = 2;

--connection node_1
CREATE TABLE t1 (f1 INTEGER);
INSERT INTO t1 VALUES (2);
SET GLOBAL wsrep_on = OFF;
INSERT INTO t1 VALUES (1);
SET GLOBAL wsrep_on = ON;
SET SESSION wsrep_trx_fragment_size = 1;
START TRANSACTION;
INSERT INTO t1 VALUES (3);
DELETE FROM t1 WHERE f1 = 1;
DELETE FROM t1 WHERE f1 = 2;
COMMIT;

--connection node_1
SELECT COUNT(*) = 1 FROM t1;
--connection node_2
SELECT COUNT(*) = 1 FROM t1;

SET SESSION wsrep_trx_fragment_size = 0;
DROP TABLE t1;

SET GLOBAL wsrep_ignore_apply_errors = 7;
CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows event");
CALL mtr.add_suppression("Can't find record in 't1'");