Alexander J. Kozlovsky
<[EMAIL PROTECTED]> wrote:
T2 will try to acquire RESERVED lock of its own, but T1 is already
holding PENDING. At this point SQLite will return to the caller with
SQLITE_BUSY return code. The only way out of this situation is for
T2 to ROLLBACK and retry the transaction from the beginning.
Suppose next:
1. Transaction T2 perform complex calculation
2. T1 have time to release EXCLUSIVE lock ***before*** T2 try
to acquire RESERVED lock
T1 won't be able to even acquire EXCLUSIVE lock, let alone release it,
while T2 holds SHARED. Remember that T2 holds a SHARED lock from the
beginning. The rest of your scenario thereby becomes moot.
Igor Tandetnik