| 1 |
connection node_2; |
| 2 |
connection node_1; |
| 3 |
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; |
| 4 |
connection node_1; |
| 5 |
CREATE TABLE p (id INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; |
| 6 |
connection node_1; |
| 7 |
SET AUTOCOMMIT=ON; |
| 8 |
START TRANSACTION; |
| 9 |
INSERT INTO p VALUES(1,0); |
| 10 |
connection node_1a; |
| 11 |
SET SESSION wsrep_sync_wait = 0; |
| 12 |
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; |
| 13 |
connection node_2; |
| 14 |
CREATE TABLE c(id INT NOT NULL PRIMARY KEY, p_id INT, FOREIGN KEY (p_id) REFERENCES p(id) ON DELETE CASCADE) ENGINE=InnoDB; |
| 15 |
connection node_1a; |
| 16 |
SET SESSION wsrep_on = 0; |
| 17 |
SET SESSION wsrep_on = 1; |
| 18 |
SET GLOBAL wsrep_provider_options = 'dbug='; |
| 19 |
connection node_1; |
| 20 |
COMMIT; |
| 21 |
connection node_1a; |
| 22 |
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync'; |
| 23 |
SET GLOBAL wsrep_provider_options = 'dbug='; |
| 24 |
connection node_1; |
| 25 |
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction |
| 26 |
connection node_1a; |
| 27 |
SET SESSION DEBUG_SYNC = "RESET"; |
| 28 |
connection node_2; |
| 29 |
SELECT * FROM p; |
| 30 |
id f2 |
| 31 |
SELECT * FROM c; |
| 32 |
id p_id |
| 33 |
DROP TABLE c; |
| 34 |
DROP TABLE p; |