Lines Matching refs:nCell
48750 u16 nCell; /* Number of cells on this page, local and ovfl */
50462 int nCell; /* Number of cells on the page */
50478 nCell = pPage->nCell;
50479 assert( nCell==get2byte(&data[hdr+3]) );
50484 iCellFirst = cellOffset + 2*nCell;
50486 for(i=0; i<nCell; i++){
50564 gap = pPage->cellOffset + 2*pPage->nCell;
50804 pPage->nCell = get2byte(&data[hdr+3]);
50805 if( pPage->nCell>MX_CELL(pBt) ){
50809 testcase( pPage->nCell==MX_CELL(pBt) );
50818 iCellFirst = cellOffset + 2*pPage->nCell;
50826 for(i=0; i<pPage->nCell; i++){
50911 pPage->nCell = 0;
52083 int nCell; /* Number of cells in page pPage */
52094 nCell = pPage->nCell;
52096 for(i=0; i<nCell; i++){
52143 int nCell;
52146 nCell = pPage->nCell;
52148 for(i=0; i<nCell; i++){
52168 if( i==nCell ){
53252 assert( pCur->aiIdx[pCur->iPage]<pPage->nCell );
53418 assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
53445 assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
53484 assert( pCur->aiIdx[pCur->iPage]<pPage->nCell );
53571 if( pNewPage->nCell<1 || pNewPage->intKey!=pCur->apPage[i]->intKey ){
53586 assert( iIdx<=pParent->nCell );
53587 if( iIdx==pParent->nCell ){
53623 testcase( pCur->aiIdx[pCur->iPage-1] > pCur->apPage[pCur->iPage-1]->nCell );
53712 if( pRoot->nCell==0 && !pRoot->leaf ){
53719 pCur->eState = ((pRoot->nCell>0)?CURSOR_VALID:CURSOR_INVALID);
53739 assert( pCur->aiIdx[pCur->iPage]<pPage->nCell );
53765 pCur->aiIdx[pCur->iPage] = pPage->nCell;
53769 pCur->aiIdx[pCur->iPage] = pPage->nCell-1;
53788 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
53791 assert( pCur->apPage[pCur->iPage]->nCell>0 );
53816 assert( pCur->aiIdx[ii]==pCur->apPage[ii]->nCell );
53818 assert( pCur->aiIdx[pCur->iPage]==pCur->apPage[pCur->iPage]->nCell-1 );
53827 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
53902 assert( pCur->eState==CURSOR_INVALID || pCur->apPage[pCur->iPage]->nCell>0 );
53905 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
53915 /* pPage->nCell must be greater than zero. If this is the root-page
53921 assert( pPage->nCell>0 );
53924 upr = pPage->nCell-1;
53962 int nCell = pCell[0];
53963 if( nCell<=pPage->max1bytePayload
53964 /* && (pCell+nCell)<pPage->aDataEnd */
53969 testcase( pCell+nCell+1==pPage->aDataEnd );
53970 c = sqlite3VdbeRecordCompare(nCell, (void*)&pCell[1], pIdxKey);
53972 && (nCell = ((nCell&0x7f)<<7) + pCell[1])<=pPage->maxLocal
53973 /* && (pCell+nCell+2)<=pPage->aDataEnd */
53977 testcase( pCell+nCell+2==pPage->aDataEnd );
53978 c = sqlite3VdbeRecordCompare(nCell, (void*)&pCell[2], pIdxKey);
53987 nCell = (int)pCur->info.nKey;
53988 pCellKey = sqlite3Malloc( nCell );
53993 rc = accessPayload(pCur, 0, nCell, (unsigned char*)pCellKey, 0);
53998 c = sqlite3VdbeRecordCompare(nCell, pCellKey, pIdxKey);
54026 }else if( lwr>=pPage->nCell ){
54032 assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
54100 testcase( idx>pPage->nCell );
54104 if( idx>=pPage->nCell ){
54120 }while( pCur->aiIdx[pCur->iPage]>=pPage->nCell );
54873 assert( idx>=0 && idx<pPage->nCell );
54892 endPtr = &pPage->aCellIdx[2*pPage->nCell - 2];
54898 pPage->nCell--;
54899 put2byte(&data[hdr+3], pPage->nCell);
54942 assert( i>=0 && i<=pPage->nCell+pPage->nOverflow );
54943 assert( pPage->nCell<=MX_CELL(pPage->pBt) && MX_CELL(pPage->pBt)<=10921 );
54974 end = cellOffset + 2*pPage->nCell;
54982 pPage->nCell++;
54996 put2byte(&data[pPage->hdrOffset+3], pPage->nCell);
55014 int nCell, /* The number of cells to add to this page */
55027 assert( nCell>=0 && nCell<=(int)MX_CELL(pPage->pBt)
55032 assert( pPage->nCell==0 );
55035 pCellptr = &pPage->aCellIdx[nCell*2];
55037 for(i=nCell-1; i>=0; i--){
55044 put2byte(&data[hdr+3], nCell);
55046 pPage->nFree -= (nCell*2 + nUsable - cellbody);
55047 pPage->nCell = (u16)nCell;
55101 if( pPage->nCell<=0 ) return SQLITE_CORRUPT_BKPT;
55150 pCell = findCell(pPage, pPage->nCell-1);
55157 insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace),
55186 for(j=0; j<pPage->nCell; j++){
55248 memcpy(&aTo[iToHdr], &aFrom[iFromHdr], pFrom->cellOffset + 2*pFrom->nCell);
55318 int nCell = 0; /* Number of cells in apCell[] */
55376 i = pParent->nOverflow + pParent->nCell;
55391 if( (i+nxDiv-pParent->nOverflow)==pParent->nCell ){
55403 nMaxCells += 1+apOld[i]->nCell+apOld[i]->nOverflow;
55497 limit = pOld->nCell+pOld->nOverflow;
55500 assert( nCell<nMaxCells );
55501 apCell[nCell] = findOverflowCell(pOld, j);
55502 szCell[nCell] = cellSizePtr(pOld, apCell[nCell]);
55503 nCell++;
55510 assert( nCell<nMaxCells );
55511 apCell[nCell] = findCellv2(aData, maskPage, cellOffset, j);
55512 szCell[nCell] = cellSizePtr(pOld, apCell[nCell]);
55513 nCell++;
55519 assert( nCell<nMaxCells );
55520 szCell[nCell] = sz;
55526 apCell[nCell] = pTemp+leafCorrection;
55528 szCell[nCell] = szCell[nCell] - leafCorrection;
55534 memcpy(apCell[nCell], &pOld->aData[8], 4);
55537 if( szCell[nCell]<4 ){
55539 szCell[nCell] = 4;
55542 nCell++;
55547 ** Figure out the number of pages needed to hold all nCell cells.
55551 ** cntNew[k] should equal nCell.
55563 for(subtotal=k=i=0; i<nCell; i++){
55576 cntNew[k] = nCell;
55619 assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) );
55722 assert( pNew->nCell>0 || (nNew==1 && cntNew[0]==0) );
55730 assert( i<nNew-1 || j==nCell );
55731 if( j<nCell ){
55783 assert( j==nCell );
55791 if( isRoot && pParent->nCell==0 && pParent->hdrOffset<=apNew[0]->nFree ){
55808 (get2byte(&apNew[0]->aData[5])-apNew[0]->cellOffset-apNew[0]->nCell*2)
55847 int iNextOld = pOld->nCell + nOverflow;
55851 for(i=0; i<nCell; i++){
55859 iNextOld = i + !leafData + pOld->nCell + pOld->nOverflow;
55920 nOld, nNew, nCell));
55985 assert( pChild->nCell==pRoot->nCell );
56056 && pPage->aiOvfl[0]==pPage->nCell
56058 && pParent->nCell==iIdx
56228 assert( idx<pPage->nCell );
56241 }else if( loc<0 && pPage->nCell>0 ){
56248 assert( rc!=SQLITE_OK || pPage->nCell>0 || pPage->nOverflow>0 );
56308 if( NEVER(pCur->aiIdx[pCur->iPage]>=pCur->apPage[pCur->iPage]->nCell)
56358 int nCell;
56362 pCell = findCell(pLeaf, pLeaf->nCell-1);
56363 nCell = cellSizePtr(pLeaf, pCell);
56364 assert( MX_CELL_SIZE(pBt) >= nCell );
56370 insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n, &rc);
56371 dropCell(pLeaf, pLeaf->nCell-1, nCell, &rc);
56580 for(i=0; i<pPage->nCell; i++){
56594 *pnChange += pPage->nCell;
56866 nEntry += pPage->nCell;
56887 }while ( pCur->aiIdx[pCur->iPage]>=pCur->apPage[pCur->iPage]->nCell );
56894 ** points at. This is the right-child if (iIdx==pPage->nCell).
56897 if( iIdx==pPage->nCell ){
57100 int nCell;
57137 for(i=0; i<pPage->nCell && pCheck->mxErr; i++){
57200 checkTreePage(pCheck, pgno, zContext, NULL, !pPage->nCell ? NULL : &nMaxKey);
57251 nCell = get2byte(&data[hdr+3]);
57253 for(i=0; i<nCell; i++){
130426 #define NCELL(pNode) readInt16(&(pNode)->zData[2])
130690 if( NCELL(pNode)>((pRtree->iNodeSize-4)/pRtree->nBytesPerCell) ){
130734 int nByte = (NCELL(pNode) - iCell - 1) * pRtree->nBytesPerCell;
130736 writeInt16(&pNode->zData[2], NCELL(pNode)-1);
130752 int nCell; /* Current number of cells in pNode */
130756 nCell = NCELL(pNode);
130758 assert( nCell<=nMaxCell );
130759 if( nCell<nMaxCell ){
130760 nodeOverwriteCell(pRtree, pNode, pCell, nCell);
130761 writeInt16(&pNode->zData[2], nCell+1);
130765 return (nCell==nMaxCell);
130830 assert( iCell<NCELL(pNode) );
131187 for(ii=0; isEof && ii<NCELL(pChild); ii++){
131219 int nCell = NCELL(pNode);
131220 for(ii=0; ii<nCell; ii++){
131265 int nCell = NCELL(pNode);
131266 for(pCsr->iCell++; pCsr->iCell<nCell; pCsr->iCell++){
131460 int nCell = NCELL(pRoot);
131462 for(pCsr->iCell=0; rc==SQLITE_OK && pCsr->iCell<nCell; pCsr->iCell++){
131474 assert( rc!=SQLITE_OK || !pCsr->pNode || pCsr->iCell<NCELL(pCsr->pNode) );
131658 int nCell,
131663 for(ii=0; ii<nCell; ii++){
131700 int nCell,
131705 before = cellOverlap(pRtree, p, aCell, nCell, iExclude);
131707 after = cellOverlap(pRtree, p, aCell, nCell, iExclude);
131739 int nCell = NCELL(pNode);
131748 aCell = sqlite3_malloc(sizeof(RtreeCell)*nCell);
131755 for(jj=0; jj<nCell; jj++){
131765 for(iCell=0; iCell<nCell; iCell++){
131775 overlap = cellOverlapEnlargement(pRtree,&cell,pCell,aCell,nCell,iCell);
131870 int nCell,
131888 int nCell,
131912 for(jj=1; jj<nCell; jj++){
131950 int nCell,
131960 for(ii=0; ii<nCell; ii++){
131982 int nCell,
131993 for(ii=0; ii<nCell; ii++){
131994 for(jj=ii+1; jj<nCell; jj++){
132158 int nCell,
132172 int nByte = (pRtree->nDim+1)*(sizeof(int*)+nCell*sizeof(int));
132179 aSpare = &((int *)&aaSorted[pRtree->nDim])[pRtree->nDim*nCell];
132183 aaSorted[ii] = &((int *)&aaSorted[pRtree->nDim])[ii*nCell];
132184 for(jj=0; jj<nCell; jj++){
132187 SortByDimension(pRtree, aaSorted[ii], nCell, ii, aCell, aSpare);
132199 nLeft<=(nCell-RTREE_MINCELLS(pRtree));
132209 memcpy(&right, &aCell[aaSorted[ii][nCell-1]], sizeof(RtreeCell));
132210 for(kk=1; kk<(nCell-1); kk++){
132240 for(ii=0; ii<nCell; ii++){
132260 int nCell,
132271 aiUsed = sqlite3_malloc(sizeof(int)*nCell);
132275 memset(aiUsed, 0, sizeof(int)*nCell);
132277 PickSeeds(pRtree, aCell, nCell, &iLeftSeed, &iRightSeed);
132286 for(i=nCell-2; i>0; i--){
132288 pNext = PickNext(pRtree, aCell, nCell, pBboxLeft, pBboxRight, aiUsed);
132293 if( (RTREE_MINCELLS(pRtree)-NCELL(pRight)==i)
132294 || (diff>0.0 && (RTREE_MINCELLS(pRtree)-NCELL(pLeft)!=i))
132338 int nCell = NCELL(pNode);
132351 aCell = sqlite3_malloc((sizeof(RtreeCell)+sizeof(int))*(nCell+1));
132356 aiUsed = (int *)&aCell[nCell+1];
132357 memset(aiUsed, 0, sizeof(int)*(nCell+1));
132358 for(i=0; i<nCell; i++){
132362 memcpy(&aCell[nCell], pCell, sizeof(RtreeCell));
132363 nCell++;
132385 rc = AssignCells(pRtree, aCell, nCell, pLeft, pRight, &leftbbox, &rightbbox);
132425 for(i=0; i<NCELL(pRight); i++){
132436 for(i=0; i<NCELL(pLeft); i++){
132560 int nCell = NCELL(pNode);
132563 for(ii=1; ii<nCell; ii++){
132603 if( NCELL(pNode)<RTREE_MINCELLS(pRtree) ){
132623 int nCell;
132631 nCell = NCELL(pNode)+1;
132636 aCell = (RtreeCell *)sqlite3_malloc(nCell * (
132645 aOrder = (int *)&aCell[nCell];
132646 aSpare = (int *)&aOrder[nCell];
132647 aDistance = (float *)&aSpare[nCell];
132649 for(ii=0; ii<nCell; ii++){
132650 if( ii==(nCell-1) ){
132662 aCenterCoord[iDim] = (float)(aCenterCoord[iDim]/((float)nCell*2.0));
132665 for(ii=0; ii<nCell; ii++){
132674 SortByDistance(aOrder, nCell, aDistance, aSpare);
132677 for(ii=0; rc==SQLITE_OK && ii<(nCell-(RTREE_MINCELLS(pRtree)+1)); ii++){
132691 for(; rc==SQLITE_OK && ii<nCell; ii++){
132758 int nCell = NCELL(pNode);
132760 for(ii=0; rc==SQLITE_OK && ii<nCell; ii++){
132842 if( rc==SQLITE_OK && pRtree->iDepth>0 && NCELL(pRoot)==1 ){
133308 for(ii=0; ii<NCELL(&node); ii++){
133310 int nCell = 0;
133315 sqlite3_snprintf(512-nCell,&zCell[nCell],"%lld", cell.iRowid);
133316 nCell = (int)strlen(zCell);
133318 sqlite3_snprintf(512-nCell,&zCell[nCell]," %f",(double)cell.aCoord[jj].f);
133319 nCell = (int)strlen(zCell);