diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-05-19 19:26:05 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-05-19 19:26:05 +0200 |
| commit | 9d4de5d139a5b4b5eeabc41551ef3f92d9c64625 (patch) | |
| tree | 8eb4987d57e108d7c30e0c9ffadf5fbdfda3e133 /src | |
| parent | b6b0ae12e306c8b7760e79f338bb0f155340117a (diff) | |
| download | PROJ-9d4de5d139a5b4b5eeabc41551ef3f92d9c64625.tar.gz PROJ-9d4de5d139a5b4b5eeabc41551ef3f92d9c64625.zip | |
Add runtime checking that sqlite3 is >= 3.11
```
$ LD_LIBRARY_PATH=$HOME/install-sqlite-3.8.2/lib PROJ_DEBUG=1 src/projinfo -s @in.wkt -t @out.wkt --spatial-test intersects >/dev/null
SQLite3 version is 3.8.2, whereas at least 3.11 should be used
```
Diffstat (limited to 'src')
| -rw-r--r-- | src/iso19111/factory.cpp | 9 |
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()) { |
