I would like to have further explantion for case when snapshot isolation is settled and 2 connections modified the same row (id=111, col1 = 0,col2 = 0):
1st connect UPDATE myTable SET col1 = 1 WHERE id=111;
2nd connect UPDATE myTable SET col2 = 2 WHERE id=111;
2nd connect COMMIT;
1st connect COMMIT;
Will be these row id=111, col1 = 0,col2 = 2 or id=111, col1 = 1,col2 = 0 or id=111, col1 = 1,col2 = 2 ?
asked 24 Aug '12, 08:29
According to the docs, in SQL Anywhere writers always block writers, even with snapshot isolation, so I woud conclude that the 2nd UPDATE statement would already be blocked, as the first UPDATE is not yet commited. So in the end, the update from the 1st connection would be permanent, i.e. with values id=111, col1 = 1, col2 = 0.
Note: I assume both transactions already have begun before the 1st UPDATE happens.
Glenn has blogged about that here as well - please have a look at the blog comments in particular.