Paxdo Presse <pa...@mac.com> wrote:
>>> Are we to understand that the pending / exclusive locks function differently
>>> and allow simultaneous shared locks?
>> 
>> Yes. Note that, with WAL, writers never write to the same areas of files 
>> that readers may read from.
> 
> This would mean that with wal mode,
> Sqlite now some kind of lock on the record and not the entire database? :-)

Would not. The documentation at http://sqlite.org/wal.html describes exactly 
how this mode works. You don't need to guess.

> For example:
> 
> Process A:
> 
> - Begin immediate transaction
> - UPDATE Table_A SET Column_a='..' WHERE id=1
> - End transaction
> 
> If I have a process B that tries to read the record "id 2"
> between the"UPDATE..." of process A, and "END..." of process A,
> it can?

Yes it can. 

> But if he tries to read the record "id 1", it can not, right?

Wrong. It can. Any readers that started before the write transaction was 
committed, would see the original version of the record. Any readers that 
started after, would see the updated version. Neither would block.
-- 
Igor Tandetnik

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

Reply via email to