mc/misc
Dima Gerasimov ebbdc8847e Ticket #4369: sqlite 3 view: use 'immutable=1' URI parameter
...to prevent leaving wal/shm files after viewing sqlite database.

The problem I often had with viewing .sqlite files with mc is that
exiting the view mode mid-way may leave .wal/.shm files in the database
directory.

This never caused any actual issues, but a bit annoying, since leftover
.wal files are often a sign that the program working with the database
exited ungracefully.

This effectively reproduces mc's behaviour:

    /tmp/testsqlite $ rm -f *-wal *-shm && sqlite3 "/tmp/testsqlite/db file.sqlite" .dump | head >/dev/null && ls -1 /tmp/testsqlite/
    'db file.sqlite'
    'db file.sqlite-shm'
    'db file.sqlite-wal'

After the change -- no shm/wal files

    /tmp/testsqlite $ rm -f *-wal *-shm && sqlite3 "file:/tmp/testsqlite/db file.sqlite?immutable=1" .dump | head >/dev/null && ls -1 /tmp/testsqlite/
    'db file.sqlite'

You can find the docs on immutable mode here:
https://www.sqlite.org/uri.html#uriimmutable

Immutable mode has been supported in sqlite since 2014:
https://www.sqlite.org/changes.html#version_3_8_5

In case user's sqlite installation is older, the mode is just quietly
ignored, so the change is backwards compatible.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-05-01 09:46:39 +03:00
..
ext.d Ticket #4369: sqlite 3 view: use 'immutable=1' URI parameter 2022-05-01 09:46:39 +03:00
macros.d Ticket 1551: Update GPL version from 2 to 3 2011-10-18 14:08:34 +03:00
skins Ticket #3146: fix typo in skin files: s/scollbar/scrollbar. 2021-12-18 15:52:33 +03:00
syntax Ticket #4322: add basic DOT/Graphviz syntax highlighting. 2021-12-20 20:51:43 +03:00
.gitignore Fix .gitignore 2019-09-01 20:13:27 +03:00
edit.indent.rc Ticket #2274: adjust script permissions to installed ones. 2014-01-26 13:38:48 +04:00
filehighlight.ini Ticket #4351: file highlighting: add Markdown. 2022-03-19 21:04:58 +03:00
Makefile.am Ticket #4070: misc/Makefile.am: install mc.lib only once. 2020-03-07 09:58:55 +03:00
mc.charsets.in Ticket #3992: improve support of Windows 1251 encoding on Solaris. 2019-07-13 08:58:27 +03:00
mc.default.keymap Handle CK_Filter command in the file panel level. 2022-04-10 17:43:44 +03:00
mc.emacs.keymap Handle CK_Filter command in the file panel level. 2022-04-10 17:43:44 +03:00
mc.ext.in Ticket #4272: nc.ext: fix recognition of plain and compressed man pages. 2021-08-29 19:42:10 +03:00
mc.keymap Rename keymap files to be with .keymap suffix. 2013-03-09 16:04:51 +04:00
mc.lib Ticket #4325: support Shift+Fn keys for KiTTY. 2022-01-05 16:01:01 +03:00
mc.macros added examples 2011-03-03 20:48:31 +00:00
mc.menu.in Ticket #4009: mc.menu: handle symbolic links to compressed archives. 2019-08-25 18:57:21 +03:00
mcedit.menu.in Ticket #3586: mcedit - fix "Lower case selection" command in User Menu 2016-03-04 09:23:36 +03:00
xterm.ad Move some files from contrib into misc directory 2009-05-08 16:56:02 +03:00