Help


from Wikipedia
« »  
By interleaving the transactions, the actual order of actions might be:,,,.
Again, consider what happens if T < sub > 1 </ sub > fails.
T < sub > 1 </ sub > still subtracts 10 from A.
Now, T < sub > 2 </ sub > adds 10 to A restoring it to its initial value.
Now T < sub > 1 </ sub > fails.
What should A's value be?
T < sub > 2 </ sub > has already changed it.
Also, T < sub > 1 </ sub > never changed B. T < sub > 2 </ sub > subtracts 10 from it.
If T < sub > 2 </ sub > is allowed to complete, B's value will be 10 too low, and A's value will be unchanged, leaving an invalid database.
This is known as a write-write failure, because two transactions attempted to write to the same data field.

1.849 seconds.