Re: [sqlite] Effectiveness of PRAGMA integrity_check;

2004-04-15 Thread Greg Miller
D. Richard Hipp wrote: From what I am told, most IDE drives do signal the OS when the data reaches the platter. I'm also told that the Linux fsync() call does not return until it gets that signal. The Windows FlushFileBuffers(), on the other hand, does not wait for the data to get to platter.

Re: [sqlite] Effectiveness of PRAGMA integrity_check;

2004-04-15 Thread D. Richard Hipp
Greg Miller wrote: Liz Steel wrote: You say that I shouldn't get a corrupt database when I pull the power, but I am consistently getting this. I am using SQLite version 2.8.9 using the C++ interface running on Windows XP Home. Is there anything I can do to stop this happening? If you have an

Re: [sqlite] Effectiveness of PRAGMA integrity_check;

2004-04-15 Thread Greg Miller
Andrew Piskorski wrote: On Thu, Apr 15, 2004 at 08:33:14AM -0500, Greg Miller wrote: support that. The FreeBSD folks tried to solve this by turning off write caching by default. Unfortunately, this hurt performance so much they had to turn it back on and just recommend SCSI drives for important

Re: [sqlite] Effectiveness of PRAGMA integrity_check;

2004-04-15 Thread Andrew Piskorski
On Thu, Apr 15, 2004 at 08:33:14AM -0500, Greg Miller wrote: > support that. The FreeBSD folks tried to solve this by turning off write > caching by default. Unfortunately, this hurt performance so much they > had to turn it back on and just recommend SCSI drives for important data. Why, do

Re: [sqlite] Effectiveness of PRAGMA integrity_check;

2004-04-15 Thread Greg Miller
Liz Steel wrote: You say that I shouldn't get a corrupt database when I pull the power, but I am consistently getting this. I am using SQLite version 2.8.9 using the C++ interface running on Windows XP Home. Is there anything I can do to stop this happening? If you have an IDE hard drive

Re: [sqlite] Effectiveness of PRAGMA integrity_check;

2004-04-15 Thread D. Richard Hipp
D. Richard Hipp wrote: (1) Change to version 2.8.13. (2) Describe in detail what kind of changes you are making to the database as you pull the power. (3) Send me one of your corrupt databases for analysis. (4) Begin with a database that passes a "PRAGMA integrity_check". Do whatever it

Re: [sqlite] Effectiveness of PRAGMA integrity_check;

2004-04-15 Thread D. Richard Hipp
Liz Steel wrote: Hello again, I'm not sure if you received my last email, so I'm sending it to the list in the hope that someone can help me. You say that I shouldn't get a corrupt database when I pull the power, but I am consistently getting this. I am using SQLite version 2.8.9 using the

Re: [sqlite] Effectiveness of PRAGMA integrity_check;

2004-04-15 Thread Liz Steel
running on Windows XP Home. Is there anything I can do to stop this happening? Thanks, Liz. Original Message Follows From: "D. Richard Hipp" <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: [sqlite] Effectiveness of PRAGMA integrity_check; Date: Wed, 14 Apr 2004 10:50:28

RE: [sqlite] Effectiveness of PRAGMA integrity_check;

2004-04-14 Thread Liz Steel
Hello! I am trying to do a similar sort of thing with my database. The only way I've found to fairly reliably create a corrupt database file is to pull the battery out of my laptop whilst my application is accessing the database. I haven't used the "PRAGMA integrity_check;" command, but I will

Re: [sqlite] Effectiveness of PRAGMA integrity_check;

2004-04-14 Thread D. Richard Hipp
[EMAIL PROTECTED] wrote: I'm trying to write some defensive code that is able to recover from database corruption. The idea is that if a disk fails and a database becomes corrupt it can be detected and synchronised from a backup copy. To this end, I've just been trying to write a function that