On 4/30/2012 5:10 PM, Sean Cui wrote:
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?


The document referred to several emails ago in this thread states:

The WAL approach inverts this. The original content is preserved in the database file and the changes are appended into a separate WAL file. A COMMIT <http://www.sqlite.org/lang_transaction.html> occurs when a special record indicating a commit is appended to the WAL. Thus a COMMIT can happen without ever writing to the original database, which _allows readers to continue operating from the original unaltered database while changes are simultaneously being committed into the WAL_. Multiple transactions can be appended to the end of a single WAL file.

(Emphasis mine)

Otherwise it would not be very concurrent, would it?

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

Reply via email to