Re: [sqlite] simultaneous transactions

2008-06-11 Thread Igor Tandetnik
Samuel Neff <[EMAIL PROTECTED]> wrote: > using BEGIN IMMEDIATE would prevent this situation from happening, > right? Not in all cases. BEGIN IMMEDIATE acquires a RESERVED lock, which doesn't prevent another connection from acquiring a SHARED lock. The writer may still be unable to promote to EXC

Re: [sqlite] simultaneous transactions

2008-06-11 Thread Samuel Neff
using BEGIN IMMEDIATE would prevent this situation from happening, right? Process 2 would get the lock error when it tries to begin the transaction and thus never obtain a reserved lock which prevented process 1 from promoting to an exclusive lock for commit. Sam -

Re: [sqlite] simultaneous transactions

2008-06-10 Thread Igor Tandetnik
Dave Dyer <[EMAIL PROTECTED]> wrote: > I don't understand why the following transaction > behavior is correct or necessary. The question > involves two simultaneous transactions on the same > database > > Process 1 Process 2 > > BEGIN > > BEGIN > > insert... > > insert... fails "locked" > > end al

[sqlite] simultaneous transactions

2008-06-10 Thread Dave Dyer
I don't understand why the following transaction behavior is correct or necessary. The question involves two simultaneous transactions on the same database Process 1 Process 2 BEGIN BEGIN insert... insert... fails