4.2.03. A typical transaction pair
- T1
- read_lock(Y);
- read_item(Y);
- unlock(Y);
- write_lock(X);
- read_item(X);
- X=X+Y;
- write_item(X);
- unlock(X);
- T2
- read_lock(X);
- read_item(X);
- unlock(X);
- write_lock(Y);
- read_item(Y);
- Y=X+Y;
- write_item(Y);
- unlock(Y);
- Violates rules of two phase locking
- unlock occurs during locking/expanding phase