only leverage sqlite3_open_v2 in versions of sqlite that support it - ammends r3039 - see also #797
This commit is contained in:
parent
85804b797f
commit
572da8766f
1 changed files with 4 additions and 0 deletions
|
@ -122,8 +122,12 @@ public:
|
||||||
sqlite_connection (const std::string& file)
|
sqlite_connection (const std::string& file)
|
||||||
: db_(0)
|
: db_(0)
|
||||||
{
|
{
|
||||||
|
#ifdef sqlite3_open_v2
|
||||||
sqlite3_enable_shared_cache(1);
|
sqlite3_enable_shared_cache(1);
|
||||||
if (sqlite3_open_v2 (file.c_str(), &db_, SQLITE_OPEN_NOMUTEX|SQLITE_OPEN_SHAREDCACHE, 0))
|
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;
|
std::ostringstream s;
|
||||||
s << "Sqlite Plugin: ";
|
s << "Sqlite Plugin: ";
|
||||||
|
|
Loading…
Reference in a new issue