On 2017/02/13 8:55 PM, Jeff B. wrote:
Should have read up on integrity_check before posting the results... I re-worked my tool and here is the output:


pragma integrity_check;

*** in database main ***
On tree page 11 cell 0: Rowid 424 out of order
wrong # of entries in index sqlite_autoindex_messages_priority_1
**2 rows returned**

Well, that sheds the necessary light. The index have somehow become corrupted - not a bad corruption mind you, just an out-of-order node and an easy fix by simply running:
REINDEX sqlite_autoindex_messages_priority_1;
 or just:
REINDEX;
you can also drop the automatic index and it should be recreated, or create your own index that does the job.

The bigger question is, how did this happen? Well, there is a myriad possibilities from something as trivial as networked file access botch (and a list of other possible corruption causes that you can read about at https://sqlite.org/howtocorrupt.html) or something as insane as Ra hating you and he had a cosmic ray hit your memory just right....

If this happened once in years, I wouldn't worry about it, but try to work a "pragma integrity_check;" into your maintenance runs and take action if it reports any funnies. If this happens regularly, it indicates a system problem and you should start logging activity and run (and log) integrity checks often till you find the culprit.

Cheers,
Ryan
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to