On 9/13/16, Eric Sink <e...@sourcegear.com> wrote:
>
> I can fit this into your explanation:
>
> "Another process might have opened the same database with
> locking_mode=EXCLUSIVE"
>
> if I change the word "process" to "thread", and if I assume that
> sqlite3_open_v2() on a WAL-mode file can [perhaps sometimes] involve an
> exclusive lock, if even for a short time.
>
> Would this be a correct understanding?

It's actually sqlite3_close() that gets the EXCLUSIVE lock for a very
short time.  The last connection to close on a particular database
gets an EXCLUSIVE lock on that database while it runs a final
CHECKPOINT and then deletes the -shm and -wal files.

-- 
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

Reply via email to