Lines Matching defs:pParent

17778   VdbeFrame *pParent;     /* Parent of this frame, or NULL if parent is main */
57408 ** The pParent field points back to the parent page. This allows us to
62911 ** Page pParent is an internal (non-leaf) tree page. This function
62913 ** cell in page pParent. Or, if iIdx is equal to the total number of
62914 ** cells in pParent, that page number iChild is the right-child of
62917 static void assertParentIndex(MemPage *pParent, int iIdx, Pgno iChild){
62920 assert( iIdx<=pParent->nCell );
62921 if( iIdx==pParent->nCell ){
62922 assert( get4byte(&pParent->aData[pParent->hdrOffset+8])==iChild );
62924 assert( get4byte(findCell(pParent, iIdx))==iChild );
64878 ** pParent is its parent. pPage must have a single overflow entry
64882 ** cell that will be inserted into pParent. Such a cell consists of a 4
64887 static int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){
64894 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
64930 ptrmapPut(pBt, pgnoNew, PTRMAP_BTREE, pParent->pgno, &rc);
64936 /* Create a divider cell to insert into pParent. The divider cell
64955 /* Insert the new divider cell into pParent. */
64957 insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace),
64961 /* Set the right-child pointer of pParent to point to the new page. */
64962 put4byte(&pParent->aData[pParent->hdrOffset+8], pgnoNew);
65073 ** This routine redistributes cells on the iParentIdx'th child of pParent
65091 ** inserted into or removed from the parent page (pParent). Doing so
65102 ** page (pParent) the parent page becomes overfull, this buffer is
65113 MemPage *pParent, /* Parent page of siblings being balanced */
65114 int iParentIdx, /* Index of "the page" in pParent */
65116 int isRoot, /* True if pParent is a root-page */
65124 int nxDiv; /* Next divider slot in pParent->aCell[] */
65136 u8 *apDiv[NB-1]; /* Divider cells in pParent */
65151 pBt = pParent->pBt;
65153 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
65156 TRACE(("BALANCE: begin page %d child of %d\n", pPage->pgno, pParent->pgno));
65159 /* At this point pParent may have at most one overflow cell. And if
65164 assert( pParent->nOverflow==0 || pParent->nOverflow==1 );
65165 assert( pParent->nOverflow==0 || pParent->aiOvfl[0]==iParentIdx );
65171 /* Find the sibling pages to balance. Also locate the cells in pParent
65174 ** if there are fewer than NN siblings on the other side. If pParent
65175 ** has NB or fewer children then all children of pParent are taken.
65182 i = pParent->nOverflow + pParent->nCell;
65197 if( (i+nxDiv-pParent->nOverflow)==pParent->nCell ){
65198 pRight = &pParent->aData[pParent->hdrOffset+8];
65200 pRight = findCell(pParent, i+nxDiv-pParent->nOverflow);
65212 if( i+nxDiv==pParent->aiOvfl[0] && pParent->nOverflow ){
65213 apDiv[i] = pParent->apOvfl[0];
65215 szNew[i] = pParent->xCellSize(pParent, apDiv[i]);
65216 pParent->nOverflow = 0;
65218 apDiv[i] = findCell(pParent, i+nxDiv-pParent->nOverflow);
65220 szNew[i] = pParent->xCellSize(pParent, apDiv[i]);
65237 iOff = SQLITE_PTR_TO_INT(apDiv[i]) - SQLITE_PTR_TO_INT(pParent->aData);
65244 apDiv[i] = &aOvflSpace[apDiv[i]-pParent->aData];
65247 dropCell(pParent, i+nxDiv-pParent->nOverflow, szNew[i], &rc);
65279 ** been removed from pParent.
65289 ** leafData: 1 if pPage holds key+data and pParent holds only keys.
65503 assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) || CORRUPT_DB);
65533 ptrmapPut(pBt, pNew->pgno, PTRMAP_BTREE, pParent->pgno, &rc);
65599 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
65667 /* Insert new divider cells into pParent. */
65709 sz = pParent->xCellSize(pParent, pCell);
65715 insertCell(pParent, nxDiv+i, pCell, sz, pTemp, pNew->pgno, &rc);
65717 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
65785 if( isRoot && pParent->nCell==0 && pParent->hdrOffset<=apNew[0]->nFree ){
65808 copyNodeContent(apNew[0], pParent, &rc);
65820 assert( pParent->isInit );
65837 ptrmapCheckPages(&pParent, 1);
65968 MemPage * const pParent = pCur->apPage[iPage-1];
65971 rc = sqlite3PagerWrite(pParent->pDbPage);
65977 && pParent->pgno!=1
65978 && pParent->nCell==iIdx
65982 ** into pParent, which may cause pParent overflow. If this
65983 ** happens, the next iteration of the do-loop will balance pParent
65995 rc = balance_quick(pParent, pPage, aBalanceQuickSpace);
66001 ** modifying the contents of pParent, which may cause pParent to
66017 rc = balance_nonroot(pParent, iIdx, pSpace, iPage==1,
69027 pFrame->pParent = pFrame->v->pDelFrame;
72410 for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);
72422 p->pDelFrame = pDel->pParent;
78087 p->pFrame = pFrame->pParent;
81338 for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);
82844 for(pFrame=p->pFrame; pFrame && pFrame->token!=t; pFrame=pFrame->pParent);
82910 pFrame->pParent = p->pFrame;
83019 for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);
88926 Expr *pParent = pItem->pExpr;
88927 assert( pParent->op==TK_COLLATE );
88928 while( pParent->pLeft->op==TK_COLLATE ) pParent = pParent->pLeft;
88929 assert( pParent->pLeft==pE );
88930 pParent->pLeft = pNew;
105204 ** Given that pParent is the parent table for foreign key constraint pFKey,
105243 Table *pParent, /* Parent table of FK constraint pFKey */
105259 ** maps to the INTEGER PRIMARY KEY of table pParent. If so, leave *ppIdx
105270 ** mapped to the primary key of table pParent, or
105274 if( pParent->iPKey>=0 ){
105276 if( !sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName, zKey) ) return 0;
105285 for(pIdx=pParent->pIndex; pIdx; pIdx=pIdx->pNext){
105293 ** the PRIMARY KEY of table pParent. The PRIMARY KEY index may be
105304 ** map to an explicit list of columns in table pParent. Check if this
105318 zDfltColl = pParent->aCol[iCol].zColl;
105322 zIdxCol = pParent->aCol[iCol].zName;
111900 Table *pParent; /* Parent table that child points to */
111936 pParent = sqlite3FindTable(db, pFK->zTo, zDb);
111937 if( pParent==0 ) continue;
111939 sqlite3TableLock(pParse, iDb, pParent->tnum, 0, pParent->zName);
111940 x = sqlite3FkLocateIndex(pParse, pParent, pFK, &pIdx, 0);
111943 sqlite3OpenTable(pParse, i, iDb, pParent, OP_OpenRead);
111958 pParent = sqlite3FindTable(db, pFK->zTo, zDb);
111961 if( pParent ){
111962 x = sqlite3FkLocateIndex(pParse, pParent, pFK, &pIdx, &aiCols);
111966 if( pParent && pIdx==0 ){
111985 if( pParent ){
116848 Select *pParent; /* Current UNION ALL term of the other query */
117113 for(pParent=p; pParent; pParent=pParent->pPrior, pSub=pSub->pPrior){
117118 pSrc = pParent->pSrc; /* FROM clause of the outer query */
117121 assert( pParent==p ); /* First time through the loop */
117124 assert( pParent!=p ); /* 2nd and subsequent times through the loop */
117125 pSrc = pParent->pSrc = sqlite3SrcListAppend(db, 0, 0, 0);
117148 pParent->pSrc = pSrc = sqlite3SrcListEnlarge(db, pSrc, nSubSrc-1,iFrom+1);
117177 pList = pParent->pEList;
117189 ** do not necessarily correspond to columns in SELECT statement pParent,
117193 ** function attempts to flatten a compound sub-query into pParent
117200 assert( pParent->pOrderBy==0 );
117202 pParent->pOrderBy = pOrderBy;
117207 assert( pParent->pHaving==0 );
117208 pParent->pHaving = pParent->pWhere;
117209 pParent->pWhere = pWhere;
117210 pParent->pHaving = sqlite3ExprAnd(db, pParent->pHaving,
117212 assert( pParent->pGroupBy==0 );
117213 pParent->pGroupBy = sqlite3ExprListDup(db, pSub->pGroupBy, 0);
117215 pParent->pWhere = sqlite3ExprAnd(db, pParent->pWhere, pWhere);
117217 substSelect(db, pParent, iParent, pSub->pEList, 0);
117222 pParent->selFlags |= pSub->selFlags & SF_Distinct;
117231 pParent->pLimit = pSub->pLimit;
141851 Fts3Expr *pParent; /* pParent->pLeft==this or pParent->pRight==this */
147016 && (pExpr->pParent==0 || pExpr->pParent->eType!=FTSQUERY_NEAR)
147038 for(p=p->pParent;res && p && p->eType==FTSQUERY_NEAR; p=p->pParent){
147049 assert( p->pParent && p->pParent->pLeft==p );
147050 nNear = p->pParent->nNear;
147109 && (pExpr->pParent==0 || pExpr->pParent->eType!=FTSQUERY_NEAR)
147362 while( pRoot->pParent && pRoot->pParent->eType==FTSQUERY_NEAR ){
147363 pRoot = pRoot->pParent;
147464 if( pExpr->bDeferred && pExpr->pParent->eType!=FTSQUERY_NEAR ){
147540 for(p=pExpr->pParent; p; p=p->pParent){
148819 while( pSplit->pParent && opPrecedence(pSplit->pParent)<=opPrecedence(pNew) ){
148820 pSplit = pSplit->pParent;
148823 if( pSplit->pParent ){
148824 assert( pSplit->pParent->pRight==pSplit );
148825 pSplit->pParent->pRight = pNew;
148826 pNew->pParent = pSplit->pParent;
148831 pSplit->pParent = pNew;
148880 p->pParent = pNot;
148883 pNotBranch->pParent = pNot;
148939 p->pParent = pPrev;
148972 pRet->pParent = pIter;
149022 Fts3Expr *pFree = 0; /* List of free nodes. Linked by pParent. */
149045 assert( p->pParent==0 || p->pParent->pLeft==p );
149052 Fts3Expr *pParent = p->pParent; /* Current parent of p */
149054 assert( pParent==0 || pParent->pLeft==p );
149055 p->pParent = 0;
149056 if( pParent ){
149057 pParent->pLeft = 0;
149072 pFree->pLeft->pParent = pFree;
149073 pFree->pRight->pParent = pFree;
149076 pFree = pFree->pParent;
149077 p->pParent = 0;
149088 if( pParent==0 ) break;
149091 for(p=pParent->pRight; p->eType==eType; p=p->pLeft);
149093 /* Remove pParent from the original tree. */
149094 assert( pParent->pParent==0 || pParent->pParent->pLeft==pParent );
149095 pParent->pRight->pParent = pParent->pParent;
149096 if( pParent->pParent ){
149097 pParent->pParent->pLeft = pParent->pRight;
149099 assert( pParent==pRoot );
149100 pRoot = pParent->pRight;
149103 /* Link pParent into the free node list. It will be used as an
149105 pParent->pParent = pFree;
149106 pFree = pParent;
149115 p->pParent = 0;
149120 pFree->pLeft->pParent = pFree;
149121 pFree->pRight->pParent = pFree;
149124 pFree = pFree->pParent;
149125 p->pParent = 0;
149139 pFree = pDel->pParent;
149153 pLeft->pParent = 0;
149154 pRight->pParent = 0;
149167 pLeft->pParent = pRoot;
149169 pRight->pParent = pRoot;
149316 assert( pDel==0 || pDel->pParent==0 );
149318 assert( p->pParent==0 || p==p->pParent->pRight || p==p->pParent->pLeft );
149321 Fts3Expr *pParent = p->pParent;
149323 if( pParent && p==pParent->pLeft && pParent->pRight ){
149324 p = pParent->pRight;
149326 assert( p==p->pParent->pRight || p==p->pParent->pLeft );
149330 p = pParent;
152027 SegmentNode *pParent; /* Parent node (or NULL for root node) */
153891 SegmentNode *pParent = pTree->pParent;
153892 rc = fts3NodeAddTerm(p, &pParent, isCopyTerm, zTerm, nTerm);
153893 if( pTree->pParent==0 ){
153894 pTree->pParent = pParent;
153898 pNew->pParent = pParent;
153952 if( !pTree->pParent ){
153973 p, pTree->pParent, iHeight+1, iFree, iNextFree, piLast, paRoot, pnRoot
153987 fts3NodeFree(p->pParent);
160258 RtreeNode *pParent; /* Parent node */
160454 static RtreeNode *nodeNew(Rtree *pRtree, RtreeNode *pParent){
160461 pNode->pParent = pParent;
160463 nodeReference(pParent);
160474 RtreeNode *pParent, /* Either the parent node or NULL */
160485 assert( !pParent || !pNode->pParent || pNode->pParent==pParent );
160486 if( pParent && !pNode->pParent ){
160487 nodeReference(pParent);
160488 pNode->pParent = pParent;
160504 pNode->pParent = pParent;
160511 nodeReference(pParent);
160650 if( pNode->pParent ){
160651 rc = nodeRelease(pRtree, pNode->pParent);
161053 RtreeNode *pParent = pNode->pParent;
161054 if( pParent ){
161055 return nodeRowidIndex(pRtree, pParent, pNode->iNode, piIndex);
161149 RtreeSearchPoint *pParent;
161151 pParent = pCur->aPoint + j;
161152 if( rtreeSearchPointCompare(pNew, pParent)>=0 ) break;
161155 pNew = pParent;
161886 while( p->pParent ){
161887 RtreeNode *pParent = p->pParent;
161895 nodeGetCell(pRtree, pParent, iCell, &cell);
161898 nodeOverwriteCell(pRtree, pParent, &cell, iCell);
161901 p = pParent;
162180 nodeRelease(pRtree, pChild->pParent);
162182 pChild->pParent = pNode;
162233 pRight = nodeNew(pRtree, pLeft->pParent);
162266 rc = rtreeInsertCell(pRtree, pLeft->pParent, &leftbbox, iHeight+1);
162271 RtreeNode *pParent = pLeft->pParent;
162275 nodeOverwriteCell(pRtree, pParent, &leftbbox, iCell);
162276 rc = AdjustTree(pRtree, pParent, &leftbbox);
162282 if( (rc = rtreeInsertCell(pRtree, pRight->pParent, &rightbbox, iHeight+1)) ){
162325 ** If node pLeaf is not the root of the r-tree and its pParent pointer is
162327 ** the pLeaf->pParent chain all the way up to the root node.
162338 while( rc==SQLITE_OK && pChild->iNode!=1 && pChild->pParent==0 ){
162346 /* Before setting pChild->pParent, test that we are not creating a
162347 ** loop of references (as we would if, say, pChild==pParent). We don't
162352 for(pTest=pLeaf; pTest && pTest->iNode!=iNode; pTest=pTest->pParent);
162354 rc2 = nodeAcquire(pRtree, iNode, 0, &pChild->pParent);
162359 if( rc==SQLITE_OK && !pChild->pParent ) rc = SQLITE_CORRUPT_VTAB;
162360 pChild = pChild->pParent;
162370 RtreeNode *pParent = 0;
162378 pParent = pNode->pParent;
162379 pNode->pParent = 0;
162380 rc = deleteCell(pRtree, pParent, iCell, iHeight+1);
162382 rc2 = nodeRelease(pRtree, pParent);
162417 RtreeNode *pParent = pNode->pParent;
162419 if( pParent ){
162432 nodeOverwriteCell(pRtree, pParent, &box, ii);
162433 rc = fixBoundingBox(pRtree, pParent);
162444 RtreeNode *pParent;
162461 pParent = pNode->pParent;
162462 assert( pParent || pNode->iNode==1 );
162463 if( pParent ){
162589 nodeRelease(pRtree, pChild->pParent);
162591 pChild->pParent = pNode;
169601 sqlite3_vfs *pParent; /* Parent VFS */
169603 pParent = sqlite3_vfs_find(zParent);
169604 if( pParent==0 ){
169609 pNew->base.mxPathname = pParent->mxPathname;
169610 pNew->base.szOsFile = sizeof(rbu_file) + pParent->szOsFile;
169611 pNew->pRealVfs = pParent;