Lines Matching defs:cell
15691 #define BTREE_PREFORMAT 0x80 /* Inserted data is a preformated cell */
17202 #define SQLITE_CellSizeCk 0x00200000 /* Check btree cell sizes on load */
18898 ** SRT_Exists Store a 1 in memory cell pDest->iSDParm if the result
18975 #define SRT_Mem 10 /* Store result in a memory cell */
19292 #define OPFLAG_PREFORMAT 0x80 /* OP_Insert uses preformatted cell */
22559 ** well as the current memory cell array and various other frame specific
22566 ** cell in the parent (calling) frame. When the memory cell is deleted or
22739 ** Return true if a memory cell has been initialized and is valid.
22742 ** A Memory cell is initialized if at least one of the
22781 Mem *pMem; /* Memory cell used to store aggregate context */
59293 * cell header parser will never run off the end of the allocation */
67657 ** space in a page that can be consumed by a single cell for standard
67659 ** is to limit the maximum cell size so that at least 4 cells will fit
67662 ** If the payload for a cell is larger than the max payload, then extra
67665 ** the cell size drop below the min embedded payload fraction.
67673 ** cell pointer array, and the cell content area. Page 1 also has a 100-byte
67681 ** | cell pointer | | 2 bytes per cell. Sorted order.
67688 ** | cell content | | Arbitrary order interspersed with freeblocks.
67698 ** 5 2 first byte of the cell content area
67705 ** which is stored in the key size entry of the cell header rather than in
67708 ** The cell pointer array begins on the first byte after the page header.
67709 ** The cell pointer array contains zero or more 2-byte numbers which are
67710 ** offsets from the beginning of the page to the cell content in the cell
67711 ** content area. The cell pointers occur in sorted order. The system strives
67712 ** to keep free space after the last cell pointer so that new cells can
67718 ** Unused space within the cell content area is collected into a linked list of
67722 ** any group of 3 or fewer unused bytes in the cell content area cannot
67731 ** Cells are of variable length. Cells are stored in the cell content area at
67732 ** the end of the page. Pointers to the cells are in the cell pointer array
67734 ** contiguous or in order, but cell pointers are contiguous and in order.
67753 ** bytes of key and data in a btree cell.
67755 ** The content of a cell looks like this:
67785 /* The following value is the maximum cell size assuming a maximum page
67791 ** assumes a minimum cell size of 6 bytes (4 bytes for the cell itself
67792 ** plus 2 bytes for the index to the cell in the page header). Such
67850 u8 nOverflow; /* Number of overflow cell bodies in aCell[] */
67853 u16 cellOffset; /* Index in aData of first cell pointer */
67857 u16 aiOvfl[4]; /* Insert the i-th overflow cell before the aiOvfl-th
67858 ** non-overflow cell */
67865 u8 *aCellIdx; /* The cell index area */
68003 u8 max1bytePayload; /* Maximum first byte of cell for a 1-byte payload */
68024 u8 *pTmpSpace; /* Temp space sufficient to hold a single cell */
68025 int nPreformatSize; /* Size of last cell written by TransferRow() */
68043 ** about a cell. The parseCellPtr() function fills in this structure
68051 u16 nSize; /* Size of the cell content on the main b-tree page */
68107 CellInfo info; /* A parse of the cell we are pointing at */
68212 ** contains the cell with a pointer to this overflow page.
68272 u32 *heap; /* Min-heap used for analyzing cell coverage */
68287 ** cell addresses in a btree header.
68633 ** This routine is used to extract the "offset to cell content area" value
69710 ** Given a btree page and a cell index (0 means the first cell on
69711 ** the page, 1 means the second cell, and so forth) return a pointer
69712 ** to the cell content.
69727 ** btreeParseCellPtrIndex() for the case when the cell does not fit entirely
69732 MemPage *pPage, /* Page containing the cell */
69733 u8 *pCell, /* Pointer to the cell text. */
69784 ** Parse a cell content block and fill in the CellInfo structure.
69791 ** all MemPage types and that references the cell by index rather than
69795 MemPage *pPage, /* Page containing the cell */
69796 u8 *pCell, /* Pointer to the cell text. */
69812 MemPage *pPage, /* Page containing the cell */
69813 u8 *pCell, /* Pointer to the cell text. */
69817 u32 nPayload; /* Number of bytes of cell payload */
69894 MemPage *pPage, /* Page containing the cell */
69895 u8 *pCell, /* Pointer to the cell text. */
69899 u32 nPayload; /* Number of bytes of cell payload */
69931 MemPage *pPage, /* Page containing the cell */
69932 int iCell, /* The cell index. First cell is 0 */
69942 ** Compute the total number of bytes that a Cell needs in the cell
69943 ** data area of the btree-page. The return number includes the cell
69945 ** the space used by the cell pointer.
69959 ** cell. If SQLITE_DEBUG is defined, an assert() at the bottom of
69999 ** cell. If SQLITE_DEBUG is defined, an assert() at the bottom of
70021 ** cell. If SQLITE_DEBUG is defined, an assert() at the bottom of
70077 ** The cell pCell is currently part of page pSrc but will ultimately be part
70115 int pc; /* Address of the i-th cell */
70117 int size; /* Size of a cell */
70119 int cellOffset; /* Offset to the cell pointer array */
70120 int cbrk; /* Offset to the cell content area */
70123 unsigned char *temp; /* Temp area for cell content */
70125 int iCellFirst; /* First allowable cell index */
70126 int iCellLast; /* Last possible cell index */
70127 int iCellStart; /* First cell offset in input */
70145 ** offsets to each pointer in the cell-pointer array than it is to
70193 u8 *pAddr; /* The i-th cell pointer */
70234 ** Search the free-list on page pPg for space to store a cell nByte bytes in
70315 ** the first two bytes past the cell pointer area since presumably this
70316 ** allocation is being made in order to insert a new cell, so we will
70317 ** also end up needing a new cell pointer.
70322 int top; /* First byte of cell content area */
70325 int gap; /* First byte of gap between cell pointers and cell content */
70330 assert( nByte>=0 ); /* Minimum cell size is 4 */
70340 ** then the cell content offset of an empty page wants to be 65536.
70354 /* If there is enough space between gap and top for one more cell pointer,
70391 /* Allocate memory from the gap in between the cell pointer array
70392 ** and the cell content area. The btreeComputeFreeSpace() call has already
70423 u16 x; /* Offset to cell content area */
70433 assert( iSize>=4 ); /* Minimum cell size is 4 */
70492 /* The new freeblock is at the beginning of the cell content area,
70493 ** so just extend the cell content area rather than create another
70608 int top; /* First byte of the cell content area */
70609 int iCellFirst; /* First allowable cell or freeblock offset */
70610 int iCellLast; /* Last possible cell or freeblock offset */
70625 ** the start of the cell content area. A zero value for this integer is
70641 ** always be at least one cell before the first freeblock.
70667 ** of the cell-content area plus the number of free bytes within
70668 ** the cell-content area. If this is greater than the usable-size
70670 ** serves to verify that the offset to the start of the cell-content
70685 int iCellFirst; /* First allowable cell or freeblock offset */
70686 int iCellLast; /* Last possible cell or freeblock offset */
70687 int i; /* Index into the cell pointer array */
70688 int sz; /* Size of a cell */
70692 int cellOffset; /* Start of cell content area */
70761 ** offset to the cell content area will equal the page size minus the
71423 ** a cell is less than 4 bytes in size, it is rounded up to 4 bytes
71434 ** left-child pointer to the beginning of a cell.
71958 ** a cell. Make sure it is small enough so that at least minFanout
71960 ** Besides the payload, the cell must store:
71961 ** 2-byte pointer to the cell
71966 ** So a cell consists of a 2-byte pointer, a header which is as much as
73323 ** BtCursor.info is a cache of the information in the current cell.
73915 ** cell in page pParent. Or, if iIdx is equal to the total number of
73936 ** pCur->idx is set to the cell index that contains the pointer
73939 ** the largest cell index.
73971 ** the cursor is set to point to the first cell located on the root
74272 u8 *pCell; /* Pointer to current cell in pPage */
74346 ** Compare the "idx"-th cell on the page the cursor pCur is currently
74348 ** zero if the cell is less than or equal pIdxKey. Return positive
74356 ** of the cell at pCur[idx] and pIdxKey.
74369 int nCell; /* Size of the pCell cell in bytes */
74374 /* This branch runs if the record-size field of the cell is a
74461 ** (1) If the cursor is already pointing to the very last cell
74463 ** equal to that last cell, then no movement is required.
74466 ** cell on that last page is less than or equal to the pIdxKey
74516 u8 *pCell; /* Pointer to current cell in pPage */
74530 int nCell; /* Size of the pCell cell in bytes */
74537 ** the entire cell by checking for the cases where the record is
74539 ** 2 bytes of the cell.
74543 /* This branch runs if the record-size field of the cell is a
74557 ** this case the whole cell needs to be parsed, a buffer allocated
74688 ** for the common case of merely incrementing the cell counter BtCursor.aiIdx
74689 ** to the next cell on the current page. The (slower) btreeNext() helper
74781 ** for the common case of merely decrementing the cell counter BtCursor.aiIdx
74782 ** to the previous cell on the current page. The (slower) btreePrevious()
75347 CellInfo *pInfo /* Size information about the cell */
75389 ** to an overflow page belonging to a cell that is being deleted/updated.
75412 /* Call xParseCell to compute the size of a cell. If the cell contains
75428 ** Create the byte sequence used to represent a cell on page pPage
75435 ** area. pCell might point to some temporary storage. The cell will
75440 MemPage *pPage, /* The page that contains the cell */
75441 unsigned char *pCell, /* Complete text of the cell */
75442 const BtreePayload *pX, /* Payload with which to construct the cell */
75443 int *pnSize /* Write cell size here */
75517 ** *pnSize Size of the local cell (not counting overflow pages)
75622 ** Remove the i-th cell from pPage. This routine effects pPage only.
75623 ** The cell content is not freed or deallocated. It is assumed that
75624 ** the cell content has been copied someplace else. This routine just
75625 ** removes the reference to the cell from pPage.
75627 ** "sz" must be the number of bytes in the cell.
75630 u32 pc; /* Offset to cell content of cell being deleted */
75674 ** Insert a new cell on pPage at cell index "i". pCell points to the
75675 ** content of the cell.
75677 ** If the cell content will fit on the page, then put it there. If it
75678 ** will not fit, then make a copy of the cell content into pTemp if
75680 ** in pPage->apOvfl[] and make it point to the cell content (either
75689 int i, /* New cell becomes the i-th cell of the page */
75690 u8 *pCell, /* Content of the new cell */
75696 int idx = 0; /* Where to write new cell content in data[] */
75699 u8 *pIns; /* The point in pPage->aCellIdx[] where no cell inserted */
75751 /* In a corrupt database where an entry in the cell index section of
75765 /* increment the cell count */
75770 /* The cell may contain a pointer to an overflow page. If so, write
75803 ** The cells in this array are the divider cell or cells from the pParent
75811 ** cell and the size of each cell. Some of the apCell[] pointers might refer
75815 ** A szCell[] of zero means the size of that cell has not yet been computed.
75831 ** 2. The first divider cell from Parent
75833 ** 4. The second divider cell from Parent
75873 ** Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been
75892 ** Return the size of the Nth element of the cell array
75908 ** szCell[] array contains the size in bytes of each cell. This function
75909 ** replaces the current contents of page pPg with the contents of the cell
75921 int iFirst, /* First cell in pCArray to use */
75929 int i = iFirst; /* Which cell to copy from pCArray*/
75930 u32 j; /* Start of cell content area */
75986 ** The pCArray objects contains pointers to b-tree cells and the cell sizes.
75992 ** Argument pCellptr points to the first entry in the cell-pointer array
75993 ** (part of page pPg) to populate. After cell apCell[0] is written to the
75995 ** cell in the array. It is the responsibility of the caller to ensure
75996 ** that it is safe to overwrite this part of the cell-pointer array.
76004 ** end of the space required by this page for the cell-pointer area (for
76011 u8 *pBegin, /* End of cell-pointer array */
76013 u8 *pCellptr, /* Pointer to cell-pointer area */
76014 int iFirst, /* Index of first cell to add */
76018 int i = iFirst; /* Loop counter - cell index to insert */
76021 int iEnd = iFirst + nCell; /* End of loop. One past last cell to ins */
76023 u8 *pEnd; /* Maximum extent of cell data */
76068 ** This function adds the space associated with each cell in the array
76070 ** The cell-pointers and other fields of the page are not updated.
76076 int iFirst, /* First cell to delete */
76135 int iOld, /* Index of first cell currently on page */
76136 int iNew, /* Index of new first cell on page */
76257 ** cell that will be inserted into pParent. Such a cell consists of a 4
76277 ** pPage. Make the parent page writable, so that the new divider cell
76308 ** cell on the page to an overflow page. If either of these
76322 /* Create a divider cell to insert into pParent. The divider cell
76328 ** cell on pPage. The first two fields of this cell are the
76333 ** cell on pPage into the pSpace buffer.
76341 /* Insert the new divider cell into pParent. */
76492 ** size of a cell stored within an internal node is always less than 1/4
76524 int cntNew[NB+2]; /* Index in b.paCell[] of cell after i-th page */
76539 /* At this point pParent may have at most one overflow cell. And if
76540 ** this overflow cell is present, it must be the cell with
76612 /* Drop the cell from the parent page. apDiv[i] still points to
76613 ** the cell within the parent, even though it has been dropped.
76614 ** This is safe because dropping a cell only overwrites the first
76616 ** four bytes of the divider cell. So the pointer is safe to use
76620 ** the dropCell() routine will overwrite the entire cell with zeroes.
76621 ** In this case, temporarily copy the cell into the aOvflSpace[]
76670 ** child pointers. If siblings are not leaves, then all cell in
76706 ** with "NOTE 1" in the overflow cell insertion loop to prove this
76709 ** This must be done in advance. Once the balance starts, the cell
76711 ** long be able to find the cells if a pointer to each cell is not saved
76759 ** pointer of the divider cell */
76764 /* Do not allow any cells smaller than 4 bytes. If a smaller cell
76780 ** in b.apCell[] of the cell that divides page i from page i+1.
76787 ** cntNew[i]: Index in b.apCell[] and b.szCell[] for the first cell to
76870 int r; /* Index of right-most cell in left sibling */
76871 int d; /* Index of first cell to the left of right sibling */
77021 ** a) if the cell contains a reference to an overflow chain, the
77025 ** with the cell.
77054 ** was either part of sibling page iOld (possibly an overflow cell),
77055 ** or else the divider cell to the left of sibling page iOld. So,
77058 ** overflow cell), we can skip updating the pointer map entries. */
77092 ** then there is no divider cell in b.apCell[]. Instead, the divider
77093 ** cell consists of the integer key for the right-most cell of
77104 /* Obscure case for non-leaf-data trees: If the cell at pCell was
77108 ** any cell). But it is important to pass the correct size to
77109 ** insertCell(), so reparse the cell now.
77434 ** to store the overflow cell. balance_quick() inserts a new cell
77438 ** happens, the overflow cell is stored in the aBalanceQuickSpace[]
77458 ** If the parent page becomes overfull, the overflow cell or cells
77465 ** the previous call, as the overflow cell data will have been
77546 ** Overwrite the cell that cursor pCur is pointing to with fresh content
77616 ** is currently pointing to a cell that will be adjacent to the cell
77617 ** to be inserted. If seekResult<0 then pCur points to a cell that is
77618 ** smaller then (pKey,nKey). If seekResult>0 then pCur points to a cell
77672 ** points to a valid cell.
77729 /* The cursor is *not* pointing to the cell to be overwritten, nor
77730 ** to an adjacent cell. Move the cursor so that it is pointing either
77731 ** to the cell to be overwritten or an adjacent cell.
77745 /* If the cursor is not already pointing either to the cell to be
77746 ** overwritten, or if a new cell is being inserted, if the cursor is
77747 ** not pointing to an immediately adjacent cell, then move the cursor
77842 /* Overwrite the old cell with the new if they are the same size.
77843 ** We could also try to do this if the old cell is smaller, then add
77874 /* If no error has occurred and pPage has an overflow cell, call balance()
77935 ** writes the data for the new cell into the BtShared.pTmpSpace buffer
77936 ** for the destination database. The size of the cell, in bytes, is left
78060 MemPage *pPage; /* Page to delete cell from */
78061 unsigned char *pCell; /* Pointer to cell to delete */
78062 int iCellIdx; /* Index of cell to delete */
78064 CellInfo info; /* Size of the cell being deleted */
78130 ** the entry being deleted. This cell will replace the cell being deleted
78133 ** sub-tree headed by the child page of the cell being deleted. This makes
78155 ** overflow pages associated with the entry and finally remove the cell
78163 /* If the cell deleted was not located on a leaf page, then the cursor
78165 ** by the child-page of the cell that was just deleted from an internal
78166 ** node. The cell from the leaf node needs to be moved to the internal
78167 ** node to replace the deleted cell. */
78203 ** pCur is pointing to the leaf page from which a cell was removed to
78204 ** replace the cell deleted from the internal node. This is slightly
78743 ** points to the first interior cell that it points to the parent of
78745 ** pCur->aiIdx[pCur->iPage] value is set to the index of the parent cell
78766 /* Descend to the child node of the cell that the cursor currently
78978 ** This heap is used for cell overlap and coverage testing. Each u32
78979 ** entry represents the span of a cell or freeblock on a btree page.
79022 ** 2. Make sure integer cell keys are in order.
79040 int cellStart; /* Offset to the start of the cell pointer array */
79042 int doCoverageCheck = 1; /* True if cell coverage checking should be done */
79047 u8 *pCellIdx; /* Next element of the cell pointer array */
79049 u32 pc; /* Address of a cell */
79051 u32 contentOffset; /* Offset to the start of the cell content area */
79052 u32 *heap = 0; /* Min-heap used for checking cell coverage */
79091 /* Set up for cell analysis */
79092 pCheck->zPfx = "On tree page %u cell %d: ";
79101 /* EVIDENCE-OF: R-23882-45353 The cell pointer array of a b-tree page
79120 ** as the other cell checks, so initialize the heap. */
79125 /* EVIDENCE-OF: R-02776-14802 The cell pointer array consists of K 2-byte
79126 ** integer offsets to the cell contents. */
79130 /* Check cell size */
79239 ** There is an implied first entry the covers the page header, the cell
79240 ** pointer index, and the gap between the cell pointer index and the start
79241 ** of cell content.
79264 ** number of fragmented free bytes within the cell content area.
80791 /* If the bPreserve flag is set to true, then the memory cell must already
80996 ** Memory cell pMem contains the context of an aggregate function.
81028 ** Memory cell pAccum contains the context of an aggregate function.
81030 ** the results in memory cell pMem.
81055 ** If the memory cell contains a value that must be freed by
81566 ** This routine prepares a memory cell for modification by breaking
81568 ** copies of this cell as invalid.
81686 Mem *pMem, /* Memory cell to set to string value */
84561 ** that takes advantage of the fact that the memory cell value is
84775 Mem *pSub = 0; /* Memory cell hold array of subprogs */
84804 ** commandeer the 9th cell to use as storage for an array of pointers
85040 /* Each cursor uses a memory cell. The first cursor (cursor 0) can
85210 ** cell array. This is necessary as the memory cell array may contain
86438 Mem *pMem /* Memory cell to write value into */
86473 Mem *pMem /* Memory cell to write value into */
89952 /* For an INSERT, memory cell p->iNewReg contains the serialized record
89973 /* For an UPDATE, memory cell (p->iNewReg+1+iIdx) contains the required
89974 ** value. Make a copy of the cell contents and return a pointer to it.
89975 ** It is not safe to return a pointer to the memory cell itself as the
90296 ** value of the cell. This macro verifies that shallow copies are
90516 /* Find the memory cell that will be used to store the blob of memory
90518 ** vdbe memory cell to manage the memory allocation required for a
90526 ** * When using ENABLE_MEMORY_MANAGEMENT, memory cell buffers can
90530 ** The memory cell for cursor 0 is aMem[0]. The rest are allocated from
90766 ** Write a nice string representation of the contents of cell pMem
93569 ** memory cell in the range.
95803 /* Assert that P3 is a valid memory cell. */
95807 /* Assert that P3 is a valid memory cell. */
95811 /* Assert that P3 is a valid memory cell. */
95898 Mem *pData; /* MEM cell holding data for the record to be inserted */
95899 Mem *pKey; /* MEM cell holding key for the record */
96039 ** of the memory cell that contains the value that the rowid of the row will
97428 /* If there is anything other than a rowset object in memory cell P1,
97455 ** P1 contains the address of the memory cell that contains the first memory
97456 ** cell in an array of values used as arguments to the sub-program. P2
97459 ** of a memory cell in this (the parent) VM that is used to allocate the
97471 Mem *pEnd; /* Last memory cell in new array */
97510 ** cell is required for each cursor used by the program. Set local
97602 ** cell of the calling (parent) frame to cell P2 in the current frames
97606 ** The address of the cell in the parent frame is determined by adding
97675 ** This instruction throws an error if the memory cell is not initially
98630 ** The argv[0] element (which corresponds to memory cell P3)
98706 ** Write the current number of pages in database P1 to memory cell P2.
101545 Mem *pVal /* Memory cell containing record */
102473 ** Copy the current sorter key into the memory cell pOut.
102493 ** Compare the key in memory cell pVal with the key that the sorter cursor
123994 int memCnt = 0; /* Memory cell used for change counting */
124002 int iKey; /* Memory cell holding key of row to be deleted */
124436 int iPk, /* First memory cell containing the PRIMARY KEY */
129113 ** larger than the maximum rowid in the memId memory cell, then the
129114 ** memory cell is updated.
129319 int regRowCount = 0; /* Memory cell used for the row counter */
129432 ** sqlite_sequence table and store it in memory cell regAutoinc.
139318 /* Usually, regResult is the first cell in an array of memory cells
139617 ** store the results in the appropriate memory cell or array of
141506 ** store the results in the appropriate memory cell and break out
148900 ** value is copied from memory cell (regNewRowid+1+iCol), where iCol
151380 int iLeftJoin; /* Memory cell used to implement LEFT OUTER JOIN */
152657 ** The only thing it does is allocate the pLevel->iMem memory cell and
152666 ** the index of the first memory cell in that range. The code that
153305 ** initialize a memory cell that records if this table matches any
201098 u8 nBytesPerCell; /* Bytes consumed per cell */
201181 ** the id is of the parent node and the cell that RtreeSearchPoint
201207 ** supported cell size is 48 bytes (8 byte rowid + ten 4 byte coordinates).
201318 ** A single cell from a node, deserialized
201753 ** Overwrite cell iCell of node pNode with the contents of pCell.
201757 RtreeNode *pNode, /* The node into which the cell is to be written */
201758 RtreeCell *pCell, /* The cell to write */
201771 ** Remove the cell with index iCell from node pNode.
201783 ** Insert the contents of cell pCell into node pNode. If the insert
201790 RtreeNode *pNode, /* Write new cell into this node */
201791 RtreeCell *pCell /* The cell to be inserted */
201863 ** Return the 64-bit integer value associated with cell iCell of
201870 int iCell /* The cell index from which to extract the ID */
201877 ** Return coordinate iCoord from cell iCell in node pNode.
201882 int iCell, /* The index of the cell within the node */
201890 ** Deserialize cell iCell of node pNode. Populate the structure pointed
201895 RtreeNode *pNode, /* The node containing the cell to be read */
201896 int iCell, /* Index of the cell within the node */
201897 RtreeCell *pCell /* OUT: Write the cell contents here */
202143 u8 *pCellData, /* Raw cell content */
202144 RtreeSearchPoint *pSearch, /* Container of this cell */
202145 sqlite3_rtree_dbl *prScore, /* OUT: score for the cell */
202146 int *peWithin /* OUT: visibility of the cell */
202219 u8 *pCellData, /* Raw cell content as appears on disk */
202264 ** Check the leaf RTree cell given by pCellData against constraint p.
202276 u8 *pCellData, /* Raw cell content as appears on disk */
202301 ** integer value equal to iRowid. Return the index of this cell.
202323 ** Return the index of the cell containing a pointer to node pNode
202798 RtreeNode *pLeaf; /* Leaf on which the required cell resides */
203018 ** Return the N-dimensional volumn of the cell stored in *p.
203047 ** Return the margin length of cell p. The margin length is the sum
203100 ** Return the amount cell p would grow by if it were unioned with pCell.
203104 RtreeCell cell;
203105 memcpy(&cell, p, sizeof(RtreeCell));
203106 area = cellArea(pRtree, &cell);
203107 cellUnion(pRtree, &cell, pCell);
203108 return (cellArea(pRtree, &cell)-area);
203162 RtreeCell cell;
203175 nodeGetCell(pRtree, pNode, iCell, &cell);
203176 growth = cellGrowth(pRtree, &cell, pCell);
203177 area = cellArea(pRtree, &cell);
203184 iBest = cell.iRowid;
203199 ** A cell with the same content as pCell has just been inserted into
203206 RtreeCell *pCell /* This cell was just inserted */
203213 RtreeCell cell;
203227 nodeGetCell(pRtree, pParent, iCell, &cell);
203228 if( !cellContains(pRtree, &cell, pCell) ){
203229 cellUnion(pRtree, &cell, pCell);
203230 nodeOverwriteCell(pRtree, pParent, &cell, iCell);
203716 /* Remove the entry in the parent cell. */
203767 RtreeCell cell;
203768 nodeGetCell(pRtree, pNode, ii, &cell);
203769 cellUnion(pRtree, &box, &cell);
203782 ** Delete the cell at index iCell of node pNode. After removing the
203783 ** cell, adjust the r-tree data structure if required.
203793 /* Remove the cell from the node. This call just moves bytes around
203800 ** cell in the parent node so that it tightly contains the updated
203897 /* Find a node to store this cell in. pNode->iNode currently contains
203898 ** the height of the sub-tree headed by the cell.
203918 ** Insert cell pCell into node pNode. Node pNode is the head of a
203963 RtreeCell cell;
203964 nodeGetCell(pRtree, pNode, ii, &cell);
203966 /* Find a node to store this cell in. pNode->iNode currently contains
203967 ** the height of the sub-tree headed by the cell.
203969 rc = ChooseLeaf(pRtree, &cell, (int)pNode->iNode, &pInsert);
203972 rc = rtreeInsertCell(pRtree, pInsert, &cell, (int)pNode->iNode);
204001 int iCell; /* Index of iDelete cell in pLeaf */
204019 /* Delete the cell in question from the leaf node. */
204172 RtreeCell cell; /* New cell to insert if nData>1 */
204184 memset(&cell, 0, sizeof(cell));
204202 /* Populate the cell.aCoord[] array. The first coordinate is aData[3].
204214 cell.aCoord[ii].f = rtreeValueDown(aData[ii+3]);
204215 cell.aCoord[ii+1].f = rtreeValueUp(aData[ii+4]);
204216 if( cell.aCoord[ii].f>cell.aCoord[ii+1].f ){
204225 cell.aCoord[ii].i = sqlite3_value_int(aData[ii+3]);
204226 cell.aCoord[ii+1].i = sqlite3_value_int(aData[ii+4]);
204227 if( cell.aCoord[ii].i>cell.aCoord[ii+1].i ){
204237 cell.iRowid = sqlite3_value_int64(aData[2]);
204239 || sqlite3_value_int64(aData[0])!=cell.iRowid
204242 sqlite3_bind_int64(pRtree->pReadRowid, 1, cell.iRowid);
204247 rc = rtreeDeleteRowid(pRtree, cell.iRowid);
204276 rc = rtreeNewRowid(pRtree, &cell.iRowid);
204278 *pRowid = cell.iRowid;
204281 rc = ChooseLeaf(pRtree, &cell, 0, &pLeaf);
204286 rc = rtreeInsertCell(pRtree, pLeaf, &cell, 0);
204806 ** entry for each cell in the r-tree node. Each entry is itself a
204833 RtreeCell cell;
204836 nodeGetCell(&tree, &node, ii, &cell);
204838 sqlite3_str_appendf(pOut, "{%lld", cell.iRowid);
204841 sqlite3_str_appendf(pOut, " %g", (double)cell.aCoord[jj].f);
204843 sqlite3_str_appendf(pOut, " %d", cell.aCoord[jj].i);
205027 int bLeaf, /* True for a leaf cell, false for interior */
205081 u8 *pCell, /* Pointer to cell coordinates */
205095 "Dimension %d of cell %d on node %lld is corrupt", i, iCell, iNode
205107 "Dimension %d of cell %d on node %lld is corrupt relative to parent"
205155 "Node %lld is too small for cell count of %d (%d bytes)",
205293 ** 1. For each cell in the r-tree structure (%_node table), that:
205297 ** b) unless the cell is on the root node, that the cell is bounded
205298 ** by the parent cell on the parent node.
205301 ** table corresponding to the cell's rowid value that
205305 ** %_parent table mapping from the cell's child node to the
205310 ** is a leaf cell that corresponds to each entry in the %_rowid table.
205314 ** there is a non-leaf cell that corresponds to each entry in the
206711 RtreeNode *pLeaf; /* Leaf on which the required cell resides */
206938 RtreeCell cell; /* New cell to insert if nData>1 */
206958 cell.iRowid = newRowid;
206966 geopolyBBox(0, aData[2], cell.aCoord, &rc);
206980 sqlite3_bind_int64(pRtree->pReadRowid, 1, cell.iRowid);
206985 rc = rtreeDeleteRowid(pRtree, cell.iRowid);
207009 rc = rtreeNewRowid(pRtree, &cell.iRowid);
207011 *pRowid = cell.iRowid;
207013 rc = ChooseLeaf(pRtree, &cell, 0, &pLeaf);
207018 rc = rtreeInsertCell(pRtree, pLeaf, &cell, 0);
207031 sqlite3_bind_int64(pUp, 1, cell.iRowid);
214237 ** six-digit hexadecimal value to the path to the cell they are linked
214239 ** the left-most cell of the 450th child of the root page are identified
214247 ** the overflow pages associated with a cell will appear earlier in the
214275 /* Size information for a single cell within a btree page */
214289 int iCell; /* Current cell */
214298 int nMxPayload; /* Largest payload of any cell on the page */
214548 ** For a single cell on a btree page, compute the number of bytes of