Hi, I am using sqlite version 3.7.13 in a multi-threaded application. In this application, multiple connections to the same database are established, and every connection has the sqlite tracer attached to it with the sqlite3_trace () function. I use the same callback function in each of the sqlite3_trace () calls. This callback function simply prints the const char* sql statement to stdout and then flushes stdout.
I am getting odd results when I do a simple test such as doing a couple of inserts to different tables from 4 threads. Some sql statements appear to be printed twice or more when they should only be printed once. The sql statements that are replicated vary from test to test, and I am lead to believe that there may be some race condition. Is sqlite3_trace () threadsafe? Is there a reason that the same sql statement is being passed twice to the callback function when it is really only executed once? 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