I'm reading A Critique of ANSI SQL Isolation Levels and get confused by the two definitions:
Dirty write
w1[x]...w2[x]...((c1 or a1) and (c2 or a2) in any order)
Lost update
r1[x]...w2[x]...w1[x]...c1
Doesn't the history definition of lost update include dirty write? (The w2[x]...w1[x] part). If yes then if we prevent dirty write we prevent lost update, right? I know this is clearly wrong but I don't understand why. Can anyone give some hints on what I misunderstood here? Many thanks!
I found the article explaining this example:
There is no Dirty Write since T2 commits before T1 writes x.
But the definition of lost update does not require the 2nd write to happen after the first transaction commits, right?