Lines Matching refs:nCell

63609   u16 nCell;           /* Number of cells on this page, local and ovfl */
65740 int nCell; /* Number of cells on the page */
65756 nCell = pPage->nCell;
65757 assert( nCell==get2byte(&data[hdr+3]) || CORRUPT_DB );
65758 iCellFirst = cellOffset + 2*nCell;
65773 u8 *pEnd = &data[cellOffset + nCell*2];
65806 for(i=0; i<nCell; i++){
65952 gap = pPage->cellOffset + 2*pPage->nCell;
65997 assert( pPage->nCell>0 || CORRUPT_DB );
66218 iCellFirst = hdr + 8 + pPage->childPtrSize + 2*pPage->nCell;
66284 iCellFirst = pPage->cellOffset + 2*pPage->nCell;
66290 for(i=0; i<pPage->nCell; i++){
66343 pPage->nCell = get2byte(&data[3]);
66344 if( pPage->nCell>MX_CELL(pBt) ){
66348 testcase( pPage->nCell==MX_CELL(pBt) );
66353 assert( pPage->nCell>0
66396 pPage->nCell = 0;
66522 if( pCur && ((*ppPage)->nCell<1 || (*ppPage)->intKey!=pCur->curIntKey) ){
67880 int nCell; /* Number of cells in page pPage */
67888 nCell = pPage->nCell;
67890 for(i=0; i<nCell; i++){
67934 int nCell;
67939 nCell = pPage->nCell;
67941 for(i=0; i<nCell; i++){
67963 if( i==nCell ){
69126 assert( pCur->ix<pPage->nCell );
69312 assert( pCur->ix<pCur->pPage->nCell );
69374 assert( pCur->ix<pCur->pPage->nCell );
69448 assert( iIdx<=pParent->nCell );
69449 if( iIdx==pParent->nCell ){
69478 testcase( pCur->aiIdx[pCur->iPage-1] > pCur->apPage[pCur->iPage-1]->nCell );
69573 if( pRoot->nCell>0 ){
69603 assert( pCur->ix<pPage->nCell );
69629 pCur->ix = pPage->nCell;
69633 pCur->ix = pPage->nCell-1;
69650 assert( pCur->pPage->nCell>0 );
69654 assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );
69678 assert( pCur->aiIdx[ii]==pCur->apPage[ii]->nCell );
69680 assert( pCur->ix==pCur->pPage->nCell-1 );
69698 assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );
69800 assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );
69809 assert( pCur->pPage->nCell > 0 );
69824 assert( pPage->nCell>0 );
69827 upr = pPage->nCell-1;
69868 int nCell; /* Size of the pCell cell in bytes */
69879 nCell = pCell[0];
69880 if( nCell<=pPage->max1bytePayload ){
69884 testcase( pCell+nCell+1==pPage->aDataEnd );
69885 c = xRecordCompare(nCell, (void*)&pCell[1], pIdxKey);
69887 && (nCell = ((nCell&0x7f)<<7) + pCell[1])<=pPage->maxLocal
69891 testcase( pCell+nCell+2==pPage->aDataEnd );
69892 c = xRecordCompare(nCell, (void*)&pCell[2], pIdxKey);
69907 nCell = (int)pCur->info.nKey;
69908 testcase( nCell<0 ); /* True if key size is 2^32 or more */
69909 testcase( nCell==0 ); /* Invalid key size: 0x80 0x80 0x00 */
69910 testcase( nCell==1 ); /* Invalid key size: 0x80 0x80 0x01 */
69911 testcase( nCell==2 ); /* Minimum legal index key size */
69912 if( nCell<2 || nCell/pCur->pBt->usableSize>pCur->pBt->nPage ){
69916 pCellKey = sqlite3Malloc( nCell+nOverrun );
69922 rc = accessPayload(pCur, 0, nCell, (unsigned char*)pCellKey, 0);
69923 memset(((u8*)pCellKey)+nCell,0,nOverrun); /* Fix uninit warnings */
69929 c = sqlite3VdbeRecordCompare(nCell, pCellKey, pIdxKey);
69956 assert( pCur->ix<pCur->pPage->nCell );
69963 if( lwr>=pPage->nCell ){
70012 n = pCur->pPage->nCell;
70014 n *= pCur->apPage[i]->nCell;
70081 harmless( idx>pPage->nCell );
70083 if( idx>=pPage->nCell ){
70096 }while( pCur->ix>=pPage->nCell );
70118 if( (++pCur->ix)>=pPage->nCell ){
70979 assert( idx>=0 && idx<pPage->nCell );
70999 pPage->nCell--;
71000 if( pPage->nCell==0 ){
71007 memmove(ptr, ptr+2, 2*(pPage->nCell - idx));
71008 put2byte(&data[hdr+3], pPage->nCell);
71042 assert( i>=0 && i<=pPage->nCell+pPage->nOverflow );
71044 assert( pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB );
71087 assert( idx >= pPage->cellOffset+2*pPage->nCell+2 || CORRUPT_DB );
71102 memmove(pIns+2, pIns, 2*(pPage->nCell - i));
71104 pPage->nCell++;
71107 assert( get2byte(&data[pPage->hdrOffset+3])==pPage->nCell || CORRUPT_DB );
71204 int nCell; /* Number of cells in apCell[] */
71217 assert( idx>=0 && idx+N<=p->nCell );
71235 assert( N>=0 && N<p->nCell );
71241 assert( N>=0 && N<p->nCell );
71262 int nCell, /* Final number of cells on page */
71271 int iEnd = i+nCell; /* Loop terminator */
71316 pPg->nCell = nCell;
71320 put2byte(&aData[hdr+3], pPg->nCell);
71356 int nCell, /* Number of cells to add to pPg */
71362 int iEnd = iFirst + nCell; /* End of loop. One past last cell to ins */
71418 int nCell, /* Cells to delete */
71426 int iEnd = iFirst + nCell;
71482 int nCell = pPg->nCell; /* Cells stored on pPg */
71486 int iOldEnd = iOld + pPg->nCell + pPg->nOverflow;
71495 assert( nCell>=0 );
71498 if( NEVER(nShift>nCell) ) return SQLITE_CORRUPT_BKPT;
71499 memmove(pPg->aCellIdx, &pPg->aCellIdx[nShift*2], nCell*2);
71500 nCell -= nShift;
71504 assert( nCell>=nTail );
71505 nCell -= nTail;
71514 assert( (iOld-iNew)<nNew || nCell==0 || CORRUPT_DB );
71517 memmove(&pCellptr[nAdd*2], pCellptr, nCell*2);
71522 nCell += nAdd;
71530 if( nCell>iCell ){
71531 memmove(&pCellptr[2], pCellptr, (nCell - iCell) * 2);
71533 nCell++;
71543 assert( nCell>=0 );
71544 pCellptr = &pPg->aCellIdx[nCell*2];
71547 iNew+nCell, nNew-nCell, pCArray
71550 pPg->nCell = nNew;
71553 put2byte(&aData[hdr+3], pPg->nCell);
71610 if( pPage->nCell==0 ) return SQLITE_CORRUPT_BKPT; /* dbfuzz001.test */
71631 b.nCell = 1;
71673 pCell = findCell(pPage, pPage->nCell-1);
71681 insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace),
71711 for(j=0; j<pPage->nCell; j++){
71773 memcpy(&aTo[iToHdr], &aFrom[iFromHdr], pFrom->cellOffset + 2*pFrom->nCell);
71874 b.nCell = 0;
71904 i = pParent->nOverflow + pParent->nCell;
71919 if( (i+nxDiv-pParent->nOverflow)==pParent->nCell ){
72023 int limit = pOld->nCell;
72028 VVA_ONLY( int nCellAtStart = b.nCell; )
72055 memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*(limit+pOld->nOverflow));
72063 b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
72065 b.nCell++;
72069 b.apCell[b.nCell] = pOld->apOvfl[k];
72070 b.nCell++;
72073 piEnd = aData + pOld->cellOffset + 2*pOld->nCell;
72075 assert( b.nCell<nMaxCells );
72076 b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
72078 b.nCell++;
72080 assert( (b.nCell-nCellAtStart)==(pOld->nCell+pOld->nOverflow) );
72082 cntOld[i] = b.nCell;
72086 assert( b.nCell<nMaxCells );
72087 b.szCell[b.nCell] = sz;
72093 b.apCell[b.nCell] = pTemp+leafCorrection;
72095 b.szCell[b.nCell] = b.szCell[b.nCell] - leafCorrection;
72101 memcpy(b.apCell[b.nCell], &pOld->aData[8], 4);
72104 while( b.szCell[b.nCell]<4 ){
72107 assert( b.szCell[b.nCell]==3 || CORRUPT_DB );
72108 assert( b.apCell[b.nCell]==&aSpace1[iSpace1-3] || CORRUPT_DB );
72110 b.szCell[b.nCell]++;
72113 b.nCell++;
72161 cntNew[k-1] = b.nCell;
72166 if( cntNew[i]<b.nCell ){
72175 while( cntNew[i]<b.nCell ){
72181 if( cntNew[i]<b.nCell ){
72189 if( cntNew[i]>=b.nCell ){
72246 assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) || CORRUPT_DB);
72248 apOld[0]->pgno, apOld[0]->nCell,
72249 nOld>=2 ? apOld[1]->pgno : 0, nOld>=2 ? apOld[1]->nCell : 0,
72250 nOld>=3 ? apOld[2]->pgno : 0, nOld>=3 ? apOld[2]->nCell : 0
72272 cntOld[i] = b.nCell;
72374 int cntOldNext = pNew->nCell + pNew->nOverflow;
72378 for(i=0; i<b.nCell; i++){
72385 cntOldNext += pOld->nCell + pOld->nOverflow + !leafData;
72511 iOld = iPg<nOld ? (cntOld[iPg-1] + !leafData) : b.nCell;
72521 assert( apNew[iPg]->nCell==nNewCell );
72531 if( isRoot && pParent->nCell==0 && pParent->hdrOffset<=apNew[0]->nFree ){
72552 - apNew[0]->nCell*2)
72569 nOld, nNew, b.nCell));
72651 assert( pChild->nCell==pRoot->nCell || CORRUPT_DB );
72753 && pPage->aiOvfl[0]==pPage->nCell
72755 && pParent->nCell==iIdx
73116 assert( idx<pPage->nCell );
73152 }else if( loc<0 && pPage->nCell>0 ){
73161 assert( rc!=SQLITE_OK || pPage->nCell>0 || pPage->nOverflow>0 );
73276 || pPage->nCell==1 /* See dbfuzz001.test for a test case */
73329 int nCell;
73342 pCell = findCell(pLeaf, pLeaf->nCell-1);
73344 nCell = pLeaf->xCellSize(pLeaf, pCell);
73345 assert( MX_CELL_SIZE(pBt) >= nCell );
73350 insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n, &rc);
73352 dropCell(pLeaf, pLeaf->nCell-1, nCell, &rc);
73386 assert( (pPage->nCell>0 || CORRUPT_DB) && iCellIdx<=pPage->nCell );
73388 if( iCellIdx>=pPage->nCell ){
73390 pCur->ix = pPage->nCell-1;
73597 for(i=0; i<pPage->nCell; i++){
73612 *pnChange += pPage->nCell;
73886 nEntry += pPage->nCell;
73907 }while ( pCur->ix>=pCur->pPage->nCell );
73917 if( iIdx==pPage->nCell ){
74188 int nCell; /* Number of cells */
74245 nCell = get2byte(&data[hdr+3]);
74246 assert( pPage->nCell==nCell );
74252 pCellIdx = &data[cellStart + 2*(nCell-1)];
74274 for(i=nCell-1; i>=0 && pCheck->mxErr; i--){
74351 for(i=nCell-1; i>=0; i--){
188011 int nCell; /* Current number of cells in pNode */
188015 nCell = NCELL(pNode);
188017 assert( nCell<=nMaxCell );
188018 if( nCell<nMaxCell ){
188019 nodeOverwriteCell(pRtree, pNode, pCell, nCell);
188020 writeInt16(&pNode->zData[2], nCell+1);
188024 return (nCell==nMaxCell);
188519 int nCell = NCELL(pNode);
188520 assert( nCell<200 );
188521 for(ii=0; ii<nCell; ii++){
188768 int nCell;
188779 nCell = NCELL(pNode);
188780 assert( nCell<200 );
188782 while( p->iCell<nCell ){
188818 if( p->iCell>=nCell ){
188831 if( p->iCell>=nCell ){
189319 int nCell
189323 for(ii=0; ii<nCell; ii++){
189365 int nCell = NCELL(pNode);
189375 for(iCell=0; iCell<nCell; iCell++){
189603 int nCell,
189617 sqlite3_int64 nByte = (pRtree->nDim+1)*(sizeof(int*)+nCell*sizeof(int));
189624 aSpare = &((int *)&aaSorted[pRtree->nDim])[pRtree->nDim*nCell];
189628 aaSorted[ii] = &((int *)&aaSorted[pRtree->nDim])[ii*nCell];
189629 for(jj=0; jj<nCell; jj++){
189632 SortByDimension(pRtree, aaSorted[ii], nCell, ii, aCell, aSpare);
189644 nLeft<=(nCell-RTREE_MINCELLS(pRtree));
189654 memcpy(&right, &aCell[aaSorted[ii][nCell-1]], sizeof(RtreeCell));
189655 for(kk=1; kk<(nCell-1); kk++){
189685 for(ii=0; ii<nCell; ii++){
189727 int nCell = NCELL(pNode);
189740 aCell = sqlite3_malloc64((sizeof(RtreeCell)+sizeof(int))*(nCell+1));
189745 aiUsed = (int *)&aCell[nCell+1];
189746 memset(aiUsed, 0, sizeof(int)*(nCell+1));
189747 for(i=0; i<nCell; i++){
189751 memcpy(&aCell[nCell], pCell, sizeof(RtreeCell));
189752 nCell++;
189774 rc = splitNodeStartree(pRtree, aCell, nCell, pLeft, pRight,
189953 int nCell = NCELL(pNode);
189956 for(ii=1; ii<nCell; ii++){
190016 int nCell;
190025 nCell = NCELL(pNode)+1;
190026 n = (nCell+1)&(~1);
190044 for(ii=0; ii<nCell; ii++){
190045 if( ii==(nCell-1) ){
190057 aCenterCoord[iDim] = (aCenterCoord[iDim]/(nCell*(RtreeDValue)2));
190060 for(ii=0; ii<nCell; ii++){
190069 SortByDistance(aOrder, nCell, aDistance, aSpare);
190072 for(ii=0; rc==SQLITE_OK && ii<(nCell-(RTREE_MINCELLS(pRtree)+1)); ii++){
190086 for(; rc==SQLITE_OK && ii<nCell; ii++){
190149 int nCell = NCELL(pNode);
190151 for(ii=0; rc==SQLITE_OK && ii<nCell; ii++){
191333 int nCell; /* Number of cells on page */
191343 nCell = readInt16(&aNode[2]);
191344 if( (4 + nCell*(8 + pCheck->nDim*2*4))>nNode ){
191347 iNode, nCell, nNode
191350 for(i=0; i<nCell; i++){
200369 int nCell; /* Number of cells on page */
200393 int nCell; /* Value of 'ncell' column */
200566 for(i=0; i<p->nCell; i++){
200571 p->nCell = 0;
200596 pCsr->nCell = 0;
200666 p->nCell = get2byte(&aHdr[3]);
200670 nUnused = get2byte(&aHdr[5]) - nHdr - 2*p->nCell;
200684 if( p->nCell ){
200691 p->aCell = sqlite3_malloc64((p->nCell+1) * sizeof(StatCell));
200693 memset(p->aCell, 0, (p->nCell+1) * sizeof(StatCell));
200695 for(i=0; i<p->nCell; i++){
200829 while( p->iCell<p->nCell ){
200861 if( !p->iRightChildPg || p->iCell>p->nCell ){
200879 if( p->iCell==p->nCell ){
200921 pCsr->nCell += p->nCell;
200929 for(i=0; i<p->nCell; i++){
201047 sqlite3_result_int(ctx, pCsr->nCell);