On 5/24/16, Cecil Westerhof <[email protected]> wrote:
> 2016-05-25 3:49 GMT+02:00 Richard Hipp <[email protected]>:
>
>> On 5/24/16, Cecil Westerhof <[email protected]> wrote:
>> > Until now I did not need it, but better inform before I do. ;-)
>> >
>> > When a program crashes it is possible that you have a journal file with
>> > things that are not committed. Is there a way to find out what those
>> > are?
>> > (And selectively commit?)
>>

A rollback journal contains the original content of the database.  The
database file itself contains the partial uncommitted changes.  When
the automatic rollback occurs, this will restore the database to its
original pre-transaction state.

If you try to prevent the automatic rollback in order to "keep" some
of your uncommitted changes you will corrupt your database.

The WAL file contains changes that have already been committed but not
moved back into the main database, and possible uncommitted changes.
The committed changes will automatically be moved into the main
database the next time the database is opened.  You cannot force
uncommitted changes to commit.  If you try, you will corrupt the
database.

Bottom line:  The transaction mechanism is there to protect you from
problems on a power failure.  If you try to defeat that mechanism, you
will run into corruption problems.

-- 
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to