`Row Constructor Expression Optimization` doesn't work as expected. During the raw update with `Row Constructor Expression Optimization` the whole table is locked.
This query locks the whole table with `repeatable read` transaction (even so it updates a single row).
This query works as expected and locks only a single row with `repeatable read` transaction:
Both queries should lock only a single row.
An example which shows the bug:
1. Step one. Create table:
2. Step two. insert values into table:
3. Step three. Set repeatable read transaction isolation level for the session 1:
4. Step four. Open another session with database and set repeatable read transaction isolation level for the session 2:
5. Step five. Begin a new transaction in the session 1 and update a single raw using "row constructor expression optimization":
6. Step six. Go into session 2 and execute an update query for another raw:
As a result step 6 is locked and will through the lock timeout exception after the timeout (by default 60 seconds):
Step 5 should not acquire locks for all raws. Step 6 should be processed immediately without a deadlock while transaction in step 5 is open.