| 1 |
# Make sure that FKs referencing partitioned tables actually work. |
| 2 |
setup { |
| 3 |
drop table if exists ppk, pfk, pfk1; |
| 4 |
create table ppk (a int primary key) partition by list (a); |
| 5 |
create table ppk1 partition of ppk for values in (1); |
| 6 |
insert into ppk values (1); |
| 7 |
create table pfk (a int references ppk) partition by list (a); |
| 8 |
create table pfk1 partition of pfk for values in (1); |
| 9 |
} |
| 10 |
|
| 11 |
session s1 |
| 12 |
step s1b { begin; } |
| 13 |
step s1d { delete from ppk where a = 1; } |
| 14 |
step s1c { commit; } |
| 15 |
|
| 16 |
session s2 |
| 17 |
step s2b { begin; } |
| 18 |
step s2bs { begin isolation level serializable; select 1; } |
| 19 |
step s2i { insert into pfk values (1); } |
| 20 |
step s2c { commit; } |
| 21 |
|
| 22 |
teardown { drop table ppk, pfk, pfk1; } |
| 23 |
|
| 24 |
permutation s1b s1d s2b s2i s1c s2c |
| 25 |
permutation s1b s1d s2bs s2i s1c s2c |
| 26 |
permutation s1b s2b s1d s2i s1c s2c |
| 27 |
permutation s1b s2bs s1d s2i s1c s2c |
| 28 |
permutation s1b s2b s2i s1d s2c s1c |
| 29 |
permutation s1b s2bs s2i s1d s2c s1c |