SQLite

View Ticket
Login
Ticket Hash: 72b01a982a84f64d4284f63907224c548470d457
Title: Per page/region checksums
Status: Closed Type: Feature_Request
Severity: Important Priority: Immediate
Subsystem: Unknown Resolution: Rejected
Last Modified: 2014-03-11 13:18:08
Version Found In:
Description:
Please add per page (or collection of pages) checksums. This is to detect the case when what SQLite wrote to the database is different than what is later returned from the database.

It is increasingly the case that files get larger, I/O systems more complex, features and voltages smaller at the physical level, more diversity in storage and OS (desktops, servers, mobiles, storage hierarchies). A bug or stray electron could cause an unwanted change which won't be caught by integrity check pragma unless it happens in sufficiently important metadata. Changes in data or valid but wrong metadata (eg an index entry pointing to wrong row id) will be silent.

The expectation is that checksums would be checked on each page read plus the whole database on pragma integrity check.

It is understood that it will slow down things somewhat and may impose a version bump (ie older SQLites that do not understand checksums should not be able to write to a db that uses them).