On 6 Nov 2017, at 10:38pm, Nicholas Lovell <nicholas.lov...@tivo.com> wrote:

> When getting sqlite_corrupt when reading from a database, is there a way to 
> know if a particular failure came from reading/initializing a page from a WAL 
> file, or the database disk file?

Obtain the extended error code to learn more than you already know:


> Specifically I've been seeing a number of failures around btreeInitPage. 
> However when I pull up the saved copies I make whenever corruption occurs and 
> run "pragma integrity_check", its coming up as "ok".

What exactly are you "saving" ?  The database file ?  Or the WAL file too ?  Or 
the SHM file too ?

It would probably be useful to figure out what’s causing your corruption.  What 
PRAGMAs does your program use under normal use ?  Are you using anything clever 
like shared cache ?  Also, is your database stored on a disk in the computer 
running SQLite or it is accessed remotely, perhaps across a network ?

sqlite-users mailing list

Reply via email to