Home | History | Annotate | Download | only in dist

Lines Matching refs:pCell

59994   u8 *pCell,              /* Pointer to the cell text. */
60020 pInfo->nSize = (u16)(&pInfo->pPayload[pInfo->nLocal] - pCell) + 4;
60039 u8 *pCell, /* Pointer to the cell text. */
60048 pInfo->nSize = 4 + getVarint(&pCell[4], (u64*)&pInfo->nKey);
60056 u8 *pCell, /* Pointer to the cell text. */
60059 u8 *pIter; /* For scanning through pCell */
60067 pIter = pCell;
60115 pInfo->nSize = nPayload + (u16)(pIter - pCell);
60119 btreeParseCellAdjustSizeForOverflow(pPage, pCell, pInfo);
60124 u8 *pCell, /* Pointer to the cell text. */
60127 u8 *pIter; /* For scanning through pCell */
60133 pIter = pCell + pPage->childPtrSize;
60152 pInfo->nSize = nPayload + (u16)(pIter - pCell);
60156 btreeParseCellAdjustSizeForOverflow(pPage, pCell, pInfo);
60179 static u16 cellSizePtr(MemPage *pPage, u8 *pCell){
60180 u8 *pIter = pCell + pPage->childPtrSize; /* For looping over bytes of pCell */
60190 pPage->xParseCell(pPage, pCell, &debuginfo);
60212 nSize += (u32)(pIter - pCell);
60222 nSize += 4 + (u16)(pIter - pCell);
60227 static u16 cellSizePtrNoPayload(MemPage *pPage, u8 *pCell){
60228 u8 *pIter = pCell + 4; /* For looping over bytes of pCell */
60237 pPage->xParseCell(pPage, pCell, &debuginfo);
60245 assert( debuginfo.nSize==(u16)(pIter - pCell) || CORRUPT_DB );
60246 return (u16)(pIter - pCell);
60260 ** If the cell pCell, part of page pPage contains a pointer
60264 static void ptrmapPutOvflPtr(MemPage *pPage, u8 *pCell, int *pRC){
60267 assert( pCell!=0 );
60268 pPage->xParseCell(pPage, pCell, &info);
60270 Pgno ovfl = get4byte(&pCell[info.nSize-4]);
62325 u8 *pCell = findCell(pPage, i);
62327 ptrmapPutOvflPtr(pPage, pCell, &rc);
62330 Pgno childPgno = get4byte(pCell);
62376 u8 *pCell = findCell(pPage, i);
62379 pPage->xParseCell(pPage, pCell, &info);
62381 if( pCell+info.nSize > pPage->aData+pPage->pBt->usableSize ){
62384 if( iFrom==get4byte(pCell+info.nSize-4) ){
62385 put4byte(pCell+info.nSize-4, iTo);
62390 if( get4byte(pCell)==iFrom ){
62391 put4byte(pCell, iTo);
64169 u8 *pCell; /* Pointer to current cell in pPage */
64187 pCell = findCellPastPtr(pPage, idx);
64189 while( 0x80 <= *(pCell++) ){
64190 if( pCell>=pPage->aDataEnd ) return SQLITE_CORRUPT_BKPT;
64193 getVarint(pCell, (u64*)&nCellKey);
64219 int nCell; /* Size of the pCell cell in bytes */
64220 pCell = findCellPastPtr(pPage, idx);
64230 nCell = pCell[0];
64235 testcase( pCell+nCell+1==pPage->aDataEnd );
64236 c = xRecordCompare(nCell, (void*)&pCell[1], pIdxKey);
64237 }else if( !(pCell[1] & 0x80)
64238 && (nCell = ((nCell&0x7f)<<7) + pCell[1])<=pPage->maxLocal
64242 testcase( pCell+nCell+2==pPage->aDataEnd );
64243 c = xRecordCompare(nCell, (void*)&pCell[2], pIdxKey);
64255 u8 * const pCellBody = pCell - pPage->childPtrSize;
65060 unsigned char *pCell, /* First byte of the Cell */
65070 pPage->xParseCell(pPage, pCell, pInfo);
65074 if( pCell+pInfo->nSize-1 > pPage->aData+pPage->maskPage ){
65077 ovflPgno = get4byte(pCell + pInfo->nSize - 4);
65127 ** and write that byte sequence into pCell[]. Overflow pages are
65130 ** for pCell[].
65132 ** Note that pCell does not necessary need to point to the pPage->aData
65133 ** area. pCell might point to some temporary storage. The cell will
65139 unsigned char *pCell, /* Complete text of the cell */
65157 /* pPage is not necessarily writeable since pCell might be auxiliary
65159 assert( pCell<pPage->aData || pCell>=&pPage->aData[pBt->pageSize]
65169 nHeader += putVarint32(&pCell[nHeader], nPayload);
65170 nHeader += putVarint(&pCell[nHeader], *(u64*)&pX->nKey);
65175 nHeader += putVarint32(&pCell[nHeader], nPayload);
65186 pPrior = pCell;
65195 pPrior = &pCell[nHeader+n];
65197 pPayload = &pCell[nHeader];
65214 pPage->xParseCell(pPage, pCell, &info);
65215 assert( nHeader==(int)(info.pPayload - pCell) );
65356 ** Insert a new cell on pPage at cell index "i". pCell points to the
65363 ** in pTemp or the original pCell) and also record its index.
65372 u8 *pCell, /* Content of the new cell */
65373 int sz, /* Bytes of content in pCell */
65374 u8 *pTemp, /* Temp storage space for pCell, if needed */
65395 assert( sz==pPage->xCellSize(pPage, pCell) || (sz==8 && iChild>0) );
65398 memcpy(pTemp, pCell, sz);
65399 pCell = pTemp;
65402 put4byte(pCell, iChild);
65409 pPage->apOvfl[j] = pCell;
65436 memcpy(&data[idx], pCell, sz);
65452 ptrmapPutOvflPtr(pPage, pCell, pRC);
65537 u8 *pCell = apCell[i];
65538 if( SQLITE_WITHIN(pCell,aData,pEnd) ){
65539 pCell = &pTmp[pCell - aData];
65545 memcpy(pData, pCell, szCell[i]);
65546 assert( szCell[i]==pPg->xCellSize(pPg, pCell) || CORRUPT_DB );
65547 testcase( szCell[i]!=pPg->xCellSize(pPg,pCell) );
65648 u8 *pCell = pCArray->apCell[i];
65649 if( SQLITE_WITHIN(pCell, pStart, pEnd) ){
65655 if( pFree!=(pCell + sz) ){
65660 pFree = pCell;
65664 pFree = pCell;
65766 u8 *pCell = pCArray->apCell[i+iNew];
65768 if( SQLITE_WITHIN(pCell, aData, &aData[pPg->pBt->usableSize]) ){
65769 pCell = &pTmp[pCell - aData];
65771 assert( 0==memcmp(pCell, &aData[iOff],
65845 u8 *pCell = pPage->apOvfl[0];
65846 u16 szCell = pPage->xCellSize(pPage, pCell);
65852 rc = rebuildPage(pNew, 1, &pCell, &szCell);
65868 ptrmapPutOvflPtr(pNew, pCell, &rc);
65885 pCell = findCell(pPage, pPage->nCell-1);
65886 pStop = &pCell[9];
65887 while( (*(pCell++)&0x80) && pCell<pStop );
65888 pStop = &pCell[9];
65889 while( ((*(pOut++) = *(pCell++))&0x80) && pCell<pStop );
66570 u8 *pCell = b.apCell[i];
66581 /* Cell pCell is destined for new sibling page pNew. Originally, it
66585 ** pCell really was a part of sibling page iOld (not a divider or
66589 || !SQLITE_WITHIN(pCell,aOld,&aOld[usableSize])
66592 ptrmapPut(pBt, get4byte(pCell), PTRMAP_BTREE, pNew->pgno, &rc);
66595 ptrmapPutOvflPtr(pNew, pCell, &rc);
66604 u8 *pCell;
66612 pCell = b.apCell[j];
66616 memcpy(&pNew->aData[8], pCell, 4);
66626 pCell = pTemp;
66627 sz = 4 + putVarint(&pCell[4], info.nKey);
66630 pCell -= 4;
66631 /* Obscure case for non-leaf-data trees: If the cell at pCell was
66644 sz = pParent->xCellSize(pParent, pCell);
66650 insertCell(pParent, nxDiv+i, pCell, sz, pTemp, pNew->pgno, &rc);
67237 unsigned char *pCell; /* Pointer to cell to delete */
67239 int iCellDepth; /* Depth of node containing pCell */
67257 pCell = findCell(pPage, iCellIdx);
67270 || (pPage->nFree+cellSizePtr(pPage,pCell)+2)>(int)(pBt->usableSize*2/3)
67312 rc = clearCell(pPage, pCell, &info);
67327 pCell = findCell(pLeaf, pLeaf->nCell-1);
67328 if( pCell<&pLeaf->aData[4] ) return SQLITE_CORRUPT_BKPT;
67329 nCell = pLeaf->xCellSize(pLeaf, pCell);
67335 insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n, &rc);
67560 unsigned char *pCell;
67578 pCell = findCell(pPage, i);
67580 rc = clearDatabasePage(pBt, get4byte(pCell), 1, pnChange);
67583 rc = clearCell(pPage, pCell, &info);
68175 u8 *pCell; /* Cell content */
68265 pCell = &data[pc];
68266 pPage->xParseCell(pPage, pCell, &info);
68287 pgnoOvfl = get4byte(&pCell[info.nSize - 4]);
68298 pgno = get4byte(pCell);
164218 ** Overwrite cell iCell of node pNode with the contents of pCell.
164223 RtreeCell *pCell, /* The cell to write */
164224 int iCell /* Index into pNode into which pCell is written */
164228 p += writeInt64(p, pCell->iRowid);
164230 p += writeCoord(p, &pCell->aCoord[ii]);
164248 ** Insert the contents of cell pCell into node pNode. If the insert
164256 RtreeCell *pCell /* The cell to be inserted */
164266 nodeOverwriteCell(pRtree, pNode, pCell, nCell);
164353 ** to by pCell with the results.
164359 RtreeCell *pCell /* OUT: Write the cell contents here */
164364 pCell->iRowid = nodeGetRowid(pRtree, pNode, iCell);
164366 pCoord = pCell->aCoord;
165492 ** Return the amount cell p would grow by if it were unioned with pCell.
165494 static RtreeDValue cellGrowth(Rtree *pRtree, RtreeCell *p, RtreeCell *pCell){
165499 cellUnion(pRtree, &cell, pCell);
165537 RtreeCell *pCell, /* Cell to insert into rtree */
165538 int iHeight, /* Height of sub-tree rooted at pCell */
165559 /* Select the child node which will be enlarged the least if pCell
165568 growth = cellGrowth(pRtree, &cell, pCell);
165591 ** A cell with the same content as pCell has just been inserted into
165598 RtreeCell *pCell /* This cell was just inserted */
165611 if( !cellContains(pRtree, &cell, pCell) ){
165612 cellUnion(pRtree, &cell, pCell);
165874 RtreeCell *pCell = &aCell[aaSorted[iBestDim][ii]];
165875 nodeInsertCell(pRtree, pTarget, pCell);
165876 cellUnion(pRtree, pBbox, pCell);
165906 RtreeCell *pCell,
165923 /* Allocate an array and populate it with a copy of pCell and
165937 memcpy(&aCell[nCell], pCell, sizeof(RtreeCell));
166004 if( iRowid==pCell->iRowid ){
166020 rc = updateMapping(pRtree, pCell->iRowid, pLeft, iHeight);
166192 RtreeCell *pCell,
166229 memcpy(&aCell[ii], pCell, sizeof(RtreeCell));
166258 if( p->iRowid==pCell->iRowid ){
166291 ** Insert cell pCell into node pNode. Node pNode is the head of a
166297 RtreeCell *pCell,
166302 RtreeNode *pChild = nodeHashLookup(pRtree, pCell->iRowid);
166309 if( nodeInsertCell(pRtree, pNode, pCell) ){
166311 rc = SplitNode(pRtree, pNode, pCell, iHeight);
166314 rc = Reinsert(pRtree, pNode, pCell, iHeight);
166317 rc = AdjustTree(pRtree, pNode, pCell);
166320 rc = rowidWrite(pRtree, pCell->iRowid, pNode->iNode);
166322 rc = parentWrite(pRtree, pCell->iRowid, pNode->iNode);
173826 StatCell *pCell = &p->aCell[i];
173830 pCell->iChildPg = sqlite3Get4byte(&aData[iOff]);
173845 pCell->nLocal = nLocal;
173852 pCell->nLastOvfl = (nPayload-nLocal) - (nOvfl-1) * (nUsable-4);
173853 pCell->nOvfl = nOvfl;
173854 pCell->aOvfl = sqlite3_malloc64(sizeof(u32)*nOvfl);
173855 if( pCell->aOvfl==0 ) return SQLITE_NOMEM_BKPT;
173856 pCell->aOvfl[0] = sqlite3Get4byte(&aData[iOff+nLocal]);
173859 u32 iPrev = pCell->aOvfl[j-1];
173866 pCell->aOvfl[j] = sqlite3Get4byte(sqlite3PagerGetData(pPg));
173945 StatCell *pCell = &p->aCell[p->iCell];
173946 if( pCell->iOvfl<pCell->nOvfl ){
173953 pCsr->iPageno = pCell->aOvfl[pCell->iOvfl];
173958 pCell->iOvfl
173960 if( pCell->iOvfl<pCell->nOvfl-1 ){
173964 pCsr->nPayload = pCell->nLastOvfl;
173967 pCell->iOvfl++;