From 05684271c62efe2aefb39c536b628e260cc0a872 Mon Sep 17 00:00:00 2001 From: drh Date: Sat, 19 Oct 2013 16:51:39 +0000 Subject: [PATCH] Improved header comment with better instructions on the vfslog.c extension. FossilOrigin-Name: 4bd592c8f0e011e203443a6e88008a61d6926df5 --- ext/misc/vfslog.c | 37 ++++++++++++++++++++++++++++++------- manifest | 14 +++++++------- manifest.uuid | 2 +- 3 files changed, 38 insertions(+), 15 deletions(-) diff --git a/ext/misc/vfslog.c b/ext/misc/vfslog.c index 4854ca9a4c..b55b06fcf3 100644 --- a/ext/misc/vfslog.c +++ b/ext/misc/vfslog.c @@ -16,14 +16,37 @@ /* ** This module contains code for a wrapper VFS that causes a log of -** most VFS calls to be written into a file on disk. The log -** is stored as comma-separated variables. +** most VFS calls to be written into a file on disk. ** -** All calls on sqlite3_file objects are logged. -** Additionally, calls to the xAccess(), xOpen(), and xDelete() -** methods are logged. The other sqlite3_vfs object methods (xDlXXX, -** xRandomness, xSleep, xCurrentTime, xGetLastError and xCurrentTimeInt64) -** are not logged. +** Each database connection creates a separate log file in the same +** directory as the original database and named after the original +** database. A unique suffix is added to avoid name collisions. +** Separate log files are used so that concurrent processes do not +** try to write log operations to the same file at the same instant, +** resulting in overwritten or comingled log text. +** +** Each individual log file records operations by a single database +** connection on both the original database and its associated rollback +** journal. +** +** The log files are in the comma-separated-value (CSV) format. The +** log files can be imported into an SQLite database using the ".import" +** command of the SQLite command-line shell for analysis. +** +** One technique for using this module is to append the text of this +** module to the end of a standard "sqlite3.c" amalgamation file then +** add the following compile-time options: +** +** -DSQLITE_EXTRA_INIT=sqlite3_register_vfslog +** -DSQLITE_USE_FCNTL_TRACE +** +** The first compile-time option causes the sqlite3_register_vfslog() +** function, defined below, to be invoked when SQLite is initialized. +** That causes this custom VFS to become the default VFS for all +** subsequent connections. The SQLITE_USE_FCNTL_TRACE option causes +** the SQLite core to issue extra sqlite3_file_control() operations +** with SQLITE_FCNTL_TRACE to give some indication of what is going +** on in the core. */ #include "sqlite3.h" diff --git a/manifest b/manifest index 3a2cbdcefc..9a49cfa35d 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\sbug\scausing\san\s"malformed\sdatabase\sschema\serror"\serror\sif\sa\stemp\stable\swith\sthe\ssame\sname\sas\san\sexisting\stable\sthat\shas\sat\sleast\sone\stemp\strigger\sattached\sto\sit\sis\screated. -D 2013-10-19T15:07:49.621 +C Improved\sheader\scomment\swith\sbetter\sinstructions\son\sthe\svfslog.c\nextension. +D 2013-10-19T16:51:39.506 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 0522b53cdc1fcfc18f3a98e0246add129136c654 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -116,7 +116,7 @@ F ext/misc/regexp.c af92cdaa5058fcec1451e49becc7ba44dba023dc F ext/misc/rot13.c 1ac6f95f99b575907b9b09c81a349114cf9be45a F ext/misc/spellfix.c 5e1d547e9a2aed13897fa91bac924333f62fd2d9 F ext/misc/totype.c 4a167594e791abeed95e0a8db028822b5e8fe512 -F ext/misc/vfslog.c db244ca9e64d5e036499c81806a5aabf23695b77 +F ext/misc/vfslog.c fe40fab5c077a40477f7e5eba994309ecac6cc95 F ext/misc/vtshim.c babb0dc2bf116029e3e7c9a618b8a1377045303e F ext/misc/wholenumber.c 784b12543d60702ebdd47da936e278aa03076212 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761 @@ -1126,7 +1126,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01 F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff -P e801f35a96d861a1e5f223655af4c8a6a7e356bc -R ac49857d368ae5ae24a9a42091be2bd4 -U dan -Z 1c112f168e833ab0ddaf48bcba202dcf +P 56dca4a65c3b14123272fa0cc5c15530c06fda28 +R 1cee309be53ed4b90f763a6791fd81dc +U drh +Z 23f623447e2329bbecfcb9fee8496fa4 diff --git a/manifest.uuid b/manifest.uuid index 38fbe878ac..dd2fc69985 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -56dca4a65c3b14123272fa0cc5c15530c06fda28 \ No newline at end of file +4bd592c8f0e011e203443a6e88008a61d6926df5 \ No newline at end of file