| 1 |
create table t1 (a int) engine=innodb STATS_PERSISTENT=0; |
| 2 |
create table t2 (a int) engine=innodb STATS_PERSISTENT=0; |
| 3 |
BEGIN; |
| 4 |
insert into t1 values(1); |
| 5 |
connect con_1, localhost, root,,; |
| 6 |
SET DEBUG_SYNC="before_trx_hash_find_element_mutex_enter SIGNAL before_mutex_enter WAIT_FOR cont1"; |
| 7 |
SET DEBUG_SYNC="after_trx_hash_find_element_mutex_enter SIGNAL after_mutex_enter WAIT_FOR cont2"; |
| 8 |
SELECT * FROM t1 WHERE a = 1 FOR UPDATE; |
| 9 |
connection default; |
| 10 |
SET DEBUG_SYNC="now WAIT_FOR before_mutex_enter"; |
| 11 |
COMMIT; |
| 12 |
SET DEBUG_SYNC="now SIGNAL cont1"; |
| 13 |
SET DEBUG_SYNC="now WAIT_FOR after_mutex_enter"; |
| 14 |
insert into t2 values(1); |
| 15 |
BEGIN; |
| 16 |
INSERT INTO t2 VALUES(2); |
| 17 |
SET DEBUG_SYNC="now SIGNAL cont2"; |
| 18 |
connection con_1; |
| 19 |
a |
| 20 |
1 |
| 21 |
disconnect con_1; |
| 22 |
connection default; |
| 23 |
DROP TABLE t1; |
| 24 |
DROP TABLE t2; |
| 25 |
SET DEBUG_SYNC="reset"; |