Lines Matching defs:pParent
12945 VdbeFrame *pParent; /* Parent of this frame, or NULL if parent is main */
48729 ** The pParent field points back to the parent page. This allows us to
53579 ** Page pParent is an internal (non-leaf) tree page. This function
53581 ** cell in page pParent. Or, if iIdx is equal to the total number of
53582 ** cells in pParent, that page number iChild is the right-child of
53585 static void assertParentIndex(MemPage *pParent, int iIdx, Pgno iChild){
53586 assert( iIdx<=pParent->nCell );
53587 if( iIdx==pParent->nCell ){
53588 assert( get4byte(&pParent->aData[pParent->hdrOffset+8])==iChild );
53590 assert( get4byte(findCell(pParent, iIdx))==iChild );
53613 ** one cursor has modified page pParent while a reference to it is held
55081 ** pParent is its parent. pPage must have a single overflow entry
55085 ** cell that will be inserted into pParent. Such a cell consists of a 4
55090 static int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){
55097 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
55131 ptrmapPut(pBt, pgnoNew, PTRMAP_BTREE, pParent->pgno, &rc);
55137 /* Create a divider cell to insert into pParent. The divider cell
55156 /* Insert the new divider cell into pParent. */
55157 insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace),
55160 /* Set the right-child pointer of pParent to point to the new page. */
55161 put4byte(&pParent->aData[pParent->hdrOffset+8], pgnoNew);
55272 ** This routine redistributes cells on the iParentIdx'th child of pParent
55290 ** inserted into or removed from the parent page (pParent). Doing so
55301 ** page (pParent) the parent page becomes overfull, this buffer is
55312 MemPage *pParent, /* Parent page of siblings being balanced */
55313 int iParentIdx, /* Index of "the page" in pParent */
55315 int isRoot /* True if pParent is a root-page */
55323 int nxDiv; /* Next divider slot in pParent->aCell[] */
55337 u8 *apDiv[NB-1]; /* Divider cells in pParent */
55345 pBt = pParent->pBt;
55347 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
55350 TRACE(("BALANCE: begin page %d child of %d\n", pPage->pgno, pParent->pgno));
55353 /* At this point pParent may have at most one overflow cell. And if
55358 assert( pParent->nOverflow==0 || pParent->nOverflow==1 );
55359 assert( pParent->nOverflow==0 || pParent->aiOvfl[0]==iParentIdx );
55365 /* Find the sibling pages to balance. Also locate the cells in pParent
55368 ** if there are fewer than NN siblings on the other side. If pParent
55369 ** has NB or fewer children then all children of pParent are taken.
55376 i = pParent->nOverflow + pParent->nCell;
55391 if( (i+nxDiv-pParent->nOverflow)==pParent->nCell ){
55392 pRight = &pParent->aData[pParent->hdrOffset+8];
55394 pRight = findCell(pParent, i+nxDiv-pParent->nOverflow);
55406 if( i+nxDiv==pParent->aiOvfl[0] && pParent->nOverflow ){
55407 apDiv[i] = pParent->apOvfl[0];
55409 szNew[i] = cellSizePtr(pParent, apDiv[i]);
55410 pParent->nOverflow = 0;
55412 apDiv[i] = findCell(pParent, i+nxDiv-pParent->nOverflow);
55414 szNew[i] = cellSizePtr(pParent, apDiv[i]);
55431 iOff = SQLITE_PTR_TO_INT(apDiv[i]) - SQLITE_PTR_TO_INT(pParent->aData);
55438 apDiv[i] = &aOvflSpace[apDiv[i]-pParent->aData];
55441 dropCell(pParent, i+nxDiv-pParent->nOverflow, szNew[i], &rc);
55471 ** from pParent.
55481 ** leafData: 1 if pPage holds key+data and pParent holds only keys.
55619 assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) );
55653 ptrmapPut(pBt, pNew->pgno, PTRMAP_BTREE, pParent->pgno, &rc);
55708 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
55713 ** Insert divider cells into pParent as necessary.
55769 sz = cellSizePtr(pParent, pCell);
55775 insertCell(pParent, nxDiv, pCell, sz, pTemp, pNew->pgno, &rc);
55777 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
55791 if( isRoot && pParent->nCell==0 && pParent->hdrOffset<=apNew[0]->nFree ){
55810 copyNodeContent(apNew[0], pParent, &rc);
55914 ptrmapCheckPages(&pParent, 1);
55918 assert( pParent->isInit );
56048 MemPage * const pParent = pCur->apPage[iPage-1];
56051 rc = sqlite3PagerWrite(pParent->pDbPage);
56057 && pParent->pgno!=1
56058 && pParent->nCell==iIdx
56062 ** into pParent, which may cause pParent overflow. If this
56063 ** happens, the next interation of the do-loop will balance pParent
56074 rc = balance_quick(pParent, pPage, aBalanceQuickSpace);
56080 ** modifying the contents of pParent, which may cause pParent to
56096 rc = balance_nonroot(pParent, iIdx, pSpace, iPage==1);
58869 pFrame->pParent = pFrame->v->pDelFrame;
61166 for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);
61187 p->pDelFrame = pDel->pParent;
65710 p->pFrame = pFrame->pParent;
68799 for(u.bg.pFrame=p->pFrame; u.bg.pFrame->pParent; u.bg.pFrame=u.bg.pFrame->pParent);
70090 for(u.cc.pFrame=p->pFrame; u.cc.pFrame && u.cc.pFrame->token!=u.cc.t; u.cc.pFrame=u.cc.pFrame->pParent);
70150 u.cc.pFrame->pParent = p->pFrame;
70249 for(u.ce.pFrame=p->pFrame; u.ce.pFrame->pParent; u.ce.pFrame=u.ce.pFrame->pParent);
87921 ** Given that pParent is the parent table for foreign key constraint pFKey,
87960 Table *pParent, /* Parent table of FK constraint pFKey */
87976 ** maps to the INTEGER PRIMARY KEY of table pParent. If so, leave *ppIdx
87987 ** mapped to the primary key of table pParent, or
87991 if( pParent->iPKey>=0 ){
87993 if( !sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName, zKey) ) return 0;
88002 for(pIdx=pParent->pIndex; pIdx; pIdx=pIdx->pNext){
88010 ** the PRIMARY KEY of table pParent. The PRIMARY KEY index may be
88021 ** map to an explicit list of columns in table pParent. Check if this
88033 zDfltColl = pParent->aCol[iCol].zColl;
88039 zIdxCol = pParent->aCol[iCol].zName;
97255 Select *pParent;
97492 for(pParent=p; pParent; pParent=pParent->pPrior, pSub=pSub->pPrior){
97497 pSrc = pParent->pSrc; /* FROM clause of the outer query */
97500 assert( pParent==p ); /* First time through the loop */
97503 assert( pParent!=p ); /* 2nd and subsequent times through the loop */
97504 pSrc = pParent->pSrc = sqlite3SrcListAppend(db, 0, 0, 0);
97527 pParent->pSrc = pSrc = sqlite3SrcListEnlarge(db, pSrc, nSubSrc-1,iFrom+1);
97555 pList = pParent->pEList;
97564 substExprList(db, pParent->pEList, iParent, pSub->pEList);
97566 substExprList(db, pParent->pGroupBy, iParent, pSub->pEList);
97567 pParent->pHaving = substExpr(db, pParent->pHaving, iParent, pSub->pEList);
97570 assert( pParent->pOrderBy==0 );
97571 pParent->pOrderBy = pSub->pOrderBy;
97573 }else if( pParent->pOrderBy ){
97574 substExprList(db, pParent->pOrderBy, iParent, pSub->pEList);
97582 assert( pParent->pHaving==0 );
97583 pParent->pHaving = pParent->pWhere;
97584 pParent->pWhere = pWhere;
97585 pParent->pHaving = substExpr(db, pParent->pHaving, iParent, pSub->pEList);
97586 pParent->pHaving = sqlite3ExprAnd(db, pParent->pHaving,
97588 assert( pParent->pGroupBy==0 );
97589 pParent->pGroupBy = sqlite3ExprListDup(db, pSub->pGroupBy, 0);
97591 pParent->pWhere = substExpr(db, pParent->pWhere, iParent, pSub->pEList);
97592 pParent->pWhere = sqlite3ExprAnd(db, pParent->pWhere, pWhere);
97598 pParent->selFlags |= pSub->selFlags & SF_Distinct;
97607 pParent->pLimit = pSub->pLimit;
116801 Fts3Expr *pParent; /* pParent->pLeft==this or pParent->pRight==this */
121311 && (pExpr->pParent==0 || pExpr->pParent->eType!=FTSQUERY_NEAR)
121330 for(p=p->pParent;res && p && p->eType==FTSQUERY_NEAR; p=p->pParent){
121341 assert( p->pParent && p->pParent->pLeft==p );
121342 nNear = p->pParent->nNear;
121400 && (pExpr->pParent==0 || pExpr->pParent->eType!=FTSQUERY_NEAR)
121635 while( pRoot->pParent && pRoot->pParent->eType==FTSQUERY_NEAR ){
121636 pRoot = pRoot->pParent;
121738 if( pExpr->bDeferred && pExpr->pParent->eType!=FTSQUERY_NEAR ){
122919 while( pSplit->pParent && opPrecedence(pSplit->pParent)<=opPrecedence(pNew) ){
122920 pSplit = pSplit->pParent;
122923 if( pSplit->pParent ){
122924 assert( pSplit->pParent->pRight==pSplit );
122925 pSplit->pParent->pRight = pNew;
122926 pNew->pParent = pSplit->pParent;
122931 pSplit->pParent = pNew;
123034 p->pParent = pPrev;
125295 SegmentNode *pParent; /* Parent node (or NULL for root node) */
127032 SegmentNode *pParent = pTree->pParent;
127033 rc = fts3NodeAddTerm(p, &pParent, isCopyTerm, zTerm, nTerm);
127034 if( pTree->pParent==0 ){
127035 pTree->pParent = pParent;
127039 pNew->pParent = pParent;
127093 if( !pTree->pParent ){
127114 p, pTree->pParent, iHeight+1, iFree, iNextFree, piLast, paRoot, pnRoot
127128 fts3NodeFree(p->pParent);
130419 RtreeNode *pParent; /* Parent node */
130607 static RtreeNode *nodeNew(Rtree *pRtree, RtreeNode *pParent){
130614 pNode->pParent = pParent;
130616 nodeReference(pParent);
130628 RtreeNode *pParent, /* Either the parent node or NULL */
130639 assert( !pParent || !pNode->pParent || pNode->pParent==pParent );
130640 if( pParent && !pNode->pParent ){
130641 nodeReference(pParent);
130642 pNode->pParent = pParent;
130658 pNode->pParent = pParent;
130665 nodeReference(pParent);
130807 if( pNode->pParent ){
130808 rc = nodeRelease(pRtree, pNode->pParent);
131234 RtreeNode *pParent = pNode->pParent;
131235 if( pParent ){
131236 return nodeRowidIndex(pRtree, pParent, pNode->iNode, piIndex);
131273 pCsr->pNode = pNode->pParent;
131820 while( p->pParent ){
131821 RtreeNode *pParent = p->pParent;
131829 nodeGetCell(pRtree, pParent, iCell, &cell);
131832 nodeOverwriteCell(pRtree, pParent, &cell, iCell);
131835 p = pParent;
132320 nodeRelease(pRtree, pChild->pParent);
132322 pChild->pParent = pNode;
132373 pRight = nodeNew(pRtree, pLeft->pParent);
132405 rc = rtreeInsertCell(pRtree, pLeft->pParent, &leftbbox, iHeight+1);
132410 RtreeNode *pParent = pLeft->pParent;
132414 nodeOverwriteCell(pRtree, pParent, &leftbbox, iCell);
132415 rc = AdjustTree(pRtree, pParent, &leftbbox);
132421 if( (rc = rtreeInsertCell(pRtree, pRight->pParent, &rightbbox, iHeight+1)) ){
132464 ** If node pLeaf is not the root of the r-tree and its pParent pointer is
132466 ** the pLeaf->pParent chain all the way up to the root node.
132477 while( rc==SQLITE_OK && pChild->iNode!=1 && pChild->pParent==0 ){
132485 /* Before setting pChild->pParent, test that we are not creating a
132486 ** loop of references (as we would if, say, pChild==pParent). We don't
132491 for(pTest=pLeaf; pTest && pTest->iNode!=iNode; pTest=pTest->pParent);
132493 rc2 = nodeAcquire(pRtree, iNode, 0, &pChild->pParent);
132498 if( rc==SQLITE_OK && !pChild->pParent ) rc = SQLITE_CORRUPT_VTAB;
132499 pChild = pChild->pParent;
132509 RtreeNode *pParent = 0;
132517 pParent = pNode->pParent;
132518 pNode->pParent = 0;
132519 rc = deleteCell(pRtree, pParent, iCell, iHeight+1);
132521 rc2 = nodeRelease(pRtree, pParent);
132556 RtreeNode *pParent = pNode->pParent;
132558 if( pParent ){
132571 nodeOverwriteCell(pRtree, pParent, &box, ii);
132572 rc = fixBoundingBox(pRtree, pParent);
132583 RtreeNode *pParent;
132600 pParent = pNode->pParent;
132601 assert( pParent || pNode->iNode==1 );
132602 if( pParent ){
132726 nodeRelease(pRtree, pChild->pParent);
132728 pChild->pParent = pNode;