| 1 |
# After rolling back a subtransaction that upgraded a lock, the previously |
| 2 |
# held lock should still be held. |
| 3 |
setup |
| 4 |
{ |
| 5 |
CREATE TABLE foo ( |
| 6 |
key INT PRIMARY KEY, |
| 7 |
value INT |
| 8 |
); |
| 9 |
|
| 10 |
INSERT INTO foo VALUES (1, 1); |
| 11 |
} |
| 12 |
|
| 13 |
teardown |
| 14 |
{ |
| 15 |
DROP TABLE foo; |
| 16 |
} |
| 17 |
|
| 18 |
session s1 |
| 19 |
setup { BEGIN; } |
| 20 |
step s1l { SELECT * FROM foo FOR KEY SHARE; } |
| 21 |
step s1svp { SAVEPOINT f; } |
| 22 |
step s1d { DELETE FROM foo; } |
| 23 |
step s1r { ROLLBACK TO f; } |
| 24 |
step s1c { COMMIT; } |
| 25 |
|
| 26 |
session s2 |
| 27 |
setup { BEGIN; } |
| 28 |
step s2l { SELECT * FROM foo FOR UPDATE; } |
| 29 |
step s2c { COMMIT; } |
| 30 |
|
| 31 |
permutation s1l s1svp s1d s1r s1c s2l s2c |
| 32 |
permutation s1l s1svp s1d s1r s2l s1c s2c |
| 33 |
permutation s1l s1svp s1d s2l s1r s1c s2c |
| 34 |
permutation s1l s1svp s2l s1d s1r s1c s2c |
| 35 |
permutation s1l s2l s1svp s1d s1r s1c s2c |
| 36 |
permutation s2l s1l s2c s1svp s1d s1r s1c |
| 37 |
permutation s2l s2c s1l s1svp s1d s1r s1c |