Hi,

the GPL'ed application GNUnet opens a SQLite DB inside the main thread
and uses statements that were prepared there in a few other threads
(protected by mutexes).
If SQLite was built with "--enable-threadsafe" (as Debian's
"libsqlite3-0" package), sqlite3_step fails with "library routine called
out of sequence".

The FAQ says:
---
An *sqlite3* structure can only be used in the same thread that called
sqlite3_open <http://www.sqlite.org/capi3ref#sqlite3_open> to create it.
You cannot open a database in one thread then pass the handle off to
another thread for it to use.
---
But this is only true for Unix builds compiled with
"--enable-threadsafe" (os_unix.c:1050). Statements prepared in the way
described above work on Win32 (os_win.c:628) and if SQLite isn't threadsafe.

Is this behavior really intended?

Thanks a lot,

Nils Durner


_______________________________________________
GNUnet-developers mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnunet-developers

Reply via email to