patters <[EMAIL PROTECTED]> wrote: > Greetings, > > We ran into a bug that's not documented behavior: closing a connection that > was created in a different thread (where thread A calls sqlite3_open[16], > "hands off" the connection to thread B, and thread B calls sqlite3_close). > > The documentation (http://www.sqlite.org/faq.html#q6) says that any > functions can be used with a connection as long as it's not being used by > another thread. With SQLITE_ENABLE_MEMORY_MANAGEMENT defined,
The documentation says that when SQLITE_ENABLE_MEMORY_MANAGEMENT is defined then all operations against a database connection must occur in the same thread in which the database connection was originally opened. This constraint exists for all versions of SQLite before and including 3.4.2. The constraint is removed in version 3.5.0. And as is my custom, I must also warn you that your best remedy is to not use threads in the first place since threads are evil and programs that use threads are almost always buggy and slow. If you feel compelled to use threads in spite of this warning, then upgrading to SQLite version 3.5.0 will probably work out better for you than trying to use version 3.4.2 or earlier. -- D. Richard Hipp <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------