blob: f71ee5cb17dfe94b3682f0afb392dbf70c7b48d7 (
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
35
36
37
38
39
40
41
42
43
44
45
|
# Verify that cloning a foreign key constraint to a partition ensures
# that referenced values exist, even if they're being concurrently
# deleted.
setup {
drop table if exists ppk, pfk, pfk1;
create table ppk (a int primary key) partition by list (a);
create table ppk1 partition of ppk for values in (1);
insert into ppk values (1);
create table pfk (a int references ppk) partition by list (a);
create table pfk1 (a int not null);
insert into pfk1 values (1);
}
session s1
step s1b { begin; }
step s1d { delete from ppk1 where a = 1; }
step s1c { commit; }
session s2
step s2b { begin; }
step s2a { alter table pfk attach partition pfk1 for values in (1); }
step s2c { commit; }
teardown { drop table ppk, pfk, pfk1; }
permutation s1b s1d s1c s2b s2a s2c
permutation s1b s1d s2b s1c s2a s2c
permutation s1b s1d s2b s2a s1c s2c
#permutation s1b s1d s2b s2a s2c s1c
permutation s1b s2b s1d s1c s2a s2c
permutation s1b s2b s1d s2a s1c s2c
#permutation s1b s2b s1d s2a s2c s1c
#permutation s1b s2b s2a s1d s1c s2c
permutation s1b s2b s2a s1d s2c s1c
permutation s1b s2b s2a s2c s1d s1c
permutation s2b s1b s1d s1c s2a s2c
permutation s2b s1b s1d s2a s1c s2c
#permutation s2b s1b s1d s2a s2c s1c
#permutation s2b s1b s2a s1d s1c s2c
permutation s2b s1b s2a s1d s2c s1c
permutation s2b s1b s2a s2c s1d s1c
#permutation s2b s2a s1b s1d s1c s2c
permutation s2b s2a s1b s1d s2c s1c
permutation s2b s2a s1b s2c s1d s1c
permutation s2b s2a s2c s1b s1d s1c
|