>> Correct me if I have a wrong model of transaction in mind.
>> Maybe sqlite does not write a byte to disk if inside a transaction
>> there are only selects?

>So, the answer to my question is: NO.
>SQLite does no writes, the begin of a transaction is simply an
>acquisition of write lock.

"BEGIN" acquires a read lock.  If an attempt is made to write, then it is 
escalated to a write lock.  "BEGIN IMMEDIATE" acquires a write lock from the 
outset and other attempts to obtain a lock will be blocked until the write lock 
is released (except in WAL mode, in which case a WRITE lock does not block 
subsequent attempts to READ, which see the database as it existed prior to the 
WRITE lock being obtained).




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

Reply via email to