On Sun, 4 Jan 2015 17:31:14 +0800
Neo Anderson <[email protected]> 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.
>                 

Char 27 is on Sqlite3 header. It tracks the file change counter. When you .dump 
the counter is increased in your old.db by 1, that's the difference. Both files 
has the same corruption.

The mail list has attachment set to off, so they're deleted before remailed.

---   ---
Eduardo Morras <[email protected]>
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to