Index: amalgamation/sqlite3.c |
=================================================================== |
--- amalgamation/sqlite3.c (revision 291977) |
+++ amalgamation/sqlite3.c (working copy) |
@@ -110889,6 +110889,8 @@ |
/* Internal helper. Reset storage in preparation for iterating pPage. */ |
static void interiorCursorSetPage(RecoverInteriorCursor *pCursor, |
DbPage *pPage){ |
+ const unsigned knMinCellLength = 2 + 4 + 1; |
+ unsigned nMaxChildren; |
assert( PageHeader(pPage)[kiPageTypeOffset]==kTableInteriorPage ); |
if( pCursor->pPage ){ |
@@ -110909,8 +110911,7 @@ |
* each child contains a 32-bit page number and at least a varint (min size of |
* one byte). The final child page is in the header. |
*/ |
- const unsigned knMinCellLength = 2 + 4 + 1; |
- unsigned nMaxChildren = |
+ nMaxChildren = |
(pCursor->nPageSize - kiPageInteriorHeaderBytes) / knMinCellLength + 1; |
if (pCursor->nChildren > nMaxChildren) { |
pCursor->nChildren = nMaxChildren; |