mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-01-21 03:55:00 +00:00
Merge pull request #548 from mapbox/integrity-check
Check integrity of sqlite3 file before decoding or tile-joining
This commit is contained in:
commit
6b29966e4a
@ -1,3 +1,7 @@
|
|||||||
|
## 1.27.12
|
||||||
|
|
||||||
|
* Check integrity of sqlite3 file before decoding or tile-joining
|
||||||
|
|
||||||
## 1.27.11
|
## 1.27.11
|
||||||
|
|
||||||
* Always include tile and layer in tippecanoe-decode, fixing corrupt JSON.
|
* Always include tile and layer in tippecanoe-decode, fixing corrupt JSON.
|
||||||
|
@ -274,6 +274,12 @@ void decode(char *fname, int z, unsigned x, unsigned y, std::set<std::string> co
|
|||||||
fprintf(stderr, "%s: %s\n", fname, sqlite3_errmsg(db));
|
fprintf(stderr, "%s: %s\n", fname, sqlite3_errmsg(db));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *err = NULL;
|
||||||
|
if (sqlite3_exec(db, "PRAGMA integrity_check;", NULL, NULL, &err) != SQLITE_OK) {
|
||||||
|
fprintf(stderr, "%s: integrity_check: %s\n", fname, err);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (z < 0) {
|
if (z < 0) {
|
||||||
|
@ -11,6 +11,12 @@ void enumerate(char *fname) {
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *err = NULL;
|
||||||
|
if (sqlite3_exec(db, "PRAGMA integrity_check;", NULL, NULL, &err) != SQLITE_OK) {
|
||||||
|
fprintf(stderr, "%s: integrity_check: %s\n", fname, err);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
const char *sql = "SELECT zoom_level, tile_column, tile_row from tiles order by zoom_level, tile_column, tile_row;";
|
const char *sql = "SELECT zoom_level, tile_column, tile_row from tiles order by zoom_level, tile_column, tile_row;";
|
||||||
|
|
||||||
sqlite3_stmt *stmt;
|
sqlite3_stmt *stmt;
|
||||||
|
@ -413,6 +413,12 @@ struct reader *begin_reading(char *fname) {
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *err = NULL;
|
||||||
|
if (sqlite3_exec(db, "PRAGMA integrity_check;", NULL, NULL, &err) != SQLITE_OK) {
|
||||||
|
fprintf(stderr, "%s: integrity_check: %s\n", fname, err);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
const char *sql = "SELECT zoom_level, tile_column, tile_row, tile_data from tiles order by zoom_level, tile_column, tile_row;";
|
const char *sql = "SELECT zoom_level, tile_column, tile_row, tile_data from tiles order by zoom_level, tile_column, tile_row;";
|
||||||
sqlite3_stmt *stmt;
|
sqlite3_stmt *stmt;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#ifndef VERSION_HPP
|
#ifndef VERSION_HPP
|
||||||
#define VERSION_HPP
|
#define VERSION_HPP
|
||||||
|
|
||||||
#define VERSION "tippecanoe v1.27.11\n"
|
#define VERSION "tippecanoe v1.27.12\n"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user