On Wed, Aug 27, 2014 at 11:21 AM, Jan Slodicka <j...@resco.net> wrote:
> A while ago I reported > < > http://sqlite.1065341.n5.nabble.com/What-can-be-deduced-from-integrity-check-td70451.html > > > about DB corruption issues that we occasionally receive from our users. > They > always have the same pattern: > - A few rowid's missing from a few indexes, and > - A few "wrong # of entries in index xxx" errors. > No other integrity errors, just these two types. > ... > - We use sqlite 3.7.15.2, custom encryption and custom collation. > Your custom collation function would be my prime suspect here. A subtle bug in a collation function can result in the kinds of errors you are seeing. ... > Suppose that integrity_check > a) does not fail with a fatal error > b) lists only 2 types of messages: > - rowid ... missing from index ... > - wrong # of entries in index ... > > then rebuilding of all indexes listed in the report should repair the > database. (Note that I am trying to avoid full REINDEX because it is a slow > operation.) > Correct. Note that you can add an argument to the REINDEX command telling it what to reindex. The argument can be either the name of an index, or it can be the name of a collating function, in which case all indices using that collation will be recomputed. -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users