]> git.ipfire.org Git - thirdparty/sqlite.git/commit
On the first connection to a WAL-mode database that was not cleanly shut down
authordrh <drh@noemail.net>
Thu, 11 Oct 2018 13:51:48 +0000 (13:51 +0000)
committerdrh <drh@noemail.net>
Thu, 11 Oct 2018 13:51:48 +0000 (13:51 +0000)
commitf7f2a82aa0b3e4a166f6d838e216088e047bc9c2
tree689ad89fb3b57c0354c8b7155bc063e43454bbce
parent1dbb1475985639849099ef8d2c9483a9dbb7da1c
On the first connection to a WAL-mode database that was not cleanly shut down
and contains a left-over -shm file, truncate the -shm file to 3 bytes instead
of to 0 bytes. Avoiding a truncation to 0 means that system monitoring tools
can better detect if a process illegitimately tries to truncate a -shm file.
Such a rogue process might think it is being helpful by cleaning up old files,
but there is a race condition that can cause damage to the database.

FossilOrigin-Name: 90cf32cde072a305f30c75a71665d1f9e23e805c0a49f5306f015c056dd70f0c
manifest
manifest.uuid
src/os_unix.c