From: drh <> Date: Tue, 27 Jan 2026 12:50:52 +0000 (+0000) Subject: Additional usage notes added to the header comment of the tmstmpvfs.c X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87efa1bd79b4b3d48fa785b73b5f8f40dd3e780a;p=thirdparty%2Fsqlite.git Additional usage notes added to the header comment of the tmstmpvfs.c source file. No code changes. FossilOrigin-Name: d1b8e7740bee13a8cf199c6477ee20a4f8bcbbd9ec4096bcdc05a996fadf0d56 --- diff --git a/ext/misc/tmstmpvfs.c b/ext/misc/tmstmpvfs.c index 99ad49f703..a3c5468c95 100644 --- a/ext/misc/tmstmpvfs.c +++ b/ext/misc/tmstmpvfs.c @@ -211,17 +211,56 @@ ** The command-line utility at tool/showtmlog.c will read and display ** the content of one or more tmstmpvfs.c log files. If all of the ** log files are stored in directory $(DATABASE)-tmstmp, then you can -** view them all using a command like: +** view them all using a command like shown below (with an extra "?" +** inserted on the wildcard to avoid closing the C-language comment +** that contains this text): ** -** showtmlog $(DATABASE)-tmstmp/* +** showtmlog $(DATABASE)-tmstmp/?* ** ** The command-line utility at tools/showdb.c can be used to show the ** timestamps on pages of a database file, using a command like this: ** -** showdb -tmstmp $(DATABASE) pgidx +** showdb --tmstmp $(DATABASE) pgidx +* +** The command above shows the timestamp and the intended use of every +** pages in the database, in human-readable form. If you also add +** the --csv option to the command above, then the command generates +** a Comma-Separated-Value (CSV) file as output, which contains a +** decoding of the complete timestamp tag on each page of the database. +** This CVS file can be easily imported into another SQLite database +** using a CLI command like the following: ** -** Both utility programs can be built by running "make showtmlog showdb" -** from the top-level of a recent SQLite source tree. +** .import --csv '|showdb --tmstmp -csv orig.db pgidx' ts_table +** +** In the command above, the database containing the timestamps is +** "orig.db" and the content is imported into a new table named "ts_table". +** The "ts_table" is created automatically, using the column names found +** in the first line of the CSV file. All columns of the automatically +** created ts_table are of type TEXT. It might make more sense to +** create the table yourself, using more sensible datatypes, like this: +** +** CREATE TABLE ts_table ( +** pgno INT, -- page number +** tm REAL, -- seconds since 1970-01-01 +** frame INT, -- WAL frame number +** flg INT, -- flag (tag byte 12) +** salt INT, -- WAL salt (tag bytes 13-15) +** parent INT, -- Parent page number +** child INT, -- Index of this page in its parent +** ovfl INT, -- Index of this page on the overflow chain +** txt TEXT -- Description of this page +** ); +** +** Then import using: +** +** .import --csv --skip 1 '|showdb --tmstmp --csv orig.db pgidx' ts_table +** +** Note the addition of the "--skip 1" option on ".import" to bypass the +** first line of the CSV file that contains the column names. +** +** Both programs "showdb" and "showtmlog" can be built by running +** "make showtmlog showdb" from the top-level of a recent SQLite +** source tree. */ #if defined(SQLITE_AMALGAMATION) && !defined(SQLITE_TMSTMPVFS_STATIC) # define SQLITE_TMSTMPVFS_STATIC diff --git a/manifest b/manifest index 3d9c2281a6..d346d1eaee 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Enhanced\sdocumentation\sin\sthe\sheader\scomment\sof\stmstmpvfs.c. -D 2026-01-27T12:02:02.699 +C Additional\susage\snotes\sadded\sto\sthe\sheader\scomment\sof\sthe\stmstmpvfs.c\nsource\sfile.\s\sNo\scode\schanges. +D 2026-01-27T12:50:52.534 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@ -403,7 +403,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 81d61c92b927a8ddfd6d3257c791cf40824078435371fae0fe45a561098fa567 +F ext/misc/tmstmpvfs.c 877edddc075dc303442f5746508e89d070a4a5bd0180978fe51134ac3eeffbde F ext/misc/totype.c ba11aac3c0b52c685bd25aa4e0f80c41c624fb1cc5ab763250e09ddc762bc3a8 F ext/misc/uint.c 327afc166058acf566f33a15bf47c869d2d3564612644d9ff81a23efc8b36039 F ext/misc/unionvtab.c 716d385256d5fb4beea31b0efede640807e423e85c9784d21d22f0cce010a785 @@ -2193,8 +2193,8 @@ F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee F tool/warnings.sh d924598cf2f55a4ecbc2aeb055c10bd5f48114793e7ba25f9585435da29e7e98 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f F tool/winmain.c 00c8fb88e365c9017db14c73d3c78af62194d9644feaf60e220ab0f411f3604c -P 57fda9dd85f0de8c5d4a4d8015e67982d73ab96ad6f1cd590a48d8995dc28140 -R 01d1e54ad42c4692717d8be6eeeed235 +P 3d37da3cb5943a61f528e3002c4c3ac3d41e871d742d8e603bffcc4bc5bd42fd +R 8a32f6cdd6aca81d8601f27b004d8314 U drh -Z c3d5e8ed054e270e3a2e94497ce20be7 +Z d0b77a5a906394fca0dd542c83c29e20 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index dbe3c9f9e4..fa632973fb 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -3d37da3cb5943a61f528e3002c4c3ac3d41e871d742d8e603bffcc4bc5bd42fd +d1b8e7740bee13a8cf199c6477ee20a4f8bcbbd9ec4096bcdc05a996fadf0d56