Lines Matching refs:pCell

51055   u8 *pCell;     /* Pointer to the start of cell content */
52478 u8 *pCell, /* Pointer to the cell text. */
52486 pInfo->pCell = pCell;
52493 n = getVarint32(pCell, nPayload);
52497 n += getVarint(&pCell[n], (u64*)&pInfo->nKey);
52501 n += getVarint32(&pCell[n], nPayload);
52559 static u16 cellSizePtr(MemPage *pPage, u8 *pCell){
52560 u8 *pIter = &pCell[pPage->childPtrSize];
52569 btreeParseCellPtr(pPage, pCell, &debuginfo);
52601 nSize += (u32)(pIter - pCell);
52622 ** If the cell pCell, part of page pPage contains a pointer
52626 static void ptrmapPutOvflPtr(MemPage *pPage, u8 *pCell, int *pRC){
52629 assert( pCell!=0 );
52630 btreeParseCellPtr(pPage, pCell, &info);
52633 Pgno ovfl = get4byte(&pCell[info.iOverflow]);
54380 u8 *pCell = findCell(pPage, i);
54382 ptrmapPutOvflPtr(pPage, pCell, &rc);
54385 Pgno childPgno = get4byte(pCell);
54432 u8 *pCell = findCell(pPage, i);
54435 btreeParseCellPtr(pPage, pCell, &info);
54437 && pCell+info.iOverflow+3<=pPage->aData+pPage->maskPage
54438 && iFrom==get4byte(&pCell[info.iOverflow])
54440 put4byte(&pCell[info.iOverflow], iTo);
54444 if( get4byte(pCell)==iFrom ){
54445 put4byte(pCell, iTo);
55519 aPayload = pCur->info.pCell + pCur->info.nHeader;
55761 return (void*)(pCur->info.pCell + pCur->info.nHeader);
56171 u8 *pCell; /* Pointer to current cell in pPage */
56189 pCell = findCell(pPage, idx) + pPage->childPtrSize;
56191 while( 0x80 <= *(pCell++) ){
56192 if( pCell>=pPage->aDataEnd ) return SQLITE_CORRUPT_BKPT;
56195 getVarint(pCell, (u64*)&nCellKey);
56222 pCell = findCell(pPage, idx) + pPage->childPtrSize;
56232 nCell = pCell[0];
56237 testcase( pCell+nCell+1==pPage->aDataEnd );
56238 c = xRecordCompare(nCell, (void*)&pCell[1], pIdxKey, 0);
56239 }else if( !(pCell[1] & 0x80)
56240 && (nCell = ((nCell&0x7f)<<7) + pCell[1])<=pPage->maxLocal
56244 testcase( pCell+nCell+2==pPage->aDataEnd );
56245 c = xRecordCompare(nCell, (void*)&pCell[2], pIdxKey, 0);
56252 u8 * const pCellBody = pCell - pPage->childPtrSize;
56980 static int clearCell(MemPage *pPage, unsigned char *pCell){
56989 btreeParseCellPtr(pPage, pCell, &info);
56993 if( pCell+info.iOverflow+3 > pPage->aData+pPage->maskPage ){
56996 ovflPgno = get4byte(&pCell[info.iOverflow]);
57044 ** and write that byte sequence into pCell[]. Overflow pages are
57047 ** for pCell[].
57049 ** Note that pCell does not necessary need to point to the pPage->aData
57050 ** area. pCell might point to some temporary storage. The cell will
57056 unsigned char *pCell, /* Complete text of the cell */
57077 /* pPage is not necessarily writeable since pCell might be auxiliary
57079 assert( pCell<pPage->aData || pCell>=&pPage->aData[pBt->pageSize]
57088 nHeader += putVarint32(&pCell[nHeader], nData+nZero);
57092 nHeader += putVarint(&pCell[nHeader], *(u64*)&nKey);
57093 btreeParseCellPtr(pPage, pCell, &info);
57114 pPayload = &pCell[nHeader];
57115 pPrior = &pCell[info.iOverflow];
57247 ** Insert a new cell on pPage at cell index "i". pCell points to the
57254 ** in pTemp or the original pCell) and also record its index.
57260 ** nSkip is non-zero, then pCell may not point to an invalid memory location
57261 ** (but pCell+nSkip is always valid).
57266 u8 *pCell, /* Content of the new cell */
57267 int sz, /* Bytes of content in pCell */
57268 u8 *pTemp, /* Temp storage space for pCell, if needed */
57293 assert( sz==cellSizePtr(pPage, pCell) || (sz==8 && iChild>0) );
57296 memcpy(pTemp+nSkip, pCell+nSkip, sz-nSkip);
57297 pCell = pTemp;
57300 put4byte(pCell, iChild);
57304 pPage->apOvfl[j] = pCell;
57325 memcpy(&data[idx+nSkip], pCell+nSkip, sz-nSkip);
57337 ptrmapPutOvflPtr(pPage, pCell, pRC);
57447 u8 *pCell = pPage->apOvfl[0];
57448 u16 szCell = cellSizePtr(pPage, pCell);
57454 assemblePage(pNew, 1, &pCell, &szCell);
57468 ptrmapPutOvflPtr(pNew, pCell, &rc);
57485 pCell = findCell(pPage, pPage->nCell-1);
57486 pStop = &pCell[9];
57487 while( (*(pCell++)&0x80) && pCell<pStop );
57488 pStop = &pCell[9];
57489 while( ((*(pOut++) = *(pCell++))&0x80) && pCell<pStop );
58074 u8 *pCell;
58079 pCell = apCell[j];
58083 memcpy(&pNew->aData[8], pCell, 4);
58093 pCell = pTemp;
58094 sz = 4 + putVarint(&pCell[4], info.nKey);
58097 pCell -= 4;
58098 /* Obscure case for non-leaf-data trees: If the cell at pCell was
58111 sz = cellSizePtr(pParent, pCell);
58117 insertCell(pParent, nxDiv, pCell, sz, pTemp, pNew->pgno, &rc);
58650 unsigned char *pCell; /* Pointer to cell to delete */
58652 int iCellDepth; /* Depth of node containing pCell */
58670 pCell = findCell(pPage, iCellIdx);
58701 rc = clearCell(pPage, pCell);
58702 dropCell(pPage, iCellIdx, cellSizePtr(pPage, pCell), &rc);
58716 pCell = findCell(pLeaf, pLeaf->nCell-1);
58717 nCell = cellSizePtr(pLeaf, pCell);
58724 insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n, &rc);
58931 unsigned char *pCell;
58944 pCell = findCell(pPage, i);
58946 rc = clearDatabasePage(pBt, get4byte(pCell), 1, pnChange);
58949 rc = clearCell(pPage, pCell);
59530 u8 *pCell;
59538 pCell = findCell(pPage,i);
59539 btreeParseCellPtr(pPage, pCell, &info);
59554 && (&pCell[info.iOverflow]<=&pPage->aData[pBt->usableSize])
59557 Pgno pgnoOvfl = get4byte(&pCell[info.iOverflow]);
59569 pgno = get4byte(pCell);
145239 ** Overwrite cell iCell of node pNode with the contents of pCell.
145244 RtreeCell *pCell, /* The cell to write */
145245 int iCell /* Index into pNode into which pCell is written */
145249 p += writeInt64(p, pCell->iRowid);
145251 p += writeCoord(p, &pCell->aCoord[ii]);
145269 ** Insert the contents of cell pCell into node pNode. If the insert
145277 RtreeCell *pCell /* The cell to be inserted */
145287 nodeOverwriteCell(pRtree, pNode, pCell, nCell);
145374 ** to by pCell with the results.
145380 RtreeCell *pCell /* OUT: Write the cell contents here */
145385 pCell->iRowid = nodeGetRowid(pRtree, pNode, iCell);
145388 pCoord = pCell->aCoord;
146447 ** Return the amount cell p would grow by if it were unioned with pCell.
146449 static RtreeDValue cellGrowth(Rtree *pRtree, RtreeCell *p, RtreeCell *pCell){
146454 cellUnion(pRtree, &cell, pCell);
146492 RtreeCell *pCell, /* Cell to insert into rtree */
146493 int iHeight, /* Height of sub-tree rooted at pCell */
146514 /* Select the child node which will be enlarged the least if pCell
146523 growth = cellGrowth(pRtree, &cell, pCell);
146546 ** A cell with the same content as pCell has just been inserted into
146553 RtreeCell *pCell /* This cell was just inserted */
146566 if( !cellContains(pRtree, &cell, pCell) ){
146567 cellUnion(pRtree, &cell, pCell);
146829 RtreeCell *pCell = &aCell[aaSorted[iBestDim][ii]];
146830 nodeInsertCell(pRtree, pTarget, pCell);
146831 cellUnion(pRtree, pBbox, pCell);
146861 RtreeCell *pCell,
146878 /* Allocate an array and populate it with a copy of pCell and
146892 memcpy(&aCell[nCell], pCell, sizeof(RtreeCell));
146959 if( iRowid==pCell->iRowid ){
146975 rc = updateMapping(pRtree, pCell->iRowid, pLeft, iHeight);
147147 RtreeCell *pCell,
147184 memcpy(&aCell[ii], pCell, sizeof(RtreeCell));
147213 if( p->iRowid==pCell->iRowid ){
147246 ** Insert cell pCell into node pNode. Node pNode is the head of a
147252 RtreeCell *pCell,
147257 RtreeNode *pChild = nodeHashLookup(pRtree, pCell->iRowid);
147264 if( nodeInsertCell(pRtree, pNode, pCell) ){
147266 rc = SplitNode(pRtree, pNode, pCell, iHeight);
147269 rc = Reinsert(pRtree, pNode, pCell, iHeight);
147272 rc = AdjustTree(pRtree, pNode, pCell);
147275 rc = rowidWrite(pRtree, pCell->iRowid, pNode->iNode);
147277 rc = parentWrite(pRtree, pCell->iRowid, pNode->iNode);