Re: [sqlite] Does journal_mode=DELETE writes uncommitted queries into DB?

2017-11-23 Thread J. King
Thanks for the thorough explanation, Rowan. I must say I learned something, myself! On November 23, 2017 11:23:11 PM EST, Rowan Worth wrote: >On 24 November 2017 at 10:27, J. King wrote: > >> The rollback journal is used to return the database to its previous

Re: [sqlite] Does journal_mode=DELETE writes uncommitted queries into DB?

2017-11-23 Thread Rowan Worth
On 24 November 2017 at 10:27, J. King wrote: > The rollback journal is used to return the database to its previous state > in the case of a partial write, not complete writes which are interrupted. > As you didn't commit the transaction, no write occurred, never mind a >

Re: [sqlite] Does journal_mode=DELETE writes uncommitted queries into DB?

2017-11-23 Thread 林自均
Hi King, Thank you for the detailed explanation! Now I understand rollback journal a bit more. John Lin J. King 於 2017年11月24日 週五 上午10:28寫道: > The rollback journal is used to return the database to its previous state > in the case of a partial write, not complete writes

Re: [sqlite] Does journal_mode=DELETE writes uncommitted queries into DB?

2017-11-23 Thread J. King
The rollback journal is used to return the database to its previous state in the case of a partial write, not complete writes which are interrupted. As you didn't commit the transaction, no write occurred, never mind a partial one, so the database remained in its initial state. Deleting a

[sqlite] Does journal_mode=DELETE writes uncommitted queries into DB?

2017-11-23 Thread 林自均
Hi folks, When I was learning about rollback journal, I did the following tests: (in shell 1) $ sqlite3 /tmp/db.sqlite SQLite version 3.21.0 2017-10-24 18:55:49 Enter ".help" for usage hints. sqlite> PRAGMA journal_mode; delete sqlite> CREATE TABLE bank (name STR, money INT); sqlite> INSERT INTO