Lines Matching refs:nCell

18469   u16 nCell;           /* Number of cells on this page, local and ovfl */
64177 int nCell; /* Number of cells on the page */
64193 nCell = pPage->nCell;
64194 assert( nCell==get2byte(&data[hdr+3]) );
64195 iCellFirst = cellOffset + 2*nCell;
64219 u8 *pEnd = &data[cellOffset + nCell*2];
64246 for(i=0; i<nCell; i++){
64331 if( pc < pPg->cellOffset+2*pPg->nCell || size+pc > usableSize ){
64386 gap = pPage->cellOffset + 2*pPage->nCell;
64426 assert( pPage->nCell>0 || CORRUPT_DB );
64664 pPage->nCell = get2byte(&data[hdr+3]);
64665 if( pPage->nCell>MX_CELL(pBt) ){
64669 testcase( pPage->nCell==MX_CELL(pBt) );
64674 assert( pPage->nCell>0 || top==usableSize || CORRUPT_DB );
64683 iCellFirst = cellOffset + 2*pPage->nCell;
64690 for(i=0; i<pPage->nCell; i++){
64788 pPage->nCell = 0;
64915 if( pCur && ((*ppPage)->nCell<1 || (*ppPage)->intKey!=pCur->curIntKey) ){
66215 int nCell; /* Number of cells in page pPage */
66223 nCell = pPage->nCell;
66225 for(i=0; i<nCell; i++){
66269 int nCell;
66274 nCell = pPage->nCell;
66276 for(i=0; i<nCell; i++){
66298 if( i==nCell ){
67395 assert( pCur->ix<pPage->nCell );
67583 assert( pCur->ix<pCur->apPage[pCur->iPage]->nCell );
67645 assert( pCur->ix<pCur->apPage[pCur->iPage]->nCell );
67713 assert( iIdx<=pParent->nCell );
67714 if( iIdx==pParent->nCell ){
67742 testcase( pCur->aiIdx[pCur->iPage-1] > pCur->apPage[pCur->iPage-1]->nCell );
67832 if( pRoot->nCell>0 ){
67861 assert( pCur->ix<pPage->nCell );
67887 pCur->ix = pPage->nCell;
67891 pCur->ix = pPage->nCell-1;
67909 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
67912 assert( pCur->apPage[pCur->iPage]->nCell>0 );
67937 assert( pCur->aiIdx[ii]==pCur->apPage[ii]->nCell );
67939 assert( pCur->ix==pCur->apPage[pCur->iPage]->nCell-1 );
67948 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
68063 assert( pCur->eState==CURSOR_INVALID || pCur->apPage[pCur->iPage]->nCell>0 );
68066 assert( pCur->pgnoRoot==0 || pCur->apPage[pCur->iPage]->nCell==0 );
68083 assert( pPage->nCell>0 );
68086 upr = pPage->nCell-1;
68127 int nCell; /* Size of the pCell cell in bytes */
68138 nCell = pCell[0];
68139 if( nCell<=pPage->max1bytePayload ){
68143 testcase( pCell+nCell+1==pPage->aDataEnd );
68144 c = xRecordCompare(nCell, (void*)&pCell[1], pIdxKey);
68146 && (nCell = ((nCell&0x7f)<<7) + pCell[1])<=pPage->maxLocal
68150 testcase( pCell+nCell+2==pPage->aDataEnd );
68151 c = xRecordCompare(nCell, (void*)&pCell[2], pIdxKey);
68165 nCell = (int)pCur->info.nKey;
68166 testcase( nCell<0 ); /* True if key size is 2^32 or more */
68167 testcase( nCell==0 ); /* Invalid key size: 0x80 0x80 0x00 */
68168 testcase( nCell==1 ); /* Invalid key size: 0x80 0x80 0x01 */
68169 testcase( nCell==2 ); /* Minimum legal index key size */
68170 if( nCell<2 ){
68174 pCellKey = sqlite3Malloc( nCell+18 );
68180 rc = accessPayload(pCur, 0, nCell, (unsigned char*)pCellKey, 0);
68186 c = xRecordCompare(nCell, pCellKey, pIdxKey);
68213 assert( pCur->ix<pCur->apPage[pCur->iPage]->nCell );
68220 if( lwr>=pPage->nCell ){
68270 n *= pCur->apPage[i]->nCell;
68331 testcase( idx>pPage->nCell );
68333 if( idx>=pPage->nCell ){
68346 }while( pCur->ix>=pPage->nCell );
68369 if( (++pCur->ix)>=pPage->nCell ){
69220 assert( idx>=0 && idx<pPage->nCell );
69239 pPage->nCell--;
69240 if( pPage->nCell==0 ){
69247 memmove(ptr, ptr+2, 2*(pPage->nCell - idx));
69248 put2byte(&data[hdr+3], pPage->nCell);
69282 assert( i>=0 && i<=pPage->nCell+pPage->nOverflow );
69284 assert( pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB );
69331 assert( idx >= pPage->cellOffset+2*pPage->nCell+2 || CORRUPT_DB );
69339 memmove(pIns+2, pIns, 2*(pPage->nCell - i));
69341 pPage->nCell++;
69344 assert( get2byte(&data[pPage->hdrOffset+3])==pPage->nCell );
69362 int nCell; /* Number of cells in apCell[] */
69373 assert( idx>=0 && idx+N<=p->nCell );
69391 assert( N>=0 && N<p->nCell );
69397 assert( N>=0 && N<p->nCell );
69417 int nCell, /* Final number of cells on page */
69434 for(i=0; i<nCell; i++){
69449 pPg->nCell = nCell;
69453 put2byte(&aData[hdr+3], pPg->nCell);
69490 int nCell, /* Number of cells to add to pPg */
69496 int iEnd = iFirst + nCell;
69533 int nCell, /* Cells to delete */
69541 int iEnd = iFirst + nCell;
69597 int nCell = pPg->nCell; /* Cells stored on pPg */
69601 int iOldEnd = iOld + pPg->nCell + pPg->nOverflow;
69612 memmove(pPg->aCellIdx, &pPg->aCellIdx[nShift*2], nCell*2);
69613 nCell -= nShift;
69616 nCell -= pageFreeArray(pPg, iNewEnd, iOldEnd - iNewEnd, pCArray);
69625 assert( (iOld-iNew)<nNew || nCell==0 || CORRUPT_DB );
69627 memmove(&pCellptr[nAdd*2], pCellptr, nCell*2);
69632 nCell += nAdd;
69640 memmove(&pCellptr[2], pCellptr, (nCell - iCell) * 2);
69641 nCell++;
69650 pCellptr = &pPg->aCellIdx[nCell*2];
69653 iNew+nCell, nNew-nCell, pCArray
69656 pPg->nCell = nNew;
69659 put2byte(&aData[hdr+3], pPg->nCell);
69732 if( NEVER(pPage->nCell==0) ) return SQLITE_CORRUPT_BKPT;
69783 pCell = findCell(pPage, pPage->nCell-1);
69791 insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace),
69821 for(j=0; j<pPage->nCell; j++){
69883 memcpy(&aTo[iToHdr], &aFrom[iFromHdr], pFrom->cellOffset + 2*pFrom->nCell);
69983 b.nCell = 0;
70016 i = pParent->nOverflow + pParent->nCell;
70031 if( (i+nxDiv-pParent->nOverflow)==pParent->nCell ){
70043 nMaxCells += 1+apOld[i]->nCell+apOld[i]->nOverflow;
70130 int limit = pOld->nCell;
70161 memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*(limit+pOld->nOverflow));
70165 b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
70167 b.nCell++;
70171 b.apCell[b.nCell] = pOld->apOvfl[k];
70172 b.nCell++;
70175 piEnd = aData + pOld->cellOffset + 2*pOld->nCell;
70177 assert( b.nCell<nMaxCells );
70178 b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
70180 b.nCell++;
70183 cntOld[i] = b.nCell;
70187 assert( b.nCell<nMaxCells );
70188 b.szCell[b.nCell] = sz;
70194 b.apCell[b.nCell] = pTemp+leafCorrection;
70196 b.szCell[b.nCell] = b.szCell[b.nCell] - leafCorrection;
70202 memcpy(b.apCell[b.nCell], &pOld->aData[8], 4);
70205 while( b.szCell[b.nCell]<4 ){
70208 assert( b.szCell[b.nCell]==3 || CORRUPT_DB );
70209 assert( b.apCell[b.nCell]==&aSpace1[iSpace1-3] || CORRUPT_DB );
70211 b.szCell[b.nCell]++;
70214 b.nCell++;
70251 cntNew[k-1] = b.nCell;
70256 if( cntNew[i]<b.nCell ){
70265 while( cntNew[i]<b.nCell ){
70271 if( cntNew[i]<b.nCell ){
70279 if( cntNew[i]>=b.nCell ){
70336 assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) || CORRUPT_DB);
70338 apOld[0]->pgno, apOld[0]->nCell,
70339 nOld>=2 ? apOld[1]->pgno : 0, nOld>=2 ? apOld[1]->nCell : 0,
70340 nOld>=3 ? apOld[2]->pgno : 0, nOld>=3 ? apOld[2]->nCell : 0
70362 cntOld[i] = b.nCell;
70462 int cntOldNext = pNew->nCell + pNew->nOverflow;
70467 for(i=0; i<b.nCell; i++){
70471 cntOldNext += pOld->nCell + pOld->nOverflow + !leafData;
70598 iOld = iPg<nOld ? (cntOld[iPg-1] + !leafData) : b.nCell;
70608 assert( apNew[iPg]->nCell==nNewCell );
70618 if( isRoot && pParent->nCell==0 && pParent->hdrOffset<=apNew[0]->nFree ){
70638 (get2byte(&apNew[0]->aData[5])-apNew[0]->cellOffset-apNew[0]->nCell*2)
70655 nOld, nNew, b.nCell));
70737 assert( pChild->nCell==pRoot->nCell );
70809 && pPage->aiOvfl[0]==pPage->nCell
70811 && pParent->nCell==iIdx
71021 assert( idx<pPage->nCell );
71050 }else if( loc<0 && pPage->nCell>0 ){
71059 assert( rc!=SQLITE_OK || pPage->nCell>0 || pPage->nOverflow>0 );
71149 assert( pCur->ix<pCur->apPage[pCur->iPage]->nCell );
71222 int nCell;
71226 pCell = findCell(pLeaf, pLeaf->nCell-1);
71228 nCell = pLeaf->xCellSize(pLeaf, pCell);
71229 assert( MX_CELL_SIZE(pBt) >= nCell );
71234 insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n, &rc);
71236 dropCell(pLeaf, pLeaf->nCell-1, nCell, &rc);
71267 assert( (pPage->nCell>0 || CORRUPT_DB) && iCellIdx<=pPage->nCell );
71269 if( iCellIdx>=pPage->nCell ){
71271 pCur->ix = pPage->nCell-1;
71476 for(i=0; i<pPage->nCell; i++){
71491 *pnChange += pPage->nCell;
71763 nEntry += pPage->nCell;
71784 }while ( pCur->ix>=pCur->apPage[pCur->iPage]->nCell );
71794 if( iIdx==pPage->nCell ){
72069 int nCell; /* Number of cells */
72121 nCell = get2byte(&data[hdr+3]);
72122 assert( pPage->nCell==nCell );
72128 pCellIdx = &data[cellStart + 2*(nCell-1)];
72150 for(i=nCell-1; i>=0 && pCheck->mxErr; i--){
72227 for(i=nCell-1; i>=0; i--){
169315 int nCell; /* Current number of cells in pNode */
169319 nCell = NCELL(pNode);
169321 assert( nCell<=nMaxCell );
169322 if( nCell<nMaxCell ){
169323 nodeOverwriteCell(pRtree, pNode, pCell, nCell);
169324 writeInt16(&pNode->zData[2], nCell+1);
169328 return (nCell==nMaxCell);
169803 int nCell = NCELL(pNode);
169804 assert( nCell<200 );
169805 for(ii=0; ii<nCell; ii++){
170051 int nCell;
170061 nCell = NCELL(pNode);
170062 assert( nCell<200 );
170063 while( p->iCell<nCell ){
170090 if( p->iCell>=nCell ){
170103 if( p->iCell>=nCell ){
170548 int nCell
170552 for(ii=0; ii<nCell; ii++){
170594 int nCell = NCELL(pNode);
170604 for(iCell=0; iCell<nCell; iCell++){
170830 int nCell,
170844 int nByte = (pRtree->nDim+1)*(sizeof(int*)+nCell*sizeof(int));
170851 aSpare = &((int *)&aaSorted[pRtree->nDim])[pRtree->nDim*nCell];
170855 aaSorted[ii] = &((int *)&aaSorted[pRtree->nDim])[ii*nCell];
170856 for(jj=0; jj<nCell; jj++){
170859 SortByDimension(pRtree, aaSorted[ii], nCell, ii, aCell, aSpare);
170871 nLeft<=(nCell-RTREE_MINCELLS(pRtree));
170881 memcpy(&right, &aCell[aaSorted[ii][nCell-1]], sizeof(RtreeCell));
170882 for(kk=1; kk<(nCell-1); kk++){
170912 for(ii=0; ii<nCell; ii++){
170954 int nCell = NCELL(pNode);
170967 aCell = sqlite3_malloc((sizeof(RtreeCell)+sizeof(int))*(nCell+1));
170972 aiUsed = (int *)&aCell[nCell+1];
170973 memset(aiUsed, 0, sizeof(int)*(nCell+1));
170974 for(i=0; i<nCell; i++){
170978 memcpy(&aCell[nCell], pCell, sizeof(RtreeCell));
170979 nCell++;
171001 rc = splitNodeStartree(pRtree, aCell, nCell, pLeft, pRight,
171177 int nCell = NCELL(pNode);
171180 for(ii=1; ii<nCell; ii++){
171240 int nCell;
171249 nCell = NCELL(pNode)+1;
171250 n = (nCell+1)&(~1);
171268 for(ii=0; ii<nCell; ii++){
171269 if( ii==(nCell-1) ){
171281 aCenterCoord[iDim] = (aCenterCoord[iDim]/(nCell*(RtreeDValue)2));
171284 for(ii=0; ii<nCell; ii++){
171293 SortByDistance(aOrder, nCell, aDistance, aSpare);
171296 for(ii=0; rc==SQLITE_OK && ii<(nCell-(RTREE_MINCELLS(pRtree)+1)); ii++){
171310 for(; rc==SQLITE_OK && ii<nCell; ii++){
171373 int nCell = NCELL(pNode);
171375 for(ii=0; rc==SQLITE_OK && ii<nCell; ii++){
172120 int nCell = 0;
172125 sqlite3_snprintf(512-nCell,&zCell[nCell],"%lld", cell.iRowid);
172126 nCell = (int)strlen(zCell);
172129 sqlite3_snprintf(512-nCell,&zCell[nCell], " %g",
172132 sqlite3_snprintf(512-nCell,&zCell[nCell], " %d",
172135 nCell = (int)strlen(zCell);
178642 int nCell; /* Number of cells on page */
178663 int nCell; /* Value of 'ncell' column */
178804 for(i=0; i<p->nCell; i++){
178871 p->nCell = get2byte(&aHdr[3]);
178877 nUnused = get2byte(&aHdr[5]) - nHdr - 2*p->nCell;
178888 if( p->nCell ){
178895 p->aCell = sqlite3_malloc64((p->nCell+1) * sizeof(StatCell));
178897 memset(p->aCell, 0, (p->nCell+1) * sizeof(StatCell));
178899 for(i=0; i<p->nCell; i++){
179018 while( p->iCell<p->nCell ){
179029 pCsr->nCell = 0;
179049 if( !p->iRightChildPg || p->iCell>p->nCell ){
179058 if( p->iCell==p->nCell ){
179097 pCsr->nCell = p->nCell;
179103 for(i=0; i<p->nCell; i++){
179183 sqlite3_result_int(ctx, pCsr->nCell);