On Sun, 29 Nov 2009 10:31:29 +0000, Ben <[email protected]> wrote:
>Hi all, > >I write an SQLite browser for macs, and someone recently brought to my >attention that it doesn't handle corrupt database files very well. >I've read the pages on pragmas for integrity checking and how locking >problems can cause corruption, but am looking for something a bit >different: > >1. Are there detectably different ways for a database to become >corrupt? Or is SQLITE_CORRUPT the only one? >2. Is there an easy way for me to create a couple of corrupt databases >for testing? I was thinking that opening a database file in a text >editor and swapping bits around would do it, but wondered if this >would produce different symptoms than a file 'properly' corrupted >through accidental damage. http://www.sqlite.org/lockingv3.html#how_to_corrupt Also, the testsuite (part of the SQLite source tree) contains some code to corrupt a database. >Thanks, > >Ben Barnett -- ( Kees Nuyt ) c[_] _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

