fix: vendored sqlite builds SQLITE_THREADSAFE=1 — std.thread exists now
THREADSAFE=0 was correct when sx had no threads; with std.thread (S6) and std.http's pooled dispatch (S7b), concurrent connections corrupted sqlite's unprotected globals (caught live: distd under ab -c20 died with free-of-unallocated inside yy_reduce). Serialized mode is sqlite's own default and safe for every consumer; per-connection use across threads is the supported pattern.
This commit is contained in:
6
library/vendors/sqlite/sqlite.sx
vendored
6
library/vendors/sqlite/sqlite.sx
vendored
@@ -27,8 +27,8 @@
|
||||
// meaningful with user-defined functions (callbacks, above);
|
||||
// * varargs APIs (sqlite3_config, db_config, log, mprintf) —
|
||||
// configuration happens via the unit's compile-time defines;
|
||||
// * UTF-16 variants (we are UTF-8 only), the mutex/VFS layer
|
||||
// (built SQLITE_THREADSAFE=0), sessions/snapshots/vtabs/loadable
|
||||
// * UTF-16 variants (we are UTF-8 only), the VFS layer,
|
||||
// sessions/snapshots/vtabs/loadable
|
||||
// extensions (not compiled in), deprecated API (compiled out via
|
||||
// SQLITE_OMIT_DEPRECATED).
|
||||
//
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
sqlib :: #import c {
|
||||
#define "SQLITE_DQS=0";
|
||||
#define "SQLITE_THREADSAFE=0";
|
||||
#define "SQLITE_THREADSAFE=1";
|
||||
#define "SQLITE_DEFAULT_MEMSTATUS=0";
|
||||
#define "SQLITE_OMIT_DEPRECATED";
|
||||
#define "SQLITE_OMIT_SHARED_CACHE";
|
||||
|
||||
Reference in New Issue
Block a user