Lines Matching refs:pParent

22580   VdbeFrame *pParent;     /* Parent of this frame, or NULL if parent is main */
73913 ** Page pParent is an internal (non-leaf) tree page. This function
73915 ** cell in page pParent. Or, if iIdx is equal to the total number of
73916 ** cells in pParent, that page number iChild is the right-child of
73919 static void assertParentIndex(MemPage *pParent, int iIdx, Pgno iChild){
73922 assert( iIdx<=pParent->nCell );
73923 if( iIdx==pParent->nCell ){
73924 assert( get4byte(&pParent->aData[pParent->hdrOffset+8])==iChild );
73926 assert( get4byte(findCell(pParent, iIdx))==iChild );
75803 ** The cells in this array are the divider cell or cells from the pParent
76253 ** pParent is its parent. pPage must have a single overflow entry
76257 ** cell that will be inserted into pParent. Such a cell consists of a 4
76262 static int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){
76269 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
76274 assert( pParent->nFree>=0 );
76316 ptrmapPut(pBt, pgnoNew, PTRMAP_BTREE, pParent->pgno, &rc);
76322 /* Create a divider cell to insert into pParent. The divider cell
76341 /* Insert the new divider cell into pParent. */
76343 insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace),
76347 /* Set the right-child pointer of pParent to point to the new page. */
76348 put4byte(&pParent->aData[pParent->hdrOffset+8], pgnoNew);
76460 ** This routine redistributes cells on the iParentIdx'th child of pParent
76478 ** inserted into or removed from the parent page (pParent). Doing so
76489 ** page (pParent) the parent page becomes overfull, this buffer is
76500 MemPage *pParent, /* Parent page of siblings being balanced */
76501 int iParentIdx, /* Index of "the page" in pParent */
76503 int isRoot, /* True if pParent is a root-page */
76511 int nxDiv; /* Next divider slot in pParent->aCell[] */
76523 u8 *apDiv[NB-1]; /* Divider cells in pParent */
76535 pBt = pParent->pBt;
76537 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
76539 /* At this point pParent may have at most one overflow cell. And if
76544 assert( pParent->nOverflow==0 || pParent->nOverflow==1 );
76545 assert( pParent->nOverflow==0 || pParent->aiOvfl[0]==iParentIdx );
76550 assert( pParent->nFree>=0 );
76552 /* Find the sibling pages to balance. Also locate the cells in pParent
76555 ** if there are fewer than NN siblings on the other side. If pParent
76556 ** has NB or fewer children then all children of pParent are taken.
76563 i = pParent->nOverflow + pParent->nCell;
76578 if( (i+nxDiv-pParent->nOverflow)==pParent->nCell ){
76579 pRight = &pParent->aData[pParent->hdrOffset+8];
76581 pRight = findCell(pParent, i+nxDiv-pParent->nOverflow);
76599 nMaxCells += apOld[i]->nCell + ArraySize(pParent->apOvfl);
76602 if( pParent->nOverflow && i+nxDiv==pParent->aiOvfl[0] ){
76603 apDiv[i] = pParent->apOvfl[0];
76605 szNew[i] = pParent->xCellSize(pParent, apDiv[i]);
76606 pParent->nOverflow = 0;
76608 apDiv[i] = findCell(pParent, i+nxDiv-pParent->nOverflow);
76610 szNew[i] = pParent->xCellSize(pParent, apDiv[i]);
76629 iOff = SQLITE_PTR_TO_INT(apDiv[i]) - SQLITE_PTR_TO_INT(pParent->aData);
76632 apDiv[i] = &aOvflSpace[apDiv[i]-pParent->aData];
76635 dropCell(pParent, i+nxDiv-pParent->nOverflow, szNew[i], &rc);
76665 ** been removed from pParent.
76675 ** leafData: 1 if pPage holds key+data and pParent holds only keys.
76802 b.apEnd[k] = pParent->aDataEnd;
76905 assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) || CORRUPT_DB);
76940 ptrmapPut(pBt, pNew->pgno, PTRMAP_BTREE, pParent->pgno, &rc);
77003 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
77074 /* Insert new divider cells into pParent. */
77117 sz = pParent->xCellSize(pParent, pCell);
77129 insertCell(pParent, nxDiv+i, pCell, sz, pTemp, pNew->pgno, &rc);
77131 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
77199 if( isRoot && pParent->nCell==0 && pParent->hdrOffset<=apNew[0]->nFree ){
77223 copyNodeContent(apNew[0], pParent, &rc);
77235 assert( pParent->isInit );
77252 ptrmapCheckPages(&pParent, 1);
77418 MemPage * const pParent = pCur->apPage[iPage-1];
77421 rc = sqlite3PagerWrite(pParent->pDbPage);
77422 if( rc==SQLITE_OK && pParent->nFree<0 ){
77423 rc = btreeComputeFreeSpace(pParent);
77430 && pParent->pgno!=1
77431 && pParent->nCell==iIdx
77435 ** into pParent, which may cause pParent overflow. If this
77436 ** happens, the next iteration of the do-loop will balance pParent
77448 rc = balance_quick(pParent, pPage, aBalanceQuickSpace);
77454 ** modifying the contents of pParent, which may cause pParent to
77470 rc = balance_nonroot(pParent, iIdx, pSpace, iPage==1,
84616 pFrame->pParent = pFrame->v->pDelFrame;
85217 for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);
85227 p->pDelFrame = pDel->pParent;
91488 p->pFrame = pFrame->pParent;
95806 for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);
97493 for(pFrame=p->pFrame; pFrame && pFrame->token!=t; pFrame=pFrame->pParent);
97563 pFrame->pParent = p->pFrame;
97681 for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);
105183 Expr *pParent = pItem->pExpr;
105184 assert( pParent->op==TK_COLLATE );
105185 while( pParent->pLeft->op==TK_COLLATE ) pParent = pParent->pLeft;
105186 assert( pParent->pLeft==pE );
105187 pParent->pLeft = pNew;
127270 ** Given that pParent is the parent table for foreign key constraint pFKey,
127309 Table *pParent, /* Parent table of FK constraint pFKey */
127325 ** maps to the INTEGER PRIMARY KEY of table pParent. If so, leave *ppIdx
127336 ** mapped to the primary key of table pParent, or
127340 if( pParent->iPKey>=0 ){
127342 if( !sqlite3StrICmp(pParent->aCol[pParent->iPKey].zCnName, zKey) ){
127353 for(pIdx=pParent->pIndex; pIdx; pIdx=pIdx->pNext){
127361 ** the PRIMARY KEY of table pParent. The PRIMARY KEY index may be
127372 ** map to an explicit list of columns in table pParent. Check if this
127386 zDfltColl = sqlite3ColumnColl(&pParent->aCol[iCol]);
127390 zIdxCol = pParent->aCol[iCol].zCnName;
135751 Table *pParent; /* Parent table that child points to */
135785 pParent = sqlite3FindTable(db, pFK->zTo, zDb);
135786 if( pParent==0 ) continue;
135788 sqlite3TableLock(pParse, iDb, pParent->tnum, 0, pParent->zName);
135789 x = sqlite3FkLocateIndex(pParse, pParent, pFK, &pIdx, 0);
135792 sqlite3OpenTable(pParse, i, iDb, pParent, OP_OpenRead);
135808 pParent = sqlite3FindTable(db, pFK->zTo, zDb);
135811 if( pParent ){
135812 x = sqlite3FkLocateIndex(pParse, pParent, pFK, &pIdx, &aiCols);
135835 }else if( pParent ){
142483 Select *pParent; /* Current UNION ALL term of the other query */
142773 for(pParent=p; pParent; pParent=pParent->pPrior, pSub=pSub->pPrior){
142780 pSrc = pParent->pSrc; /* FROM clause of the outer query */
142782 if( pParent==p ){
142804 pParent->pSrc = pSrc;
142834 if( pSub->pOrderBy && (pParent->selFlags & SF_NoopOrderBy)==0 ){
142838 ** do not necessarily correspond to columns in SELECT statement pParent,
142842 ** function attempts to flatten a compound sub-query into pParent
142849 assert( pParent->pOrderBy==0 );
142850 pParent->pOrderBy = pOrderBy;
142859 if( pParent->pWhere ){
142860 pParent->pWhere = sqlite3PExpr(pParse, TK_AND, pWhere, pParent->pWhere);
142862 pParent->pWhere = pWhere;
142873 substSelect(&x, pParent, 0);
142878 pParent->selFlags |= pSub->selFlags & SF_Compound;
142888 pParent->pLimit = pSub->pLimit;
142895 recomputeColumnsUsed(pParent, &pSrc->a[i+iFrom]);
179735 Fts3Expr *pParent; /* pParent->pLeft==this or pParent->pRight==this */
185094 && (pExpr->pParent==0 || pExpr->pParent->eType!=FTSQUERY_NEAR)
185114 for(p=p->pParent;res && p && p->eType==FTSQUERY_NEAR; p=p->pParent){
185125 assert( p->pParent && p->pParent->pLeft==p );
185126 nNear = p->pParent->nNear;
185184 && (pExpr->pParent==0 || pExpr->pParent->eType!=FTSQUERY_NEAR)
185438 while( pRoot->pParent && pRoot->pParent->eType==FTSQUERY_NEAR ){
185439 pRoot = pRoot->pParent;
185541 if( pExpr->bDeferred && pExpr->pParent->eType!=FTSQUERY_NEAR ){
185617 for(p=pExpr->pParent; p; p=p->pParent){
186906 while( pSplit->pParent && opPrecedence(pSplit->pParent)<=opPrecedence(pNew) ){
186907 pSplit = pSplit->pParent;
186910 if( pSplit->pParent ){
186911 assert( pSplit->pParent->pRight==pSplit );
186912 pSplit->pParent->pRight = pNew;
186913 pNew->pParent = pSplit->pParent;
186918 pSplit->pParent = pNew;
186967 p->pParent = pNot;
186970 pNotBranch->pParent = pNot;
187026 p->pParent = pPrev;
187059 pRet->pParent = pIter;
187109 Fts3Expr *pFree = 0; /* List of free nodes. Linked by pParent. */
187132 assert( p->pParent==0 || p->pParent->pLeft==p );
187139 Fts3Expr *pParent = p->pParent; /* Current parent of p */
187141 assert( pParent==0 || pParent->pLeft==p );
187142 p->pParent = 0;
187143 if( pParent ){
187144 pParent->pLeft = 0;
187159 pFree->pLeft->pParent = pFree;
187160 pFree->pRight->pParent = pFree;
187163 pFree = pFree->pParent;
187164 p->pParent = 0;
187175 if( pParent==0 ) break;
187178 for(p=pParent->pRight; p->eType==eType; p=p->pLeft);
187180 /* Remove pParent from the original tree. */
187181 assert( pParent->pParent==0 || pParent->pParent->pLeft==pParent );
187182 pParent->pRight->pParent = pParent->pParent;
187183 if( pParent->pParent ){
187184 pParent->pParent->pLeft = pParent->pRight;
187186 assert( pParent==pRoot );
187187 pRoot = pParent->pRight;
187190 /* Link pParent into the free node list. It will be used as an
187192 pParent->pParent = pFree;
187193 pFree = pParent;
187202 p->pParent = 0;
187207 pFree->pLeft->pParent = pFree;
187208 pFree->pRight->pParent = pFree;
187211 pFree = pFree->pParent;
187212 p->pParent = 0;
187226 pFree = pDel->pParent;
187240 pLeft->pParent = 0;
187241 pRight->pParent = 0;
187254 pLeft->pParent = pRoot;
187256 pRight->pParent = pRoot;
187403 assert( pDel==0 || pDel->pParent==0 );
187405 assert( p->pParent==0 || p==p->pParent->pRight || p==p->pParent->pLeft );
187408 Fts3Expr *pParent = p->pParent;
187410 if( pParent && p==pParent->pLeft && pParent->pRight ){
187411 p = pParent->pRight;
187413 assert( p==p->pParent->pRight || p==p->pParent->pLeft );
187417 p = pParent;
190105 SegmentNode *pParent; /* Parent node (or NULL for root node) */
192003 SegmentNode *pParent = pTree->pParent;
192004 rc = fts3NodeAddTerm(p, &pParent, isCopyTerm, zTerm, nTerm);
192005 if( pTree->pParent==0 ){
192006 pTree->pParent = pParent;
192010 pNew->pParent = pParent;
192064 if( !pTree->pParent ){
192085 p, pTree->pParent, iHeight+1, iFree, iNextFree, piLast, paRoot, pnRoot
192099 fts3NodeFree(p->pParent);
201306 RtreeNode *pParent; /* Parent node */
201613 static RtreeNode *nodeNew(Rtree *pRtree, RtreeNode *pParent){
201621 pNode->pParent = pParent;
201623 nodeReference(pParent);
201645 RtreeNode *pParent, /* Either the parent node or NULL */
201655 if( pParent && pParent!=pNode->pParent ){
201695 pNode->pParent = pParent;
201734 nodeReference(pParent);
201849 if( pNode->pParent ){
201850 rc = nodeRelease(pRtree, pNode->pParent);
202327 RtreeNode *pParent = pNode->pParent;
202328 if( ALWAYS(pParent) ){
202329 return nodeRowidIndex(pRtree, pParent, pNode->iNode, piIndex);
202424 RtreeSearchPoint *pParent;
202426 pParent = pCur->aPoint + j;
202427 if( rtreeSearchPointCompare(pNew, pParent)>=0 ) break;
202430 pNew = pParent;
203211 while( p->pParent ){
203212 RtreeNode *pParent = p->pParent;
203227 nodeGetCell(pRtree, pParent, iCell, &cell);
203230 nodeOverwriteCell(pRtree, pParent, &cell, iCell);
203233 p = pParent;
203512 for(p=pNode; p; p=p->pParent){
203516 nodeRelease(pRtree, pChild->pParent);
203518 pChild->pParent = pNode;
203570 pRight = nodeNew(pRtree, pLeft->pParent);
203603 rc = rtreeInsertCell(pRtree, pLeft->pParent, &leftbbox, iHeight+1);
203608 RtreeNode *pParent = pLeft->pParent;
203612 nodeOverwriteCell(pRtree, pParent, &leftbbox, iCell);
203613 rc = AdjustTree(pRtree, pParent, &leftbbox);
203620 if( (rc = rtreeInsertCell(pRtree, pRight->pParent, &rightbbox, iHeight+1)) ){
203663 ** If node pLeaf is not the root of the r-tree and its pParent pointer is
203665 ** the pLeaf->pParent chain all the way up to the root node.
203676 while( rc==SQLITE_OK && pChild->iNode!=1 && pChild->pParent==0 ){
203684 /* Before setting pChild->pParent, test that we are not creating a
203685 ** loop of references (as we would if, say, pChild==pParent). We don't
203690 for(pTest=pLeaf; pTest && pTest->iNode!=iNode; pTest=pTest->pParent);
203692 rc2 = nodeAcquire(pRtree, iNode, 0, &pChild->pParent);
203697 if( rc==SQLITE_OK && !pChild->pParent ){
203701 pChild = pChild->pParent;
203711 RtreeNode *pParent = 0;
203719 pParent = pNode->pParent;
203720 pNode->pParent = 0;
203721 rc = deleteCell(pRtree, pParent, iCell, iHeight+1);
203724 rc2 = nodeRelease(pRtree, pParent);
203759 RtreeNode *pParent = pNode->pParent;
203761 if( pParent ){
203774 nodeOverwriteCell(pRtree, pParent, &box, ii);
203775 rc = fixBoundingBox(pRtree, pParent);
203786 RtreeNode *pParent;
203803 pParent = pNode->pParent;
203804 assert( pParent || pNode->iNode==1 );
203805 if( pParent ){
203931 nodeRelease(pRtree, pChild->pParent);
203933 pChild->pParent = pNode;
205071 ** Additionally, if pParent is not NULL, then it is assumed to point to
205082 u8 *pParent /* Pointer to parent coordinates */
205099 if( pParent ){
205100 readCoord(&pParent[4*2*i], &p1);
205101 readCoord(&pParent[4*(2*i + 1)], &p2);
214132 sqlite3_vfs *pParent; /* Parent VFS */
214134 pParent = sqlite3_vfs_find(zParent);
214135 if( pParent==0 ){
214140 pNew->base.mxPathname = pParent->mxPathname;
214141 pNew->base.szOsFile = sizeof(rbu_file) + pParent->szOsFile;
214142 pNew->pRealVfs = pParent;