On 23 Nov 2017, at 3:11am, 林自均 <johnl...@gmail.com> wrote:

> It's for logs. If it corrupts, we rename it with a suffix ".corrupt" and
> write new logs into a new sqlite file. Does that affect the way I check it?

I was interested why you were checking for corruption, so your answer just 
inspires more questions.

Why are your sqlite database files being corrupted so frequently that it’s 
worth checking for corruption ?  SQLite is a very good database system.  It 
does not corrupt its files.  You might spend your time better finding out why 
you keep getting corrupt log files.  Maybe there is a fault in your 
programming, or in your hardware.

Why are you not just deleting the corrupt database files ?  They’re corrupt.  
You cannot trust the contents at all.  You do not know if they have one row 
missing or hundreds.  They do not tell you anything useful

ALso, why not just create a new log each time ?  It can take a very long time 
to execute "PRAGMA integrity_check".  The longer your file goes uncorrupted, 
the longer the check will take.  Eventually you will get a pause of many 
minutes every time you start up your program.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to