Lines Matching defs:pParent

12945   VdbeFrame *pParent;     /* Parent of this frame, or NULL if parent is main */
48714 ** The pParent field points back to the parent page. This allows us to
53564 ** Page pParent is an internal (non-leaf) tree page. This function
53566 ** cell in page pParent. Or, if iIdx is equal to the total number of
53567 ** cells in pParent, that page number iChild is the right-child of
53570 static void assertParentIndex(MemPage *pParent, int iIdx, Pgno iChild){
53571 assert( iIdx<=pParent->nCell );
53572 if( iIdx==pParent->nCell ){
53573 assert( get4byte(&pParent->aData[pParent->hdrOffset+8])==iChild );
53575 assert( get4byte(findCell(pParent, iIdx))==iChild );
53598 ** one cursor has modified page pParent while a reference to it is held
55066 ** pParent is its parent. pPage must have a single overflow entry
55070 ** cell that will be inserted into pParent. Such a cell consists of a 4
55075 static int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){
55082 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
55116 ptrmapPut(pBt, pgnoNew, PTRMAP_BTREE, pParent->pgno, &rc);
55122 /* Create a divider cell to insert into pParent. The divider cell
55141 /* Insert the new divider cell into pParent. */
55142 insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace),
55145 /* Set the right-child pointer of pParent to point to the new page. */
55146 put4byte(&pParent->aData[pParent->hdrOffset+8], pgnoNew);
55257 ** This routine redistributes cells on the iParentIdx'th child of pParent
55275 ** inserted into or removed from the parent page (pParent). Doing so
55286 ** page (pParent) the parent page becomes overfull, this buffer is
55297 MemPage *pParent, /* Parent page of siblings being balanced */
55298 int iParentIdx, /* Index of "the page" in pParent */
55300 int isRoot /* True if pParent is a root-page */
55308 int nxDiv; /* Next divider slot in pParent->aCell[] */
55322 u8 *apDiv[NB-1]; /* Divider cells in pParent */
55330 pBt = pParent->pBt;
55332 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
55335 TRACE(("BALANCE: begin page %d child of %d\n", pPage->pgno, pParent->pgno));
55338 /* At this point pParent may have at most one overflow cell. And if
55343 assert( pParent->nOverflow==0 || pParent->nOverflow==1 );
55344 assert( pParent->nOverflow==0 || pParent->aiOvfl[0]==iParentIdx );
55350 /* Find the sibling pages to balance. Also locate the cells in pParent
55353 ** if there are fewer than NN siblings on the other side. If pParent
55354 ** has NB or fewer children then all children of pParent are taken.
55361 i = pParent->nOverflow + pParent->nCell;
55376 if( (i+nxDiv-pParent->nOverflow)==pParent->nCell ){
55377 pRight = &pParent->aData[pParent->hdrOffset+8];
55379 pRight = findCell(pParent, i+nxDiv-pParent->nOverflow);
55391 if( i+nxDiv==pParent->aiOvfl[0] && pParent->nOverflow ){
55392 apDiv[i] = pParent->apOvfl[0];
55394 szNew[i] = cellSizePtr(pParent, apDiv[i]);
55395 pParent->nOverflow = 0;
55397 apDiv[i] = findCell(pParent, i+nxDiv-pParent->nOverflow);
55399 szNew[i] = cellSizePtr(pParent, apDiv[i]);
55416 iOff = SQLITE_PTR_TO_INT(apDiv[i]) - SQLITE_PTR_TO_INT(pParent->aData);
55423 apDiv[i] = &aOvflSpace[apDiv[i]-pParent->aData];
55426 dropCell(pParent, i+nxDiv-pParent->nOverflow, szNew[i], &rc);
55456 ** from pParent.
55466 ** leafData: 1 if pPage holds key+data and pParent holds only keys.
55604 assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) );
55638 ptrmapPut(pBt, pNew->pgno, PTRMAP_BTREE, pParent->pgno, &rc);
55693 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
55698 ** Insert divider cells into pParent as necessary.
55754 sz = cellSizePtr(pParent, pCell);
55760 insertCell(pParent, nxDiv, pCell, sz, pTemp, pNew->pgno, &rc);
55762 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
55776 if( isRoot && pParent->nCell==0 && pParent->hdrOffset<=apNew[0]->nFree ){
55795 copyNodeContent(apNew[0], pParent, &rc);
55899 ptrmapCheckPages(&pParent, 1);
55903 assert( pParent->isInit );
56033 MemPage * const pParent = pCur->apPage[iPage-1];
56036 rc = sqlite3PagerWrite(pParent->pDbPage);
56042 && pParent->pgno!=1
56043 && pParent->nCell==iIdx
56047 ** into pParent, which may cause pParent overflow. If this
56048 ** happens, the next interation of the do-loop will balance pParent
56059 rc = balance_quick(pParent, pPage, aBalanceQuickSpace);
56065 ** modifying the contents of pParent, which may cause pParent to
56081 rc = balance_nonroot(pParent, iIdx, pSpace, iPage==1);
58854 pFrame->pParent = pFrame->v->pDelFrame;
61151 for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);
61172 p->pDelFrame = pDel->pParent;
65695 p->pFrame = pFrame->pParent;
68784 for(u.bg.pFrame=p->pFrame; u.bg.pFrame->pParent; u.bg.pFrame=u.bg.pFrame->pParent);
70075 for(u.cc.pFrame=p->pFrame; u.cc.pFrame && u.cc.pFrame->token!=u.cc.t; u.cc.pFrame=u.cc.pFrame->pParent);
70135 u.cc.pFrame->pParent = p->pFrame;
70234 for(u.ce.pFrame=p->pFrame; u.ce.pFrame->pParent; u.ce.pFrame=u.ce.pFrame->pParent);
87898 ** Given that pParent is the parent table for foreign key constraint pFKey,
87937 Table *pParent, /* Parent table of FK constraint pFKey */
87953 ** maps to the INTEGER PRIMARY KEY of table pParent. If so, leave *ppIdx
87964 ** mapped to the primary key of table pParent, or
87968 if( pParent->iPKey>=0 ){
87970 if( !sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName, zKey) ) return 0;
87979 for(pIdx=pParent->pIndex; pIdx; pIdx=pIdx->pNext){
87987 ** the PRIMARY KEY of table pParent. The PRIMARY KEY index may be
87998 ** map to an explicit list of columns in table pParent. Check if this
88010 zDfltColl = pParent->aCol[iCol].zColl;
88016 zIdxCol = pParent->aCol[iCol].zName;
97232 Select *pParent;
97469 for(pParent=p; pParent; pParent=pParent->pPrior, pSub=pSub->pPrior){
97474 pSrc = pParent->pSrc; /* FROM clause of the outer query */
97477 assert( pParent==p ); /* First time through the loop */
97480 assert( pParent!=p ); /* 2nd and subsequent times through the loop */
97481 pSrc = pParent->pSrc = sqlite3SrcListAppend(db, 0, 0, 0);
97504 pParent->pSrc = pSrc = sqlite3SrcListEnlarge(db, pSrc, nSubSrc-1,iFrom+1);
97532 pList = pParent->pEList;
97541 substExprList(db, pParent->pEList, iParent, pSub->pEList);
97543 substExprList(db, pParent->pGroupBy, iParent, pSub->pEList);
97544 pParent->pHaving = substExpr(db, pParent->pHaving, iParent, pSub->pEList);
97547 assert( pParent->pOrderBy==0 );
97548 pParent->pOrderBy = pSub->pOrderBy;
97550 }else if( pParent->pOrderBy ){
97551 substExprList(db, pParent->pOrderBy, iParent, pSub->pEList);
97559 assert( pParent->pHaving==0 );
97560 pParent->pHaving = pParent->pWhere;
97561 pParent->pWhere = pWhere;
97562 pParent->pHaving = substExpr(db, pParent->pHaving, iParent, pSub->pEList);
97563 pParent->pHaving = sqlite3ExprAnd(db, pParent->pHaving,
97565 assert( pParent->pGroupBy==0 );
97566 pParent->pGroupBy = sqlite3ExprListDup(db, pSub->pGroupBy, 0);
97568 pParent->pWhere = substExpr(db, pParent->pWhere, iParent, pSub->pEList);
97569 pParent->pWhere = sqlite3ExprAnd(db, pParent->pWhere, pWhere);
97575 pParent->selFlags |= pSub->selFlags & SF_Distinct;
97584 pParent->pLimit = pSub->pLimit;
116793 Fts3Expr *pParent; /* pParent->pLeft==this or pParent->pRight==this */
121294 && (pExpr->pParent==0 || pExpr->pParent->eType!=FTSQUERY_NEAR)
121313 for(p=p->pParent;res && p && p->eType==FTSQUERY_NEAR; p=p->pParent){
121324 assert( p->pParent && p->pParent->pLeft==p );
121325 nNear = p->pParent->nNear;
121383 && (pExpr->pParent==0 || pExpr->pParent->eType!=FTSQUERY_NEAR)
121618 while( pRoot->pParent && pRoot->pParent->eType==FTSQUERY_NEAR ){
121619 pRoot = pRoot->pParent;
121721 if( pExpr->bDeferred && pExpr->pParent->eType!=FTSQUERY_NEAR ){
122902 while( pSplit->pParent && opPrecedence(pSplit->pParent)<=opPrecedence(pNew) ){
122903 pSplit = pSplit->pParent;
122906 if( pSplit->pParent ){
122907 assert( pSplit->pParent->pRight==pSplit );
122908 pSplit->pParent->pRight = pNew;
122909 pNew->pParent = pSplit->pParent;
122914 pSplit->pParent = pNew;
123017 p->pParent = pPrev;
125278 SegmentNode *pParent; /* Parent node (or NULL for root node) */
127015 SegmentNode *pParent = pTree->pParent;
127016 rc = fts3NodeAddTerm(p, &pParent, isCopyTerm, zTerm, nTerm);
127017 if( pTree->pParent==0 ){
127018 pTree->pParent = pParent;
127022 pNew->pParent = pParent;
127076 if( !pTree->pParent ){
127097 p, pTree->pParent, iHeight+1, iFree, iNextFree, piLast, paRoot, pnRoot
127111 fts3NodeFree(p->pParent);
130402 RtreeNode *pParent; /* Parent node */
130590 static RtreeNode *nodeNew(Rtree *pRtree, RtreeNode *pParent){
130597 pNode->pParent = pParent;
130599 nodeReference(pParent);
130611 RtreeNode *pParent, /* Either the parent node or NULL */
130622 assert( !pParent || !pNode->pParent || pNode->pParent==pParent );
130623 if( pParent && !pNode->pParent ){
130624 nodeReference(pParent);
130625 pNode->pParent = pParent;
130641 pNode->pParent = pParent;
130648 nodeReference(pParent);
130790 if( pNode->pParent ){
130791 rc = nodeRelease(pRtree, pNode->pParent);
131217 RtreeNode *pParent = pNode->pParent;
131218 if( pParent ){
131219 return nodeRowidIndex(pRtree, pParent, pNode->iNode, piIndex);
131256 pCsr->pNode = pNode->pParent;
131803 while( p->pParent ){
131804 RtreeNode *pParent = p->pParent;
131812 nodeGetCell(pRtree, pParent, iCell, &cell);
131815 nodeOverwriteCell(pRtree, pParent, &cell, iCell);
131818 p = pParent;
132303 nodeRelease(pRtree, pChild->pParent);
132305 pChild->pParent = pNode;
132356 pRight = nodeNew(pRtree, pLeft->pParent);
132388 rc = rtreeInsertCell(pRtree, pLeft->pParent, &leftbbox, iHeight+1);
132393 RtreeNode *pParent = pLeft->pParent;
132397 nodeOverwriteCell(pRtree, pParent, &leftbbox, iCell);
132398 rc = AdjustTree(pRtree, pParent, &leftbbox);
132404 if( (rc = rtreeInsertCell(pRtree, pRight->pParent, &rightbbox, iHeight+1)) ){
132447 ** If node pLeaf is not the root of the r-tree and its pParent pointer is
132449 ** the pLeaf->pParent chain all the way up to the root node.
132460 while( rc==SQLITE_OK && pChild->iNode!=1 && pChild->pParent==0 ){
132468 /* Before setting pChild->pParent, test that we are not creating a
132469 ** loop of references (as we would if, say, pChild==pParent). We don't
132474 for(pTest=pLeaf; pTest && pTest->iNode!=iNode; pTest=pTest->pParent);
132476 rc2 = nodeAcquire(pRtree, iNode, 0, &pChild->pParent);
132481 if( rc==SQLITE_OK && !pChild->pParent ) rc = SQLITE_CORRUPT_VTAB;
132482 pChild = pChild->pParent;
132492 RtreeNode *pParent = 0;
132500 pParent = pNode->pParent;
132501 pNode->pParent = 0;
132502 rc = deleteCell(pRtree, pParent, iCell, iHeight+1);
132504 rc2 = nodeRelease(pRtree, pParent);
132539 RtreeNode *pParent = pNode->pParent;
132541 if( pParent ){
132554 nodeOverwriteCell(pRtree, pParent, &box, ii);
132555 rc = fixBoundingBox(pRtree, pParent);
132566 RtreeNode *pParent;
132583 pParent = pNode->pParent;
132584 assert( pParent || pNode->iNode==1 );
132585 if( pParent ){
132709 nodeRelease(pRtree, pChild->pParent);
132711 pChild->pParent = pNode;