This may help: You can use the function to track all statements associated with a database connection.
http://sqlite.org/c3ref/next_stmt.html --- On Wed, 4/15/09, [email protected] <[email protected]> wrote: > From: [email protected] <[email protected]> > Subject: Re: [sqlite] step() fails with SQLITE_BUSY after > BEGINEXCLUSIVETRANSACTION - SOLVED > To: "'General Discussion of SQLite Database'" <[email protected]> > Date: Wednesday, April 15, 2009, 4:01 AM > > I've found the problem. It was caused by a pre-compiled > statement in a third > party library. Since the library was used by several > threads now, the > statement, compiled in the context of one thread, blocked > the entire > database when an attempt way made to use it from another > thread. > > The programmer has changed his code to not use pre-compiled > statements and > now it works, even if used by multiple threads. Another > solution would have > been to maintain pre-compiled statements per thread. > > Since this was really hard to track down, I wonder if there > would have been > a way to get more info from SQLite, e.g. some debug log or > anyhting? > Something telling me "I'm blocking everything because I > here have an > statement which is in state "X" and hence no other thread > can do anything > right now"... > > -- Mario > > > > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

