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);
55900 MemPage *pRoot;
55929 pRoot = pCur->apPage[0];
55930 assert( pRoot->pgno==pCur->pgnoRoot );
55940 ** in such a way that page pRoot is linked into a second b-tree table
55942 assert( pRoot->intKey==1 || pRoot->intKey==0 );
55943 if( pRoot->isInit==0 || (pCur->pKeyInfo==0)!=pRoot->intKey ){
55951 if( pRoot->nCell>0 ){
55953 }else if( !pRoot->leaf ){
55955 if( pRoot->pgno!=1 ) return SQLITE_CORRUPT_BKPT;
55956 subpage = get4byte(&pRoot->aData[pRoot->hdrOffset+8]);
58303 static int balance_deeper(MemPage *pRoot, MemPage **ppChild){
58307 BtShared *pBt = pRoot->pBt; /* The BTree */
58309 assert( pRoot->nOverflow>0 );
58312 /* Make pRoot, the root page of the b-tree, writable. Allocate a new
58314 ** of the node stored on pRoot into the new child page.
58316 rc = sqlite3PagerWrite(pRoot->pDbPage);
58318 rc = allocateBtreePage(pBt,&pChild,&pgnoChild,pRoot->pgno,0);
58319 copyNodeContent(pRoot, pChild, &rc);
58321 ptrmapPut(pBt, pgnoChild, PTRMAP_BTREE, pRoot->pgno, &rc);
58330 assert( sqlite3PagerIswriteable(pRoot->pDbPage) );
58331 assert( pChild->nCell==pRoot->nCell );
58333 TRACE(("BALANCE: copy root %d into %d\n", pRoot->pgno, pChild->pgno));
58335 /* Copy the overflow cells from pRoot to pChild */
58336 memcpy(pChild->aiOvfl, pRoot->aiOvfl,
58337 pRoot->nOverflow*sizeof(pRoot->aiOvfl[0]));
58338 memcpy(pChild->apOvfl, pRoot->apOvfl,
58339 pRoot->nOverflow*sizeof(pRoot->apOvfl[0]));
58340 pChild->nOverflow = pRoot->nOverflow;
58342 /* Zero the contents of pRoot. Then install pChild as the right-child. */
58343 zeroPage(pRoot, pChild->aData[0] & ~PTF_LEAF);
58344 put4byte(&pRoot->aData[pRoot->hdrOffset+8], pgnoChild);
58771 MemPage *pRoot;
58781 rc = allocateBtreePage(pBt, &pRoot, &pgnoRoot, 1, 0);
58842 rc = btreeGetPage(pBt, pgnoRoot, &pRoot, 0);
58851 releasePage(pRoot);
58856 rc = relocatePage(pBt, pRoot, eType, iPtrPage, pgnoMove, 0);
58857 releasePage(pRoot);
58863 rc = btreeGetPage(pBt, pgnoRoot, &pRoot, 0);
58867 rc = sqlite3PagerWrite(pRoot->pDbPage);
58869 releasePage(pRoot);
58873 pRoot = pPageMove;
58879 releasePage(pRoot);
58890 releasePage(pRoot);
58895 rc = allocateBtreePage(pBt, &pRoot, &pgnoRoot, 1, 0);
58899 assert( sqlite3PagerIswriteable(pRoot->pDbPage) );
58905 zeroPage(pRoot, ptfFlags);
58906 sqlite3PagerUnref(pRoot->pDbPage);
78701 ** Attach subtrees pLeft and pRight to the Expr node pRoot.
78703 ** If pRoot==NULL that means that a memory allocation error has occurred.
78708 Expr *pRoot,
78712 if( pRoot==0 ){
78718 pRoot->pRight = pRight;
78719 pRoot->flags |= EP_Collate & pRight->flags;
78722 pRoot->pLeft = pLeft;
78723 pRoot->flags |= EP_Collate & pLeft->flags;
78725 exprSetHeight(pRoot);
107991 Parse *pRoot = sqlite3ParseToplevel(pParse);
108000 for(pPrg=pRoot->pTriggerPrg;
131393 ** Fts3TokenAndCost.pRoot.
131400 Fts3Expr *pRoot; /* Root of NEAR/AND cluster */
131414 Fts3Expr *pRoot, /* Root of current AND/NEAR cluster */
131428 pTC->pRoot = pRoot;
131440 pRoot = pExpr->pLeft;
131441 **ppOr = pRoot;
131444 fts3EvalTokenCosts(pCsr, pRoot, pExpr->pLeft, ppTC, ppOr, pRc);
131446 pRoot = pExpr->pRight;
131447 **ppOr = pRoot;
131450 fts3EvalTokenCosts(pCsr, pRoot, pExpr->pRight, ppTC, ppOr, pRc);
131520 ** the cluster with root node pRoot. See comments above the definition
131529 Fts3Expr *pRoot, /* Consider tokens with this root node */
131556 if( aTC[ii].pRoot==pRoot ){
131596 if( aTC[iTC].pToken && aTC[iTC].pRoot==pRoot
132298 Fts3Expr *pRoot; /* Root of NEAR expression */
132306 pRoot = pExpr;
132307 while( pRoot->pParent && pRoot->pParent->eType==FTSQUERY_NEAR ){
132308 pRoot = pRoot->pParent;
132310 iDocid = pRoot->iDocid;
132311 bEof = pRoot->bEof;
132312 assert( pRoot->bStart );
132315 for(p=pRoot; p; p=p->pLeft){
132323 fts3EvalRestart(pCsr, pRoot, &rc);
132333 fts3EvalNextRow(pCsr, pRoot, &rc);
132334 pCsr->isEof = pRoot->bEof;
132337 pCsr->iPrevId = pRoot->iDocid;
132339 && pRoot->eType==FTSQUERY_NEAR
132344 fts3EvalUpdateCounts(pRoot);
132352 pRoot->bEof = bEof;
132354 /* Caution: pRoot may iterate through docids in ascending or descending
132358 ** do {...} while( pRoot->iDocid<iDocid && rc==SQLITE_OK );
132360 fts3EvalRestart(pCsr, pRoot, &rc);
132362 fts3EvalNextRow(pCsr, pRoot, &rc);
132363 assert( pRoot->bEof==0 );
132364 }while( pRoot->iDocid!=iDocid && rc==SQLITE_OK );
133974 Fts3Expr *pRoot = *pp; /* Initial root node */
133976 int eType = pRoot->eType; /* Type of node in this tree */
133996 for(p=pRoot; p->eType==eType; p=p->pLeft){
134011 pRoot = 0;
134051 assert( pParent==pRoot );
134052 pRoot = pParent->pRight;
134081 pRoot = p;
134085 ** sqlite3Fts3ExprFree(pRoot) below. */
134102 sqlite3Fts3ExprFree(pRoot);
134103 pRoot = 0;
134105 *pp = pRoot;
140712 NodeWriter *pRoot; /* NodeWriter for root node */
140757 pRoot = &pWriter->aNodeWriter[iRoot];
140778 pRoot->block.a, pRoot->block.n /* root */
140781 sqlite3_free(pRoot->block.a);
140782 sqlite3_free(pRoot->key.a);
146174 RtreeNode *pRoot = 0;
146211 rc = nodeAcquire(pRtree, 1, 0, &pRoot);
146256 pCsr->aNode[0] = pRoot;
146257 pRoot = 0;
146263 nodeRelease(pRtree, pRoot);
147330 RtreeNode *pRoot; /* Root node of rtree structure */
147334 rc = nodeAcquire(pRtree, 1, 0, &pRoot);
147371 if( rc==SQLITE_OK && pRtree->iDepth>0 && NCELL(pRoot)==1 ){
147374 i64 iChild = nodeGetRowid(pRtree, pRoot, 0);
147375 rc = nodeAcquire(pRtree, iChild, pRoot, &pChild);
147383 writeInt16(pRoot->zData, pRtree->iDepth);
147384 pRoot->isDirty = 1;
147399 rc = nodeRelease(pRtree, pRoot);
147401 nodeRelease(pRtree, pRoot);