How to fix inconsistency error

Yes this is this button.
Given that your backup has 4M blocks, it could take some time. You can follow the advance on the live log (About / Show log)

ok i’ll do it after the shedule backup today to avoid some conflicts.

shedule backup is ended and without any error (i didn’t do the delete and repair yet) but yesterday i got the error so i’ll see tomorrow if i got it again and i’ll let you know

In testing a Block table export as SQL, I put the 307 MB text file into glogg to look at it that way too.

showed up as


and what’s interesting is that it has the spot where 1051699 would be expected (at least by me).


shows ID 1051649 in two rows, in spite of ID being table primary key, which I think is also illegal.
1051699 isn’t mentioned anywhere in the file, however the BlocksetEntry table references it like:


so maybe the SQL doing the size calculation takes the BlockID for the missing Block yet adds 0
instead of giving error on should-not-happen situation? My SQL’s not good enough to read it all.

Regardless, I thought it was interesting to look at the shape of the corruption, whatever it means.

How To Corrupt An SQLite Database File is the official document on how corruption may happen.


It’s difficult to guess what is the behaviour of a database engine when its files are corrupted. Somehow, the condition

““Block””.““ID”” = ““BlocksetEntry””.““BlockID””

is not satisfied by the database as it is. From the query I displayed (block with an ID between 1051690 and 1051702) did not display the correct block at the expected place. Normal Sql rules can’t apply in this case.

1 Like

seems to be fiexed because i don’t get the error today too.

thank you very much.

1 Like