summaryrefslogtreecommitdiffstats
path: root/src/test/isolation/specs/nowait.spec
blob: a75e54cc67b428a3d6136d47ee6e69931138dc00 (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
# Test NOWAIT when regular row locks can't be acquired.

setup
{
  CREATE TABLE foo (
	id int PRIMARY KEY,
	data text NOT NULL
  );
  INSERT INTO foo VALUES (1, 'x');
}

teardown
{
  DROP TABLE foo;
}

session s1
setup		{ BEGIN; }
step s1a	{ SELECT * FROM foo FOR UPDATE NOWAIT; }
step s1b	{ COMMIT; }

session s2
setup		{ BEGIN; }
step s2a	{ SELECT * FROM foo FOR UPDATE NOWAIT; }
step s2b	{ COMMIT; }