Synthèse
Once the model is in place, we can define an invariant that will trigger in the event of data loss or database corruption: \* There are no "holes" in the database. \* All the frames that were added to the WAL have landed in order. NoPageIsLost ≜ ∀ f ∈ 1‥Cardinality(db) : f ∈ db Running the model-checker quickly finds a counter-example. It takes only 20 states to witness a missing page in the database which can, as stated in the documentation, lead to database corruption. The sequence of states l
Once the model is in place, we can define an invariant that will trigger in the event of data loss or database corruption: \* There are no "holes" in the database. \* All the frames that were added to the WAL have landed in order. NoPageIsLost ≜ ∀ f ∈ 1‥Cardinality(db) : f ∈ db Running the model-checker quickly finds a counter-example. It takes only 20 states to witness a missing page in the database which can, as stated in the documentation, lead to database corruption. The sequence of states looks very similar to what is included in SQLite’s own report of the bug, validating our model.
Source originale
sqlite.org