Lines Matching refs:nCell

67855   u16 nCell;           /* Number of cells on this page, local and ovfl */
70121 int nCell; /* Number of cells on the page */
70137 nCell = pPage->nCell;
70138 assert( nCell==get2byte(&data[hdr+3]) || CORRUPT_DB );
70139 iCellFirst = cellOffset + 2*nCell;
70154 u8 *pEnd = &data[cellOffset + nCell*2];
70188 if( nCell>0 ){
70192 for(i=0; i<nCell; i++){
70336 gap = pPage->cellOffset + 2*pPage->nCell;
70382 assert( pPage->nCell>0 || CORRUPT_DB );
70577 "childPtrSize[%u], cellOffset[%u], nCell[%u], hdrOffset[%u], minLocal[%u], maxLocal[%u], last ckpt time[%lld]",
70586 pPage->nCell,
70628 iCellFirst = hdr + 8 + pPage->childPtrSize + 2*pPage->nCell;
70694 iCellFirst = pPage->cellOffset + 2*pPage->nCell;
70700 for(i=0; i<pPage->nCell; i++){
70753 pPage->nCell = get2byte(&data[3]);
70754 if( pPage->nCell>MX_CELL(pBt) ){
70758 testcase( pPage->nCell==MX_CELL(pBt) );
70763 assert( pPage->nCell>0
70806 pPage->nCell = 0;
70931 if( pCur && ((*ppPage)->nCell<1 || (*ppPage)->intKey!=pCur->curIntKey) ){
72309 int nCell; /* Number of cells in page pPage */
72317 nCell = pPage->nCell;
72319 for(i=0; i<nCell; i++){
72363 int nCell;
72368 nCell = pPage->nCell;
72370 for(i=0; i<nCell; i++){
72395 if( i==nCell ){
73599 if( pCur->ix>=pPage->nCell ){
73849 assert( pCur->ix<pCur->pPage->nCell || CORRUPT_DB );
73922 assert( iIdx<=pParent->nCell );
73923 if( iIdx==pParent->nCell ){
73952 testcase( pCur->aiIdx[pCur->iPage-1] > pCur->apPage[pCur->iPage-1]->nCell );
74046 if( pRoot->nCell>0 ){
74076 assert( pCur->ix<pPage->nCell );
74102 pCur->ix = pPage->nCell;
74106 pCur->ix = pPage->nCell-1;
74123 assert( pCur->pPage->nCell>0 );
74127 assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );
74151 assert( pCur->aiIdx[ii]==pCur->apPage[ii]->nCell );
74153 assert( pCur->ix==pCur->pPage->nCell-1 || CORRUPT_DB );
74154 testcase( pCur->ix!=pCur->pPage->nCell-1 );
74173 assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );
74255 assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );
74264 assert( pCur->pPage->nCell > 0 );
74274 /* pPage->nCell must be greater than zero. If this is the root-page
74280 assert( pPage->nCell>0 );
74283 upr = pPage->nCell-1;
74323 assert( pCur->ix<pCur->pPage->nCell );
74330 if( lwr>=pPage->nCell ){
74369 int nCell; /* Size of the pCell cell in bytes */
74372 nCell = pCell[0];
74373 if( nCell<=pPage->max1bytePayload ){
74377 testcase( pCell+nCell+1==pPage->aDataEnd );
74378 c = xRecordCompare(nCell, (void*)&pCell[1], pIdxKey);
74380 && (nCell = ((nCell&0x7f)<<7) + pCell[1])<=pPage->maxLocal
74384 testcase( pCell+nCell+2==pPage->aDataEnd );
74385 c = xRecordCompare(nCell, (void*)&pCell[2], pIdxKey);
74403 if( pCur->aiIdx[i]<pPage->nCell ) return 0;
74475 if( pCur->ix==pCur->pPage->nCell-1
74498 assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );
74509 assert( pCur->pPage->nCell > 0 );
74518 /* pPage->nCell must be greater than zero. If this is the root-page
74524 assert( pPage->nCell>0 );
74527 upr = pPage->nCell-1;
74530 int nCell; /* Size of the pCell cell in bytes */
74541 nCell = pCell[0];
74542 if( nCell<=pPage->max1bytePayload ){
74546 testcase( pCell+nCell+1==pPage->aDataEnd );
74547 c = xRecordCompare(nCell, (void*)&pCell[1], pIdxKey);
74549 && (nCell = ((nCell&0x7f)<<7) + pCell[1])<=pPage->maxLocal
74553 testcase( pCell+nCell+2==pPage->aDataEnd );
74554 c = xRecordCompare(nCell, (void*)&pCell[2], pIdxKey);
74569 nCell = (int)pCur->info.nKey;
74570 testcase( nCell<0 ); /* True if key size is 2^32 or more */
74571 testcase( nCell==0 ); /* Invalid key size: 0x80 0x80 0x00 */
74572 testcase( nCell==1 ); /* Invalid key size: 0x80 0x80 0x01 */
74573 testcase( nCell==2 ); /* Minimum legal index key size */
74574 if( nCell<2 || nCell/pCur->pBt->usableSize>pCur->pBt->nPage ){
74578 pCellKey = sqlite3Malloc( nCell+nOverrun );
74584 rc = accessPayload(pCur, 0, nCell, (unsigned char*)pCellKey, 0);
74585 memset(((u8*)pCellKey)+nCell,0,nOverrun); /* Fix uninit warnings */
74591 c = sqlite3VdbeRecordCompare(nCell, pCellKey, pIdxKey);
74617 assert( pCur->ix<pCur->pPage->nCell || CORRUPT_DB );
74623 if( lwr>=pPage->nCell ){
74672 n = pCur->pPage->nCell;
74674 n *= pCur->apPage[i]->nCell;
74726 if( idx>=pPage->nCell ){
74739 }while( pCur->ix>=pPage->nCell );
74761 if( (++pCur->ix)>=pPage->nCell ){
75638 assert( idx<pPage->nCell );
75659 pPage->nCell--;
75660 if( pPage->nCell==0 ){
75667 memmove(ptr, ptr+2, 2*(pPage->nCell - idx));
75668 put2byte(&data[hdr+3], pPage->nCell);
75702 assert( i>=0 && i<=pPage->nCell+pPage->nOverflow );
75704 assert( pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB );
75747 assert( idx >= pPage->cellOffset+2*pPage->nCell+2 || CORRUPT_DB );
75762 memmove(pIns+2, pIns, 2*(pPage->nCell - i));
75764 pPage->nCell++;
75767 assert( get2byte(&data[pPage->hdrOffset+3])==pPage->nCell || CORRUPT_DB );
75804 ** page plus up to three child pages. There are a total of nCell cells.
75864 int nCell; /* Number of cells in apCell[] */
75877 assert( idx>=0 && idx+N<=p->nCell );
75895 assert( N>=0 && N<p->nCell );
75901 assert( N>=0 && N<p->nCell );
75907 ** Array apCell[] contains pointers to nCell b-tree page cells. The
75922 int nCell, /* Final number of cells on page */
75931 int iEnd = i+nCell; /* Loop terminator */
75975 pPg->nCell = nCell;
75979 put2byte(&aData[hdr+3], pPg->nCell);
76015 int nCell, /* Number of cells to add to pPg */
76021 int iEnd = iFirst + nCell; /* End of loop. One past last cell to ins */
76077 int nCell, /* Cells to delete */
76085 int iEnd = iFirst + nCell;
76123 ** balanced. The current page, pPg, has pPg->nCell cells starting with
76143 int nCell = pPg->nCell; /* Cells stored on pPg */
76147 int iOldEnd = iOld + pPg->nCell + pPg->nOverflow;
76156 assert( nCell>=0 );
76159 if( NEVER(nShift>nCell) ) return SQLITE_CORRUPT_BKPT;
76160 memmove(pPg->aCellIdx, &pPg->aCellIdx[nShift*2], nCell*2);
76161 nCell -= nShift;
76165 assert( nCell>=nTail );
76166 nCell -= nTail;
76176 assert( (iOld-iNew)<nNew || nCell==0 || CORRUPT_DB );
76179 memmove(&pCellptr[nAdd*2], pCellptr, nCell*2);
76184 nCell += nAdd;
76192 if( nCell>iCell ){
76193 memmove(&pCellptr[2], pCellptr, (nCell - iCell) * 2);
76195 nCell++;
76205 assert( nCell>=0 );
76206 pCellptr = &pPg->aCellIdx[nCell*2];
76209 iNew+nCell, nNew-nCell, pCArray
76212 pPg->nCell = nNew;
76215 put2byte(&aData[hdr+3], pPg->nCell);
76272 if( pPage->nCell==0 ) return SQLITE_CORRUPT_BKPT; /* dbfuzz001.test */
76293 b.nCell = 1;
76335 pCell = findCell(pPage, pPage->nCell-1);
76343 insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace),
76373 for(j=0; j<pPage->nCell; j++){
76435 memcpy(&aTo[iToHdr], &aFrom[iFromHdr], pFrom->cellOffset + 2*pFrom->nCell);
76563 i = pParent->nOverflow + pParent->nCell;
76578 if( (i+nxDiv-pParent->nOverflow)==pParent->nCell ){
76599 nMaxCells += apOld[i]->nCell + ArraySize(pParent->apOvfl);
76682 int limit = pOld->nCell;
76687 VVA_ONLY( int nCellAtStart = b.nCell; )
76714 memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*(limit+pOld->nOverflow));
76722 b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
76724 b.nCell++;
76728 b.apCell[b.nCell] = pOld->apOvfl[k];
76729 b.nCell++;
76732 piEnd = aData + pOld->cellOffset + 2*pOld->nCell;
76734 assert( b.nCell<nMaxCells );
76735 b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
76737 b.nCell++;
76739 assert( (b.nCell-nCellAtStart)==(pOld->nCell+pOld->nOverflow) );
76741 cntOld[i] = b.nCell;
76745 assert( b.nCell<nMaxCells );
76746 b.szCell[b.nCell] = sz;
76752 b.apCell[b.nCell] = pTemp+leafCorrection;
76754 b.szCell[b.nCell] = b.szCell[b.nCell] - leafCorrection;
76760 memcpy(b.apCell[b.nCell], &pOld->aData[8], 4);
76763 while( b.szCell[b.nCell]<4 ){
76766 assert( b.szCell[b.nCell]==3 || CORRUPT_DB );
76767 assert( b.apCell[b.nCell]==&aSpace1[iSpace1-3] || CORRUPT_DB );
76769 b.szCell[b.nCell]++;
76772 b.nCell++;
76777 ** Figure out the number of pages needed to hold all b.nCell cells.
76781 ** cntNew[k] should equal b.nCell.
76820 cntNew[k-1] = b.nCell;
76825 if( cntNew[i]<b.nCell ){
76834 while( cntNew[i]<b.nCell ){
76840 if( cntNew[i]<b.nCell ){
76848 if( cntNew[i]>=b.nCell ){
76905 assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) || CORRUPT_DB);
76907 apOld[0]->pgno, apOld[0]->nCell,
76908 nOld>=2 ? apOld[1]->pgno : 0, nOld>=2 ? apOld[1]->nCell : 0,
76909 nOld>=3 ? apOld[2]->pgno : 0, nOld>=3 ? apOld[2]->nCell : 0
76936 cntOld[i] = b.nCell;
77035 int cntOldNext = pNew->nCell + pNew->nOverflow;
77039 for(i=0; i<b.nCell; i++){
77046 cntOldNext += pOld->nCell + pOld->nOverflow + !leafData;
77179 iOld = iPg<nOld ? (cntOld[iPg-1] + !leafData) : b.nCell;
77189 assert( apNew[iPg]->nCell==nNewCell );
77199 if( isRoot && pParent->nCell==0 && pParent->hdrOffset<=apNew[0]->nFree ){
77220 - apNew[0]->nCell*2)
77237 nOld, nNew, b.nCell));
77319 assert( pChild->nCell==pRoot->nCell || CORRUPT_DB );
77429 && pPage->aiOvfl[0]==pPage->nCell
77431 && pParent->nCell==iIdx
77825 if( idx>=pPage->nCell ){
77863 }else if( loc<0 && pPage->nCell>0 ){
77872 assert( rc!=SQLITE_OK || pPage->nCell>0 || pPage->nOverflow>0 );
78088 if( pPage->nCell<=iCellIdx ){
78117 || pPage->nCell==1 /* See dbfuzz001.test for a test case */
78170 int nCell;
78183 pCell = findCell(pLeaf, pLeaf->nCell-1);
78185 nCell = pLeaf->xCellSize(pLeaf, pCell);
78186 assert( MX_CELL_SIZE(pBt) >= nCell );
78191 insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n, &rc);
78193 dropCell(pLeaf, pLeaf->nCell-1, nCell, &rc);
78235 assert( (pPage->nCell>0 || CORRUPT_DB) && iCellIdx<=pPage->nCell );
78237 if( iCellIdx>=pPage->nCell ){
78239 pCur->ix = pPage->nCell-1;
78449 for(i=0; i<pPage->nCell; i++){
78465 *pnChange += pPage->nCell;
78739 nEntry += pPage->nCell;
78760 }while ( pCur->ix>=pCur->pPage->nCell );
78767 ** points at. This is the right-child if (iIdx==pPage->nCell).
78770 if( iIdx==pPage->nCell ){
79041 int nCell; /* Number of cells */
79098 nCell = get2byte(&data[hdr+3]);
79099 assert( pPage->nCell==nCell );
79105 pCellIdx = &data[cellStart + 2*(nCell-1)];
79127 for(i=nCell-1; i>=0 && pCheck->mxErr; i--){
79204 for(i=nCell-1; i>=0; i--){
201793 int nCell; /* Current number of cells in pNode */
201797 nCell = NCELL(pNode);
201799 assert( nCell<=nMaxCell );
201800 if( nCell<nMaxCell ){
201801 nodeOverwriteCell(pRtree, pNode, pCell, nCell);
201802 writeInt16(&pNode->zData[2], nCell+1);
201806 return (nCell==nMaxCell);
202310 int nCell = NCELL(pNode);
202311 assert( nCell<200 );
202312 for(ii=0; ii<nCell; ii++){
202561 int nCell;
202572 nCell = NCELL(pNode);
202573 assert( nCell<200 );
202575 while( p->iCell<nCell ){
202611 if( p->iCell>=nCell ){
202624 if( p->iCell>=nCell ){
203115 int nCell
203119 for(ii=0; ii<nCell; ii++){
203161 int nCell = NCELL(pNode);
203171 for(iCell=0; iCell<nCell; iCell++){
203406 int nCell,
203420 sqlite3_int64 nByte = (pRtree->nDim+1)*(sizeof(int*)+nCell*sizeof(int));
203427 aSpare = &((int *)&aaSorted[pRtree->nDim])[pRtree->nDim*nCell];
203431 aaSorted[ii] = &((int *)&aaSorted[pRtree->nDim])[ii*nCell];
203432 for(jj=0; jj<nCell; jj++){
203435 SortByDimension(pRtree, aaSorted[ii], nCell, ii, aCell, aSpare);
203447 nLeft<=(nCell-RTREE_MINCELLS(pRtree));
203457 memcpy(&right, &aCell[aaSorted[ii][nCell-1]], sizeof(RtreeCell));
203458 for(kk=1; kk<(nCell-1); kk++){
203488 for(ii=0; ii<nCell; ii++){
203535 int nCell = NCELL(pNode);
203548 aCell = sqlite3_malloc64((sizeof(RtreeCell)+sizeof(int))*(nCell+1));
203553 aiUsed = (int *)&aCell[nCell+1];
203554 memset(aiUsed, 0, sizeof(int)*(nCell+1));
203555 for(i=0; i<nCell; i++){
203559 memcpy(&aCell[nCell], pCell, sizeof(RtreeCell));
203560 nCell++;
203582 rc = splitNodeStartree(pRtree, aCell, nCell, pLeft, pRight,
203763 int nCell = NCELL(pNode);
203766 for(ii=1; ii<nCell; ii++){
203826 int nCell;
203835 nCell = NCELL(pNode)+1;
203836 n = (nCell+1)&(~1);
203854 for(ii=0; ii<nCell; ii++){
203855 if( ii==(nCell-1) ){
203867 aCenterCoord[iDim] = (aCenterCoord[iDim]/(nCell*(RtreeDValue)2));
203870 for(ii=0; ii<nCell; ii++){
203879 SortByDistance(aOrder, nCell, aDistance, aSpare);
203882 for(ii=0; rc==SQLITE_OK && ii<(nCell-(RTREE_MINCELLS(pRtree)+1)); ii++){
203896 for(; rc==SQLITE_OK && ii<nCell; ii++){
203959 int nCell = NCELL(pNode);
203961 for(ii=0; rc==SQLITE_OK && ii<nCell; ii++){
205142 int nCell; /* Number of cells on page */
205152 nCell = readInt16(&aNode[2]);
205153 if( (4 + nCell*(8 + pCheck->nDim*2*4))>nNode ){
205156 iNode, nCell, nNode
205159 for(i=0; i<nCell; i++){
214294 int nCell; /* Number of cells on page */
214318 int nCell; /* Value of 'ncell' column */
214491 for(i=0; i<p->nCell; i++){
214496 p->nCell = 0;
214528 pCsr->nCell = 0;
214598 p->nCell = get2byte(&aHdr[3]);
214602 nUnused = get2byte(&aHdr[5]) - nHdr - 2*p->nCell;
214616 if( p->nCell ){
214623 p->aCell = sqlite3_malloc64((p->nCell+1) * sizeof(StatCell));
214625 memset(p->aCell, 0, (p->nCell+1) * sizeof(StatCell));
214627 for(i=0; i<p->nCell; i++){
214793 while( p->iCell<p->nCell ){
214825 if( !p->iRightChildPg || p->iCell>p->nCell ){
214842 if( p->iCell==p->nCell ){
214884 pCsr->nCell += p->nCell;
214892 for(i=0; i<p->nCell; i++){
215011 sqlite3_result_int(ctx, pCsr->nCell);