Home | History | Annotate | Download | only in orig

Lines Matching defs:pParent

18156   VdbeFrame *pParent;     /* Parent of this frame, or NULL if parent is main */
64049 ** Page pParent is an internal (non-leaf) tree page. This function
64051 ** cell in page pParent. Or, if iIdx is equal to the total number of
64052 ** cells in pParent, that page number iChild is the right-child of
64055 static void assertParentIndex(MemPage *pParent, int iIdx, Pgno iChild){
64058 assert( iIdx<=pParent->nCell );
64059 if( iIdx==pParent->nCell ){
64060 assert( get4byte(&pParent->aData[pParent->hdrOffset+8])==iChild );
64062 assert( get4byte(findCell(pParent, iIdx))==iChild );
66062 ** pParent is its parent. pPage must have a single overflow entry
66066 ** cell that will be inserted into pParent. Such a cell consists of a 4
66071 static int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){
66078 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
66114 ptrmapPut(pBt, pgnoNew, PTRMAP_BTREE, pParent->pgno, &rc);
66120 /* Create a divider cell to insert into pParent. The divider cell
66139 /* Insert the new divider cell into pParent. */
66141 insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace),
66145 /* Set the right-child pointer of pParent to point to the new page. */
66146 put4byte(&pParent->aData[pParent->hdrOffset+8], pgnoNew);
66257 ** This routine redistributes cells on the iParentIdx'th child of pParent
66275 ** inserted into or removed from the parent page (pParent). Doing so
66286 ** page (pParent) the parent page becomes overfull, this buffer is
66297 MemPage *pParent, /* Parent page of siblings being balanced */
66298 int iParentIdx, /* Index of "the page" in pParent */
66300 int isRoot, /* True if pParent is a root-page */
66308 int nxDiv; /* Next divider slot in pParent->aCell[] */
66320 u8 *apDiv[NB-1]; /* Divider cells in pParent */
66335 pBt = pParent->pBt;
66337 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
66340 TRACE(("BALANCE: begin page %d child of %d\n", pPage->pgno, pParent->pgno));
66343 /* At this point pParent may have at most one overflow cell. And if
66348 assert( pParent->nOverflow==0 || pParent->nOverflow==1 );
66349 assert( pParent->nOverflow==0 || pParent->aiOvfl[0]==iParentIdx );
66355 /* Find the sibling pages to balance. Also locate the cells in pParent
66358 ** if there are fewer than NN siblings on the other side. If pParent
66359 ** has NB or fewer children then all children of pParent are taken.
66366 i = pParent->nOverflow + pParent->nCell;
66381 if( (i+nxDiv-pParent->nOverflow)==pParent->nCell ){
66382 pRight = &pParent->aData[pParent->hdrOffset+8];
66384 pRight = findCell(pParent, i+nxDiv-pParent->nOverflow);
66396 if( pParent->nOverflow && i+nxDiv==pParent->aiOvfl[0] ){
66397 pParent->apOvfl[0];
66399 szNew[i] = pParent->xCellSize(pParent, apDiv[i]);
66400 pParent->nOverflow = 0;
66402 apDiv[i] = findCell(pParent, i+nxDiv-pParent->nOverflow);
66404 szNew[i] = pParent->xCellSize(pParent, apDiv[i]);
66421 iOff = SQLITE_PTR_TO_INT(apDiv[i]) - SQLITE_PTR_TO_INT(pParent->aData);
66428 apDiv[i] = &aOvflSpace[apDiv[i]-pParent->aData];
66431 dropCell(pParent, i+nxDiv-pParent->nOverflow, szNew[i], &rc);
66463 ** been removed from pParent.
66473 ** leafData: 1 if pPage holds key+data and pParent holds only keys.
66686 assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) || CORRUPT_DB);
66716 ptrmapPut(pBt, pNew->pgno, PTRMAP_BTREE, pParent->pgno, &rc);
66782 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
66850 /* Insert new divider cells into pParent. */
66892 sz = pParent->xCellSize(pParent, pCell);
66898 insertCell(pParent, nxDiv+i, pCell, sz, pTemp, pNew->pgno, &rc);
66900 assert( sqlite3PagerIswriteable(pParent->pDbPage) );
66968 if( isRoot && pParent->nCell==0 && pParent->hdrOffset<=apNew[0]->nFree ){
66991 copyNodeContent(apNew[0], pParent, &rc);
67003 assert( pParent->isInit );
67020 ptrmapCheckPages(&pParent, 1);
67151 MemPage * const pParent = pCur->apPage[iPage-1];
67154 rc = sqlite3PagerWrite(pParent->pDbPage);
67160 && pParent->pgno!=1
67161 && pParent->nCell==iIdx
67165 ** into pParent, which may cause pParent overflow. If this
67166 ** happens, the next iteration of the do-loop will balance pParent
67178 rc = balance_quick(pParent, pPage, aBalanceQuickSpace);
67184 ** modifying the contents of pParent, which may cause pParent to
67200 rc = balance_nonroot(pParent, iIdx, pSpace, iPage==1,
70249 pFrame->pParent = pFrame->v->pDelFrame;
73704 for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);
73716 p->pDelFrame = pDel->pParent;
79413 p->pFrame = pFrame->pParent;
82803 for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);
84387 for(pFrame=p->pFrame; pFrame && pFrame->token!=t; pFrame=pFrame->pParent);
84451 pFrame->pParent = p->pFrame;
84559 for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);
90550 Expr *pParent = pItem->pExpr;
90551 assert( pParent->op==TK_COLLATE );
90552 while( pParent->pLeft->op==TK_COLLATE ) pParent = pParent->pLeft;
90553 assert( pParent->pLeft==pE );
90554 pParent->pLeft = pNew;
107745 ** Given that pParent is the parent table for foreign key constraint pFKey,
107784 Table *pParent, /* Parent table of FK constraint pFKey */
107800 ** maps to the INTEGER PRIMARY KEY of table pParent. If so, leave *ppIdx
107811 ** mapped to the primary key of table pParent, or
107815 if( pParent->iPKey>=0 ){
107817 if( !sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName, zKey) ) return 0;
107826 for(pIdx=pParent->pIndex; pIdx; pIdx=pIdx->pNext){
107834 ** the PRIMARY KEY of table pParent. The PRIMARY KEY index may be
107845 ** map to an explicit list of columns in table pParent. Check if this
107859 zDfltColl = pParent->aCol[iCol].zColl;
107863 zIdxCol = pParent->aCol[iCol].zName;
114682 Table *pParent; /* Parent table that child points to */
114715 pParent = sqlite3FindTable(db, pFK->zTo, zDb);
114716 if( pParent==0 ) continue;
114718 sqlite3TableLock(pParse, iDb, pParent->tnum, 0, pParent->zName);
114719 x = sqlite3FkLocateIndex(pParse, pParent, pFK, &pIdx, 0);
114722 sqlite3OpenTable(pParse, i, iDb, pParent, OP_OpenRead);
114737 pParent = sqlite3FindTable(db, pFK->zTo, zDb);
114740 if( pParent ){
114741 x = sqlite3FkLocateIndex(pParse, pParent, pFK, &pIdx, &aiCols);
114763 }else if( pParent ){
120094 Select *pParent; /* Current UNION ALL term of the other query */
120358 for(pParent=p; pParent; pParent=pParent->pPrior, pSub=pSub->pPrior){
120363 pSrc = pParent->pSrc; /* FROM clause of the outer query */
120366 assert( pParent==p ); /* First time through the loop */
120369 assert( pParent!=p ); /* 2nd and subsequent times through the loop */
120370 pSrc = pParent->pSrc = sqlite3SrcListAppend(db, 0, 0, 0);
120393 pParent->pSrc = pSrc = sqlite3SrcListEnlarge(db, pSrc, nSubSrc-1,iFrom+1);
120427 ** do not necessarily correspond to columns in SELECT statement pParent,
120431 ** function attempts to flatten a compound sub-query into pParent
120438 assert( pParent->pOrderBy==0 );
120440 pParent->pOrderBy = pOrderBy;
120448 assert( pParent->pHaving==0 );
120449 pParent->pHaving = pParent->pWhere;
120450 pParent->pWhere = pWhere;
120451 pParent->pHaving = sqlite3ExprAnd(db,
120452 sqlite3ExprDup(db, pSub->pHaving, 0), pParent->pHaving
120454 assert( pParent->pGroupBy==0 );
120455 pParent->pGroupBy = sqlite3ExprListDup(db, pSub->pGroupBy, 0);
120457 pParent->pWhere = sqlite3ExprAnd(db, pWhere, pParent->pWhere);
120466 substSelect(&x, pParent, 0);
120472 pParent->selFlags |= pSub->selFlags & SF_Distinct;
120481 pParent->pLimit = pSub->pLimit;
146050 Fts3Expr *pParent; /* pParent->pLeft==this or pParent->pRight==this */
151243 && (pExpr->pParent==0 || pExpr->pParent->eType!=FTSQUERY_NEAR)
151263 for(p=p->pParentpParent){
151274 assert( p->pParent && p->pParent->pLeft==p );
151275 nNear = p->pParent->nNear;
151333 && (pExpr->pParent==0 || pExpr->pParent->eType!=FTSQUERY_NEAR)
151586 while( pRoot->pParent && pRoot->pParent->eType==FTSQUERY_NEAR ){
151587 pRoot = pRoot->pParent;
151688 if( pExpr->bDeferred && pExpr->pParent->eType!=FTSQUERY_NEAR ){
151764 for(p=pExpr->pParent; p; p=p->pParent){
153043 while( pSplit->pParent && opPrecedence(pSplit->pParent)<=opPrecedence(pNew) ){
153044 pSplit = pSplit->pParent;
153047 if( pSplit->pParent ){
153048 assert( pSplit->pParent->pRight==pSplit );
153049 pSplit->pParent->pRight = pNew;
153050 pNew->pParent = pSplit->pParent;
153055 pSplit->pParent = pNew;
153104 p->pParent = pNot;
153107 pNotBranch->pParent = pNot;
153163 p->pParent = pPrev;
153196 pRet->pParent = pIter;
153246 Fts3Expr *pFree = 0; /* List of free nodes. Linked by pParent. */
153269 assert( p->pParent==0 || p->pParent->pLeft==p );
153276 Fts3Expr *pParent = p->pParent; /* Current parent of p */
153278 assert( pParent==0 || pParent->pLeft==p );
153279 p->pParent = 0;
153280 if( pParent ){
153281 pParent->pLeft = 0;
153296 pFree->pLeft->pParent = pFree;
153297 pFree->pRight->pParent = pFree;
153300 pParent;
153301 p->pParent = 0;
153312 if( pParent==0 ) break;
153315 for(p=pParent->pRight; p->eType==eType; p=p->pLeft);
153317 /* Remove pParent from the original tree. */
153318 assert( pParent->pParent==0 || pParent->pParent->pLeft==pParent );
153319 pParent->pRight->pParent = pParent->pParent;
153320 if( pParent->pParent ){
153321 pParent->pParent->pLeft = pParent->pRight;
153323 assert( pParent==pRoot );
153324 pRoot = pParent->pRight;
153327 /* Link pParent into the free node list. It will be used as an
153329 pParent->pParent = pFree;
153330 pFree = pParent;
153339 p->pParent = 0;
153344 pFree->pLeft->pParent = pFree;
153345 pFree->pRight->pParent = pFree;
153348 pFree = pFree->pParent;
153349 p->pParent = 0;
153363 pFree = pDel->pParent;
153377 pLeft->pParent = 0;
153378 pRight->pParent = 0;
153391 pLeft->pParent = pRoot;
153393 pRight->pParent = pRoot;
153540 assert( pDel==0 || pDel->pParent==0 );
153542 assert( p->pParent==0 || p==p->pParent->pRight || p==p->pParent->pLeft );
153545 Fts3Expr *pParent = p->pParent;
153547 if( pParent && p==pParent->pLeft && pParent->pRight ){
153548 p = pParent->pRight;
153550 assert( p==p->pParent->pRight || p==p->pParent->pLeft );
153554 p = pParent;
156251 SegmentNode *pParent; /* Parent node (or NULL for root node) */
158115 SegmentNode *pParent = pTree->pParent;
158116 rc = fts3NodeAddTerm(p, &pParent, isCopyTerm, zTerm, nTerm);
158117 if( pTree->pParent==0 ){
158118 pTree->pParent = pParent;
158122 pNew->pParent = pParent;
158176 if( !pTree->pParent ){
158197 p, pTree->pParent, iHeight+1, iFree, iNextFree, piLast, paRoot, pnRoot
158211 fts3NodeFree(p->pParent);
164490 RtreeNode *pParent; /* Parent node */
164783 static RtreeNode *nodeNew(Rtree *pRtree, RtreeNode *pParent){
164790 pNode->pParent = pParent;
164792 nodeReference(pParent);
164814 RtreeNode *pParent, /* Either the parent node or NULL */
164824 assert( !pParent || !pNode->pParent || pNode->pParent==pParent );
164825 if( pParent && !pNode->pParent ){
164826 nodeReference(pParent);
164827 pNode->pParent = pParent;
164862 pNode->pParent = pParent;
164870 nodeReference(pParent);
165006 if( pNode->pParent ){
165007 rc = nodeRelease(pRtree, pNode->pParent);
165457 RtreeNode *pParent = pNode->pParent;
165458 if( pParent ){
165459 return nodeRowidIndex(pRtree, pParent, pNode->iNode, piIndex);
165553 RtreeSearchPoint *pParent;
165555 pParent = pCur->aPoint + j;
165556 if( rtreeSearchPointCompare(pNew, pParent)>=0 ) break;
165559 pNew = pParent;
166300 while( p->pParent ){
166301 RtreeNode *pParent = p->pParent;
166309 nodeGetCell(pRtree, pParent
166312 nodeOverwriteCell(pRtree, pParent, &cell, iCell);
166315 p = pParent;
166594 nodeRelease(pRtree, pChild->pParent);
166596 pChild->pParent = pNode;
166647 pRight = nodeNew(pRtree, pLeft->pParent);
166680 rc = rtreeInsertCell(pRtree, pLeft->pParent, &leftbbox, iHeight+1);
166685 RtreeNode *pParent = pLeft->pParent;
166689 nodeOverwriteCell(pRtree, pParent, &leftbbox, iCell);
166690 rc = AdjustTree(pRtree, pParent, &leftbbox);
166696 if( (rc = rtreeInsertCell(pRtree, pRight->pParent, &rightbbox, iHeight+1)) ){
166739 ** If node pLeaf is not the root of the r-tree and its pParent pointer is
166741 ** the pLeaf->pParent chain all the way up to the root node.
166752 while( rc==SQLITE_OK && pChild->iNode!=1 && pChild->pParent==0 ){
166760 /* Before setting pChild->pParent, test that we are not creating a
166761 ** loop of references (as we would if, say, pChild==pParent). We don't
166766 for(pTest=pLeaf; pTest && pTest->iNode!=iNode; pTest=pTest->pParent);
166768 rc2 = nodeAcquire(pRtree, iNode, 0, &pChild->pParent);
166773 if( rc==SQLITE_OK && !pChild->pParent ) rc = SQLITE_CORRUPT_VTAB;
166774 pChild = pChild->pParent;
166784 RtreeNode *pParent = 0;
166792 pParent = pNode->pParent;
166793 pNode->pParent = 0;
166794 rc = deleteCell(pRtree, pParent, iCell, iHeight+1);
166796 rc2 = nodeRelease(pRtree, pParent);
166831 RtreeNode *pParent = pNode->pParent;
166833 if( pParent ){
166846 nodeOverwriteCell(pRtree, pParent, &box, ii);
166847 rc = fixBoundingBox(pRtree, pParent);
166858 RtreeNode *pParent;
166875 pParent = pNode->pParent;
166876 assert( pParent || pNode->iNode==1 );
166877 if( pParent ){
167003 nodeRelease(pRtree, pChild->pParent);
167005 pChild->pParent = pNode;
174156 sqlite3_vfs *pParent; /* Parent VFS */
174158 pParent = sqlite3_vfs_find(zParent);
174159 if( pParent==0 ){
174164 pNew->base.mxPathname = pParent->mxPathname;
174165 pNew->base.szOsFile = sizeof(rbu_file) + pParent->szOsFile;
174166 pNew->pRealVfs = pParent;