Martin,
Thank you for great explanation. I think I understand it better now. :)

Regards,
Serge


Martin Engelschalk <engelsch...@codeswift.com> писал(а) в своём письме Wed, 11 
May 2011 23:18:13 +0600:

> Hello,
>
> This question does not arise with SQLite, because parallel transaction
> are not supported, as Igor and Pavel pointed out.
>
> However, consider this: If you have a unique constraint on a table like
> in your example, when should the database enforce it?
>
> To use your example and add a second colum
>
> 00:01 Transaction A: BEGIN
> 00:02 Transaction B: BEGIN
> 00:03 Transaction A: INSERT INTO test VALUES (1, 'foo') // works okay
> 00:04 Transaction B: INSERT INTO test VALUES (1, 'bar') // lets say, this 
> also works like you expected.
> 00:05 Transaction B: COMMIT // shall this work? If yes, the Record ('1', 
> 'bar') is now committed. However, Transaction A was first!
> 00:06 Transaction A: COMMIT // This cannot work. What error message would you 
> expect?
>
> Now, consider large transactions with many Operations.
> Therefore, the second insert fails on every database system i ever 
> encountered.
>
> Martin
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to