diff options
author | drh <drh@noemail.net> | 2011-05-23 18:37:42 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2011-05-23 18:37:42 +0000 |
commit | a12b6fa392a7d81d5c4720f199d542671b9c9afd (patch) | |
tree | 8c7a209dd6a26f59ce24de8b2de475791e9f4c96 /src | |
parent | 1c48530a13d2943141ca20641e300a3c6de23682 (diff) | |
download | sqlite-a12b6fa392a7d81d5c4720f199d542671b9c9afd.tar.gz sqlite-a12b6fa392a7d81d5c4720f199d542671b9c9afd.zip |
Minor cleanups to the header comments on various test_*.c file, to make
the suitable for programmer-level documentation.
FossilOrigin-Name: a65d043a2ad895b931871c67e0ef397a1dc614a6
Diffstat (limited to 'src')
-rw-r--r-- | src/test_demovfs.c | 12 | ||||
-rw-r--r-- | src/test_journal.c | 12 | ||||
-rw-r--r-- | src/test_multiplex.c | 33 | ||||
-rw-r--r-- | src/test_vfs.c | 5 |
4 files changed, 39 insertions, 23 deletions
diff --git a/src/test_demovfs.c b/src/test_demovfs.c index d7bcd1f90..637627071 100644 --- a/src/test_demovfs.c +++ b/src/test_demovfs.c @@ -10,14 +10,12 @@ ** ************************************************************************* ** -** An example of a simple VFS implementation that omits complex features -** often not required or not possible on embedded platforms. Also includes -** code to buffer writes to the journal file, which can be a significant -** performance improvement on some embedded platforms. +** This file implements an example of a simple VFS implementation that +** omits complex features often not required or not possible on embedded +** platforms. Code is included to buffer writes to the journal file, +** which can be a significant performance improvement on some embedded +** platforms. ** -*/ - -/* ** OVERVIEW ** ** The code in this file implements a minimal SQLite VFS that can be diff --git a/src/test_journal.c b/src/test_journal.c index ca4c5c388..68869723b 100644 --- a/src/test_journal.c +++ b/src/test_journal.c @@ -14,13 +14,7 @@ ** an existing VFS. The code in this file attempts to verify that SQLite ** correctly populates and syncs a journal file before writing to a ** corresponding database file. -*/ -#if SQLITE_TEST /* This file is used for testing only */ - -#include "sqlite3.h" -#include "sqliteInt.h" - -/* +** ** INTERFACE ** ** The public interface to this wrapper VFS is two functions: @@ -99,6 +93,10 @@ ** ** c) The journal file is deleted using xDelete. */ +#if SQLITE_TEST /* This file is used for testing only */ + +#include "sqlite3.h" +#include "sqliteInt.h" /* ** Maximum pathname length supported by the jt backend. diff --git a/src/test_multiplex.c b/src/test_multiplex.c index 32e63ae88..f709c9a99 100644 --- a/src/test_multiplex.c +++ b/src/test_multiplex.c @@ -11,13 +11,36 @@ ************************************************************************* ** ** This file contains a VFS "shim" - a layer that sits in between the -** pager and the real VFS. +** pager and the real VFS - that breaks up a very large database file +** into two or more smaller files on disk. This is useful, for example, +** in order to support large, multi-gigabyte databases on older filesystems +** that limit the maximum file size to 2 GiB. ** -** This particular shim enforces a multiplex system on DB files. -** This shim shards/partitions a single DB file into smaller -** "chunks" such that the total DB file size may exceed the maximum -** file size of the underlying file system. +** USAGE: ** +** Compile this source file and link it with your application. Then +** at start-time, invoke the following procedure: +** +** int sqlite3_multiplex_initialize( +** const char *zOrigVfsName, // The underlying real VFS +** int makeDefault // True to make multiplex the default VFS +** ); +** +** The procedure call above will create and register a new VFS shim named +** "multiplex". The multiplex VFS will use the VFS named by zOrigVfsName to +** do the actual disk I/O. (The zOrigVfsName parameter may be NULL, in +** which case the default VFS at the moment sqlite3_multiplex_initialize() +** is called will be used as the underlying real VFS.) +** +** If the makeDefault parameter is TRUE then multiplex becomes the new +** default VFS. Otherwise, you can use the multiplex VFS by specifying +** "multiplex" as the 4th parameter to sqlite3_open_v2() or by employing +** URI filenames and adding "vfs=multiplex" as a parameter to the filename +** URI. +** +** The multiplex VFS allows databases up to 32 GiB in size. But it splits +** the files up into 1 GiB pieces, so that they will work even on filesystems +** that do not support large files. */ #include "sqlite3.h" #include <string.h> diff --git a/src/test_vfs.c b/src/test_vfs.c index ba078a0f9..696321d26 100644 --- a/src/test_vfs.c +++ b/src/test_vfs.c @@ -10,10 +10,6 @@ ** ****************************************************************************** ** -*/ -#if SQLITE_TEST /* This file is used for testing only */ - -/* ** This file contains the implementation of the Tcl [testvfs] command, ** used to create SQLite VFS implementations with various properties and ** instrumentation to support testing SQLite. @@ -28,6 +24,7 @@ ** -mxpathname INTEGER (Value for sqlite3_vfs.mxPathname) ** -iversion INTEGER (Value for sqlite3_vfs.iVersion) */ +#if SQLITE_TEST /* This file is used for testing only */ #include "sqlite3.h" #include "sqliteInt.h" |