Hi Simon,

If I run my program step-by-step, I can see that the sqlite database is not 
modified when I do an INSERT. It is modified only when I do a COMMIT. 

I read the page on the sqlite website detailing how sqlite deals with crashes 
and untimely power losses, and it says that the journal file is created just 
before modifying the database and is a copy of the areas that are to be 
modified. Once the journal file is committed to the disk, the database is 
modified. 
But this is not what I can see. What I can see is that the database file is not 
modified when I do the INSERT, it is modified only when I do the COMMIT. 

And even then, that would not explain why the journal file lingers after 
re-opening the database. 

Could anyone shed some light on the above?

Thank you very much for any help!

Best regards,

  Fabrice

------Original Message------
From: Simon Slavin
To: Fabrice Triboix
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Question about how sqlite recovers after a power loss
Sent: 18 Feb 2014 08:57


On 18 Feb 2014, at 8:13am, Fabrice Triboix <ftrib...@falcon-one.com> wrote:

> Actually, the journal file does not get deleted when I do a SELECT just after 
> opening the database. 

Depending on your journal mode (I think), the journal file should be deleted, 
but then it will immediately be recreated.  Are you sure that this is not 
what's happening ?

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

Reply via email to