On May 25, 2009, at 2:54 PM, Dennis Volodomanov wrote:

> Hello all,
>
> Is it possible that with the read_uncommitted=1 and the shared cache
> mode turned on (multithreaded application), that some data that has  
> been
> inserted into the database, but not yet committed, could not be picked
> up by another thread as being in the database?
>
> I thought (from reading the docs) that with read_uncommitted=1 and
> sqlite3_enable_shared_cache(1), if I INSERT something, it will be  
> picked
> up if I do a SELECT on another thread's connection as being in the
> database, even if a COMMIT has not been issued yet. Am I wrong in my
> understanding?

That's correct.

Normally, when using shared-cache mode, if connection A writes to a  
table
(within a transaction) then a second connection to the same shared- 
cache is
unable to read from that table until connection A either COMMITs or  
ROLLBACKs
its open transaction. Trying to do so returns SQLITE_LOCKED. However,  
when
in read_uncommitted=1 mode, the second connection reads the modified  
contents
of the table, even though that data has not yet been (and indeed may  
never be)
committed.

Dan.


>
>
> Thanks in advance for any insight,
>
>   Dennis
>
>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to