We are using two different connections to sqlite for these two different
threads.
So, we are not sharing the connection in SELECT and the DELETE thread.

On Tue, Jun 10, 2008 at 5:28 PM, D. Richard Hipp <[EMAIL PROTECTED]> wrote:

>
> On Jun 10, 2008, at 7:36 AM, Sabyasachi Ruj wrote:
>
> > Hi,
> >
> > I have a very big table with around 40,00, 000 rows. 4 columns. 220
> > MB.
> >
> > Now, I have two threads:-
> > Thread1: Is deleting 7,00, 000 rows from the table.
> > Thread2: Is doing SELECT on the same table.
> >
> > Now the problem is sometimes the sqlite3_prepare for the SELECT
> > query is
> > failing with SQLITE_BUSY error.
> >
> > My questions: -
> > 1. What is the best way to handle this error, and continue working
> > normally?
> > 2. Is there any documentation in sqlite3.org, which discuses the
> > locking
> > mechanism for DELETEs? Exacly in what phase of DELETE sqlite creates
> > the
> > exclusive lock, so, the SELECT is failing?
> >
>
>
> Are the two threads using the same database connection, or are they
> making separate and independent calls to sqlite3_open()?
>
>
> D. Richard Hipp
> [EMAIL PROTECTED]
>
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



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

Reply via email to