Background: Monotone has a "db check" command, that goes through and verifies that everything in the database is valid and accessible. While our existing tests basically hit every row of every table, so most things should be caught, we didn't previously call sqlite's "PRAGMA integrity_check". In principle, I guess, this could mean that subtle things like a corrupted index that only caused issues on certain access patterns could be missed...
So, we just committed a patch to call the PRAGMA as part of the "db check" process, but now this raises the issue of how we can _test_ this new code path. So, my question is -- what is a simple way to reliably corrupt a sqlite db so that "PRAGMA integrity_check" will fail? Thanks, -- Nathaniel -- "...these, like all words, have single, decontextualized meanings: everyone knows what each of these words means, everyone knows what constitutes an instance of each of their referents. Language is fixed. Meaning is certain. Santa Claus comes down the chimney at midnight on December 24." -- The Language War, Robin Lakoff