On Wed, 08 Dec 2004 14:27:45 -0500, D. Richard Hipp <[EMAIL PROTECTED]> wrote: > Michael Robinette wrote: > > I have table somewhat like this created by sqlite 2.8.14: > > > > create table t1( created timestamp not null, n int not null, url text > > not null, primary key(n) ); > > > > somehow i've ended up with a database where .dump t1 produces a bunch of > > > > insert into t1 values(NULL,NULL,NULL); > > > > a pragma integrity_check produces output like: > > > > *** in database main *** > [error messages omitted...] > > > > how does one get into this state where the contraints are ignored? > > In a corrupt database, all things are possible.
Yes. I'm trying to figure out how the database got corrupted. I'm very confident that my code plays by all the rules. > > > If I were a guessing man, I'd say that space is being reserved and > > zeroed, but data is never being flushed to disk. Additionally, it > > seems that a journal file is either not being created, or is being > > deleted before the database is opened again, so that data is never > > recovered. > > > > Has anyone seen anything like this and can suggest possible causes? > > > > See http://www.sqlite.org/lockingv3.html section 6.0 "How To Corrupt > Your Database Files". This is written for version 3.0 but all the > same rules apply to version 2.8.14. > > If you think the problem is caused by some bug in SQLite and not > by one of the external problems described above, please let us know > how to reproduce it and we will look into the problem further. I did read that, which is why I'm confident that my wrapper plays by all the rules. At this point I don't believe the bug is in SQLite, but saying 'That user bought a cheap IDE drive' doesn't help me all that much, so I'm trying to figure out what sequence of actions was interrupted so that I can say what happened with more certainty. Thanks, - michael