Hi Richard,
I had SQLite 3.5.2 and my application has two threads one for write and one for 
read.
Even the connection has "PRAGMA read_uncommited=ON" but the read thread still 
has problem with the connection is busy.
So I don't know if the new version of SQLite allows to have the shared cache 
mode or not.
Thanks,
JP




----- Original Message ----
From: D. Richard Hipp <[EMAIL PROTECTED]>
To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
Sent: Tuesday, June 10, 2008 7:30:09 AM
Subject: Re: [sqlite] Database locked error, while deleting


On Jun 10, 2008, at 10:18 AM, Shailesh Birari wrote:

> Richard,
> Just to go one step ahead, If there are independent connections, do  
> you
> mean that there can exist multiple transactions at the same time? I
> think not since the first transaction (write) will exclusively lock  
> the
> database and the second transaction will get a busy error. Correct  
> me if
> I am wrong. Will the behaviour differ in case of shared cache enabled
> and disabled?
>

In shared cache mode, you can do "PRAGMA read_uncommited=ON" and then  
the reader will be able to see uncommitted data from the writer.  And  
you won't ever get SQLITE_BUSY because the reader is unable to read  
the schema on account of a busy write transaction.

An easier thing for you to do might be to use a single database  
connection.  That way the reader will certainly never block waiting on  
the writer since they will be serialized.

D. Richard Hipp
[EMAIL PROTECTED]



_______________________________________________
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