ClearOut(p1,s1)
AcceptReturn(p1,s1,60)
Query InStore; qty is 25
//t1 R-lock InStore.row1
Add 25 to WarehouseQty: 40->65
// t1 W-lock Product.row 1
try Update row 1
// blocked
// as W-lock on
InStore.row1
// cant be obtained
Update row 1, setting it to 0
//t1 upgrades to W-lock on InStore.row1
COMMIT // release t1s locks
//
now get W-lock
Update row 1: 0->60
COMMIT