1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-10-28 10:57:26 +03:00

Documentation tweaks.

FossilOrigin-Name: b10b0aa7658a04b9354ca09a2dcb807eecd9421451537f3230ba5f47269ec5c1
This commit is contained in:
drh
2026-01-06 21:18:42 +00:00
parent d3c9cce43c
commit 8fe0385661
3 changed files with 37 additions and 18 deletions

View File

@@ -11,10 +11,19 @@
******************************************************************************
**
** This file implements a VFS shim that writes a timestamp and other tracing
** information into reserved space at the end of each page of the database
** file. The additional data is written as the page is added to the WAL
** file for databases in WAL mode, or as the database file itself is modified
** in rollback modes.
** information into 16 byts of reserved space at the end of each page of the
** database file. The additional data is written as the page is added to
** the WAL file for databases in WAL mode, or as the database file itself
** is modified in rollback modes.
**
** The VFS also generates log-files with names of the form:
**
** $(DATABASE)-$(TIME)$(PID)$(ID).tmstmp
**
** In the same directory as the database file. This log file contain one
** 16-byte record for various events, such as opening or close of the
** database or WAL file, writes to the WAL file, checkpoints, and similar.
** There is one log file for each open database connection.
**
** COMPILING
**
@@ -90,7 +99,9 @@
** The timestamp information is stored in the last 16 bytes of each page.
** This module only operates if the "bytes of reserved space on each page"
** value at offset 20 the SQLite database header is exactly 16. If
** the reserved-space value is not 16, this module is a no-op.
** the reserved-space value is not 16, no timestamp information is added
** to database pages. Some, but not all, logfile entries will be made
** still, but the size of the logs will be greatly reduced.
**
** The timestamp layout is as follows:
**
@@ -100,8 +111,9 @@
** bytes 12 0: WAL write 1: WAL txn 2: rollback write
** bytes 13-15 Lower 24 bits of Salt-1
**
** For transactions that occur in rollback mode, bytes 6-15 are all
** zero.
** For transactions that occur in rollback mode, only the timestamp
** in bytes 2-7 and byte 12 are non-zero. Byte 12 is set to 2 for
** rollback writes.
**
** LOGGING
**
@@ -109,11 +121,18 @@
** WAL connection are both logged to the same file. If the name of the
** database file is BASE then the logfile is named something like:
**
** BASE-tmstmp-UNIQUEID
** $(DATABASE)-$(TIMESTAMP)$(PID)$(RANDOM)
**
** Where UNIQUEID is a character string that is unique to that particular
** connection. The log consists of 16-byte records. Each record consists
** of five unsigned integers:
** Where DATABASE is the database filename, TIMESTAMP is the millisecond
** resolution timestamp of when the database connection was opened, PID
** is the process ID of the process that opened the database connection,
** and RANDOM is 32-bits of randomness used to distinguish between multiple
** connections being opened on the same database from the same process.
** The last three values are all expressed in hexadecimal and are joined
** together without punctuation.
**
** The log consists of 16-byte records. Each record consists of five
** unsigned integers:
**
** 1 1 6 4 4 <--- bytes
** op a1 ts a2 a3

View File

@@ -1,5 +1,5 @@
C Enhance\sthe\stimestamp-vfs\sprototype\sso\sthat\sit\salso\skeeps\san\sevent\slog.
D 2026-01-06T20:51:06.241
C Documentation\stweaks.
D 2026-01-06T21:18:42.496
F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
@@ -402,7 +402,7 @@ F ext/misc/sqlite3_stdio.h 27a4ecea47e61bc9574ccdf2806f468afe23af2f95028c9b689bf
F ext/misc/stmt.c b090086cd6bd6281c21271d38d576eeffe662f0e6b67536352ce32bbaa438321
F ext/misc/stmtrand.c 59cffa5d8e158943ff1ce078956d8e208e8c04e67307e8f249dece2436dcb7fc
F ext/misc/templatevtab.c 10f15b165b95423ddef593bc5dcb915ec4eb5e0f1066d585e5435a368b8bc22b
F ext/misc/tmstmpvfs.c 406df06b8ce336dbbe144771b944237aee7de659b8a67ac98d7cc02b3177bdfc
F ext/misc/tmstmpvfs.c 05e80557222c648bc676e599343d8d33f9e2d4801476592271ffb580cebbab69
F ext/misc/totype.c ba11aac3c0b52c685bd25aa4e0f80c41c624fb1cc5ab763250e09ddc762bc3a8
F ext/misc/uint.c 327afc166058acf566f33a15bf47c869d2d3564612644d9ff81a23efc8b36039
F ext/misc/unionvtab.c 716d385256d5fb4beea31b0efede640807e423e85c9784d21d22f0cce010a785
@@ -2190,8 +2190,8 @@ F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee
F tool/warnings.sh d924598cf2f55a4ecbc2aeb055c10bd5f48114793e7ba25f9585435da29e7e98
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
F tool/winmain.c 00c8fb88e365c9017db14c73d3c78af62194d9644feaf60e220ab0f411f3604c
P 703e593dfc92676a2d44c67ca8282a78a1943b9c1e3f2447c0a9917d70a383c4
R 5eb4c6b81b2d4f64da6be7537e974747
P f087c6c0cdd542ec24b4668fff9cb434f46caf554f8856a49fd062ab3f72014e
R 877edad71f16bed2b67db9da4be832cc
U drh
Z a329d47bfb1365429e97ed4ed3ca25c0
Z ee16842ec8595f9621e28d3f57b47daa
# Remove this line to create a well-formed Fossil manifest.

View File

@@ -1 +1 @@
f087c6c0cdd542ec24b4668fff9cb434f46caf554f8856a49fd062ab3f72014e
b10b0aa7658a04b9354ca09a2dcb807eecd9421451537f3230ba5f47269ec5c1