]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix two asserts in the btree logic so that they work correctly even for
authordrh <drh@noemail.net>
Wed, 18 Aug 2010 21:19:03 +0000 (21:19 +0000)
committerdrh <drh@noemail.net>
Wed, 18 Aug 2010 21:19:03 +0000 (21:19 +0000)
maximum-size index entries for 32K and 64K pages.

FossilOrigin-Name: e127192d106bd7e036caacf01bf7725eeaa85dbe

manifest
manifest.uuid
src/btree.c

index 7f78b9c81f5c817149ad3fd6f1a73a75fdc9d9cb..c74c91a2ae17a9c3ac2c87e9c0b0ab764baf5fdb 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,8 @@
-C Updated\stests\sfor\sCLI.\s\sAdded\ssome\sbasic\stests\sfor\sthe\s.import\scommand.
-D 2010-08-18T17:16:26
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+C Fix\stwo\sasserts\sin\sthe\sbtree\slogic\sso\sthat\sthey\swork\scorrectly\seven\sfor\nmaximum-size\sindex\sentries\sfor\s32K\sand\s64K\spages.
+D 2010-08-18T21:19:04
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in ec08dc838fd8110fe24c92e5130bcd91cbb1ff2e
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -113,7 +116,7 @@ F src/auth.c 523da7fb4979469955d822ff9298352d6b31de34
 F src/backup.c 51d83300fe0baee39405c416ceb19a58ed30a8ed
 F src/bitvec.c af50f1c8c0ff54d6bdb7a80e2fceca5a93670bef
 F src/btmutex.c 96a12f50f7a17475155971a241d85ec5171573ff
-F src/btree.c b1213572824331457d3fbebf0a06945b4765ad4f
+F src/btree.c 3089d018fd27082952d79543e771f6bc8af0b0f7
 F src/btree.h b4ba2fdf6b64c7c376bdfffa826af6b786b151d9
 F src/btreeInt.h 5b034ff54800046cc5870605d683ac1f9134bd99
 F src/build.c 0018d49629fc4807100c988dd191dd95e185bb38
@@ -844,7 +847,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 56cc883d3af5574c9dafecef8aa96d1d05c01b83
-R f8071fb87093491279a52abcb3066064
-U shaneh
-Z 27e86cf284ab8d3eda267dae6456bdb0
+P d46567e5d75a2b9fe96d2a7a30708b2827a0d490
+R d8d679ffa4745c8bf93b5e6b5825b960
+U drh
+Z 7f378ed449a1354042bf47ceab852b72
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+iD8DBQFMbE5MoxKgR168RlERAm3gAJ9j3QLeVFJiXfvfSnsTlMhGqmvBSgCfTW3m
+v1U06YCPq+T+CyTYAg08zFE=
+=0zqd
+-----END PGP SIGNATURE-----
index bc4e5a703cda472695a69c22f093dedee6a3a6f1..d18da8b5e80da0dc9674f28ff9cc39b73cd9f548 100644 (file)
@@ -1 +1 @@
-d46567e5d75a2b9fe96d2a7a30708b2827a0d490
\ No newline at end of file
+e127192d106bd7e036caacf01bf7725eeaa85dbe
\ No newline at end of file
index e64aaa1490cf942e4e80ac5f7cee0b2be2bc41b6..7a41057120776528b92f6f70842750205454689e 100644 (file)
@@ -2365,7 +2365,7 @@ static int lockBtree(BtShared *pBt){
   **     9-byte nKey value
   **     4-byte nData value
   **     4-byte overflow page pointer
-  ** So a cell consists of a 2-byte poiner, a header which is as much as
+  ** So a cell consists of a 2-byte pointer, a header which is as much as
   ** 17 bytes long, 0 to N bytes of payload, and an optional 4 byte overflow
   ** page pointer.
   */
@@ -5968,7 +5968,7 @@ static int balance_nonroot(
       szCell[nCell] = sz;
       pTemp = &aSpace1[iSpace1];
       iSpace1 += sz;
-      assert( sz<=pBt->pageSize/4 );
+      assert( sz<=pBt->maxLocal+23 );
       assert( iSpace1<=pBt->pageSize );
       memcpy(pTemp, apDiv[i], sz);
       apCell[nCell] = pTemp+leafCorrection;
@@ -6214,7 +6214,7 @@ static int balance_nonroot(
         }
       }
       iOvflSpace += sz;
-      assert( sz<=pBt->pageSize/4 );
+      assert( sz<=pBt->maxLocal+23 );
       assert( iOvflSpace<=pBt->pageSize );
       insertCell(pParent, nxDiv, pCell, sz, pTemp, pNew->pgno, &rc);
       if( rc!=SQLITE_OK ) goto balance_cleanup;