There can only be one prepare per table at a time. The first prepare has to be finalized before another one. Table is locked by the first prepare until finalized.
On Tue, Jun 10, 2008 at 7:36 AM, Sabyasachi Ruj <[EMAIL PROTECTED]> 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? > > > -- > Sabyasachi > _______________________________________________ > 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