Skip to content

Commit

Permalink
[WIP] disable integrity_check
Browse files Browse the repository at this point in the history
  • Loading branch information
murlock committed Dec 24, 2019
1 parent b111a2a commit 601dbc4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sqliterepo/repository.c
Original file line number Diff line number Diff line change
Expand Up @@ -1638,6 +1638,7 @@ sqlx_repository_dump_base_fd_no_copy(struct sqlx_sqlite3_s *sq3,
const char *fallback_msg = "falling back on legacy dump function";

/* Detect a wrong/corrupted database file */
#if 0
rc = sqlx_exec(sq3->db, "PRAGMA integrity_check");
if (rc != SQLITE_OK) {
if (rc == SQLITE_NOTADB || rc == SQLITE_CORRUPT) {
Expand All @@ -1652,6 +1653,7 @@ sqlx_repository_dump_base_fd_no_copy(struct sqlx_sqlite3_s *sq3,
}
goto end;
}
#endif

if ((rc = sqlite3_db_cacheflush(sq3->db)) != SQLITE_OK) {
GRID_NOTICE("Failed to flush [%s][%s]: %s, %s",
Expand Down Expand Up @@ -1681,7 +1683,7 @@ sqlx_repository_dump_base_fd_no_copy(struct sqlx_sqlite3_s *sq3,
}
}

end:
// end:
EXTRA_ASSERT(fd < 0);
return err;
}
Expand Down

0 comments on commit 601dbc4

Please # to comment.