Nikolaus Rath <nikol...@rath.org> wrote: > What I think should be happening instead is this: > > - When executing statement 1, the main thread obtains a SHARED lock. > > - When executing statement 2, the main thread briefly obtains an > EXCLUSIVE lock. After statement 2 is executed, the EXCLUSIVE lock is > released and the main thread continues to hold the SHARED lock (since > statement 1 is still active)
No. A transaction can only upgrade its lock, but never downgrade, until it's committed or rolled back (at which point it releases all locks, of course). The lock level cannot get from EXCLUSIVE back to SHARED. Otherwise, another connection would be able to read uncommitted changes. Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users