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.
--
Ticket URL: <http://www.midnight-commander.org/ticket/4369>
Midnight Commander <https://midnight-commander.org>
Midnight Development Center
Comment (by karlicoss):
The only downside of this change is that now if you're trying to view a
database with an uncommitted WAL,the WAL is basically ignored, whereas
previously it would also display the changes in WAL.
This may or may not be desirable (personally I'd rather prefer for it not
to dump empty WAL files). If we want to preserve the old behaviour, could
change the viewer to be adaptive: if there are no existing -wal files, use
immutable mode; otherwise open in the default mode which would also
display uncommitted changes.
--
Ticket URL: <http://www.midnight-commander.org/ticket/4369#comment:1>
Comment (by karlicoss):
also in the meantime, if you want to achieve that behaviour, you can use
this in your local ext config (~/.config/mc/mc.ext)
{{{
# sqlite3.db
type/^SQLite 3.x database
Open=/usr/lib/mc/ext.d/misc.sh open sqlite
View=%view{ascii} sqlite3 file:%f?immutable=1 .dump
}}}
--
Ticket URL: <http://www.midnight-commander.org/ticket/4369#comment:2>
* status: testing => closed
--
Ticket URL: <http://www.midnight-commander.org/ticket/4369#comment:5>
* status: accepted => testing
* votes: => committed-master
* resolution: => fixed
Comment:
Thanks.
Applied as [ebbdc8847ecfedb587d494a6b85a76ec8f1c9e8b].
--
Ticket URL: <http://www.midnight-commander.org/ticket/4369#comment:4>
* owner: => andrew_b
* status: new => accepted
* component: mcview => mc-core
* milestone: Future Releases => 4.8.29
--
Ticket URL: <http://www.midnight-commander.org/ticket/4369#comment:3>