diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-05-24 13:29:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-24 13:29:33 +0200 |
| commit | e814dce2de1f67f9c92ddd0db4db4b13dda55240 (patch) | |
| tree | ee9d93dd91b6cf0a56d85c8ca895c90a711cb1b3 /src | |
| parent | 08d4b05771ada2a57dd5f96a6e852a52b6084014 (diff) | |
| parent | 1720b0586cfe0b4e0b32fd8b3ca5b9ef1799d2bc (diff) | |
| download | PROJ-e814dce2de1f67f9c92ddd0db4db4b13dda55240.tar.gz PROJ-e814dce2de1f67f9c92ddd0db4db4b13dda55240.zip | |
Merge pull request #2729 from rouault/analyze_db
Database: add a ANALYZE step during proj.db creation
Diffstat (limited to 'src')
| -rw-r--r-- | src/iso19111/factory.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/iso19111/factory.cpp b/src/iso19111/factory.cpp index 7681a2ec..5eb6d012 100644 --- a/src/iso19111/factory.cpp +++ b/src/iso19111/factory.cpp @@ -819,7 +819,9 @@ std::vector<std::string> DatabaseContext::Private::getDatabaseStructure() { : "db_0."); const auto sqlBegin("SELECT sql||';' FROM " + dbNamePrefix + "sqlite_master WHERE type = "); - const char *const objectTypes[] = {"'table'", "'view'", "'trigger'"}; + const char *const objectTypes[] = {"'table' AND " + "name NOT LIKE 'sqlite_stat%'", + "'view'", "'trigger'"}; std::vector<std::string> res; for (const auto &objectType : objectTypes) { const auto sqlRes = run(sqlBegin + objectType); @@ -846,7 +848,8 @@ void DatabaseContext::Private::attachExtraDatabases( assert(sqlite_handle_); auto tables = - run("SELECT name FROM sqlite_master WHERE type IN ('table', 'view')"); + run("SELECT name FROM sqlite_master WHERE type IN ('table', 'view') " + "AND name NOT LIKE 'sqlite_stat%'"); std::map<std::string, std::vector<std::string>> tableStructure; for (const auto &rowTable : tables) { auto tableName = rowTable[0]; |
