Skip to content

Commit

Permalink
Merge pull request #3888 from rouault/fix_3887
Browse files Browse the repository at this point in the history
proj.db opening: allow opening with a URI (typically for memvfs) (fixes #3887)
  • Loading branch information
rouault committed Sep 13, 2023
2 parents bc4aa41 + 2297392 commit 5c680a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/iso19111/factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,10 @@ std::shared_ptr<SQLiteHandle> SQLiteHandle::open(PJ_CONTEXT *ctx,
}
sqlite3 *sqlite_handle = nullptr;
// SQLITE_OPEN_FULLMUTEX as this will be used from concurrent threads
if (sqlite3_open_v2(path.c_str(), &sqlite_handle,
SQLITE_OPEN_READONLY | SQLITE_OPEN_FULLMUTEX,
vfsName.empty() ? nullptr : vfsName.c_str()) !=
SQLITE_OK ||
if (sqlite3_open_v2(
path.c_str(), &sqlite_handle,
SQLITE_OPEN_READONLY | SQLITE_OPEN_FULLMUTEX | SQLITE_OPEN_URI,
vfsName.empty() ? nullptr : vfsName.c_str()) != SQLITE_OK ||
!sqlite_handle) {
if (sqlite_handle != nullptr) {
sqlite3_close(sqlite_handle);
Expand Down

0 comments on commit 5c680a5

Please sign in to comment.