apply patch from stella for faster sqlite reads - closes #797

This commit is contained in:
Dane Springmeyer 2011-07-14 00:28:04 +00:00
parent 8bfd5956bc
commit b18a536194
2 changed files with 4 additions and 1 deletions

View file

@ -14,6 +14,8 @@ For a complete change history, see the SVN log.
Mapnik Trunk Mapnik Trunk
------------ ------------
- SQLite Plugin: optimize io using shared cache and no mutexes (#797)
- Directly link input plugins to libmapnik to avoid having to set dlopen flags from binding languages (#790) - Directly link input plugins to libmapnik to avoid having to set dlopen flags from binding languages (#790)
- Throw an error during registration for fonts which Freetype2 does not report a family or style name (r2985). - Throw an error during registration for fonts which Freetype2 does not report a family or style name (r2985).

View file

@ -122,7 +122,8 @@ public:
sqlite_connection (const std::string& file) sqlite_connection (const std::string& file)
: db_(0) : db_(0)
{ {
if (sqlite3_open (file.c_str(), &db_)) sqlite3_enable_shared_cache(1);
if (sqlite3_open_v2 (file.c_str(), &db_, SQLITE_OPEN_NOMUTEX|SQLITE_OPEN_SHAREDCACHE, 0))
{ {
std::ostringstream s; std::ostringstream s;
s << "Sqlite Plugin: "; s << "Sqlite Plugin: ";