Hello, I am not sure if that is exactly the problem, but it seems that sqlite3_prepare() deadlocks when called to attach a in-memory database that is already attached.
The second ATTACH occurs on a separate thread with a separate handle to a database that is already opened in the process. Is that known behavior? If a thread is attached on a database handle, and the database is opened on a separate handle, should the memory database be attached to the second handle as well? Best Regards, Kervin