]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Updates to comments and testcase() macros in wal.c.
authordrh <drh@noemail.net>
Tue, 15 Jun 2010 11:21:54 +0000 (11:21 +0000)
committerdrh <drh@noemail.net>
Tue, 15 Jun 2010 11:21:54 +0000 (11:21 +0000)
FossilOrigin-Name: 4d90cc0bc07e791b2838fc384866bd5c2282f681

manifest
manifest.uuid
src/wal.c

index 348dcc9b5bfeca3a3fc683ab4be90151b5291a79..86507672e34c8cbf7c48c5160eb516010c465dda 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,8 +1,8 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-C Fix\san\serror\sin\sthe\swalfault.test\sscript\sintroduced\sby\sthe\sprevious\scheck-in.
-D 2010-06-14T18:06:21
+C Updates\sto\scomments\sand\stestcase()\smacros\sin\swal.c.
+D 2010-06-15T11:21:54
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in a5cad1f8f3e021356bfcc6c77dc16f6f1952bbc3
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -229,7 +229,7 @@ F src/vdbeblob.c 5327132a42a91e8b7acfb60b9d2c3b1c5c863e0e
 F src/vdbemem.c 2a82f455f6ca6f78b59fb312f96054c04ae0ead1
 F src/vdbetrace.c 864cef96919323482ebd9986f2132435115e9cc2
 F src/vtab.c a0f8a40274e4261696ef57aa806de2776ab72cda
-F src/wal.c c261aeb28c9b40f4713bace3c1c0cee9dcba87ab
+F src/wal.c 4ea519e6d6680b2fb504268733c09df7c20ae823
 F src/wal.h 4ace25262452d17e7d3ec970c89ee17794004008
 F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f
 F src/where.c 1c895bef33d0dfc7ed90fb1f74120435d210ea56
@@ -823,14 +823,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 58dfd83d8b7905391e2a06bb918ffa209c6de6b5
-R 4f3db6f7e5f49d281298da654be5747c
+P a2b9374fc6f0aba2d465d432e1124bd957aab548
+R b8eef250f5caed4a924f16a77af9cdc6
 U drh
-Z d6eef7948b6d2db515c6c316940ff333
+Z 605208b22e0624f098357d577c5e0992
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.6 (GNU/Linux)
 
-iD8DBQFMFm+hoxKgR168RlERAozTAJ9OR+HzdHW0lOPqGOxHaVRg71dtTQCbBMmJ
-e2DOFvD2aJhVnBVlQcph2cU=
-=VNCZ
+iD8DBQFMF2JVoxKgR168RlERAth9AJ9lwylEfM0j4jEYjOmIUA5/QL1cowCfcwM8
+3EixOPtKo5P3pdMwt8qjl2M=
+=IOSP
 -----END PGP SIGNATURE-----
index 1b383f65496d3e1a7d575e37f6d60975f1ffa5c5..f276951a0cbb84000d52514336ff1311ca227d62 100644 (file)
@@ -1 +1 @@
-a2b9374fc6f0aba2d465d432e1124bd957aab548
\ No newline at end of file
+4d90cc0bc07e791b2838fc384866bd5c2282f681
\ No newline at end of file
index 775f9556bc664c899212ac8353c84e79f2e0fd54..64481c0dc19f9dd35ab9df60f6163e6de0d682b3 100644 (file)
--- a/src/wal.c
+++ b/src/wal.c
@@ -72,6 +72,7 @@
 ** big-endian format regardless of which byte order is used to compute
 ** the checksum.  The checksum is computed by interpreting the input as
 ** an even number of unsigned 32-bit integers: x[0] through x[N].  The
+** algorithm used for the checksum is as follows:
 ** 
 **   for i from 0 to n-1 step 2:
 **     s0 += x[i] + s1;
@@ -80,7 +81,7 @@
 **
 ** On a checkpoint, the WAL is first VFS.xSync-ed, then valid content of the
 ** WAL is transferred into the database, then the database is VFS.xSync-ed.
-** The VFS.xSync operations server as write barriers - all writes launched
+** The VFS.xSync operations serve as write barriers - all writes launched
 ** before the xSync must complete before any write that launches after the
 ** xSync begins.
 **
 **
 ** Each index block contains two sections, a page-mapping that contains the
 ** database page number associated with each wal frame, and a hash-table 
-** that allows users to query an index block for a specific page number.
+** that allows readers to query an index block for a specific page number.
 ** The page-mapping is an array of HASHTABLE_NPAGE (or HASHTABLE_NPAGE_ONE
 ** for the first index block) 32-bit page numbers. The first entry in the 
 ** first index-block contains the database page number corresponding to the
@@ -846,9 +847,9 @@ static void walCleanupHash(Wal *pWal){
   int i;                          /* Used to iterate through aHash[] */
 
   assert( pWal->writeLock );
-  testcase( pWal->hdr.mxFrame==HASHTABLE_NPAGE-1 );
-  testcase( pWal->hdr.mxFrame==HASHTABLE_NPAGE );
-  testcase( pWal->hdr.mxFrame==HASHTABLE_NPAGE+1 );
+  testcase( pWal->hdr.mxFrame==HASHTABLE_NPAGE_ONE-1 );
+  testcase( pWal->hdr.mxFrame==HASHTABLE_NPAGE_ONE );
+  testcase( pWal->hdr.mxFrame==HASHTABLE_NPAGE_ONE+1 );
 
   if( pWal->hdr.mxFrame==0 ) return;