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