Hi.
Sorry for the double post, but I forgot to mention that I am using sqlite 2.8.13. Since this is a live commercial product I have been leary of upgrading due to added testing time, but would if critical bugs have been fixed.
One of our users is now blocked from using our application because he gets an error that the "database disk image is malformed." I got his SQLite db file and did a "PRAGMA integrity_check;" on it. I get the same error, of course. When stepping through the exec call I get the first row complaining that:
*** in database main ***
on page 216 cell 9: invalid page number 280
on page 220 at right child : invalid page number 278
page 264 is never used
page 268is never used
page 269 is never used
page 271 is never used
page 273 is never used
My debugger cuts it off after that, but it appears to continue in a similar fashion. However, the rc is still SQLITE_ROW. Then I get a bunch of rows (like 10) where the argument is "rowid 173 missing from index (DBBackup autoindex 1)", but still SQLITE_ROW.
Then I get result code 0x0001 and bail out. sqlite_finalize returns code 0x000b. Then I return out to my code and report the error.
We use binary data, but do the encoding in all cases that I know of. I suppose it is possible that something that shouldn't be binary data is. What else could cause this "corruption?"
Is there any way to repair the db so the user does not lose his data?
thanks.
Michael Hunley
Managing Partner/Senior Engineer
PocketPurchase Consultants

