On 9 Aug 2016, at 1:58pm, Andrii Motsok <andrii.mot...@tomtom.com> wrote:

> I don't want to bother clients of the first connection with reopening it 
> twice (DELETE->WAL before modification and WAL->DELETE after).

That's not how SQLite works.  The journal mode for a database is saved in the 
database file and new connections to the file automatically know what journal 
mode to use.  All connections to the same database automatically use the same 
journal mode.  You do not specify the journal mode every time you open a 
connection.

> I am not able to switch WAL->DELETE in second (readwrite connection) after 
> data modification.

The journal mode has nothing to do with whether you open readonly or readwrite. 
In order to change a journal mode (which you should never do in a production 
setting, only while making your initial decision about which mode to use) you 
need write permission.

If you have chosen to use WAL mode, stick with that mode.  Do not try to use 
any other mode with the database.  Each connection should open the database 
readonly or readwrite, whichever they need.  Once the connection is open you 
cannot switch between readonly and readwrite.

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

Reply via email to