Merge pull request #2528 from mapycz/fix-plugin-sqlite-shared-cache
sqlite plugin - disable shared cache for sqlite prior to 3.7.15
This commit is contained in:
commit
12ebb97779
1 changed files with 6 additions and 1 deletions
|
@ -57,7 +57,12 @@ public:
|
||||||
int mode = SQLITE_OPEN_READWRITE;
|
int mode = SQLITE_OPEN_READWRITE;
|
||||||
#if SQLITE_VERSION_NUMBER >= 3006018
|
#if SQLITE_VERSION_NUMBER >= 3006018
|
||||||
// shared cache flag not available until >= 3.6.18
|
// shared cache flag not available until >= 3.6.18
|
||||||
mode |= SQLITE_OPEN_NOMUTEX | SQLITE_OPEN_SHAREDCACHE;
|
// Don't use shared cache in SQLite prior to 3.7.15.
|
||||||
|
// https://github.com/mapnik/mapnik/issues/2483
|
||||||
|
if (sqlite3_libversion_number() >= 3007015)
|
||||||
|
{
|
||||||
|
mode |= SQLITE_OPEN_NOMUTEX | SQLITE_OPEN_SHAREDCACHE;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
const int rc = sqlite3_open_v2 (file_.c_str(), &db_, mode, 0);
|
const int rc = sqlite3_open_v2 (file_.c_str(), &db_, mode, 0);
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue