On 26 May 2009, at 12:36am, Dennis Volodomanov wrote:

> Ok, thank you for confirming that. It seems that connection B
> *sometimes* doesn't see data just inserted into a table by  
> connection A.

How long a time is 'just' ?  You might want everything to be  
completely up-to-date but does that record really matter if it didn't  
exist a fraction of a second ago ?  If the difference matters to you  
then perhaps you shouldn't be using read_uncommitted.  That way your  
database will be completely consistent (assuming you're using  
transactions properly).

> Another question - is it possible for 2 threads sharing the same
> connection to do an insert at exactly the same time, thus potentially
> causing this problem?

Nope.  Even if you're using a multi-core processor, your motherboard  
can still only handle one memory access instruction at a time.   
Multiprocessing is an illusion carefully maintained by the operating  
system.

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

Reply via email to