On 6 Sep 2013, at 4:08pm, Simon Slavin <slav...@bigfraud.org> wrote:

> Right.  As I posted in my message that I had tested, this isn't being done 
> correctly.  A conflict isn't a conflict until the write, and the write 
> doesn't happen until the COMMIT. Therefore conflict testing needs to happen 
> at the commit, for /all/ the changes in the transaction, whether they're all 
> the consequence of one UPDATE or even of separate commands within the same 
> transaction.

On further thought, I may be wrong about that.  If it was really true then if 
you explicitly declared a transaction with BEGIN ... END a SQLITE_CONSTRAINT 
result due to violations of UNIQUE could only be returned at the END.  You 
wouldn't be able to tell which command within the transaction caused the 
conflict.

I don't know whether that's the way things really should work.  Or whether this 
is something the people who thought up SQL specified.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to