> Looking at the implementation of sqlite3_expired, its just a 
> comparison of the expired flag in the statement or if the 
> passed statement is NULL. The cost is an additional if 
> statement before execution, however this does not save you 
> from SQLITE_SCHEMA errors. In theory someone could modify the 
> schema just after you called sqlite3_expired, but before you 
> step the statement.

I've acquired a mutex lock at this point so no danger of another thread
clobbering the schema before the step.

I'm also testing for NULL statements anyway (first pass). I figured 
an ease way to avoid schema errors would be to change:

if (db._insertStatement == NULL)
{
   // preparation

to:

if (sqlite3_expired(db._insertStatement))
{
   // preparation

> 
> The question should more likely be: When is the expired flag set?
> 

I agree.

Daniel.

==============================================================================
Please access the attached hyperlink for an important electronic communications 
disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to