Re: [sqlite] When to close a db, take 2...

2010-06-22 Thread Jay A. Kreibich
On Tue, Jun 22, 2010 at 09:48:29AM -0400, Sam Carleton scratched on the wall: > On Tue, Jun 22, 2010 at 9:15 AM, Pavel Ivanov wrote: > > > > The idea is that the copy and nulling happens very quickly where the > > > sqlite3_close is more expensive, do the copy/null very

Re: [sqlite] When to close a db, take 2...

2010-06-22 Thread Pavel Ivanov
> No, I did not.  I am not storing any blobs right now, but...  Is the busy > handler going to kick in?  I know the busy handler is not the sole answer to > the problem, but it does seem to catch most of my SQLITE_BUSY issues since > all data is pretty small. No, this SQLITE_BUSY result is not

Re: [sqlite] When to close a db, take 2...

2010-06-22 Thread Sam Carleton
On Tue, Jun 22, 2010 at 9:15 AM, Pavel Ivanov wrote: > > The idea is that the copy and nulling happens very quickly where the > > sqlite3_close is more expensive, do the copy/null very quickly so that if > > another thread calls Close during the first threads execution of > >

Re: [sqlite] When to close a db, take 2...

2010-06-22 Thread Pavel Ivanov
> The idea is that the copy and nulling happens very quickly where the > sqlite3_close is more expensive, do the copy/null very quickly so that if > another thread calls Close during the first threads execution of > sqlite3_close, the second thread finds m_db null and will not call >

Re: [sqlite] When to close a db, take 2...

2010-06-22 Thread Luca Olivetti
En/na Sam Carleton ha escrit: > The idea is that the copy and nulling happens very quickly where the > sqlite3_close is more expensive, do the copy/null very quickly so that if > another thread calls Close during the first threads execution of > sqlite3_close, the second thread finds m_db null

Re: [sqlite] When to close a db, take 2...

2010-06-22 Thread Sam Carleton
Jay, Thank you! I believe you pointed me at the correct direction. The logic I am using of copying the m_db to a temp var, setting the m_db to null prior to calling the close method comes from my days of working with Microsoft COM. The idea is that the copy and nulling happens very quickly

Re: [sqlite] When to close a db, take 2...

2010-06-21 Thread Jay A. Kreibich
On Mon, Jun 21, 2010 at 11:56:09PM -0400, Sam Carleton scratched on the wall: > I am NEVER capturing anything in the log file, so it looks like everything > is returning the correct. I am a bit stumped right now, so if it is alright, > I am going to post my code: If you're doing a double

[sqlite] When to close a db, take 2...

2010-06-21 Thread Sam Carleton
Ok, after a bit of testing this evening, the close which is crashing the system has ALWAYS been the same close statement, the close after the Apache Module has initialized the data structure to process the request. I went in and made sure that each and every sqlite call is log if there is a