On Jan 4, 2015, at 3:31 AM, Neo Anderson <neo_in_mat...@msn.com> wrote:
> I have a customer database which appears corrupt. When I run sqlite3 mydb and > PRAGMA integrity_check I got (literally, no other lines): > > Error: database disk image is malformed > > However, I can .dump and .read to create a new database. The new database > works fine and the most surprising result is the old and new database files > are exactly of the same size. But running cmp old.db new.db gave me: > > differ: char 27, line 1 > > My question is why .dump works but sqlite3 thinks the file is corrupt. > Attached please find old.db and new.db in a zip package. Hope this can help > improve sqlite. Are you using the same sqlite3 binary for both operations? If a database has a table definition that an older version of SQLite does not understand, it will sometimes give this error. If you’re using a newer version of SQLite to dump/load the files, there will be no error. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users