Lines Matching refs:pRoot
16132 ** on. *pRoot is the list that i is a member of.
16134 static void memsys3UnlinkFromList(u32 i, u32 *pRoot){
16139 *pRoot = next;
16172 ** at *pRoot.
16174 static void memsys3LinkIntoList(u32 i, u32 *pRoot){
16176 mem3.aPool[i].u.list.next = *pRoot;
16178 if( *pRoot ){
16179 mem3.aPool[*pRoot].u.list.prev = i;
16181 *pRoot = i;
16287 ** *pRoot is the head of a list of free chunks of the same size
16288 ** or same size hash. In other words, *pRoot is an entry in either
16302 static void memsys3Merge(u32 *pRoot){
16306 for(i=*pRoot; i>0; i=iNext){
16311 memsys3UnlinkFromList(i, pRoot);
53625 MemPage *pRoot;
53675 pRoot = pCur->apPage[0];
53676 assert( pRoot->pgno==pCur->pgnoRoot );
53677 assert( pRoot->isInit && (pCur->pKeyInfo==0)==pRoot->intKey );
53684 if( pRoot->nCell==0 && !pRoot->leaf ){
53686 if( pRoot->pgno!=1 ) return SQLITE_CORRUPT_BKPT;
53687 subpage = get4byte(&pRoot->aData[pRoot->hdrOffset+8]);
53691 pCur->eState = ((pRoot->nCell>0)?CURSOR_VALID:CURSOR_INVALID);
55929 static int balance_deeper(MemPage *pRoot, MemPage **ppChild){
55933 BtShared *pBt = pRoot->pBt; /* The BTree */
55935 assert( pRoot->nOverflow>0 );
55938 /* Make pRoot, the root page of the b-tree, writable. Allocate a new
55940 ** of the node stored on pRoot into the new child page.
55942 rc = sqlite3PagerWrite(pRoot->pDbPage);
55944 rc = allocateBtreePage(pBt,&pChild,&pgnoChild,pRoot->pgno,0);
55945 copyNodeContent(pRoot, pChild, &rc);
55947 ptrmapPut(pBt, pgnoChild, PTRMAP_BTREE, pRoot->pgno, &rc);
55956 assert( sqlite3PagerIswriteable(pRoot->pDbPage) );
55957 assert( pChild->nCell==pRoot->nCell );
55959 TRACE(("BALANCE: copy root %d into %d\n", pRoot->pgno, pChild->pgno));
55961 /* Copy the overflow cells from pRoot to pChild */
55962 memcpy(pChild->aiOvfl, pRoot->aiOvfl,
55963 pRoot->nOverflow*sizeof(pRoot->aiOvfl[0]));
55964 memcpy(pChild->apOvfl, pRoot->apOvfl,
55965 pRoot->nOverflow*sizeof(pRoot->apOvfl[0]));
55966 pChild->nOverflow = pRoot->nOverflow;
55968 /* Zero the contents of pRoot. Then install pChild as the right-child. */
55969 zeroPage(pRoot, pChild->aData[0] & ~PTF_LEAF);
55970 put4byte(&pRoot->aData[pRoot->hdrOffset+8], pgnoChild);
56389 MemPage *pRoot;
56399 rc = allocateBtreePage(pBt, &pRoot, &pgnoRoot, 1, 0);
56453 rc = btreeGetPage(pBt, pgnoRoot, &pRoot, 0);
56462 releasePage(pRoot);
56467 rc = relocatePage(pBt, pRoot, eType, iPtrPage, pgnoMove, 0);
56468 releasePage(pRoot);
56474 rc = btreeGetPage(pBt, pgnoRoot, &pRoot, 0);
56478 rc = sqlite3PagerWrite(pRoot->pDbPage);
56480 releasePage(pRoot);
56484 pRoot = pPageMove;
56490 releasePage(pRoot);
56501 releasePage(pRoot);
56506 rc = allocateBtreePage(pBt, &pRoot, &pgnoRoot, 1, 0);
56510 assert( sqlite3PagerIswriteable(pRoot->pDbPage) );
56516 zeroPage(pRoot, ptfFlags);
56517 sqlite3PagerUnref(pRoot->pDbPage);
74830 ** Attach subtrees pLeft and pRight to the Expr node pRoot.
74832 ** If pRoot==NULL that means that a memory allocation error has occurred.
74837 Expr *pRoot,
74841 if( pRoot==0 ){
74847 pRoot->pRight = pRight;
74849 pRoot->flags |= EP_ExpCollate;
74850 pRoot->pColl = pRight->pColl;
74854 pRoot->pLeft = pLeft;
74856 pRoot->flags |= EP_ExpCollate;
74857 pRoot->pColl = pLeft->pColl;
74860 exprSetHeight(pRoot);
100247 Parse *pRoot = sqlite3ParseToplevel(pParse);
100256 for(pPrg=pRoot->pTriggerPrg;
120696 ** Fts3TokenAndCost.pRoot.
120703 Fts3Expr *pRoot; /* Root of NEAR/AND cluster */
120717 Fts3Expr *pRoot, /* Root of current AND/NEAR cluster */
120731 pTC->pRoot = pRoot;
120743 pRoot = pExpr->pLeft;
120744 **ppOr = pRoot;
120747 fts3EvalTokenCosts(pCsr, pRoot, pExpr->pLeft, ppTC, ppOr, pRc);
120749 pRoot = pExpr->pRight;
120750 **ppOr = pRoot;
120753 fts3EvalTokenCosts(pCsr, pRoot, pExpr->pRight, ppTC, ppOr, pRc);
120823 ** the cluster with root node pRoot. See comments above the definition
120832 Fts3Expr *pRoot, /* Consider tokens with this root node */
120859 if( aTC[ii].pRoot==pRoot ){
120899 if( aTC[iTC].pToken && aTC[iTC].pRoot==pRoot
121578 Fts3Expr *pRoot; /* Root of NEAR expression */
121586 pRoot = pExpr;
121587 while( pRoot->pParent && pRoot->pParent->eType==FTSQUERY_NEAR ){
121588 pRoot = pRoot->pParent;
121590 iDocid = pRoot->iDocid;
121591 bEof = pRoot->bEof;
121592 assert( pRoot->bStart );
121595 for(p=pRoot; p; p=p->pLeft){
121603 fts3EvalRestart(pCsr, pRoot, &rc);
121613 fts3EvalNextRow(pCsr, pRoot, &rc);
121614 pCsr->isEof = pRoot->bEof;
121617 pCsr->iPrevId = pRoot->iDocid;
121619 && pRoot->eType==FTSQUERY_NEAR
121624 fts3EvalUpdateCounts(pRoot);
121632 pRoot->bEof = bEof;
121634 /* Caution: pRoot may iterate through docids in ascending or descending
121638 ** do {...} while( pRoot->iDocid<iDocid && rc==SQLITE_OK );
121640 fts3EvalRestart(pCsr, pRoot, &rc);
121642 fts3EvalNextRow(pCsr, pRoot, &rc);
121643 assert( pRoot->bEof==0 );
121644 }while( pRoot->iDocid!=iDocid && rc==SQLITE_OK );
131354 RtreeNode *pRoot = 0;
131408 rc = nodeAcquire(pRtree, 1, 0, &pRoot);
131412 int nCell = NCELL(pRoot);
131413 pCsr->pNode = pRoot;
131415 assert( pCsr->pNode==pRoot );
131422 assert( pCsr->pNode==pRoot );
131423 nodeRelease(pRtree, pRoot);
132753 RtreeNode *pRoot; /* Root node of rtree structure */
132757 rc = nodeAcquire(pRtree, 1, 0, &pRoot);
132794 if( rc==SQLITE_OK && pRtree->iDepth>0 && NCELL(pRoot)==1 ){
132797 i64 iChild = nodeGetRowid(pRtree, pRoot, 0);
132798 rc = nodeAcquire(pRtree, iChild, pRoot, &pChild);
132806 writeInt16(pRoot->zData, pRtree->iDepth);
132807 pRoot->isDirty = 1;
132822 rc = nodeRelease(pRtree, pRoot);
132824 nodeRelease(pRtree, pRoot);