| 1 |
connection node_2; |
| 2 |
connection node_1; |
| 3 |
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 int, f3 varchar(2000)); |
| 4 |
INSERT INTO t1 VALUES (1, 0, REPEAT('1234567890', 200)); |
| 5 |
INSERT INTO t1 VALUES (3, 3, REPEAT('1234567890', 200)); |
| 6 |
SET SESSION wsrep_sync_wait=0; |
| 7 |
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; |
| 8 |
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; |
| 9 |
connection node_1a; |
| 10 |
SET SESSION wsrep_sync_wait=0; |
| 11 |
connection node_1; |
| 12 |
begin; |
| 13 |
select f1,f2 from t1; |
| 14 |
f1 f2 |
| 15 |
1 0 |
| 16 |
3 3 |
| 17 |
connection node_2; |
| 18 |
UPDATE t1 SET f2=2 WHERE f1=3; |
| 19 |
connection node_1a; |
| 20 |
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached"; |
| 21 |
connection node_1; |
| 22 |
UPDATE t1 SET f2=1 WHERE f1=3; |
| 23 |
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync'; |
| 24 |
COMMIT; |
| 25 |
connection node_1a; |
| 26 |
SET SESSION wsrep_on = 0; |
| 27 |
SET SESSION wsrep_on = 1; |
| 28 |
SET GLOBAL wsrep_provider_options = 'dbug='; |
| 29 |
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync'; |
| 30 |
SET GLOBAL DEBUG_DBUG = ""; |
| 31 |
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; |
| 32 |
SET GLOBAL debug_dbug = NULL; |
| 33 |
SET debug_sync='RESET'; |
| 34 |
connection node_1; |
| 35 |
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction |
| 36 |
select f1,f2 from t1; |
| 37 |
f1 f2 |
| 38 |
1 0 |
| 39 |
3 2 |
| 40 |
DROP TABLE t1; |