Here is a simple scenario to explain what the OP meant:

Under WAL mode,

In connection A, we issue SQL "UPDATE Employee SET Salary=0" to SQLite.

While the command is executing, from another connection, we issue "SELECT 
Salary FROM Employee".

In this case, even under WAL, the SELECT command will still be blocked by the 
UPDATE command, right?

  
Thanks,

Sean
 



-----Original Message-----
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Harnek Manj
Sent: April-30-12 5:04 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Concurrency

Hi Igor,

Sorry about that. What I meant was "really latest committed data". 

As you answered that "It will read most recent", so as per the scenario I 
mentioned in my previous post does it mean that read will wait for the current 
write operation to finish?

Regards
Harnek

-----Original Message-----
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Igor Tandetnik
Sent: April-30-12 4:56 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Concurrency

On 4/30/2012 7:46 PM, Harnek Manj wrote:
> So what I am confused is, if there is a Write (update) operation and it 
> creates a WAL file and subsequently a read operation comes in and the read is 
> trying to access the same data what write is working on. Does in this 
> scenario read will wait or it will grab the data from the original database 
> file

The latter - it will read the most recently committed data.

> which is not really data?

I don't understand this statement. What is it, if not data?
-- 
Igor Tandetnik

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

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

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

Reply via email to