Lines Matching refs:nCell
48722 u16 nCell; /* Number of cells on this page, local and ovfl */
50434 int nCell; /* Number of cells on the page */
50450 nCell = pPage->nCell;
50451 assert( nCell==get2byte(&data[hdr+3]) );
50456 iCellFirst = cellOffset + 2*nCell;
50458 for(i=0; i<nCell; i++){
50536 gap = pPage->cellOffset + 2*pPage->nCell;
50776 pPage->nCell = get2byte(&data[hdr+3]);
50777 if( pPage->nCell>MX_CELL(pBt) ){
50781 testcase( pPage->nCell==MX_CELL(pBt) );
50790 iCellFirst = cellOffset + 2*pPage->nCell;
50798 for(i=0; i<pPage->nCell; i++){
50883 pPage->nCell = 0;
52055 int nCell; /* Number of cells in page pPage */
52066 nCell = pPage->nCell;
52068 for(i=0; i<nCell; i++){
52115 int nCell;
52118 nCell = pPage->nCell;
52120 for(i=0; i<nCell; i++){
52140 if( i==nCell ){
53224 assert( pCur->aiIdx[pCur->iPage]<pPage->nCell );
53390 assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
53417 assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
53456 assert( pCur->aiIdx[pCur->iPage]<pPage->nCell );
53543 if( pNewPage->nCell<1 || pNewPage->intKey!=pCur->apPage[i]->intKey ){
53558 assert( iIdx<=pParent->nCell );
53559 if( iIdx==pParent->nCell ){
53595 testcase( pCur->aiIdx[pCur->iPage-1] > pCur->apPage[pCur->iPage-1]->nCell );
53684 if( pRoot->nCell==0 && !pRoot->leaf ){
53691 pCur->eState = ((pRoot->nCell>0)?CURSOR_VALID:CURSOR_INVALID);
53711 assert( pCur->aiIdx[pCur->iPage]<pPage->nCell );
53737 pCur->aiIdx[pCur->iPage] = pPage->nCell;
53741 pCur->aiIdx[pCur->iPage] = pPage->nCell-1;
53760 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
53763 assert( pCur->apPage[pCur->iPage]->nCell>0 );
53788 assert( pCur->aiIdx[ii]==pCur->apPage[ii]->nCell );
53790 assert( pCur->aiIdx[pCur->iPage]==pCur->apPage[pCur->iPage]->nCell-1 );
53799 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
53874 assert( pCur->eState==CURSOR_INVALID || pCur->apPage[pCur->iPage]->nCell>0 );
53877 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
53887 /* pPage->nCell must be greater than zero. If this is the root-page
53893 assert( pPage->nCell>0 );
53896 upr = pPage->nCell-1;
53934 int nCell = pCell[0];
53935 if( nCell<=pPage->max1bytePayload
53936 /* && (pCell+nCell)<pPage->aDataEnd */
53941 testcase( pCell+nCell+1==pPage->aDataEnd );
53942 c = sqlite3VdbeRecordCompare(nCell, (void*)&pCell[1], pIdxKey);
53944 && (nCell = ((nCell&0x7f)<<7) + pCell[1])<=pPage->maxLocal
53945 /* && (pCell+nCell+2)<=pPage->aDataEnd */
53949 testcase( pCell+nCell+2==pPage->aDataEnd );
53950 c = sqlite3VdbeRecordCompare(nCell, (void*)&pCell[2], pIdxKey);
53959 nCell = (int)pCur->info.nKey;
53960 pCellKey = sqlite3Malloc( nCell );
53965 rc = accessPayload(pCur, 0, nCell, (unsigned char*)pCellKey, 0);
53970 c = sqlite3VdbeRecordCompare(nCell, pCellKey, pIdxKey);
53998 }else if( lwr>=pPage->nCell ){
54004 assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
54072 testcase( idx>pPage->nCell );
54076 if( idx>=pPage->nCell ){
54092 }while( pCur->aiIdx[pCur->iPage]>=pPage->nCell );
54845 assert( idx>=0 && idx<pPage->nCell );
54864 endPtr = &pPage->aCellIdx[2*pPage->nCell - 2];
54870 pPage->nCell--;
54871 put2byte(&data[hdr+3], pPage->nCell);
54914 assert( i>=0 && i<=pPage->nCell+pPage->nOverflow );
54915 assert( pPage->nCell<=MX_CELL(pPage->pBt) && MX_CELL(pPage->pBt)<=10921 );
54946 end = cellOffset + 2*pPage->nCell;
54954 pPage->nCell++;
54968 put2byte(&data[pPage->hdrOffset+3], pPage->nCell);
54986 int nCell, /* The number of cells to add to this page */
54999 assert( nCell>=0 && nCell<=(int)MX_CELL(pPage->pBt)
55004 assert( pPage->nCell==0 );
55007 pCellptr = &pPage->aCellIdx[nCell*2];
55009 for(i=nCell-1; i>=0; i--){
55016 nCell);
55018 pPage->nFree -= (nCell*2 + nUsable - cellbody);
55019 pPage->nCell = (u16)nCell;
55073 if( pPage->nCell<=0 ) return SQLITE_CORRUPT_BKPT;
55122 pCell = findCell(pPage, pPage->nCell-1);
55129 insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace),
55158 for(j=0; j<pPage->nCell; j++){
55220 memcpy(&aTo[iToHdr], &aFrom[iFromHdr], pFrom->cellOffset + 2*pFrom->nCell);
55290 int nCell = 0; /* Number of cells in apCell[] */
55348 i = pParent->nOverflow + pParent->nCell;
55363 if( (i+nxDiv-pParent->nOverflow)==pParent->nCell ){
55375 nMaxCells += 1+apOld[i]->nCell+apOld[i]->nOverflow;
55469 limit = pOld->nCell+pOld->nOverflow;
55472 assert( nCell<nMaxCells );
55473 apCell[nCell] = findOverflowCell(pOld, j);
55474 szCell[nCell] = cellSizePtr(pOld, apCell[nCell]);
55475 nCell++;
55482 assert( nCell<nMaxCells );
55483 apCell[nCell] = findCellv2(aData, maskPage, cellOffset, j);
55484 szCell[nCell] = cellSizePtr(pOld, apCell[nCell]);
55485 nCell++;
55491 assert( nCell<nMaxCells );
55492 szCell[nCell] = sz;
55498 apCell[nCell] = pTemp+leafCorrection;
55500 szCell[nCell] = szCell[nCell] - leafCorrection;
55506 memcpy(apCell[nCell], &pOld->aData[8], 4);
55509 if( szCell[nCell]<4 ){
55511 szCell[nCell] = 4;
55514 nCell++;
55519 ** Figure out the number of pages needed to hold all nCell cells.
55523 ** cntNew[k] should equal nCell.
55535 for(subtotal=k=i=0; i<nCell; i++){
55548 cntNew[k] = nCell;
55591 assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) );
55694 assert( pNew->nCell>0 || (nNew==1 && cntNew[0]==0) );
55702 assert( i<nNew-1 || j==nCell );
55703 if( j<nCell ){
55755 assert( j==nCell );
55763 if( isRoot && pParent->nCell==0 && pParent->hdrOffset<=apNew[0]->nFree ){
55780 (get2byte(&apNew[0]->aData[5])-apNew[0]->cellOffset-apNew[0]->nCell*2)
55819 int iNextOld = pOld->nCell + nOverflow;
55823 for(i=0; i<nCell; i++){
55831 iNextOld = i + !leafData + pOld->nCell + pOld->nOverflow;
55892 nOld, nNew, nCell));
55957 assert( pChild->nCell==pRoot->nCell );
56028 && pPage->aiOvfl[0]==pPage->nCell
56030 && pParent->nCell==iIdx
56200 assert( idx<pPage->nCell );
56213 }else if( loc<0 && pPage->nCell>0 ){
56220 assert( rc!=SQLITE_OK || pPage->nCell>0 || pPage->nOverflow>0 );
56280 if( NEVER(pCur->aiIdx[pCur->iPage]>=pCur->apPage[pCur->iPage]->nCell)
56330 int nCell;
56334 pCell = findCell(pLeaf, pLeaf->nCell-1);
56335 nCell = cellSizePtr(pLeaf, pCell);
56336 assert( MX_CELL_SIZE(pBt) >= nCell );
56342 insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n, &rc);
56343 dropCell(pLeaf, pLeaf->nCell-1, nCell, &rc);
56552 for(i=0; i<pPage->nCell; i++){
56566 *pnChange += pPage->nCell;
56838 nEntry += pPage->nCell;
56859 }while ( pCur->aiIdx[pCur->iPage]>=pCur->apPage[pCur->iPage]->nCell );
56866 ** points at. This is the right-child if (iIdx==pPage->nCell).
56869 if( iIdx==pPage->nCell ){
57072 int nCell;
57109 for(i=0; i<pPage->nCell && pCheck->mxErr; i++){
57172 checkTreePage(pCheck, pgno, zContext, NULL, !pPage->nCell ? NULL : &nMaxKey);
57223 nCell = get2byte(&data[hdr+3]);
57225 for(i=0; i<nCell; i++){
130378 #define NCELL(pNode) readInt16(&(pNode)->zData[2])
130642 if( NCELL(pNode)>((pRtree->iNodeSize-4)/pRtree->nBytesPerCell) ){
130686 int nByte = (NCELL(pNode) - iCell - 1) * pRtree->nBytesPerCell;
130688 writeInt16(&pNode->zData[2], NCELL(pNode)-1);
130704 int nCell; /* Current number of cells in pNode */
130708 nCell = NCELL(pNode);
130710 assert( nCell<=nMaxCell );
130711 if( nCell<nMaxCell ){
130712 nodeOverwriteCell(pRtree, pNode, pCell, nCell);
130713 writeInt16(&pNode->zData[2], nCell+1);
130717 return (nCell==nMaxCell);
130782 assert( iCell<NCELL(pNode) );
131139 for(ii=0; isEof && ii<NCELL(pChild); ii++){
131171 int nCell = NCELL(pNode);
131172 for(ii=0; ii<nCell; ii++){
131217 int nCell = NCELL(pNode);
131218 for(pCsr->iCell++; pCsr->iCell<nCell; pCsr->iCell++){
131412 int nCell = NCELL(pRoot);
131414 nCell; pCsr->iCell++){
131426 assert( rc!=SQLITE_OK || !pCsr->pNode || pCsr->iCell<NCELL(pCsr->pNode) );
131610 int nCell,
131615 for(ii=0; ii<nCell; ii++){
131652 int nCell,
131657 before = cellOverlap(pRtree, p, aCell, nCell, iExclude);
131659 after = cellOverlap(pRtree, p, aCell, nCell, iExclude);
131691 int nCell = NCELL(pNode);
131700 aCell = sqlite3_malloc(sizeof(RtreeCell)*nCell);
131707 for(jj=0; jj<nCell; jj++){
131717 for(iCell=0; iCell<nCell; iCell++){
131727 overlap = cellOverlapEnlargement(pRtree,&cell,pCell,aCell,nCell,iCell);
131822 int nCell,
131840 int nCell,
131864 for(jj=1; jj<nCell; jj++){
131902 int nCell,
131912 for(ii=0; ii<nCell; ii++){
131934 int nCell,
131945 for(ii=0; ii<nCell; ii++){
131946 for(jj=ii+1; jj<nCell; jj++){
132110 int nCell,
132124 int nByte = (pRtree->nDim+1)*(sizeof(int*)+nCell*sizeof(int));
132131 aSpare = &((int *)&aaSorted[pRtree->nDim])[pRtree->nDim*nCell];
132135 aaSorted[ii] = &((int *)&aaSorted[pRtree->nDim])[ii*nCell];
132136 for(jj=0; jj<nCell; jj++){
132139 SortByDimension(pRtree, aaSorted[ii], nCell, ii, aCell, aSpare);
132151 nLeft<=(nCell-RTREE_MINCELLS(pRtree));
132161 memcpy(&right, &aCell[aaSorted[ii][nCell-1]], sizeof(RtreeCell));
132162 for(kk=1; kk<(nCell-1); kk++){
132192 for(ii=0; ii<nCell; ii++){
132212 int nCell,
132223 aiUsed = sqlite3_malloc(sizeof(int)*nCell);
132227 memset(aiUsed, 0, sizeof(int)*nCell);
132229 PickSeeds(pRtree, aCell, nCell, &iLeftSeed, &iRightSeed);
132238 for(i=nCell-2; i>0; i--){
132240 pNext = PickNext(pRtree, aCell, nCell, pBboxLeft, pBboxRight, aiUsed);
132245 if( (RTREE_MINCELLS(pRtree)-NCELL(pRight)==i)
132246 || (diff>0.0 && (RTREE_MINCELLS(pRtree)-NCELL(pLeft)!=i))
132290 int nCell = NCELL(pNode);
132303 aCell = sqlite3_malloc((sizeof(RtreeCell)+sizeof(int))*(nCell+1));
132308 aiUsed = (int *)&aCell[nCell+1];
132309 memset(aiUsed, 0, sizeof(int)*(nCell+1));
132310 for(i=0; i<nCell; i++){
132314 memcpy(&aCell[nCell], pCell, sizeof(RtreeCell));
132315 nCell++;
132337 rc = AssignCells(pRtree, aCell, nCell, pLeft, pRight, &leftbbox, &rightbbox);
132377 for(i=0; i<NCELL(pRight); i++){
132388 for(i=0; i<NCELL(pLeft); i++){
132512 int nCell = NCELL(pNode);
132515 for(ii=1; ii<nCell; ii++){
132555 if( NCELL(pNode)<RTREE_MINCELLS(pRtree) ){
132575 int nCell;
132583 nCell = NCELL(pNode)+1;
132588 aCell = (RtreeCell *)sqlite3_malloc(nCell * (
132597 aOrder = (int *)&aCell[nCell];
132598 aSpare = (int *)&aOrder[nCell];
132599 aDistance = (float *)&aSpare[nCell];
132601 for(ii=0; ii<nCell; ii++){
132602 if( ii==(nCell-1) ){
132614 aCenterCoord[iDim] = (float)(aCenterCoord[iDim]/((float)nCell*2.0));
132617 for(ii=0; ii<nCell; ii++){
132626 SortByDistance(aOrder, nCell
132629 for(ii=0; rc==SQLITE_OK && ii<(nCell-(RTREE_MINCELLS(pRtree)+1)); ii++){
132643 for(; rc==SQLITE_OK && ii<nCell; ii++){
132710 int nCell = NCELL(pNode);
132712 for(ii=0; rc==SQLITE_OK && ii<nCell; ii++){
132794 if( rc==SQLITE_OK && pRtree->iDepth>0 && NCELL(pRoot)==1 ){
133260 for(ii=0; ii<NCELL(&node); ii++){
133262 int nCell = 0;
133267 sqlite3_snprintf(512-nCell,&zCell[nCell],"%lld", cell.iRowid);
133268 nCell = (int)strlen(zCell);
133270 sqlite3_snprintf(512-nCell,&zCell[nCell]," %f",(double)cell.aCoord[jj].f);
133271 nCell = (int)strlen(zCell);