Lines Matching refs:pCell
56833 u8 *pCell, /* Pointer to the cell text. */
56859 pInfo->nSize = (u16)(&pInfo->pPayload[pInfo->nLocal] - pCell) + 4;
56878 u8 *pCell, /* Pointer to the cell text. */
56887 pInfo->nSize = 4 + getVarint(&pCell[4], (u64*)&pInfo->nKey);
56895 u8 *pCell, /* Pointer to the cell text. */
56898 u8 *pIter; /* For scanning through pCell */
56906 pIter = pCell;
56954 pInfo->nSize = nPayload + (u16)(pIter - pCell);
56958 btreeParseCellAdjustSizeForOverflow(pPage, pCell, pInfo);
56963 u8 *pCell, /* Pointer to the cell text. */
56966 u8 *pIter; /* For scanning through pCell */
56972 pIter = pCell + pPage->childPtrSize;
56991 pInfo->nSize = nPayload + (u16)(pIter - pCell);
56995 btreeParseCellAdjustSizeForOverflow(pPage, pCell, pInfo);
57018 static u16 cellSizePtr(MemPage *pPage, u8 *pCell){
57019 u8 *pIter = pCell + pPage->childPtrSize; /* For looping over bytes of pCell */
57029 pPage->xParseCell(pPage, pCell, &debuginfo);
57051 nSize += (u32)(pIter - pCell);
57061 nSize += 4 + (u16)(pIter - pCell);
57066 static u16 cellSizePtrNoPayload(MemPage *pPage, u8 *pCell){
57067 u8 *pIter = pCell + 4; /* For looping over bytes of pCell */
57076 pPage->xParseCell(pPage, pCell, &debuginfo);
57084 assert( debuginfo.nSize==(u16)(pIter - pCell) || CORRUPT_DB );
57085 return (u16)(pIter - pCell);
57099 ** If the cell pCell, part of page pPage contains a pointer
57103 static void ptrmapPutOvflPtr(MemPage *pPage, u8 *pCell, int *pRC){
57106 assert( pCell!=0 );
57107 pPage->xParseCell(pPage, pCell, &info);
57109 Pgno ovfl = get4byte(&pCell[info.nSize-4]);
59088 u8 *pCell = findCell(pPage, i);
59090 ptrmapPutOvflPtr(pPage, pCell, &rc);
59093 Pgno childPgno = get4byte(pCell);
59142 u8 *pCell = findCell(pPage, i);
59145 pPage->xParseCell(pPage, pCell, &info);
59147 && pCell+info.nSize-1<=pPage->aData+pPage->maskPage
59148 && iFrom==get4byte(pCell+info.nSize-4)
59150 put4byte(pCell+info.nSize-4, iTo);
59154 if( get4byte(pCell)==iFrom ){
59155 put4byte(pCell, iTo);
60928 u8 *pCell; /* Pointer to current cell in pPage */
60946 pCell = findCellPastPtr(pPage, idx);
60948 while( 0x80 <= *(pCell++) ){
60949 if( pCell>=pPage->aDataEnd ) return SQLITE_CORRUPT_BKPT;
60952 getVarint(pCell, (u64*)&nCellKey);
60978 int nCell; /* Size of the pCell cell in bytes */
60979 pCell = findCellPastPtr(pPage, idx);
60989 nCell = pCell[0];
60994 testcase( pCell+nCell+1==pPage->aDataEnd );
60995 c = xRecordCompare(nCell, (void*)&pCell[1], pIdxKey);
60996 }else if( !(pCell[1] & 0x80)
60997 && (nCell = ((nCell&0x7f)<<7) + pCell[1])<=pPage->maxLocal
61001 testcase( pCell+nCell+2==pPage->aDataEnd );
61002 c = xRecordCompare(nCell, (void*)&pCell[2], pIdxKey);
61014 u8 * const pCellBody = pCell - pPage->childPtrSize;
61794 unsigned char *pCell, /* First byte of the Cell */
61805 pPage->xParseCell(pPage, pCell, &info);
61810 if( pCell+info.nSize-1 > pPage->aData+pPage->maskPage ){
61813 ovflPgno = get4byte(pCell + info.nSize - 4);
61863 ** and write that byte sequence into pCell[]. Overflow pages are
61866 ** for pCell[].
61868 ** Note that pCell does not necessary need to point to the pPage->aData
61869 ** area. pCell might point to some temporary storage. The cell will
61875 unsigned char *pCell, /* Complete text of the cell */
61895 /* pPage is not necessarily writeable since pCell might be auxiliary
61897 assert( pCell<pPage->aData || pCell>=&pPage->aData[pBt->pageSize]
61904 nHeader += putVarint32(&pCell[nHeader], nPayload);
61909 nHeader += putVarint(&pCell[nHeader], *(u64*)&nKey);
61929 pPrior = pCell;
61938 pPrior = &pCell[nHeader+n];
61940 pPayload = &pCell[nHeader];
61957 pPage->xParseCell(pPage, pCell, &info);
61958 assert( nHeader==(int)(info.pPayload - pCell) );
62104 ** Insert a new cell on pPage at cell index "i". pCell points to the
62111 ** in pTemp or the original pCell) and also record its index.
62118 u8 *pCell, /* Content of the new cell */
62119 int sz, /* Bytes of content in pCell */
62120 u8 *pTemp, /* Temp storage space for pCell, if needed */
62142 assert( sz==pPage->xCellSize(pPage, pCell) || (sz==8 && iChild>0) );
62145 memcpy(pTemp, pCell, sz);
62146 pCell = pTemp;
62149 put4byte(pCell, iChild);
62153 pPage->apOvfl[j] = pCell;
62180 memcpy(&data[idx], pCell, sz);
62196 ptrmapPutOvflPtr(pPage, pCell, pRC);
62281 u8 *pCell = apCell[i];
62282 if( SQLITE_WITHIN(pCell,aData,pEnd) ){
62283 pCell = &pTmp[pCell - aData];
62289 memcpy(pData, pCell, szCell[i]);
62290 assert( szCell[i]==pPg->xCellSize(pPg, pCell) || CORRUPT_DB );
62291 testcase( szCell[i]!=pPg->xCellSize(pPg,pCell) );
62392 u8 *pCell = pCArray->apCell[i];
62393 if( SQLITE_WITHIN(pCell, pStart, pEnd) ){
62399 if( pFree!=(pCell + sz) ){
62404 pFree = pCell;
62408 pFree = pCell;
62510 u8 *pCell = pCArray->apCell[i+iNew];
62512 if( pCell>=aData && pCell<&aData[pPg->pBt->usableSize] ){
62513 pCell = &pTmp[pCell - aData];
62515 assert( 0==memcmp(pCell, &aData[iOff],
62589 u8 *pCell = pPage->apOvfl[0];
62590 u16 szCell = pPage->xCellSize(pPage, pCell);
62596 rc = rebuildPage(pNew, 1, &pCell, &szCell);
62612 ptrmapPutOvflPtr(pNew, pCell, &rc);
62629 pCell = findCell(pPage, pPage->nCell-1);
62630 pStop = &pCell[9];
62631 while( (*(pCell++)&0x80) && pCell<pStop );
62632 pStop = &pCell[9];
62633 while( ((*(pOut++) = *(pCell++))&0x80) && pCell<pStop );
63313 u8 *pCell = b.apCell[i];
63324 /* Cell pCell is destined for new sibling page pNew. Originally, it
63328 ** pCell really was a part of sibling page iOld (not a divider or
63332 || !SQLITE_WITHIN(pCell,aOld,&aOld[usableSize])
63335 ptrmapPut(pBt, get4byte(pCell), PTRMAP_BTREE, pNew->pgno, &rc);
63338 ptrmapPutOvflPtr(pNew, pCell, &rc);
63347 u8 *pCell;
63355 pCell = b.apCell[j];
63359 memcpy(&pNew->aData[8], pCell, 4);
63369 pCell = pTemp;
63370 sz = 4 + putVarint(&pCell[4], info.nKey);
63373 pCell -= 4;
63374 /* Obscure case for non-leaf-data trees: If the cell at pCell was
63387 sz = pParent->xCellSize(pParent, pCell);
63393 insertCell(pParent, nxDiv+i, pCell, sz, pTemp, pNew->pgno, &rc);
63922 unsigned char *pCell; /* Pointer to cell to delete */
63924 int iCellDepth; /* Depth of node containing pCell */
63942 pCell = findCell(pPage, iCellIdx);
63981 || (pPage->nFree+cellSizePtr(pPage,pCell)+2)>(int)(pBt->usableSize*2/3)
63997 rc = clearCell(pPage, pCell, &szCell);
64012 pCell = findCell(pLeaf, pLeaf->nCell-1);
64013 if( pCell<&pLeaf->aData[4] ) return SQLITE_CORRUPT_BKPT;
64014 nCell = pLeaf->xCellSize(pLeaf, pCell);
64019 insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n, &rc);
64243 unsigned char *pCell;
64261 pCell = findCell(pPage, i);
64263 rc = clearDatabasePage(pBt, get4byte(pCell), 1, pnChange);
64266 rc = clearCell(pPage, pCell, &szCell);
64878 u8 *pCell; /* Cell content */
64968 pCell = &data[pc];
64969 pPage->xParseCell(pPage, pCell, &info);
64990 pgnoOvfl = get4byte(&pCell[info.nSize - 4]);
65001 pgno = get4byte(pCell);
157234 ** Overwrite cell iCell of node pNode with the contents of pCell.
157239 RtreeCell *pCell, /* The cell to write */
157240 int iCell /* Index into pNode into which pCell is written */
157244 p += writeInt64(p, pCell->iRowid);
157246 p += writeCoord(p, &pCell->aCoord[ii]);
157264 ** Insert the contents of cell pCell into node pNode. If the insert
157272 RtreeCell *pCell /* The cell to be inserted */
157282 nodeOverwriteCell(pRtree, pNode, pCell, nCell);
157369 ** to by pCell with the results.
157375 RtreeCell *pCell /* OUT: Write the cell contents here */
157380 pCell->iRowid = nodeGetRowid(pRtree, pNode, iCell);
157382 pCoord = pCell->aCoord;
158454 ** Return the amount cell p would grow by if it were unioned with pCell.
158456 static RtreeDValue cellGrowth(Rtree *pRtree, RtreeCell *p, RtreeCell *pCell){
158461 cellUnion(pRtree, &cell, pCell);
158499 RtreeCell *pCell, /* Cell to insert into rtree */
158500 int iHeight, /* Height of sub-tree rooted at pCell */
158521 /* Select the child node which will be enlarged the least if pCell
158530 growth = cellGrowth(pRtree, &cell, pCell);
158553 ** A cell with the same content as pCell has just been inserted into
158560 RtreeCell *pCell /* This cell was just inserted */
158573 if( !cellContains(pRtree, &cell, pCell) ){
158574 cellUnion(pRtree, &cell, pCell);
158836 RtreeCell *pCell = &aCell[aaSorted[iBestDim][ii]];
158837 nodeInsertCell(pRtree, pTarget, pCell);
158838 cellUnion(pRtree, pBbox, pCell);
158868 RtreeCell *pCell,
158885 /* Allocate an array and populate it with a copy of pCell and
158899 memcpy(&aCell[nCell], pCell, sizeof(RtreeCell));
158966 if( iRowid==pCell->iRowid ){
158982 rc = updateMapping(pRtree, pCell->iRowid, pLeft, iHeight);
159154 RtreeCell *pCell,
159191 memcpy(&aCell[ii], pCell, sizeof(RtreeCell));
159220 if( p->iRowid==pCell->iRowid ){
159253 ** Insert cell pCell into node pNode. Node pNode is the head of a
159259 RtreeCell *pCell,
159264 RtreeNode *pChild = nodeHashLookup(pRtree, pCell->iRowid);
159271 if( nodeInsertCell(pRtree, pNode, pCell) ){
159273 rc = SplitNode(pRtree, pNode, pCell, iHeight);
159276 rc = Reinsert(pRtree, pNode, pCell, iHeight);
159279 rc = AdjustTree(pRtree, pNode, pCell);
159282 rc = rowidWrite(pRtree, pCell->iRowid, pNode->iNode);
159284 rc = parentWrite(pRtree, pCell->iRowid, pNode->iNode);
166113 StatCell *pCell = &p->aCell[i];
166117 pCell->iChildPg = sqlite3Get4byte(&aData[iOff]);
166132 pCell->nLocal = nLocal;
166139 pCell->nLastOvfl = (nPayload-nLocal) - (nOvfl-1) * (nUsable-4);
166140 pCell->nOvfl = nOvfl;
166141 pCell->aOvfl = sqlite3_malloc64(sizeof(u32)*nOvfl);
166142 if( pCell->aOvfl==0 ) return SQLITE_NOMEM_BKPT;
166143 pCell->aOvfl[0] = sqlite3Get4byte(&aData[iOff+nLocal]);
166146 u32 iPrev = pCell->aOvfl[j-1];
166153 pCell->aOvfl[j] = sqlite3Get4byte(sqlite3PagerGetData(pPg));
166232 StatCell *pCell = &p->aCell[p->iCell];
166233 if( pCell->iOvfl<pCell->nOvfl ){
166240 pCsr->iPageno = pCell->aOvfl[pCell->iOvfl];
166245 "%s%.3x+%.6x", p->zPath, p->iCell, pCell->iOvfl
166247 if( pCell->iOvfl<pCell->nOvfl-1 ){
166251 pCsr->nPayload = pCell->nLastOvfl;
166254 pCell->iOvfl++;