Re: Unexpected echo when setting locking_mode

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected echo when setting locking_mode

Graham Holden
I'm not against rationalising the PRAGMA commands, but this wouldn't help with the example you gave. "page_size" is more accurately "the page size I would like it to be" and so can be "successfully" set at any time (providing it's a power of 2). The only time the current setting gets _acted_ upon is for a new database or _during_ a VACUUM command. (Unless I've misinterpreted something).
Graham

Sent from my Samsung Galaxy S7 - powered by Three
-------- Original message --------From: Simon Slavin <[hidden email]> Date: 19/11/2017  02:07  (GMT+00:00) To: SQLite mailing list <[hidden email]> Subject: Re: [sqlite] Unexpected echo when setting locking_mode


On 19 Nov 2017, at 2:01am, Kees Nuyt <[hidden email]> wrote:

> The same happens for
> pragma journal_mode=wal;

Perhaps the PRAGMAs should be reviewed for consistency: that all PRAGMAs which change values should output their new value.

This might provide a useful piece of diagnostic information for some users.  For example suppose someone changes the page_size using this:

        PRAGMA page_size = 16384;

They change page_size to 16384 but they don’t know that that works only for an empty database, or after a VACUUM.  The PRAGMA outputs 4096 and, although they don’t yet know why, they do at least know that their change didn’t work properly.

Simon.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users