aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-05-19 20:26:04 +0200
committerGitHub <noreply@github.com>2020-05-19 20:26:04 +0200
commit8a1e831688b56480964b88387cd86704466d3ea6 (patch)
tree8eb4987d57e108d7c30e0c9ffadf5fbdfda3e133 /src
parentb6b0ae12e306c8b7760e79f338bb0f155340117a (diff)
parent9d4de5d139a5b4b5eeabc41551ef3f92d9c64625 (diff)
downloadPROJ-8a1e831688b56480964b88387cd86704466d3ea6.tar.gz
PROJ-8a1e831688b56480964b88387cd86704466d3ea6.zip
Merge pull request #2235 from rouault/check_sqlite3_runtime
Add runtime checking that sqlite3 is >= 3.11
Diffstat (limited to 'src')
-rw-r--r--src/iso19111/factory.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/iso19111/factory.cpp b/src/iso19111/factory.cpp
index 16554b2a..3901e183 100644
--- a/src/iso19111/factory.cpp
+++ b/src/iso19111/factory.cpp
@@ -499,6 +499,15 @@ void DatabaseContext::Private::open(const std::string &databasePath,
if (!ctx) {
ctx = pj_get_default_ctx();
}
+
+ const int sqlite3VersionNumber = sqlite3_libversion_number();
+ // Minimum version for correct performance: 3.11
+ if (sqlite3VersionNumber < 3 * 1000000 + 11 * 1000) {
+ pj_log(ctx, PJ_LOG_ERROR,
+ "SQLite3 version is %s, whereas at least 3.11 should be used",
+ sqlite3_libversion());
+ }
+
setPjCtxt(ctx);
std::string path(databasePath);
if (path.empty()) {