| 1 |
connection node_2; |
| 2 |
connection node_1; |
| 3 |
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; |
| 4 |
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; |
| 5 |
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; |
| 6 |
connect node_3a, 127.0.0.1, root, , test, $NODE_MYPORT_3; |
| 7 |
connection node_1; |
| 8 |
connection node_2; |
| 9 |
connection node_3; |
| 10 |
connection node_1; |
| 11 |
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY); |
| 12 |
SET SESSION wsrep_trx_fragment_size=1; |
| 13 |
BEGIN; |
| 14 |
INSERT INTO t1 VALUES (11); |
| 15 |
INSERT INTO t1 VALUES (12); |
| 16 |
connection node_2; |
| 17 |
SET SESSION wsrep_trx_fragment_size=1; |
| 18 |
BEGIN; |
| 19 |
INSERT INTO t1 VALUES (21); |
| 20 |
INSERT INTO t1 VALUES (22); |
| 21 |
connection node_3; |
| 22 |
SET SESSION wsrep_trx_fragment_size=1; |
| 23 |
BEGIN; |
| 24 |
INSERT INTO t1 VALUES (31); |
| 25 |
INSERT INTO t1 VALUES (32); |
| 26 |
connection node_2a; |
| 27 |
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1'; |
| 28 |
connection node_3a; |
| 29 |
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1'; |
| 30 |
connection node_1a; |
| 31 |
SET SESSION wsrep_sync_wait = 0; |
| 32 |
SHOW STATUS LIKE 'wsrep_cluster_status'; |
| 33 |
Variable_name Value |
| 34 |
wsrep_cluster_status non-Primary |
| 35 |
SET SESSION wsrep_sync_wait = DEFAULT; |
| 36 |
connection node_2a; |
| 37 |
SET SESSION wsrep_sync_wait = 0; |
| 38 |
SHOW STATUS LIKE 'wsrep_cluster_status'; |
| 39 |
Variable_name Value |
| 40 |
wsrep_cluster_status non-Primary |
| 41 |
SET SESSION wsrep_sync_wait = DEFAULT; |
| 42 |
connection node_3a; |
| 43 |
SET SESSION wsrep_sync_wait = 0; |
| 44 |
SHOW STATUS LIKE 'wsrep_cluster_status'; |
| 45 |
Variable_name Value |
| 46 |
wsrep_cluster_status non-Primary |
| 47 |
SET SESSION wsrep_sync_wait = DEFAULT; |
| 48 |
connection node_2a; |
| 49 |
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0'; |
| 50 |
connection node_3a; |
| 51 |
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0'; |
| 52 |
connection node_1a; |
| 53 |
connection node_2a; |
| 54 |
connection node_3a; |
| 55 |
connection node_1a; |
| 56 |
SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log; |
| 57 |
expect 0 |
| 58 |
0 |
| 59 |
INSERT INTO t1 VALUES(11); |
| 60 |
INSERT INTO t1 VALUES(21); |
| 61 |
INSERT INTO t1 VALUES(31); |
| 62 |
SELECT * FROM t1; |
| 63 |
f1 |
| 64 |
11 |
| 65 |
21 |
| 66 |
31 |
| 67 |
connection node_2a; |
| 68 |
SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log; |
| 69 |
expect 0 |
| 70 |
0 |
| 71 |
connection node_3a; |
| 72 |
SELECT COUNT(*) `expect 0` FROM mysql.wsrep_streaming_log; |
| 73 |
expect 0 |
| 74 |
0 |
| 75 |
connection node_1; |
| 76 |
INSERT INTO t1 VALUES(103); |
| 77 |
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction |
| 78 |
connection node_2; |
| 79 |
INSERT INTO t1 VALUES(203); |
| 80 |
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction |
| 81 |
connection node_3; |
| 82 |
INSERT INTO t1 VALUES(303); |
| 83 |
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction |
| 84 |
connection node_1; |
| 85 |
DROP TABLE t1; |