Lines Matching defs:pRoot

17247 ** on.  *pRoot is the list that i is a member of.
17249 static void memsys3UnlinkFromList(u32 i, u32 *pRoot){
17254 *pRoot = next;
17287 ** at *pRoot.
17289 static void memsys3LinkIntoList(u32 i, u32 *pRoot){
17291 mem3.aPool[i].u.list.next = *pRoot;
17293 if( *pRoot ){
17294 mem3.aPool[*pRoot].u.list.prev = i;
17296 *pRoot = i;
17402 ** *pRoot is the head of a list of free chunks of the same size
17403 ** or same size hash. In other words, *pRoot is an entry in either
17417 static void memsys3Merge(u32 *pRoot){
17421 for(i=*pRoot; i>0; i=iNext){
17426 memsys3UnlinkFromList(i, pRoot);
55920 MemPage *pRoot;
55949 pRoot = pCur->apPage[0];
55950 assert( pRoot->pgno==pCur->pgnoRoot );
55960 ** in such a way that page pRoot is linked into a second b-tree table
55962 assert( pRoot->intKey==1 || pRoot->intKey==0 );
55963 if( pRoot->isInit==0 || (pCur->pKeyInfo==0)!=pRoot->intKey ){
55971 if( pRoot->nCell>0 ){
55973 }else if( !pRoot->leaf ){
55975 if( pRoot->pgno!=1 ) return SQLITE_CORRUPT_BKPT;
55976 subpage = get4byte(&pRoot->aData[pRoot->hdrOffset+8]);
58323 static int balance_deeper(MemPage *pRoot, MemPage **ppChild){
58327 BtShared *pBt = pRoot->pBt; /* The BTree */
58329 assert( pRoot->nOverflow>0 );
58332 /* Make pRoot, the root page of the b-tree, writable. Allocate a new
58334 ** of the node stored on pRoot into the new child page.
58336 rc = sqlite3PagerWrite(pRoot->pDbPage);
58338 rc = allocateBtreePage(pBt,&pChild,&pgnoChild,pRoot->pgno,0);
58339 copyNodeContent(pRoot, pChild, &rc);
58341 ptrmapPut(pBt, pgnoChild, PTRMAP_BTREE, pRoot->pgno, &rc);
58350 assert( sqlite3PagerIswriteable(pRoot->pDbPage) );
58351 assert( pChild->nCell==pRoot->nCell );
58353 TRACE(("BALANCE: copy root %d into %d\n", pRoot->pgno, pChild->pgno));
58355 /* Copy the overflow cells from pRoot to pChild */
58356 memcpy(pChild->aiOvfl, pRoot->aiOvfl,
58357 pRoot->nOverflow*sizeof(pRoot->aiOvfl[0]));
58358 memcpy(pChild->apOvfl, pRoot->apOvfl,
58359 pRoot->nOverflow*sizeof(pRoot->apOvfl[0]));
58360 pChild->nOverflow = pRoot->nOverflow;
58362 /* Zero the contents of pRoot. Then install pChild as the right-child. */
58363 zeroPage(pRoot, pChild->aData[0] & ~PTF_LEAF);
58364 put4byte(&pRoot->aData[pRoot->hdrOffset+8], pgnoChild);
58791 MemPage *pRoot;
58801 rc = allocateBtreePage(pBt, &pRoot, &pgnoRoot, 1, 0);
58862 rc = btreeGetPage(pBt, pgnoRoot, &pRoot, 0);
58871 releasePage(pRoot);
58876 rc = relocatePage(pBt, pRoot, eType, iPtrPage, pgnoMove, 0);
58877 releasePage(pRoot);
58883 rc = btreeGetPage(pBt, pgnoRoot, &pRoot, 0);
58887 rc = sqlite3PagerWrite(pRoot->pDbPage);
58889 releasePage(pRoot);
58893 pRoot = pPageMove;
58899 releasePage(pRoot);
58910 releasePage(pRoot);
58915 rc = allocateBtreePage(pBt, &pRoot, &pgnoRoot, 1, 0);
58919 assert( sqlite3PagerIswriteable(pRoot->pDbPage) );
58925 zeroPage(pRoot, ptfFlags);
58926 sqlite3PagerUnref(pRoot->pDbPage);
78721 ** Attach subtrees pLeft and pRight to the Expr node pRoot.
78723 ** If pRoot==NULL that means that a memory allocation error has occurred.
78728 Expr *pRoot,
78732 if( pRoot==0 ){
78738 pRoot->pRight = pRight;
78739 pRoot->flags |= EP_Collate & pRight->flags;
78742 pRoot->pLeft = pLeft;
78743 pRoot->flags |= EP_Collate & pLeft->flags;
78745 exprSetHeight(pRoot);
108011 Parse *pRoot = sqlite3ParseToplevel(pParse);
108020 for(pPrg=pRoot->pTriggerPrg;
131425 ** Fts3TokenAndCost.pRoot.
131432 Fts3Expr *pRoot; /* Root of NEAR/AND cluster */
131446 Fts3Expr *pRoot, /* Root of current AND/NEAR cluster */
131460 pTC->pRoot = pRoot;
131472 pRoot = pExpr->pLeft;
131473 **ppOr = pRoot;
131476 fts3EvalTokenCosts(pCsr, pRoot, pExpr->pLeft, ppTC, ppOr, pRc);
131478 pRoot = pExpr->pRight;
131479 **ppOr = pRoot;
131482 fts3EvalTokenCosts(pCsr, pRoot, pExpr->pRight, ppTC, ppOr, pRc);
131552 ** the cluster with root node pRoot. See comments above the definition
131561 Fts3Expr *pRoot, /* Consider tokens with this root node */
131588 if( aTC[ii].pRoot==pRoot ){
131628 if( aTC[iTC].pToken && aTC[iTC].pRoot==pRoot
132330 Fts3Expr *pRoot; /* Root of NEAR expression */
132338 pRoot = pExpr;
132339 while( pRoot->pParent && pRoot->pParent->eType==FTSQUERY_NEAR ){
132340 pRoot = pRoot->pParent;
132342 iDocid = pRoot->iDocid;
132343 bEof = pRoot->bEof;
132344 assert( pRoot->bStart );
132347 for(p=pRoot; p; p=p->pLeft){
132355 fts3EvalRestart(pCsr, pRoot, &rc);
132365 fts3EvalNextRow(pCsr, pRoot, &rc);
132366 pCsr->isEof = pRoot->bEof;
132369 pCsr->iPrevId = pRoot->iDocid;
132371 && pRoot->eType==FTSQUERY_NEAR
132376 fts3EvalUpdateCounts(pRoot);
132384 pRoot->bEof = bEof;
132386 /* Caution: pRoot may iterate through docids in ascending or descending
132390 ** do {...} while( pRoot->iDocid<iDocid && rc==SQLITE_OK );
132392 fts3EvalRestart(pCsr, pRoot, &rc);
132394 fts3EvalNextRow(pCsr, pRoot, &rc);
132395 assert( pRoot->bEof==0 );
132396 }while( pRoot->iDocid!=iDocid && rc==SQLITE_OK );
134006 Fts3Expr *pRoot = *pp; /* Initial root node */
134008 int eType = pRoot->eType; /* Type of node in this tree */
134028 for(p=pRoot; p->eType==eType; p=p->pLeft){
134043 pRoot = 0;
134083 assert( pParent==pRoot );
134084 pRoot = pParent->pRight;
134113 pRoot = p;
134117 ** sqlite3Fts3ExprFree(pRoot) below. */
134134 sqlite3Fts3ExprFree(pRoot);
134135 pRoot = 0;
134137 *pp = pRoot;
140744 NodeWriter *pRoot; /* NodeWriter for root node */
140789 pRoot = &pWriter->aNodeWriter[iRoot];
140810 pRoot->block.a, pRoot->block.n /* root */
140813 sqlite3_free(pRoot->block.a);
140814 sqlite3_free(pRoot->key.a);
146206 RtreeNode *pRoot = 0;
146243 rc = nodeAcquire(pRtree, 1, 0, &pRoot);
146288 pCsr->aNode[0] = pRoot;
146289 pRoot = 0;
146295 nodeRelease(pRtree, pRoot);
147362 RtreeNode *pRoot; /* Root node of rtree structure */
147366 rc = nodeAcquire(pRtree, 1, 0, &pRoot);
147403 if( rc==SQLITE_OK && pRtree->iDepth>0 && NCELL(pRoot)==1 ){
147406 i64 iChild = nodeGetRowid(pRtree, pRoot, 0);
147407 rc = nodeAcquire(pRtree, iChild, pRoot, &pChild);
147415 writeInt16(pRoot->zData, pRtree->iDepth);
147416 pRoot->isDirty = 1;
147431 rc = nodeRelease(pRtree, pRoot);
147433 nodeRelease(pRtree, pRoot);