Hi:
    I read from the website that in WAL mode, when we commit a transaction, 
data will be written to -wal file, when doing checkpoint, the committed data 
will be written to database file. If a transaction commit failed, the failed 
transaction data will not be written to database, so we can say it promises the 
data integrity, right?
    In this mode, do we need to check the integrity of database ( PRAGMA 
database.integrity_check;)? Thank you very much.

Catherine

On 06/26/2015 09:09 AM, Simon Slavin wrote:


On 26 Jun 2015, at 2:06am, Wei, Catherine <Catherine.Wei at 
arris.com><mailto:Catherine.Wei at arris.com> wrote:



    I'm using the wal mode for my sqlite database. I have a problem
that since there's no copy of database file in wal, how does it support
transaction rollback if something bad happened to the database? Can wal
promise the data integrity? Thank you.



WAL mode does support ROLLBACK.  The uncommitted changes are written to the 
journal file.  Committing them moves them to the database file.  You may like 
to read this page

<https://www.sqlite.org/wal.html><https://www.sqlite.org/wal.html>

then if you have more questions please post again.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org<mailto:sqlite-users at 
mailinglists.sqlite.org>
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Reply via email to