| 1 |
connection node_2; |
| 2 |
connection node_1; |
| 3 |
CREATE TABLE t1(id int not null primary key, b int) engine=InnoDB; |
| 4 |
INSERT INTO t1 VALUES (0,0),(1,1),(2,2),(3,3); |
| 5 |
BEGIN; |
| 6 |
SET DEBUG_SYNC = 'wsrep_after_statement_enter SIGNAL blocked'; |
| 7 |
UPDATE t1 set b = 100 where id between 1 and 2;; |
| 8 |
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1; |
| 9 |
SET DEBUG_SYNC = 'now WAIT_FOR blocked'; |
| 10 |
SET DEBUG_SYNC = 'wsrep_after_statement_enter CLEAR'; |
| 11 |
connection node_1b; |
| 12 |
SET @save_dbug = @@SESSION.debug_dbug; |
| 13 |
SET @@SESSION.innodb_lock_wait_timeout=2; |
| 14 |
SET @@SESSION.debug_dbug = '+d,wsrep_instrument_BF_lock_wait'; |
| 15 |
UPDATE t1 set b = 200 WHERE id = 1; |
| 16 |
ERROR HY000: Lock wait timeout exceeded; try restarting transaction |
| 17 |
SET @@SESSION.debug_dbug = @save_dbug; |
| 18 |
connection node_1; |
| 19 |
COMMIT; |
| 20 |
SELECT * FROM t1; |
| 21 |
id b |
| 22 |
0 0 |
| 23 |
1 100 |
| 24 |
2 100 |
| 25 |
3 3 |
| 26 |
SET DEBUG_SYNC = 'RESET'; |
| 27 |
disconnect node_1b; |
| 28 |
DROP TABLE t1; |