I found that the sqlite3_open call is not thread safe even if you open different files in separate connections. Cannot tell you about sqlite3_close but may be the same problem. Darío
On Dec 26, 2007 6:40 AM, Pathompong Puengrostham <[EMAIL PROTECTED]> wrote: > Hi, > > I have a multi-threaded program. Each thread opens a connection to the same > database file. It runs fine most of the time but sometime I get a 'no such > table' error from a SQL select statement. It appears that if one thread > close the database connection, it closes all the schema without checking > nRef in BtShared. This make other threads receive a 'no such table' error. > > Do I get it right that schema is also shared together with Btree? When > shared cache mode is enabled, does SQLite really share cache within one > thread and not between other threads? I don't know much about internal of > SQLite. But from looking at the source code, there is only one > sqlite3SharedCacheList variable that is shared with every threads. > > Jay > ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------