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:
Artem Pavlenko 2014-10-13 14:42:48 +01:00
commit 12ebb97779

View file

@ -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
// 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; 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