(I think it’s cleaner to reply to three replies in one message; here goes…)
On 2014 Jun 23, at 22:43, Keith Medcalf <kmedc...@dessus.com> wrote: > Unique is implemented (as it must be) via a unique index. Very good, Keith. So my database *does* have an index. > You should be able to rebuild the corrupted index with: > REINDEX ItemTable; Nope. If I try that on the “bad” file, I get Error: Database disk image is malformed. If I manually change byte 2048 to 0x0A first, then the command succeeds. Looking at the resulting database, it seemed to change the order of the columns listed in the last page, which I assume is not significant. On 2014 Jun 24, at 00:06, Clemens Ladisch <clem...@ladisch.de> wrote: > <http://www.sqlite.org/fileformat2.html#cell_payload> says … Thank you, Clemens. 0x0A=index. 0x0D=table. I suppose that is a sensible re-use of “carrige return” and “line feed”. > So the bad index claims to be a table. > Is there any other 0x0A byte in the good file? No, only that one. On 2014 Jun 24, at 02:10, Eduardo Morras <emorr...@yahoo.es> wrote: > Did you create the db schema with newer version of sqlite3? Perhaps you did > that and create a partial index, not supported on older sqlite3 versions. I see that the Partial Index feature was added in August 2013, in sqlite 3.8. I don’t think I have anything greater than 3.7.x on this Mac, but I’m looking into it. * * * According to the git history for my project, I committed the corrupt file about 10 days ago. Still trying to figure out how that happened. Thank you guys for all of the clues. Jerry _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users