Closed tpgxyz closed 11 months ago
Thanks for the report. I'd rarher replace it together with sqlite3_open() with sqlite3_open_v2(,, SQLITE_OPEN_READWRITE|SQLITE_OPEN_SHAREDCACHE, NULL) call. Not only the flags works is ignored by sqlite builds compiled with -DSQLITE_OMIT_SHARED_CACHE, it also prevents from contaminating the shared cache use for SQLite connections not opend by createrepo_c library.
SQLITE_OPEN_SHAREDCACHE flag was added in sqlite-3.6.18 4 years ago.
Hi, looks like there is no check if SQLite is compiled with -DSQLITE_OMIT_SHARED_CACHE According to SQLite upstream docs this option is recommended to use https://www.sqlite.org/c3ref/enable_shared_cache.html
sqlite3_enable_shared_cache
I’d surges to make this sqlite3_enable_shared_cache call conditional if SQLite is compiled with -DSQLITE_OMIT_SHARED_CACHE