Hello,

I generally understand the locking states of SQLite well enough, I think.  
Though this specific case below caught me off guard.  I couldn't give an 
immediate intelligible answer to my coworker.  Nor could I find the answer on 
the website, or I'm blind today.

A connection holds a SHARED lock. It did start a DEFERRED transaction then read 
something. Now it executes COMMIT.  Will the lock be upgraded from SHARED to 
EXCLUSIVE for the very short duration of the COMMIT (the connection made no 
writing, as evidenced by its SHARED lock), or will this specific case elude 
upgrading the lock and simply exit the transaction, releasing the SHARED-lock 
to NO lock?  Sounds logical, but is it true?  In other words, can I say that 
the lock upgrade to EXCLUSIVE at COMMIT time only happens if the current lock 
state was RESERVED (and not simply SHARED)?

—  
Best Regards, Meilleures salutations, Met vriendelijke groeten, Mit besten 
Grüßen,
Olivier Mascia


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

Reply via email to