Example:
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; START TRANSACTION; SELECT * FROM t1; // to "create shapshot". For simplicity t1 contains 1 row 1 column which contains value 1. // another transaction updates this row and change 1 to 2 and commits. SELECT * FROM t1; // we see no changes. As expected in repeatable read. SELECT * FROM t1 FOR UPDATE; // i see change row. Why? The problem i cant find explanation to such behaviour. Why locking read ignore isolation level?
SELECT * FROM t1;after theFOR UPDATEone returns value 1 still. I can see why it works this way, but it is a little surprising.