blob: e607eda3dc9847a16a2033282e9527a68e92f5ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
CREATE TABLE t1(id INT PRIMARY key, val VARCHAR(16000))
ENGINE=InnoDB STATS_PERSISTENT=0;
INSERT INTO t1 (id,val) SELECT 2*seq,'x' FROM seq_0_to_1023;
connect con1,localhost,root,,;
InnoDB 0 transactions not purged
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
DELETE FROM t1 WHERE id=1788;
SET @saved_dbug = @@GLOBAL.debug_dbug;
SET @@GLOBAL.debug_dbug="d,enable_row_purge_del_mark_exit_sync_point";
BEGIN;
SELECT * FROM t1 WHERE id=1788 FOR UPDATE;
id val
connection con1;
COMMIT;
SET DEBUG_SYNC = 'now WAIT_FOR row_purge_del_mark_finished';
SET @@GLOBAL.debug_dbug = @saved_dbug;
connection default;
INSERT INTO t1 (id,val) VALUES (1787, REPEAT('x',2000));
connection con1;
SET innodb_lock_wait_timeout=0;
INSERT INTO t1 (id,val) VALUES (1788, 'x');
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SELECT * FROM t1 WHERE id=1788 FOR UPDATE;
id val
disconnect con1;
connection default;
COMMIT;
DROP TABLE t1;
|