On Mon, 2005-09-19 at 13:27 -0400, Iulian Popescu wrote:
> Hello,
> 
>  
> 
> I'm kind of new to the SQLite. I'm running an instance of the database in
> memory. I'm trying to figure out if the transaction isolation is also valid
> between threads. To give a concrete example, two threads as part of the same
> process share the same database connection. Suppose a transaction is started
> in one thread and inserts some rows in a table A. If the same thread does a
> SELECT * FROM A it should see the inserted records if my understanding is
> correct. What will happen if another thread does a SELECT from the same
> table A before the first thread commits the transaction? Will it see the
> records inserted by the first thread? Based on the tests I have made it
> seems to - weather I expected not. Is that correct or am I doing something
> wrong?
> 
> I've noticed if I do the same thing with a database on disk and between
> processes, the second process won't see the changes until the first one will
> commit the transaction.
> 

Isolation only occurs between separate database handles.  If
you do two statements against the same database handle, they
will not be isolated.  I do not understand why you would expect
that they would be.
-- 
D. Richard Hipp <[EMAIL PROTECTED]>

Reply via email to