On Tue, Sep 4, 2012 at 2:14 PM, esum <eric.b....@lmco.com> wrote:

>   Is sqlite3_trace ()
> threadsafe?


Yes.


>  Is there a reason that the same sql statement is being passed
> twice to the callback function when it is really only executed once?


Probably this is due to a schema change.  Hypothesized sequence of events:

(1) sqlite3_step() called.
(2) OP_Trace fires, causing the statement text to be printed.
(3) OP_Cookie detects a schema change, cancelling the evaluation.
(4) sqlite3_step() automatically reprepares the statement using the new
schema
(5) sqlite3_step() tries to evaluate the statement a second time
(6) OP_Trace fires again, causing the statement text to be output a second
time





>  As a
> note, the database itself appears to be perfectly fine with everything in
> tact and as expected.
>
> Thanks for all help.
>
>
>
> --
> View this message in context:
> http://sqlite.1065341.n5.nabble.com/sqlite3-trace-threadsafe-tp64004.html
> Sent from the SQLite mailing list archive at Nabble.com.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to