Some of our users have been reporting corruption in their SQLite database.
Running pragma-integrity check on the database yields the following results:
Guinevere:corrupted-messages Steve$ sqlite3 messages.db
SQLite version 3.4.0
Enter ".help" for instructions
sqlite> pragma integrity-check;
SQL error: near "-": syntax error
sqlite> pragma integrity_check;
*** in database main ***
On tree page 29677 cell 107: 2nd reference to page 29898
On tree page 29677 cell 107: Child page depth differs
On tree page 29677 cell 108: 2nd reference to page 29899
On tree page 29677 cell 109: 2nd reference to page 29900
On page 29677 at right child: invalid page number 29909
SQL error: database disk image is malformed
sqlite> .quit
Guinevere:corrupted-messages Steve$

The database was created with SQlite 3.4.0 on a Mac OSX 10.3.9 or later
system.

The user reported that he experienced a system crash and had to hard-power
his machine off and back on again. The database was open at the time however
the library was being run with synchronous=full. The following pragmas were
also applied:

pragma cache_size=2000

pragma default_cache_size=30000

pragma temp_store=1

pragma auto_vacuum=0

At this point I'm unsure what may have happened to cause this corruption.
The same corruption has been reported by other users of the program so I'm
fairly confident this isn't a one-off. Is there any other analysis I could
conduct that might give a clue as to how the corruption is arising?

Thanks!
-Steve

Reply via email to