Lines Matching refs:pParent

12671   VdbeFrame *pParent;     /* Parent of this frame, or NULL if parent is main */
47606 ** The pParent field points back to the parent page. This allows us to
52402 ** Page pParent is an internal (non-leaf) tree page. This function
52404 ** cell in page pParent. Or, if iIdx is equal to the total number of
52405 ** cells in pParent, that page number iChild is the right-child of
52408 static void assertParentIndex(MemPage *pParent, int iIdx, Pgno iChild){
52409 assert( iIdx<=pParent->nCell );
52410 if( iIdx==pParent->nCell ){
52411 assert( get4byte(&pParent->aData[pParent->hdrOffset+8])==iChild );
52413 assert( get4byte(findCell(pParent, iIdx))==iChild );
53881 ** pParent is its parent. pPage must have a single overflow entry
53885 ** cell that will be inserted into pParent. Such a cell consists of a 4
53890 static int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){
53897 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
53931 ptrmapPut(pBt, pgnoNew, PTRMAP_BTREE, pParent->pgno, &rc);
53937 /* Create a divider cell to insert into pParent. The divider cell
53956 /* Insert the new divider cell into pParent. */
53957 insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace),
53960 /* Set the right-child pointer of pParent to point to the new page. */
53961 put4byte(&pParent->aData[pParent->hdrOffset+8], pgnoNew);
54072 ** This routine redistributes cells on the iParentIdx'th child of pParent
54090 ** inserted into or removed from the parent page (pParent). Doing so
54101 ** page (pParent) the parent page becomes overfull, this buffer is
54112 MemPage *pParent, /* Parent page of siblings being balanced */
54113 int iParentIdx, /* Index of "the page" in pParent */
54115 int isRoot /* True if pParent is a root-page */
54123 int nxDiv; /* Next divider slot in pParent->aCell[] */
54137 u8 *apDiv[NB-1]; /* Divider cells in pParent */
54145 pBt = pParent->pBt;
54147 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
54150 TRACE(("BALANCE: begin page %d child of %d\n", pPage->pgno, pParent->pgno));
54153 /* At this point pParent may have at most one overflow cell. And if
54158 assert( pParent->nOverflow==0 || pParent->nOverflow==1 );
54159 assert( pParent->nOverflow==0 || pParent->aOvfl[0].idx==iParentIdx );
54165 /* Find the sibling pages to balance. Also locate the cells in pParent
54168 ** if there are fewer than NN siblings on the other side. If pParent
54169 ** has NB or fewer children then all children of pParent are taken.
54176 i = pParent->nOverflow + pParent->nCell;
54191 if( (i+nxDiv-pParent->nOverflow)==pParent->nCell ){
54192 pRight = &pParent->aData[pParent->hdrOffset+8];
54194 pRight = findCell(pParent, i+nxDiv-pParent->nOverflow);
54206 if( i+nxDiv==pParent->aOvfl[0].idx && pParent->nOverflow ){
54207 apDiv[i] = pParent->aOvfl[0].pCell;
54209 szNew[i] = cellSizePtr(pParent, apDiv[i]);
54210 pParent->nOverflow = 0;
54212 apDiv[i] = findCell(pParent, i+nxDiv-pParent->nOverflow);
54214 szNew[i] = cellSizePtr(pParent, apDiv[i]);
54229 int iOff = SQLITE_PTR_TO_INT(apDiv[i]) - SQLITE_PTR_TO_INT(pParent->aData);
54236 apDiv[i] = &aOvflSpace[apDiv[i]-pParent->aData];
54239 dropCell(pParent, i+nxDiv-pParent->nOverflow, szNew[i], &rc);
54269 ** from pParent.
54279 ** leafData: 1 if pPage holds key+data and pParent holds only keys.
54412 assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) );
54445 ptrmapPut(pBt, pNew->pgno, PTRMAP_BTREE, pParent->pgno, &rc);
54500 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
54505 ** Insert divider cells into pParent as necessary.
54561 sz = cellSizePtr(pParent, pCell);
54567 insertCell(pParent, nxDiv, pCell, sz, pTemp, pNew->pgno, &rc);
54569 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
54583 if( isRoot && pParent->nCell==0 && pParent->hdrOffset<=apNew[0]->nFree ){
54602 copyNodeContent(apNew[0], pParent, &rc);
54705 ptrmapCheckPages(&pParent, 1);
54709 assert( pParent->isInit );
54836 MemPage * const pParent = pCur->apPage[iPage-1];
54839 rc = sqlite3PagerWrite(pParent->pDbPage);
54845 && pParent->pgno!=1
54846 && pParent->nCell==iIdx
54850 ** into pParent, which may cause pParent overflow. If this
54851 ** happens, the next interation of the do-loop will balance pParent
54862 rc = balance_quick(pParent, pPage, aBalanceQuickSpace);
54868 ** modifying the contents of pParent, which may cause pParent to
54884 rc = balance_nonroot(pParent, iIdx, pSpace, iPage==1);
57636 pFrame->pParent = pFrame->v->pDelFrame;
59925 for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);
59946 p->pDelFrame = pDel->pParent;
64356 p->pFrame = pFrame->pParent;
67421 for(u.bf.pFrame=p->pFrame; u.bf.pFrame->pParent; u.bf.pFrame=u.bf.pFrame->pParent);
68713 for(u.cb.pFrame=p->pFrame; u.cb.pFrame && u.cb.pFrame->token!=u.cb.t; u.cb.pFrame=u.cb.pFrame->pParent);
68770 u.cb.pFrame->pParent = p->pFrame;
68866 for(u.cd.pFrame=p->pFrame; u.cd.pFrame->pParent; u.cd.pFrame=u.cd.pFrame->pParent);
85804 ** Given that pParent is the parent table for foreign key constraint pFKey,
85843 Table *pParent, /* Parent table of FK constraint pFKey */
85859 ** maps to the INTEGER PRIMARY KEY of table pParent. If so, leave *ppIdx
85870 ** mapped to the primary key of table pParent, or
85874 if( pParent->iPKey>=0 ){
85876 if( !sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName, zKey) ) return 0;
85885 for(pIdx=pParent->pIndex; pIdx; pIdx=pIdx->pNext){
85893 ** the PRIMARY KEY of table pParent. The PRIMARY KEY index may be
85904 ** map to an explicit list of columns in table pParent. Check if this
85916 zDfltColl = pParent->aCol[iCol].zColl;
85922 zIdxCol = pParent->aCol[iCol].zName;
95050 Select *pParent;
95285 for(pParent=p; pParent; pParent=pParent->pPrior, pSub=pSub->pPrior){
95290 pSrc = pParent->pSrc; /* FROM clause of the outer query */
95293 assert( pParent==p ); /* First time through the loop */
95296 assert( pParent!=p ); /* 2nd and subsequent times through the loop */
95297 pSrc = pParent->pSrc = sqlite3SrcListAppend(db, 0, 0, 0);
95320 pParent->pSrc = pSrc = sqlite3SrcListEnlarge(db, pSrc, nSubSrc-1,iFrom+1);
95348 pList = pParent->pEList;
95357 substExprList(db, pParent->pEList, iParent, pSub->pEList);
95359 substExprList(db, pParent->pGroupBy, iParent, pSub->pEList);
95360 pParent->pHaving = substExpr(db, pParent->pHaving, iParent, pSub->pEList);
95363 assert( pParent->pOrderBy==0 );
95364 pParent->pOrderBy = pSub->pOrderBy;
95366 }else if( pParent->pOrderBy ){
95367 substExprList(db, pParent->pOrderBy, iParent, pSub->pEList);
95375 assert( pParent->pHaving==0 );
95376 pParent->pHaving = pParent->pWhere;
95377 pParent->pWhere = pWhere;
95378 pParent->pHaving = substExpr(db, pParent->pHaving, iParent, pSub->pEList);
95379 pParent->pHaving = sqlite3ExprAnd(db, pParent->pHaving,
95381 assert( pParent->pGroupBy==0 );
95382 pParent->pGroupBy = sqlite3ExprListDup(db, pSub->pGroupBy, 0);
95384 pParent->pWhere = substExpr(db, pParent->pWhere, iParent, pSub->pEList);
95385 pParent->pWhere = sqlite3ExprAnd(db, pParent->pWhere, pWhere);
95391 pParent->selFlags |= pSub->selFlags & SF_Distinct;
95400 pParent->pLimit = pSub->pLimit;
114356 Fts3Expr *pParent; /* pParent->pLeft==this or pParent->pRight==this */
118527 && (pExpr->pParent==0 || pExpr->pParent->eType!=FTSQUERY_NEAR)
118546 for(p=p->pParent;res && p && p->eType==FTSQUERY_NEAR; p=p->pParent){
118555 int nNear = p->pParent->nNear;
118613 && (pExpr->pParent==0 || pExpr->pParent->eType!=FTSQUERY_NEAR)
118848 while( pRoot->pParent && pRoot->pParent->eType==FTSQUERY_NEAR ){
118849 pRoot = pRoot->pParent;
118951 if( pExpr->bDeferred && pExpr->pParent->eType!=FTSQUERY_NEAR ){
120079 while( pSplit->pParent && opPrecedence(pSplit->pParent)<=opPrecedence(pNew) ){
120080 pSplit = pSplit->pParent;
120083 if( pSplit->pParent ){
120084 assert( pSplit->pParent->pRight==pSplit );
120085 pSplit->pParent->pRight = pNew;
120086 pNew->pParent = pSplit->pParent;
120091 pSplit->pParent = pNew;
120194 p->pParent = pPrev;
122448 SegmentNode *pParent; /* Parent node (or NULL for root node) */
124074 SegmentNode *pParent = pTree->pParent;
124075 rc = fts3NodeAddTerm(p, &pParent, isCopyTerm, zTerm, nTerm);
124076 if( pTree->pParent==0 ){
124077 pTree->pParent = pParent;
124081 pNew->pParent = pParent;
124135 if( !pTree->pParent ){
124156 p, pTree->pParent, iHeight+1, iFree, iNextFree, piLast, paRoot, pnRoot
124170 fts3NodeFree(p->pParent);
127287 RtreeNode *pParent; /* Parent node */
127475 static RtreeNode *nodeNew(Rtree *pRtree, RtreeNode *pParent){
127482 pNode->pParent = pParent;
127484 nodeReference(pParent);
127496 RtreeNode *pParent, /* Either the parent node or NULL */
127507 assert( !pParent || !pNode->pParent || pNode->pParent==pParent );
127508 if( pParent && !pNode->pParent ){
127509 nodeReference(pParent);
127510 pNode->pParent = pParent;
127526 pNode->pParent = pParent;
127533 nodeReference(pParent);
127675 if( pNode->pParent ){
127676 rc = nodeRelease(pRtree, pNode->pParent);
128102 RtreeNode *pParent = pNode->pParent;
128103 if( pParent ){
128104 return nodeRowidIndex(pRtree, pParent, pNode->iNode, piIndex);
128141 pCsr->pNode = pNode->pParent;
128683 while( p->pParent ){
128684 RtreeNode *pParent = p->pParent;
128692 nodeGetCell(pRtree, pParent, iCell, &cell);
128695 nodeOverwriteCell(pRtree, pParent, &cell, iCell);
128698 p = pParent;
129183 nodeRelease(pRtree, pChild->pParent);
129185 pChild->pParent = pNode;
129236 pRight = nodeNew(pRtree, pLeft->pParent);
129268 rc = rtreeInsertCell(pRtree, pLeft->pParent, &leftbbox, iHeight+1);
129273 RtreeNode *pParent = pLeft->pParent;
129277 nodeOverwriteCell(pRtree, pParent, &leftbbox, iCell);
129278 rc = AdjustTree(pRtree, pParent, &leftbbox);
129284 if( (rc = rtreeInsertCell(pRtree, pRight->pParent, &rightbbox, iHeight+1)) ){
129327 ** If node pLeaf is not the root of the r-tree and its pParent pointer is
129329 ** the pLeaf->pParent chain all the way up to the root node.
129340 while( rc==SQLITE_OK && pChild->iNode!=1 && pChild->pParent==0 ){
129348 /* Before setting pChild->pParent, test that we are not creating a
129349 ** loop of references (as we would if, say, pChild==pParent). We don't
129354 for(pTest=pLeaf; pTest && pTest->iNode!=iNode; pTest=pTest->pParent);
129356 rc2 = nodeAcquire(pRtree, iNode, 0, &pChild->pParent);
129361 if( rc==SQLITE_OK && !pChild->pParent ) rc = SQLITE_CORRUPT_VTAB;
129362 pChild = pChild->pParent;
129372 RtreeNode *pParent = 0;
129380 pParent = pNode->pParent;
129381 pNode->pParent = 0;
129382 rc = deleteCell(pRtree, pParent, iCell, iHeight+1);
129384 rc2 = nodeRelease(pRtree, pParent);
129419 RtreeNode *pParent = pNode->pParent;
129421 if( pParent ){
129434 nodeOverwriteCell(pRtree, pParent, &box, ii);
129435 rc = fixBoundingBox(pRtree, pParent);
129446 RtreeNode *pParent;
129463 pParent = pNode->pParent;
129464 assert( pParent || pNode->iNode==1 );
129465 if( pParent ){
129589 nodeRelease(pRtree, pChild->pParent);
129591 pChild->pParent = pNode;