Skip to content

Add sqliteproof - #3

Open
OrbitalKeyAi wants to merge 1 commit into
lichuang:mainfrom
OrbitalKeyAi:add-sqliteproof
Open

Add sqliteproof#3
OrbitalKeyAi wants to merge 1 commit into
lichuang:mainfrom
OrbitalKeyAi:add-sqliteproof

Conversation

@OrbitalKeyAi

Copy link
Copy Markdown

PRAGMA integrity_check detects damage well, but answers with page numbers:

Page 4: btreeInitPage() returns error code 11

sqliteproof answers the questions you actually have when a database goes bad:

orders      damaged   392/400 rows, 8 lost, breaks after row 182
customers   intact    400/400
audit_log   intact    400/400

MIT, zero dependencies, Python 3.9+. Opens the database read-only, and reports UNKNOWN rather than "clean" when the damage prevents a determination.

Tested against databases built by SQLite and then corrupted at known page offsets: 3/3 localised to the correct table, 0 false alarms, 0 false-clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant