On 2/22/17, Ward WIllats <sqlite-us...@wardco.com> wrote: > sqlite> pragma integrity_check; > *** in database main *** > On tree page 598 cell 2: Offset 65026 out of range 178..1020 > On tree page 598 cell 1: Offset 21743 out of range 178..1020 > > Then I SIGKILL'd my application and restarted it, and it recovered 8 frames > from the WAL file, and the app seemed to be working again. So I used the > shell again while the app was running and lo and behold! The database was > fixed! > > sqlite> pragma integrity_check; > ok > > So....does this sorcery seem possible?
Somehow some bad data got written into the WAL file. Or perhaps part of the WAL file was overwritten by an error somewhere else in the code. (See, for example, paragraph 1.1 of https://www.sqlite.org/howtocorrupt.html) At recovery, SQLite saw that the checksums did not match and rolled back the transaction containing the error (and all subsequent transactions, if any) thus fixing the problem. -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users