Lines Matching refs:nCell

64838   u16 nCell;           /* Number of cells on this page, local and ovfl */
67017 int nCell; /* Number of cells on the page */
67034 nCell = pPage->nCell;
67035 assert( nCell==get2byte(&data[hdr+3]) || CORRUPT_DB );
67036 iCellFirst = cellOffset + 2*nCell;
67051 u8 *pEnd = &data[cellOffset + nCell*2];
67085 for(i=0; i<nCell; i++){
67229 gap = pPage->cellOffset + 2*pPage->nCell;
67274 assert( pPage->nCell>0 || CORRUPT_DB );
67495 iCellFirst = hdr + 8 + pPage->childPtrSize + 2*pPage->nCell;
67561 iCellFirst = pPage->cellOffset + 2*pPage->nCell;
67567 for(i=0; i<pPage->nCell; i++){
67620 pPage->nCell = get2byte(&data[3]);
67621 if( pPage->nCell>MX_CELL(pBt) ){
67625 testcase( pPage->nCell==MX_CELL(pBt) );
67630 assert( pPage->nCell>0
67673 pPage->nCell = 0;
67798 if( pCur && ((*ppPage)->nCell<1 || (*ppPage)->intKey!=pCur->curIntKey) ){
69160 int nCell; /* Number of cells in page pPage */
69168 nCell = pPage->nCell;
69170 for(i=0; i<nCell; i++){
69214 int nCell;
69219 nCell = pPage->nCell;
69221 for(i=0; i<nCell; i++){
69243 if( i==nCell ){
70440 if( pCur->ix>=pPage->nCell ){
70690 assert( pCur->ix<pCur->pPage->nCell || CORRUPT_DB );
70764 assert( iIdx<=pParent->nCell );
70765 if( iIdx==pParent->nCell ){
70794 testcase( pCur->aiIdx[pCur->iPage-1] > pCur->apPage[pCur->iPage-1]->nCell );
70889 if( pRoot->nCell>0 ){
70919 assert( pCur->ix<pPage->nCell );
70945 pCur->ix = pPage->nCell;
70949 pCur->ix = pPage->nCell-1;
70966 assert( pCur->pPage->nCell>0 );
70970 assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );
70994 assert( pCur->aiIdx[ii]==pCur->apPage[ii]->nCell );
70996 assert( pCur->ix==pCur->pPage->nCell-1 || CORRUPT_DB );
70997 testcase( pCur->ix!=pCur->pPage->nCell-1 );
71016 assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );
71098 assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );
71107 assert( pCur->pPage->nCell > 0 );
71123 assert( pPage->nCell>0 );
71126 upr = pPage->nCell-1;
71167 assert( pCur->ix<pCur->pPage->nCell );
71174 if( lwr>=pPage->nCell ){
71242 assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );
71251 assert( pCur->pPage->nCell > 0 );
71266 assert( pPage->nCell>0 );
71269 upr = pPage->nCell-1;
71273 int nCell; /* Size of the pCell cell in bytes */
71284 nCell = pCell[0];
71285 if( nCell<=pPage->max1bytePayload ){
71289 testcase( pCell+nCell+1==pPage->aDataEnd );
71290 c = xRecordCompare(nCell, (void*)&pCell[1], pIdxKey);
71292 && (nCell = ((nCell&0x7f)<<7) + pCell[1])<=pPage->maxLocal
71296 testcase( pCell+nCell+2==pPage->aDataEnd );
71297 c = xRecordCompare(nCell, (void*)&pCell[2], pIdxKey);
71312 nCell = (int)pCur->info.nKey;
71313 testcase( nCell<0 ); /* True if key size is 2^32 or more */
71314 testcase( nCell==0 ); /* Invalid key size: 0x80 0x80 0x00 */
71315 testcase( nCell==1 ); /* Invalid key size: 0x80 0x80 0x01 */
71316 testcase( nCell==2 ); /* Minimum legal index key size */
71317 if( nCell<2 || nCell/pCur->pBt->usableSize>pCur->pBt->nPage ){
71321 pCellKey = sqlite3Malloc( nCell+nOverrun );
71327 rc = accessPayload(pCur, 0, nCell, (unsigned char*)pCellKey, 0);
71328 memset(((u8*)pCellKey)+nCell,0,nOverrun); /* Fix uninit warnings */
71334 c = sqlite3VdbeRecordCompare(nCell, pCellKey, pIdxKey);
71360 assert( pCur->ix<pCur->pPage->nCell );
71366 if( lwr>=pPage->nCell ){
71415 n = pCur->pPage->nCell;
71417 n *= pCur->apPage[i]->nCell;
71476 if( idx>=pPage->nCell ){
71489 }while( pCur->ix>=pPage->nCell );
71511 if( (++pCur->ix)>=pPage->nCell ){
72388 assert( idx<pPage->nCell );
72409 pPage->nCell--;
72410 if( pPage->nCell==0 ){
72417 memmove(ptr, ptr+2, 2*(pPage->nCell - idx));
72418 put2byte(&data[hdr+3], pPage->nCell);
72452 assert( i>=0 && i<=pPage->nCell+pPage->nOverflow );
72454 assert( pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB );
72497 assert( idx >= pPage->cellOffset+2*pPage->nCell+2 || CORRUPT_DB );
72512 memmove(pIns+2, pIns, 2*(pPage->nCell - i));
72514 pPage->nCell++;
72517 assert( get2byte(&data[pPage->hdrOffset+3])==pPage->nCell || CORRUPT_DB );
72614 int nCell; /* Number of cells in apCell[] */
72627 assert( idx>=0 && idx+N<=p->nCell );
72645 assert( N>=0 && N<p->nCell );
72651 assert( N>=0 && N<p->nCell );
72672 int nCell, /* Final number of cells on page */
72681 int iEnd = i+nCell; /* Loop terminator */
72725 pPg->nCell = nCell;
72729 put2byte(&aData[hdr+3], pPg->nCell);
72765 int nCell, /* Number of cells to add to pPg */
72771 int iEnd = iFirst + nCell; /* End of loop. One past last cell to ins */
72827 int nCell, /* Cells to delete */
72835 int iEnd = iFirst + nCell;
72893 int nCell = pPg->nCell; /* Cells stored on pPg */
72897 int iOldEnd = iOld + pPg->nCell + pPg->nOverflow;
72906 assert( nCell>=0 );
72909 if( NEVER(nShift>nCell) ) return SQLITE_CORRUPT_BKPT;
72910 memmove(pPg->aCellIdx, &pPg->aCellIdx[nShift*2], nCell*2);
72911 nCell -= nShift;
72915 assert( nCell>=nTail );
72916 nCell -= nTail;
72926 assert( (iOld-iNew)<nNew || nCell==0 || CORRUPT_DB );
72929 memmove(&pCellptr[nAdd*2], pCellptr, nCell*2);
72934 nCell += nAdd;
72942 if( nCell>iCell ){
72943 memmove(&pCellptr[2], pCellptr, (nCell - iCell) * 2);
72945 nCell++;
72955 assert( nCell>=0 );
72956 pCellptr = &pPg->aCellIdx[nCell*2];
72959 iNew+nCell, nNew-nCell, pCArray
72962 pPg->nCell = nNew;
72965 put2byte(&aData[hdr+3], pPg->nCell);
73022 if( pPage->nCell==0 ) return SQLITE_CORRUPT_BKPT; /* dbfuzz001.test */
73043 b.nCell = 1;
73085 pCell = findCell(pPage, pPage->nCell-1);
73093 insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace),
73123 for(j=0; j<pPage->nCell; j++){
73185 memcpy(&aTo[iToHdr], &aFrom[iFromHdr], pFrom->cellOffset + 2*pFrom->nCell);
73315 i = pParent->nOverflow + pParent->nCell;
73330 if( (i+nxDiv-pParent->nOverflow)==pParent->nCell ){
73351 nMaxCells += apOld[i]->nCell + ArraySize(pParent->apOvfl);
73434 int limit = pOld->nCell;
73439 VVA_ONLY( int nCellAtStart = b.nCell; )
73466 memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*(limit+pOld->nOverflow));
73474 b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
73476 b.nCell++;
73480 b.apCell[b.nCell] = pOld->apOvfl[k];
73481 b.nCell++;
73484 piEnd = aData + pOld->cellOffset + 2*pOld->nCell;
73486 assert( b.nCell<nMaxCells );
73487 b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
73489 b.nCell++;
73491 assert( (b.nCell-nCellAtStart)==(pOld->nCell+pOld->nOverflow) );
73493 cntOld[i] = b.nCell;
73497 assert( b.nCell<nMaxCells );
73498 b.szCell[b.nCell] = sz;
73504 b.apCell[b.nCell] = pTemp+leafCorrection;
73506 b.szCell[b.nCell] = b.szCell[b.nCell] - leafCorrection;
73512 memcpy(b.apCell[b.nCell], &pOld->aData[8], 4);
73515 while( b.szCell[b.nCell]<4 ){
73518 assert( b.szCell[b.nCell]==3 || CORRUPT_DB );
73519 assert( b.apCell[b.nCell]==&aSpace1[iSpace1-3] || CORRUPT_DB );
73521 b.szCell[b.nCell]++;
73524 b.nCell++;
73572 cntNew[k-1] = b.nCell;
73577 if( cntNew[i]<b.nCell ){
73586 while( cntNew[i]<b.nCell ){
73592 if( cntNew[i]<b.nCell ){
73600 if( cntNew[i]>=b.nCell ){
73657 assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) || CORRUPT_DB);
73659 apOld[0]->pgno, apOld[0]->nCell,
73660 nOld>=2 ? apOld[1]->pgno : 0, nOld>=2 ? apOld[1]->nCell : 0,
73661 nOld>=3 ? apOld[2]->pgno : 0, nOld>=3 ? apOld[2]->nCell : 0
73688 cntOld[i] = b.nCell;
73790 int cntOldNext = pNew->nCell + pNew->nOverflow;
73794 for(i=0; i<b.nCell; i++){
73801 cntOldNext += pOld->nCell + pOld->nOverflow + !leafData;
73934 iOld = iPg<nOld ? (cntOld[iPg-1] + !leafData) : b.nCell;
73944 assert( apNew[iPg]->nCell==nNewCell );
73954 if( isRoot && pParent->nCell==0 && pParent->hdrOffset<=apNew[0]->nFree ){
73975 - apNew[0]->nCell*2)
73992 nOld, nNew, b.nCell));
74074 assert( pChild->nCell==pRoot->nCell || CORRUPT_DB );
74176 && pPage->aiOvfl[0]==pPage->nCell
74178 && pParent->nCell==iIdx
74567 if( idx>=pPage->nCell ){
74605 }else if( loc<0 && pPage->nCell>0 ){
74614 assert( rc!=SQLITE_OK || pPage->nCell>0 || pPage->nOverflow>0 );
74827 if( pPage->nCell<=iCellIdx ){
74843 || pPage->nCell==1 /* See dbfuzz001.test for a test case */
74896 int nCell;
74909 pCell = findCell(pLeaf, pLeaf->nCell-1);
74911 nCell = pLeaf->xCellSize(pLeaf, pCell);
74912 assert( MX_CELL_SIZE(pBt) >= nCell );
74917 insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n, &rc);
74919 dropCell(pLeaf, pLeaf->nCell-1, nCell, &rc);
74953 assert( (pPage->nCell>0 || CORRUPT_DB) && iCellIdx<=pPage->nCell );
74955 if( iCellIdx>=pPage->nCell ){
74957 pCur->ix = pPage->nCell-1;
75167 for(i=0; i<pPage->nCell; i++){
75183 *pnChange += pPage->nCell;
75457 nEntry += pPage->nCell;
75478 }while ( pCur->ix>=pCur->pPage->nCell );
75488 if( iIdx==pPage->nCell ){
75759 int nCell; /* Number of cells */
75816 nCell = get2byte(&data[hdr+3]);
75817 assert( pPage->nCell==nCell );
75823 pCellIdx = &data[cellStart + 2*(nCell-1)];
75845 for(i=nCell-1; i>=0 && pCheck->mxErr; i--){
75922 for(i=nCell-1; i>=0; i--){
194792 int nCell; /* Current number of cells in pNode */
194796 nCell = NCELL(pNode);
194798 assert( nCell<=nMaxCell );
194799 if( nCell<nMaxCell ){
194800 nodeOverwriteCell(pRtree, pNode, pCell, nCell);
194801 writeInt16(&pNode->zData[2], nCell+1);
194805 return (nCell==nMaxCell);
195309 int nCell = NCELL(pNode);
195310 assert( nCell<200 );
195311 for(ii=0; ii<nCell; ii++){
195560 int nCell;
195571 nCell = NCELL(pNode);
195572 assert( nCell<200 );
195574 while( p->iCell<nCell ){
195610 if( p->iCell>=nCell ){
195623 if( p->iCell>=nCell ){
196114 int nCell
196118 for(ii=0; ii<nCell; ii++){
196160 int nCell = NCELL(pNode);
196170 for(iCell=0; iCell<nCell; iCell++){
196405 int nCell,
196419 sqlite3_int64 nByte = (pRtree->nDim+1)*(sizeof(int*)+nCell*sizeof(int));
196426 aSpare = &((int *)&aaSorted[pRtree->nDim])[pRtree->nDim*nCell];
196430 aaSorted[ii] = &((int *)&aaSorted[pRtree->nDim])[ii*nCell];
196431 for(jj=0; jj<nCell; jj++){
196434 SortByDimension(pRtree, aaSorted[ii], nCell, ii, aCell, aSpare);
196446 nLeft<=(nCell-RTREE_MINCELLS(pRtree));
196456 memcpy(&right, &aCell[aaSorted[ii][nCell-1]], sizeof(RtreeCell));
196457 for(kk=1; kk<(nCell-1); kk++){
196487 for(ii=0; ii<nCell; ii++){
196534 int nCell = NCELL(pNode);
196547 aCell = sqlite3_malloc64((sizeof(RtreeCell)+sizeof(int))*(nCell+1));
196552 aiUsed = (int *)&aCell[nCell+1];
196553 memset(aiUsed, 0, sizeof(int)*(nCell+1));
196554 for(i=0; i<nCell; i++){
196558 memcpy(&aCell[nCell], pCell, sizeof(RtreeCell));
196559 nCell++;
196581 rc = splitNodeStartree(pRtree, aCell, nCell, pLeft, pRight,
196762 int nCell = NCELL(pNode);
196765 for(ii=1; ii<nCell; ii++){
196825 int nCell;
196834 nCell = NCELL(pNode)+1;
196835 n = (nCell+1)&(~1);
196853 for(ii=0; ii<nCell; ii++){
196854 if( ii==(nCell-1) ){
196866 aCenterCoord[iDim] = (aCenterCoord[iDim]/(nCell*(RtreeDValue)2));
196869 for(ii=0; ii<nCell; ii++){
196878 SortByDistance(aOrder, nCell, aDistance, aSpare);
196881 for(ii=0; rc==SQLITE_OK && ii<(nCell-(RTREE_MINCELLS(pRtree)+1)); ii++){
196895 for(; rc==SQLITE_OK && ii<nCell; ii++){
196958 int nCell = NCELL(pNode);
196960 for(ii=0; rc==SQLITE_OK && ii<nCell; ii++){
198141 int nCell; /* Number of cells on page */
198151 nCell = readInt16(&aNode[2]);
198152 if( (4 + nCell*(8 + pCheck->nDim*2*4))>nNode ){
198155 iNode, nCell, nNode
198158 for(i=0; i<nCell; i++){
207241 int nCell; /* Number of cells on page */
207265 int nCell; /* Value of 'ncell' column */
207438 for(i=0; i<p->nCell; i++){
207443 p->nCell = 0;
207475 pCsr->nCell = 0;
207545 p->nCell = get2byte(&aHdr[3]);
207549 nUnused = get2byte(&aHdr[5]) - nHdr - 2*p->nCell;
207563 if( p->nCell ){
207570 p->aCell = sqlite3_malloc64((p->nCell+1) * sizeof(StatCell));
207572 memset(p->aCell, 0, (p->nCell+1) * sizeof(StatCell));
207574 for(i=0; i<p->nCell; i++){
207740 while( p->iCell<p->nCell ){
207772 if( !p->iRightChildPg || p->iCell>p->nCell ){
207789 if( p->iCell==p->nCell ){
207831 pCsr->nCell += p->nCell;
207839 for(i=0; i<p->nCell; i++){
207958 sqlite3_result_int(ctx, pCsr->nCell);