summaryrefslogtreecommitdiff
path: root/src/test/isolation/specs/nowait.spec
blob: 73580cd1b2a28863c46e4726e0c18680e2ac4299 (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; }