connection node_2;
connection node_1;
connection node_2;
SET GLOBAL wsrep_ignore_apply_errors = 1;
connection node_1;
SET GLOBAL wsrep_on = OFF;
CREATE TABLE t1 (f1 INTEGER);
SET GLOBAL wsrep_on = ON;
DROP TABLE t1;
connection node_2;
SHOW TABLES;
Tables_in_test
connection node_1;
SET GLOBAL wsrep_on = OFF;
CREATE SCHEMA s1;
SET GLOBAL wsrep_on = ON;
DROP SCHEMA s1;
connection node_2;
SHOW SCHEMAS;
Database
information_schema
mtr
mysql
performance_schema
sys
test
connection node_1;
CREATE TABLE t1 (f1 INTEGER);
SET GLOBAL wsrep_on = OFF;
CREATE INDEX idx1 ON t1 (f1);
SET GLOBAL wsrep_on = ON;
DROP INDEX idx1 ON t1;
connection node_2;
SHOW CREATE TABLE t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
DROP TABLE t1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER);
SET GLOBAL wsrep_on = OFF;
CREATE INDEX idx1 ON t1 (f1);
SET GLOBAL wsrep_on = ON;
ALTER TABLE t1 DROP INDEX idx1;
connection node_2;
SHOW CREATE TABLE t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
DROP TABLE t1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER);
SET GLOBAL wsrep_on = OFF;
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
SET GLOBAL wsrep_on = ON;
ALTER TABLE t1 DROP COLUMN f2;
connection node_2;
SHOW CREATE TABLE t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
DROP TABLE t1;
connection node_2;
SET GLOBAL wsrep_ignore_apply_errors = 2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER);
SET GLOBAL wsrep_on = OFF;
INSERT INTO t1 VALUES (1);
SET GLOBAL wsrep_on = ON;
DELETE FROM t1 WHERE f1 = 1;
SELECT COUNT(*) AS expect_0 FROM t1;
expect_0
0
connection node_2;
SELECT COUNT(*) AS expect_0 FROM t1;
expect_0
0
DROP TABLE t1;
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;
START TRANSACTION;
INSERT INTO t1 VALUES (3);
DELETE FROM t1 WHERE f1 = 1;
DELETE FROM t1 WHERE f1 = 2;
COMMIT;
SELECT COUNT(*) AS expect_1 FROM t1;
expect_1
1
connection node_2;
SELECT COUNT(*) AS expect_1 FROM t1;
expect_1
1
DROP TABLE t1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
connection node_2;
SET SESSION wsrep_on = OFF;
DELETE FROM t1 WHERE f1 = 3;
SET SESSION wsrep_on = ON;
connection node_1;
DELETE FROM t1;
SELECT COUNT(*) AS expect_0 FROM t1;
expect_0
0
connection node_2;
SELECT VARIABLE_VALUE expect_Primary FROM performance_schema.global_status WHERE VARIABLE_NAME = 'wsrep_cluster_status';
expect_Primary
Primary
SELECT COUNT(*) AS expect_0 FROM t1;
expect_0
0
DROP TABLE t1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
connection node_2;
SET SESSION wsrep_on = OFF;
DELETE FROM t1 WHERE f1 = 3;
SET SESSION wsrep_on = ON;
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
DELETE FROM t1 WHERE f1 = 1;
DELETE FROM t1 WHERE f1 = 2;
DELETE FROM t1 WHERE f1 = 3;
DELETE FROM t1 WHERE f1 = 4;
DELETE FROM t1 WHERE f1 = 5;
COMMIT;
SET AUTOCOMMIT=ON;
SELECT COUNT(*) AS expect_0 FROM t1;
expect_0
0
connection node_2;
SELECT VARIABLE_VALUE expect_Primary FROM performance_schema.global_status WHERE VARIABLE_NAME = 'wsrep_cluster_status';
expect_Primary
Primary
SELECT COUNT(*) AS expect_0 FROM t1;
expect_0
0
DROP TABLE t1;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2),(3);
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t2 VALUES (1),(2),(3);
connection node_2;
SET SESSION wsrep_on = OFF;
DELETE FROM t2 WHERE f1 = 2;
DELETE FROM t1 WHERE f1 = 3;
SET SESSION wsrep_on = ON;
connection node_1;
DELETE t1, t2 FROM t1 JOIN t2 WHERE t1.f1 = t2.f1;
SELECT COUNT(*) expect_0 FROM t1;
expect_0
0
connection node_2;
SELECT VARIABLE_VALUE = 'Primary' FROM performance_schema.global_status WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
SELECT COUNT(*) expect_0 FROM t1;
expect_0
0
DROP TABLE t1,t2;
connection node_1;
CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
INSERT INTO parent VALUES (1),(2),(3);
CREATE TABLE child (id INT, parent_id INT, INDEX par_ind (parent_id), FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE CASCADE) ENGINE=INNODB;
INSERT INTO child VALUES (1,1),(2,2),(3,3);
connection node_2;
SET SESSION wsrep_on = OFF;
DELETE FROM child WHERE parent_id = 2;
SET SESSION wsrep_on = ON;
connection node_1;
DELETE FROM parent;
SELECT COUNT(*) AS expect_0 FROM parent;
expect_0
0
SELECT COUNT(*) AS expect_0 FROM child;
expect_0
0
connection node_2;
SELECT VARIABLE_VALUE = 'Primary' FROM performance_schema.global_status WHERE VARIABLE_NAME = 'wsrep_cluster_status';
VARIABLE_VALUE = 'Primary'
1
SELECT COUNT(*) AS expect_0 FROM parent;
expect_0
0
SELECT COUNT(*) AS expect_0 FROM child;
expect_0
0
DROP TABLE child, parent;
connection node_2;
SET GLOBAL wsrep_ignore_apply_errors = 4;
connection node_2;
SET GLOBAL wsrep_on = OFF;
CREATE TABLE t1 (f1 INTEGER);
SET GLOBAL wsrep_on = ON;
connection node_1;
CREATE TABLE t1 (f1 INTEGER, f2 INTEGER);
DROP TABLE t1;
connection node_2;
set session wsrep_sync_wait=0;
SELECT * FROM t1;
ERROR 42S02: Table 'test.t1' doesn't exist
SET GLOBAL wsrep_ignore_apply_errors = 10;
Warnings:
Warning	1292	Truncated incorrect wsrep_ignore_apply_errors value: '10'
CALL mtr.add_suppression("Can't find record in ");
CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows event");
CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test\\.t1'' on query\\. Default database: 'test'\\. Query: 'DROP TABLE t1', Error_code: 1051");
CALL mtr.add_suppression("Slave SQL: Error 'Can't drop database 's1'; database doesn't exist' on query\\. Default database: 'test'\\. Query: 'DROP SCHEMA s1', Error_code: 1008");
CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query\\. Default database: 'test'\\. Query: 'DROP INDEX idx1 ON t1', Error_code: 1091");
CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query\\. Default database: 'test'\\. Query: 'ALTER TABLE t1 DROP INDEX idx1', Error_code: 1091");
CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'f2'; check that column/key exists' on query\\. Default database: 'test'\\. Query: 'ALTER TABLE t1 DROP COLUMN f2', Error_code: 1091");
CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query\\.");
CALL mtr.add_suppression("Inconsistency detected: Inconsistent by consensus on ");
