From: drh Date: Wed, 15 Dec 2010 21:02:06 +0000 (+0000) Subject: Enhanced comments in wal.c and declare some procedure parameters "const". X-Git-Tag: version-3.7.5~71 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d9c9b78e6c98e7fdcc128e8d790d5ce82d9e3bfa;p=thirdparty%2Fsqlite.git Enhanced comments in wal.c and declare some procedure parameters "const". No changes to the generated code. FossilOrigin-Name: d0e4375b8a784d4e4ae66caababac919edd61883 --- diff --git a/manifest b/manifest index 5968a5fa22..b15c5901aa 100644 --- a/manifest +++ b/manifest @@ -1,8 +1,8 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -C When\sregistering\sthe\sbuilt-in\sLIKE\sand\sGLOB\sfunctions,\smake\ssure\sthat\sthey\nare\stagged\swith\sSQLITE_UTF8\sso\sthat\sif\sother\sapplication-defined\sLIKE\sand\nGLOB\simplementations\sare\sprovided\sfor\sUTF16,\sthen\sthe\sappropriate\sfunction\nwill\sbe\sselected. -D 2010-12-15T18:54:37 +C Enhanced\scomments\sin\swal.c\sand\sdeclare\ssome\sprocedure\sparameters\s"const".\nNo\schanges\sto\sthe\sgenerated\scode. +D 2010-12-15T21:02:06 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 4547616ad2286053af6ccccefa242dc925e49bf0 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -240,7 +240,7 @@ F src/vdbeblob.c 18955f0ee6b133cd08e1592010cb9a6b11e9984c F src/vdbemem.c 411649a35686f54268ccabeda175322c4697f5a6 F src/vdbetrace.c 864cef96919323482ebd9986f2132435115e9cc2 F src/vtab.c b297e8fa656ab5e66244ab15680d68db0adbec30 -F src/wal.c f26b8d297bd11cb792e609917f9d4c6718ac8e0e +F src/wal.c 1c846e56cb271675304c0152cea91f4c2ecf5111 F src/wal.h c1aac6593a0b02b15dc625987e619edeab39292e F src/walker.c 3112bb3afe1d85dc52317cb1d752055e9a781f8f F src/where.c fa22d45b2577c77146f2e894d58011d472d64103 @@ -897,14 +897,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f -P fa37d8eb7cd8049689068af2a80fe2cbb4a603f1 -R 54ccdc3adac00c10353f3a4344e22182 +P e1660764f20fed3fe92156d2b7f06075ff6ac145 +R 1109917c271937e015845cf31d3c184d U drh -Z d38e8f6227d017dae680c87b22026116 +Z 64f2fa76dd6cb11cf7eb68fbbec80d5e -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) -iD8DBQFNCQ7woxKgR168RlERAhlXAJ0VoVIcQCG2JtRw00vlkdOF11cy9wCfVw49 -kGM8knNFe0ZkghKGrCrLrig= -=6CjA +iD8DBQFNCSzRoxKgR168RlERAuCpAJ9yUwv8k5HtKXw8KEgKm4OKZcQUiwCfRCV0 +zLsoQIm1ng13QYFi6EqUsyY= +=j104 -----END PGP SIGNATURE----- diff --git a/manifest.uuid b/manifest.uuid index 475677dcd5..72d8e84c22 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -e1660764f20fed3fe92156d2b7f06075ff6ac145 \ No newline at end of file +d0e4375b8a784d4e4ae66caababac919edd61883 \ No newline at end of file diff --git a/src/wal.c b/src/wal.c index 3b217908b7..913644c4ae 100644 --- a/src/wal.c +++ b/src/wal.c @@ -458,14 +458,14 @@ typedef u16 ht_slot; */ struct WalIterator { int iPrior; /* Last result returned from the iterator */ - int nSegment; /* Size of the aSegment[] array */ + int nSegment; /* Number of entries in aSegment[] */ struct WalSegment { int iNext; /* Next slot in aIndex[] not yet returned */ ht_slot *aIndex; /* i0, i1, i2... such that aPgno[iN] ascend */ u32 *aPgno; /* Array of page numbers. */ - int nEntry; /* Max size of aPgno[] and aIndex[] arrays */ + int nEntry; /* Nr. of entries in aPgno[] and aIndex[] */ int iZero; /* Frame number associated with aPgno[0] */ - } aSegment[1]; /* One for every 32KB page in the WAL */ + } aSegment[1]; /* One for every 32KB page in the wal-index */ }; /* @@ -1329,9 +1329,29 @@ static int walIteratorNext( /* ** This function merges two sorted lists into a single sorted list. +** +** aLeft[] and aRight[] are arrays of indices. The sort key is +** aContent[aLeft[]] and aContent[aRight[]]. Upon entry, the following +** is guaranteed for all J