diff options
Diffstat (limited to 'src/test/isolation/specs/nowait.spec')
-rw-r--r-- | src/test/isolation/specs/nowait.spec | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/test/isolation/specs/nowait.spec b/src/test/isolation/specs/nowait.spec new file mode 100644 index 0000000..a75e54c --- /dev/null +++ b/src/test/isolation/specs/nowait.spec @@ -0,0 +1,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; } |