blob: f1e5bde357cb8a4c51782a4274c8a18a380c5af8 (
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
30
31
32
33
34
|
# INSERT...ON CONFLICT DO NOTHING test with multiple rows
# in higher isolation levels
setup
{
CREATE TABLE ints (key int primary key, val text);
}
teardown
{
DROP TABLE ints;
}
session "s1"
step "beginrr1" { BEGIN ISOLATION LEVEL REPEATABLE READ; }
step "begins1" { BEGIN ISOLATION LEVEL SERIALIZABLE; }
step "donothing1" { INSERT INTO ints(key, val) VALUES(1, 'donothing1') ON CONFLICT DO NOTHING; }
step "c1" { COMMIT; }
step "show" { SELECT * FROM ints; }
session "s2"
step "beginrr2" { BEGIN ISOLATION LEVEL REPEATABLE READ; }
step "begins2" { BEGIN ISOLATION LEVEL SERIALIZABLE; }
step "donothing2" { INSERT INTO ints(key, val) VALUES(1, 'donothing2'), (1, 'donothing3') ON CONFLICT DO NOTHING; }
step "c2" { COMMIT; }
permutation "beginrr1" "beginrr2" "donothing1" "c1" "donothing2" "c2" "show"
permutation "beginrr1" "beginrr2" "donothing2" "c2" "donothing1" "c1" "show"
permutation "beginrr1" "beginrr2" "donothing1" "donothing2" "c1" "c2" "show"
permutation "beginrr1" "beginrr2" "donothing2" "donothing1" "c2" "c1" "show"
permutation "begins1" "begins2" "donothing1" "c1" "donothing2" "c2" "show"
permutation "begins1" "begins2" "donothing2" "c2" "donothing1" "c1" "show"
permutation "begins1" "begins2" "donothing1" "donothing2" "c1" "c2" "show"
permutation "begins1" "begins2" "donothing2" "donothing1" "c2" "c1" "show"
|