Lines Matching refs:nCell
69801 u16 nCell; /* Number of cells on this page, local and ovfl */
72159 int nCell; /* Number of cells on the page */
72175 nCell = pPage->nCell;
72176 assert( nCell==get2byte(&data[hdr+3]) || CORRUPT_DB );
72177 iCellFirst = cellOffset + 2*nCell;
72192 u8 *pEnd = &data[cellOffset + nCell*2];
72226 if( nCell>0 ){
72230 for(i=0; i<nCell; i++){
72374 gap = pPage->cellOffset + 2*pPage->nCell;
72421 assert( pPage->nCell>0 || CORRUPT_DB );
72654 iCellFirst = hdr + 8 + pPage->childPtrSize + 2*pPage->nCell;
72720 iCellFirst = pPage->cellOffset + 2*pPage->nCell;
72726 for(i=0; i<pPage->nCell; i++){
72779 pPage->nCell = get2byte(&data[3]);
72780 if( pPage->nCell>MX_CELL(pBt) ){
72784 testcase( pPage->nCell==MX_CELL(pBt) );
72789 assert( pPage->nCell>0
72832 pPage->nCell = 0;
74334 int nCell; /* Number of cells in page pPage */
74342 nCell = pPage->nCell;
74344 for(i=0; i<nCell; i++){
74388 int nCell;
74393 nCell = pPage->nCell;
74395 for(i=0; i<nCell; i++){
74420 if( i==nCell ){
75622 if( pCur->ix>=pPage->nCell ){
75880 assert( pCur->ix<pCur->pPage->nCell || CORRUPT_DB );
75942 && (pCur->pPage->nCell<1 || pCur->pPage->intKey!=pCur->curIntKey)
75964 assert( iIdx<=pParent->nCell );
75965 if( iIdx==pParent->nCell ){
75994 testcase( pCur->aiIdx[pCur->iPage-1] > pCur->apPage[pCur->iPage-1]->nCell );
76088 if( pRoot->nCell>0 ){
76118 assert( pCur->ix<pPage->nCell );
76144 pCur->ix = pPage->nCell;
76148 pCur->ix = pPage->nCell-1;
76165 assert( pCur->pPage->nCell>0 );
76169 assert( pCur->pgnoRoot==0 || (pCur->pPage!=0 && pCur->pPage->nCell==0) );
76187 if( pCur->aiIdx[ii]!=pCur->apPage[ii]->nCell ) return 0;
76189 return pCur->ix==pCur->pPage->nCell-1 && pCur->pPage->leaf!=0;
76209 assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );
76304 assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );
76313 assert( pCur->pPage->nCell > 0 );
76329 assert( pPage->nCell>0 );
76332 upr = pPage->nCell-1;
76372 assert( pCur->ix<pCur->pPage->nCell );
76379 if( lwr>=pPage->nCell ){
76418 int nCell; /* Size of the pCell cell in bytes */
76421 nCell = pCell[0];
76422 if( nCell<=pPage->max1bytePayload ){
76426 testcase( pCell+nCell+1==pPage->aDataEnd );
76427 c = xRecordCompare(nCell, (void*)&pCell[1], pIdxKey);
76429 && (nCell = ((nCell&0x7f)<<7) + pCell[1])<=pPage->maxLocal
76433 testcase( pCell+nCell+2==pPage->aDataEnd );
76434 c = xRecordCompare(nCell, (void*)&pCell[2], pIdxKey);
76452 if( pCur->aiIdx[i]<pPage->nCell ) return 0;
76524 if( pCur->ix==pCur->pPage->nCell-1
76547 assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );
76558 assert( pCur->pPage->nCell > 0 );
76573 assert( pPage->nCell>0 );
76576 upr = pPage->nCell-1;
76579 int nCell; /* Size of the pCell cell in bytes */
76590 nCell = pCell[0];
76591 if( nCell<=pPage->max1bytePayload ){
76595 testcase( pCell+nCell+1==pPage->aDataEnd );
76596 c = xRecordCompare(nCell, (void*)&pCell[1], pIdxKey);
76598 && (nCell = ((nCell&0x7f)<<7) + pCell[1])<=pPage->maxLocal
76602 testcase( pCell+nCell+2==pPage->aDataEnd );
76603 c = xRecordCompare(nCell, (void*)&pCell[2], pIdxKey);
76618 nCell = (int)pCur->info.nKey;
76619 testcase( nCell<0 ); /* True if key size is 2^32 or more */
76620 testcase( nCell==0 ); /* Invalid key size: 0x80 0x80 0x00 */
76621 testcase( nCell==1 ); /* Invalid key size: 0x80 0x80 0x01 */
76622 testcase( nCell==2 ); /* Minimum legal index key size */
76623 if( nCell<2 || nCell/pCur->pBt->usableSize>pCur->pBt->nPage ){
76627 pCellKey = sqlite3Malloc( nCell+nOverrun );
76633 rc = accessPayload(pCur, 0, nCell, (unsigned char*)pCellKey, 0);
76634 memset(((u8*)pCellKey)+nCell,0,nOverrun); /* Fix uninit warnings */
76640 c = sqlite3VdbeRecordCompare(nCell, pCellKey, pIdxKey);
76666 assert( pCur->ix<pCur->pPage->nCell || CORRUPT_DB );
76672 if( lwr>=pPage->nCell ){
76695 && (pCur->pPage->nCell<1 || pCur->pPage->intKey!=pCur->curIntKey)
76747 n = pCur->pPage->nCell;
76749 n *= pCur->apPage[i]->nCell;
76802 if( idx>=pPage->nCell ){
76815 }while( pCur->ix>=pPage->nCell );
76837 if( (++pCur->ix)>=pPage->nCell ){
77720 assert( idx<pPage->nCell );
77741 pPage->nCell--;
77742 if( pPage->nCell==0 ){
77749 memmove(ptr, ptr+2, 2*(pPage->nCell - idx));
77750 put2byte(&data[hdr+3], pPage->nCell);
77788 assert( i>=0 && i<=pPage->nCell+pPage->nOverflow );
77790 assert( pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB );
77831 assert( idx >= pPage->cellOffset+2*pPage->nCell+2 || CORRUPT_DB );
77842 memmove(pIns+2, pIns, 2*(pPage->nCell - i));
77844 pPage->nCell++;
77847 assert( get2byte(&data[pPage->hdrOffset+3])==pPage->nCell || CORRUPT_DB );
77883 assert( i>=0 && i<=pPage->nCell+pPage->nOverflow );
77885 assert( pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB );
77921 assert( idx >= pPage->cellOffset+2*pPage->nCell+2 || CORRUPT_DB );
77926 memmove(pIns+2, pIns, 2*(pPage->nCell - i));
77928 pPage->nCell++;
77931 assert( get2byte(&data[pPage->hdrOffset+3])==pPage->nCell || CORRUPT_DB );
78031 int nCell; /* Number of cells in apCell[] */
78046 assert( idx>=0 && idx+N<=p->nCell );
78064 assert( N>=0 && N<p->nCell );
78070 assert( N>=0 && N<p->nCell );
78091 int nCell, /* Final number of cells on page */
78100 int iEnd = i+nCell; /* Loop terminator */
78107 assert( nCell>0 );
78145 pPg->nCell = nCell;
78149 put2byte(&aData[hdr+3], pPg->nCell);
78185 int nCell, /* Number of cells to add to pPg */
78191 int iEnd = iFirst + nCell; /* End of loop. One past last cell to ins */
78247 int nCell, /* Cells to delete */
78255 int iEnd = iFirst + nCell;
78324 int nCell = pPg->nCell; /* Cells stored on pPg */
78328 int iOldEnd = iOld + pPg->nCell + pPg->nOverflow;
78337 assert( nCell>=0 );
78340 if( NEVER(nShift>nCell) ) return SQLITE_CORRUPT_BKPT;
78341 memmove(pPg->aCellIdx, &pPg->aCellIdx[nShift*2], nCell*2);
78342 nCell -= nShift;
78346 assert( nCell>=nTail );
78347 nCell -= nTail;
78357 assert( (iOld-iNew)<nNew || nCell==0 || CORRUPT_DB );
78360 memmove(&pCellptr[nAdd*2], pCellptr, nCell*2);
78365 nCell += nAdd;
78373 if( nCell>iCell ){
78374 memmove(&pCellptr[2], pCellptr, (nCell - iCell) * 2);
78376 nCell++;
78386 assert( nCell>=0 );
78387 pCellptr = &pPg->aCellIdx[nCell*2];
78390 iNew+nCell, nNew-nCell, pCArray
78393 pPg->nCell = nNew;
78396 put2byte(&aData[hdr+3], pPg->nCell);
78454 if( pPage->nCell==0 ) return SQLITE_CORRUPT_BKPT; /* dbfuzz001.test */
78475 b.nCell = 1;
78517 pCell = findCell(pPage, pPage->nCell-1);
78525 rc = insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace),
78555 for(j=0; j<pPage->nCell; j++){
78617 memcpy(&aTo[iToHdr], &aFrom[iFromHdr], pFrom->cellOffset + 2*pFrom->nCell);
78745 i = pParent->nOverflow + pParent->nCell;
78760 if( (i+nxDiv-pParent->nOverflow)==pParent->nCell ){
78781 nMaxCells += apOld[i]->nCell + ArraySize(pParent->apOvfl);
78864 int limit = pOld->nCell;
78869 VVA_ONLY( int nCellAtStart = b.nCell; )
78896 memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*(limit+pOld->nOverflow));
78904 b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
78906 b.nCell++;
78910 b.apCell[b.nCell] = pOld->apOvfl[k];
78911 b.nCell++;
78914 piEnd = aData + pOld->cellOffset + 2*pOld->nCell;
78916 assert( b.nCell<nMaxCells );
78917 b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
78919 b.nCell++;
78921 assert( (b.nCell-nCellAtStart)==(pOld->nCell+pOld->nOverflow) );
78923 cntOld[i] = b.nCell;
78927 assert( b.nCell<nMaxCells );
78928 b.szCell[b.nCell] = sz;
78934 b.apCell[b.nCell] = pTemp+leafCorrection;
78936 b.szCell[b.nCell] = b.szCell[b.nCell] - leafCorrection;
78942 memcpy(b.apCell[b.nCell], &pOld->aData[8], 4);
78945 while( b.szCell[b.nCell]<4 ){
78948 assert( b.szCell[b.nCell]==3 || CORRUPT_DB );
78949 assert( b.apCell[b.nCell]==&aSpace1[iSpace1-3] || CORRUPT_DB );
78951 b.szCell[b.nCell]++;
78954 b.nCell++;
79002 cntNew[k-1] = b.nCell;
79007 if( cntNew[i]<b.nCell ){
79016 while( cntNew[i]<b.nCell ){
79022 if( cntNew[i]<b.nCell ){
79030 if( cntNew[i]>=b.nCell ){
79089 assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) || CORRUPT_DB);
79091 apOld[0]->pgno, apOld[0]->nCell,
79092 nOld>=2 ? apOld[1]->pgno : 0, nOld>=2 ? apOld[1]->nCell : 0,
79093 nOld>=3 ? apOld[2]->pgno : 0, nOld>=3 ? apOld[2]->nCell : 0
79120 cntOld[i] = b.nCell;
79219 int cntOldNext = pNew->nCell + pNew->nOverflow;
79223 for(i=0; i<b.nCell; i++){
79230 cntOldNext += pOld->nCell + pOld->nOverflow + !leafData;
79365 iOld = iPg<nOld ? (cntOld[iPg-1] + !leafData) : b.nCell;
79375 assert( apNew[iPg]->nCell==nNewCell );
79385 if( isRoot && pParent->nCell==0 && pParent->hdrOffset<=apNew[0]->nFree ){
79406 - apNew[0]->nCell*2)
79423 nOld, nNew, b.nCell));
79505 assert( pChild->nCell==pRoot->nCell || CORRUPT_DB );
79615 && pPage->aiOvfl[0]==pPage->nCell
79617 && pParent->nCell==iIdx
80039 if( idx>=pPage->nCell ){
80077 }else if( loc<0 && pPage->nCell>0 ){
80086 assert( rc!=SQLITE_OK || pPage->nCell>0 || pPage->nOverflow>0 );
80301 if( pPage->nCell<=iCellIdx ){
80308 if( pCell<&pPage->aCellIdx[pPage->nCell] ){
80333 || pPage->nCell==1 /* See dbfuzz001.test for a test case */
80386 int nCell;
80399 pCell = findCell(pLeaf, pLeaf->nCell-1);
80401 nCell = pLeaf->xCellSize(pLeaf, pCell);
80402 assert( MX_CELL_SIZE(pBt) >= nCell );
80407 rc = insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n);
80409 dropCell(pLeaf, pLeaf->nCell-1, nCell, &rc);
80451 assert( (pPage->nCell>0 || CORRUPT_DB) && iCellIdx<=pPage->nCell );
80453 if( iCellIdx>=pPage->nCell ){
80455 pCur->ix = pPage->nCell-1;
80665 for(i=0; i<pPage->nCell; i++){
80681 *pnChange += pPage->nCell;
80955 nEntry += pPage->nCell;
80976 }while ( pCur->ix>=pCur->pPage->nCell );
80986 if( iIdx==pPage->nCell ){
81297 int nCell; /* Number of cells */
81357 nCell = get2byte(&data[hdr+3]);
81358 assert( pPage->nCell==nCell );
81360 pCheck->nRow += nCell;
81367 pCellIdx = &data[cellStart + 2*(nCell-1)];
81389 for(i=nCell-1; i>=0 && pCheck->mxErr; i--){
81466 for(i=nCell-1; i>=0; i--){
211167 int nCell; /* Current number of cells in pNode */
211171 nCell = NCELL(pNode);
211173 assert( nCell<=nMaxCell );
211174 if( nCell<nMaxCell ){
211175 nodeOverwriteCell(pRtree, pNode, pCell, nCell);
211176 writeInt16(&pNode->zData[2], nCell+1);
211180 return (nCell==nMaxCell);
211687 int nCell = NCELL(pNode);
211688 assert( nCell<200 );
211689 for(ii=0; ii<nCell; ii++){
211938 int nCell;
211949 nCell = NCELL(pNode);
211950 assert( nCell<200 );
211952 while( p->iCell<nCell ){
211988 if( p->iCell>=nCell ){
212001 if( p->iCell>=nCell ){
212509 int nCell
212513 for(ii=0; ii<nCell; ii++){
212554 int nCell = NCELL(pNode);
212561 for(iCell=0; iCell<nCell; iCell++){
212578 for(iCell=0; iCell<nCell; iCell++){
212743 int nCell,
212757 sqlite3_int64 nByte = (pRtree->nDim+1)*(sizeof(int*)+nCell*sizeof(int));
212764 aSpare = &((int *)&aaSorted[pRtree->nDim])[pRtree->nDim*nCell];
212768 aaSorted[ii] = &((int *)&aaSorted[pRtree->nDim])[ii*nCell];
212769 for(jj=0; jj<nCell; jj++){
212772 SortByDimension(pRtree, aaSorted[ii], nCell, ii, aCell, aSpare);
212784 nLeft<=(nCell-RTREE_MINCELLS(pRtree));
212794 memcpy(&right, &aCell[aaSorted[ii][nCell-1]], sizeof(RtreeCell));
212795 for(kk=1; kk<(nCell-1); kk++){
212825 for(ii=0; ii<nCell; ii++){
212872 int nCell = NCELL(pNode);
212885 aCell = sqlite3_malloc64((sizeof(RtreeCell)+sizeof(int))*(nCell+1));
212890 aiUsed = (int *)&aCell[nCell+1];
212891 memset(aiUsed, 0, sizeof(int)*(nCell+1));
212892 for(i=0; i<nCell; i++){
212896 memcpy(&aCell[nCell], pCell, sizeof(RtreeCell));
212897 nCell++;
212919 rc = splitNodeStartree(pRtree, aCell, nCell, pLeft, pRight,
213100 int nCell = NCELL(pNode);
213103 for(ii=1; ii<nCell; ii++){
213190 int nCell = NCELL(pNode);
213192 for(ii=0; rc==SQLITE_OK && ii<nCell; ii++){
214384 int nCell; /* Number of cells on page */
214394 nCell = readInt16(&aNode[2]);
214395 if( (4 + nCell*(8 + pCheck->nDim*2*4))>nNode ){
214398 iNode, nCell, nNode
214401 for(i=0; i<nCell; i++){
223649 int nCell; /* Number of cells on page */
223673 int nCell; /* Value of 'ncell' column */
223848 for(i=0; i<p->nCell; i++){
223853 p->nCell = 0;
223885 pCsr->nCell = 0;
223955 p->nCell = get2byte(&aHdr[3]);
223959 nUnused = get2byte(&aHdr[5]) - nHdr - 2*p->nCell;
223973 if( p->nCell ){
223980 p->aCell = sqlite3_malloc64((p->nCell+1) * sizeof(StatCell));
223982 memset(p->aCell, 0, (p->nCell+1) * sizeof(StatCell));
223984 for(i=0; i<p->nCell; i++){
224150 while( p->iCell<p->nCell ){
224182 if( !p->iRightChildPg || p->iCell>p->nCell ){
224199 if( p->iCell==p->nCell ){
224241 pCsr->nCell += p->nCell;
224249 for(i=0; i<p->nCell; i++){
224370 sqlite3_result_int64(ctx, pCsr->nCell);