I have 2 programs running on 2 different machines.
Each program has a method called updateRecord that does the following 2 things:
1. Do a SELECT query on a particular record Z
2. Do a UPDATE query on the same record.
If these 2 queries are in the same transaction (between beginTransaction and commitTransaction) does it guarantee proper execution?
i.e, will the following sequence of operations fail to execute successfully?
- Prog-1 SELECT
- Prog-2 SELECT
- Prog-1 UPDATE
- Prog-2 UPDATE
OR
- Prog-1 SELECT
- Prog-1 UPDATE
- Prog-1 SELECT
- Prog-2 UPDATE
- Prog-1 COMMIT
- Prog-2 COMMIT