diff options
author | drh <drh@noemail.net> | 2010-08-18 21:19:03 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2010-08-18 21:19:03 +0000 |
commit | e22e03e210c5063384984a2e3b2ff41d3c25b984 (patch) | |
tree | 340c2bf658825aacb244d2df2053ad243547d68e /src | |
parent | 1b8f78ca5763aa874a9e6fe4cc0ea486e39714eb (diff) | |
download | sqlite-e22e03e210c5063384984a2e3b2ff41d3c25b984.tar.gz sqlite-e22e03e210c5063384984a2e3b2ff41d3c25b984.zip |
Fix two asserts in the btree logic so that they work correctly even for
maximum-size index entries for 32K and 64K pages.
FossilOrigin-Name: e127192d106bd7e036caacf01bf7725eeaa85dbe
Diffstat (limited to 'src')
-rw-r--r-- | src/btree.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/btree.c b/src/btree.c index e64aaa149..7a4105712 100644 --- a/src/btree.c +++ b/src/btree.c @@ -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; |