only leverage sqlite3_open_v2 in versions of sqlite that support it - ammends r3039 - see also #797

This commit is contained in:
Dane Springmeyer 2011-07-16 19:34:26 +00:00
parent 85804b797f
commit 572da8766f

View file

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