Re: [sqlite] What does "PRAGMA integrity_check" actually do?

2009-01-09 Thread Richard Klein
Roger Binns wrote: >> Writing to the beginning of the file (the first 40 bytes >> or so) corrupts the database so badly that SQLite can't >> even execute the pragma. > > The header contains a signature for the file and important meta > information which make the file useless if they are wrong.

Re: [sqlite] What does "PRAGMA integrity_check" actually do?

2009-01-09 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Richard Klein wrote: > Writing to the beginning of the file (the first 40 bytes > or so) corrupts the database so badly that SQLite can't > even execute the pragma. The header contains a signature for the file and important meta information which

[sqlite] What does "PRAGMA integrity_check" actually do?

2009-01-09 Thread Richard Klein
I wrote a test program to deliberately trash a database file, and then see if "PRAGMA integrity_check" could detect the corruption. The only thing I found that works is writing beyond the end of the file. Writing to the beginning of the file (the first 40 bytes or so) corrupts the database so