Closing the thread:
>Then why sqlite3_step() fails for the reader and for the
writer?
The reader fails since
it cannot obtain SHARED lock required for reading.
It cannot obtain that
lock since the writer already managed to obtain PENDING or EXCLUSIVE lock.
The writer fails since
there is pendi
Thank you Igor! Now I understand your OR!
- Original Message
From: Igor Tandetnik
To: sqlite-users@sqlite.org
Sent: Sun, February 14, 2010 2:54:35 PM
Subject: Re: [sqlite] 1 reader 1 writer but sqlite3_step fails with “database
is locked” error in both processes
a1rex wrote:
>
Then why sqlite3_step() fails for the reader and for the writer?
- Original Message
From: Igor Tandetnik
To: sqlite-users@sqlite.org
Sent: Sun, February 14, 2010 2:54:35 PM
Subject: Re: [sqlite] 1 reader 1 writer but sqlite3_step fails with “database
is locked” error in both processe
Process A updates data base table in the tight loop. Nothing special:
loop
sql = "UPDATE table SET blob=:blob WHERE id=?";
rc = sqlite3_prepare_v2(…)
rc = sqlite3_bind_int(…)
sqlite3_bind_blob(…)
rc = sqlite3_step(…)
rc = sqlite3_reset(…)
rc = sqlite3_finalize(…);
Process B just reads fr
4 matches
Mail list logo