| 1 |
connection node_2; |
| 2 |
connection node_1; |
| 3 |
CREATE TABLE t1 (f1 VARCHAR(32) NOT NULL) ENGINE=InnoDB; |
| 4 |
INSERT INTO t1 (f1) VALUES ('0e66c5227a8a'); |
| 5 |
INSERT INTO t1 (f1) VALUES ('c6c112992c9'); |
| 6 |
CREATE TABLE t2 (i int primary key); |
| 7 |
connection node_2; |
| 8 |
SET SESSION wsrep_sync_wait = 0; |
| 9 |
SET GLOBAL wsrep_slave_threads = 2; |
| 10 |
*************************************************************** |
| 11 |
scenario 1, conflicting UPDATE |
| 12 |
*************************************************************** |
| 13 |
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_slave_enter_sync'; |
| 14 |
connection node_1; |
| 15 |
START TRANSACTION; |
| 16 |
UPDATE t1 SET f1='5ffceebfada' WHERE t1.f1 = 'c6c112992c9'; |
| 17 |
COMMIT; |
| 18 |
connection node_2; |
| 19 |
SET SESSION wsrep_on = 0; |
| 20 |
SET SESSION wsrep_on = 1; |
| 21 |
connection node_1; |
| 22 |
START TRANSACTION; |
| 23 |
UPDATE t1 SET f1='4ffceebfcdc' WHERE t1.f1 = '0e66c5227a8a'; |
| 24 |
COMMIT; |
| 25 |
connection node_2; |
| 26 |
distance |
| 27 |
1 |
| 28 |
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_slave_enter_sync'; |
| 29 |
SET SESSION wsrep_on = 0; |
| 30 |
SET SESSION wsrep_on = 1; |
| 31 |
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_slave_enter_sync'; |
| 32 |
SET GLOBAL wsrep_provider_options = 'dbug='; |
| 33 |
*************************************************************** |
| 34 |
scenario 2, conflicting DELETE |
| 35 |
*************************************************************** |
| 36 |
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_slave_enter_sync'; |
| 37 |
connection node_1; |
| 38 |
START TRANSACTION; |
| 39 |
INSERT INTO t2 VALUES (1); |
| 40 |
DELETE FROM t1 WHERE f1='5ffceebfada'; |
| 41 |
COMMIT; |
| 42 |
connection node_2; |
| 43 |
SET SESSION wsrep_on = 0; |
| 44 |
SET SESSION wsrep_on = 1; |
| 45 |
connection node_1; |
| 46 |
START TRANSACTION; |
| 47 |
INSERT INTO t2 VALUES (2); |
| 48 |
DELETE FROM t1 WHERE f1='4ffceebfcdc'; |
| 49 |
COMMIT; |
| 50 |
connection node_2; |
| 51 |
distance |
| 52 |
1 |
| 53 |
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_slave_enter_sync'; |
| 54 |
SET SESSION wsrep_on = 0; |
| 55 |
SET SESSION wsrep_on = 1; |
| 56 |
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_slave_enter_sync'; |
| 57 |
SET GLOBAL wsrep_provider_options = 'dbug='; |
| 58 |
connection node_1; |
| 59 |
SET GLOBAL wsrep_slave_threads = DEFAULT; |
| 60 |
DROP TABLE t1; |
| 61 |
DROP TABLE t2; |
| 62 |
connection node_2; |
| 63 |
SET GLOBAL wsrep_slave_threads = DEFAULT; |