blob: 233b55b8ac4f9ec544e0f9b7676207407434d8a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
DROP TABLE IF EXISTS t1;
# Verifying that X_LOCK not acquired
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connect conn1,localhost,root,,;
connection conn1;
SET autocommit=0;
SET innodb_fake_changes=1;
BEGIN;
SELECT * FROM t1 FOR UPDATE;
a
1
connection default;
SET innodb_lock_wait_timeout=3;
UPDATE t1 SET a=2;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SELECT * FROM t1 LOCK IN SHARE MODE;
a
1
connection conn1;
ROLLBACK;
SET innodb_fake_changes=default;
DROP TABLE t1;
|