Surely, Mr. Hipp is an authority, but I'm slightly puzzled by this answer.
And it doesn't answer the part of the question about what happens if I do
it wrong, and transactions conflict.  Based on what I now think is true, if
I don't do something, transactions begin with the first modification.  They
may be prevented from executing UPDATEs simultaneously, but could still
result in non-serializable execution of the whole, and inconsistent or
erroneous data in the database, because each would be based on the SELECT
statements before either had written.  Or do they result in exceptions?

On Tue, Sep 20, 2016 at 10:09 AM, Richard Hipp <d...@sqlite.org> wrote:

> On 9/20/16, Kevin O'Gorman <kevinogorm...@gmail.com> wrote:
> >   c.execuite("BEGIN TRANSACTION IMMEDIATE")
> >
> > and is IMMEDIATE the right thing, or do I need EXCLUSIVE.
>
> IMMEDIATE is the right thing.  That lets other readers continue and
> new readers to start, but blocks all other writers.
>

Please confirm or refute my understanding that this would let transactions
without the EXCLUSIVE to begin, but not EXCLUSIVE ones even if they begin
with reading.


> EXCLUSIVE would block everybody - readers and writers - which is more
> than you need.
>

If my understanding above is correct, then this would indeed be more than
required.  But of course, it would work so long as the SELECTs are wrapped
along with their resultant UPDATEs.


>
> --
> D. Richard Hipp
> d...@sqlite.org
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
#define QUESTION ((bb) || (!bb)) /* Shakespeare */
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to