Lines Matching defs:pRight

18120 ** Expr.pRight and Expr.pLeft are the left and right subexpressions of a
18162 ** the child Expr objects in the Expr.pLeft and Expr.pRight subtrees
18189 Expr *pRight; /* Right subnode */
18257 #define EP_Leaf 0x800000 /* Expr.pLeft, .pRight, .u.pSelect all NULL */
30011 sqlite3TreeViewExpr(pView, p->pLimit->pLeft, p->pLimit->pRight!=0);
30012 if( p->pLimit->pRight ){
30014 sqlite3TreeViewExpr(pView, p->pLimit->pRight, 0);
30296 assert( pExpr->pRight );
30297 assert( sqlite3ExprSkipCollate(pExpr->pRight)->op==TK_TRUEFALSE );
30298 x = (pExpr->op2==TK_ISNOT)*2 + sqlite3ExprTruthValue(pExpr->pRight);
30444 sqlite3TreeViewExpr(pView, pExpr->pRight, 0);
30471 sqlite3TreeViewExpr(pView, pExpr->pRight, 0);
51565 ** objects. In that alternative use, pRight points to the next entry
51571 struct RowSetEntry *pRight; /* Right subtree (larger entries) or list */
51594 struct RowSetEntry *pEntry; /* List of entries using pRight */
51703 pEntry->pRight = 0;
51711 pLast->pRight = pEntry;
51721 ** The input lists are connected via pRight pointers and are
51734 assert( pA->pRight==0 || pA->v<=pA->pRight->v );
51735 assert( pB->pRight==0 || pB->v<=pB->pRight->v );
51737 if( pA->v<pB->v ) pTail = pTail->pRight = pA;
51738 pA = pA->pRight;
51740 pTail->pRight = pB;
51744 pTail = pTail->pRight = pB;
51745 pB = pB->pRight;
51747 pTail->pRight = pA;
51752 return head.pRight;
51765 pNext = pIn->pRight;
51766 pIn->pRight = 0;
51785 ** Convert this tree into a linked list connected by the pRight pointers
51797 p->pRight = pIn;
51801 if( pIn->pRight ){
51802 rowSetTreeToList(pIn->pRight, &pIn->pRight, ppLast);
51806 assert( (*ppLast)->pRight==0 );
51811 ** Convert a sorted list of elements (connected by pRight) into a binary
51845 *ppList = p->pRight;
51846 p->pRight = rowSetNDeepTree(ppList, iDepth-1);
51849 *ppList = p->pRight;
51850 p->pLeft = p->pRight = 0;
51866 pList = p->pRight;
51867 p->pLeft = p->pRight = 0;
51871 pList = p->pRight;
51873 p->pRight = rowSetNDeepTree(&pList, iDepth);
51906 p->pEntry = p->pEntry->pRight;
51942 for(pTree = pRowSet->pForest; pTree; pTree=pTree->pRight){
51943 ppPrevTree = &pTree->pRight;
51958 pTree->pRight = 0;
51972 for(pTree = pRowSet->pForest; pTree; pTree=pTree->pRight){
51976 p = p->pRight;
72541 u8 *pRight; /* Location in parent of right-sibling pointer */
72601 pRight = &pParent->aData[pParent->hdrOffset+8];
72603 pRight = findCell(pParent, i+nxDiv-pParent->nOverflow);
72605 pgno = get4byte(pRight);
73029 put4byte(pRight, apNew[nNew-1]->pgno);
79997 if( pExpr->pRight ){
79999 displayP4Expr(p, pExpr->pRight);
98454 assert( pExpr->x.pList==0 || pExpr->pRight==0 );
98456 if( pExpr->pRight ){
98458 pExpr = pExpr->pRight;
98850 ** pExpr->pRight Any expression this points to is deleted.
99140 assert( pExpr->pLeft==0 && pExpr->pRight==0 );
99269 sqlite3ExprDelete(db, pExpr->pRight);
99270 pExpr->pRight = 0;
99482 Expr *pRight;
99494 pRight = pExpr->pRight;
99495 if( pRight->op==TK_ID ){
99498 assert( pRight->op==TK_DOT );
99500 pLeft = pRight->pLeft;
99501 pRight = pRight->pRight;
99504 zColumn = pRight->u.zToken;
99506 sqlite3RenameTokenRemap(pParse, (void*)pExpr, (void*)pRight);
99767 Expr *pRight = sqlite3ExprSkipCollateAndLikely(pExpr->pRight);
99771 if( ALWAYS(pRight) && (pRight->op==TK_ID || pRight->op==TK_TRUEFALSE) ){
99772 int rc = resolveExprStep(pWalker, pRight);
99774 if( pRight->op==TK_TRUEFALSE ){
99799 assert( pExpr->pRight!=0 );
99800 nRight = sqlite3ExprVectorSize(pExpr->pRight);
100858 Expr *pNext = p->pRight;
100859 /* The Expr.x union is never used at the same time as Expr.pRight */
100860 assert( p->x.pList==0 || p->pRight==0 );
100945 if( pExpr->pRight ){
100946 aff = sqlite3CompareAffinity(pExpr->pRight, aff);
100988 ** a binary comparison operator comparing pLeft and pRight.
100995 ** Argument pRight (but not pLeft) may be a null pointer. In this case,
101001 const Expr *pRight
101007 }else if( pRight && (pRight->flags & EP_Collate)!=0 ){
101008 pColl = sqlite3ExprCollSeq(pParse, pRight);
101012 pColl = sqlite3ExprCollSeq(pParse, pRight);
101028 return sqlite3BinaryCompareCollSeq(pParse, p->pRight, p->pLeft);
101030 return sqlite3BinaryCompareCollSeq(pParse, p->pLeft, p->pRight);
101040 Expr *pRight, /* The right operand */
101053 p4 = sqlite3BinaryCompareCollSeq(pParse, pRight, pLeft);
101055 p4 = sqlite3BinaryCompareCollSeq(pParse, pLeft, pRight);
101057 p5 = binaryCompareP5(pLeft, pRight, jumpIfNull);
101141 ** the returned Expr object is to attach the pVector to the pRight field
101155 ** pRight: not used. But recursively deleted.
101162 ** pLeft on TK_SELECT_COLUMN nodes. But pRight is followed, so pVector
101163 ** can be attached to pRight to cause this node to take ownership of
101260 Expr *pRight = pExpr->pRight;
101271 if( nLeft!=sqlite3ExprVectorSize(pRight) ){
101290 regRight = exprCodeSubselect(pParse, pRight);
101298 r2 = exprVectorRegister(pParse, pRight, i, regRight, &pR, &regFree2);
101397 heightOfExpr(p->pRight, &nHeight);
101524 ** Attach subtrees pLeft and pRight to the Expr node pRoot.
101527 ** In that case, delete the subtrees pLeft and pRight.
101533 Expr *pRight
101538 sqlite3ExprDelete(db, pRight);
101540 if( pRight ){
101541 pRoot->pRight = pRight;
101542 pRoot->flags |= EP_Propagate & pRight->flags;
101563 Expr *pRight /* Right operand */
101571 sqlite3ExprAttachSubtrees(pParse->db, p, pLeft, pRight);
101575 sqlite3ExprDelete(pParse->db, pRight);
101604 SQLITE_PRIVATE Expr *sqlite3ExprAnd(Parse *pParse, Expr *pLeft, Expr *pRight){
101607 return pRight;
101608 }else if( pRight==0 ){
101610 }else if( (ExprAlwaysFalse(pLeft) || ExprAlwaysFalse(pRight))
101614 sqlite3ExprDeferredDelete(pParse, pRight);
101617 return sqlite3PExpr(pParse, TK_AND, pLeft, pRight);
101779 assert( p->pRight==0 );
101784 /* The Expr.x union is never used at the same time as Expr.pRight */
101785 assert( p->x.pList==0 || p->pRight==0 );
101787 if( p->pRight ){
101789 sqlite3ExprDeleteNN(db, p->pRight);
101903 assert( p->pRight==0 );
101933 ** and Expr.pRight variables (but not for any structures pointed to or
101941 nByte += dupedExprSize(p->pLeft, flags) + dupedExprSize(p->pRight, flags);
101951 ** (if applicable), and the copies of the p->pLeft and p->pRight expressions,
102024 /* Fill in pNew->pLeft and pNew->pRight. */
102030 pNew->pRight = p->pRight ?
102031 exprDup(db, p->pRight, EXPRDUP_REDUCE, &zAlloc) : 0;
102046 assert( p->iColumn==0 || p->pRight==0 );
102047 assert( p->pRight==0 || p->pRight==p->pLeft );
102051 pNew->pRight = sqlite3ExprDup(db, p->pRight, 0);
102161 assert( pOldExpr->pLeft==pOldExpr->pRight );
102162 pPriorSelectCol = pNewExpr->pLeft = pNewExpr->pRight;
102414 /* Store the SELECT statement in pRight so it will be deleted when
102416 pFirst->pRight = pExpr;
102649 Expr *pRight = sqlite3ExprSimplifiedAndOr(pExpr->pRight);
102651 if( ExprAlwaysTrue(pLeft) || ExprAlwaysFalse(pRight) ){
102652 pExpr = pExpr->op==TK_AND ? pRight : pLeft;
102653 }else if( ExprAlwaysTrue(pRight) || ExprAlwaysFalse(pLeft) ){
102654 pExpr = pExpr->op==TK_AND ? pLeft : pRight;
104700 r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, &regFree2);
104701 codeCompare(pParse, pLeft, pExpr->pRight, op,
104739 r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, &regFree2);
104783 isTrue = sqlite3ExprTruthValue(pExpr->pRight);
105161 opCompare.pRight = aListelem[i].pExpr;
105483 exprAnd.pRight = &compRight;
105486 compLeft.pRight = pExpr->x.pList->a[0].pExpr;
105489 compRight.pRight = pExpr->x.pList->a[1].pExpr;
105555 sqlite3ExprIfTrue(pParse, pExpr->pRight, dest, jumpIfNull);
105560 sqlite3ExprIfTrue(pParse, pExpr->pRight, dest, jumpIfNull);
105574 isTrue = sqlite3ExprTruthValue(pExpr->pRight);
105602 r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, &regFree2);
105603 codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
105726 sqlite3ExprIfFalse(pParse, pExpr->pRight, dest, jumpIfNull);
105732 sqlite3ExprIfFalse(pParse, pExpr->pRight, dest, jumpIfNull);
105747 isTrue = sqlite3ExprTruthValue(pExpr->pRight);
105778 r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, &regFree2);
105779 codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
105972 if( sqlite3ExprCompare(pParse, pA->pRight, pB->pRight, iTab) ) return 2;
106085 if( exprImpliesNotNull(pParse, p->pRight, pNN, iTab, seenNot) ) return 1;
106138 || sqlite3ExprImpliesExpr(pParse, pE1, pE2->pRight, iTab) )
106197 sqlite3WalkExpr(pWalker, pExpr->pRight);
106219 Expr *pRight = pExpr->pRight;
106230 || (pRight->op==TK_COLUMN && ALWAYS(pRight->y.pTab!=0)
106231 && IsVirtual(pRight->y.pTab))
106273 p = p->pRight;
121301 Expr *pRight; /* Column ref to child table */
121302 Expr *pEq; /* Expression (pLeft = pRight) */
121311 pRight = sqlite3Expr(db, TK_ID, zCol);
121312 pEq = sqlite3PExpr(pParse, TK_EQ, pLeft, pRight);
121331 Expr *pNe; /* Expression (pLeft != pRight) */
121333 Expr *pRight; /* Column ref to child table */
121336 pRight = exprTableColumn(db, pTab, pSrc->a[0].iCursor, -1);
121337 pNe = sqlite3PExpr(pParse, TK_NE, pLeft, pRight);
121345 pRight = sqlite3Expr(db, TK_ID, pTab->aCol[iCol].zName);
121346 pEq = sqlite3PExpr(pParse, TK_IS, pLeft, pRight);
131556 p = p->pRight;
131582 p = p->pRight;
131604 SrcItem *pRight; /* Right table being joined */
131608 pRight = &pLeft[1];
131609 for(i=0; i<pSrc->nSrc-1; i++, pRight++, pLeft++){
131610 Table *pRightTab = pRight->pTab;
131614 isOuter = (pRight->fg.jointype & JT_OUTER)!=0;
131619 if( pRight->fg.jointype & JT_NATURAL ){
131620 if( pRight->pOn || pRight->pUsing ){
131641 if( pRight->pOn && pRight->pUsing ){
131650 if( pRight->pOn ){
131651 if( isOuter ) sqlite3SetJoinExpr(pRight->pOn, pRight->iCursor);
131652 p->pWhere = sqlite3ExprAnd(pParse, p->pWhere, pRight->pOn);
131653 pRight->pOn = 0;
131663 if( pRight->pUsing ){
131664 IdList *pList = pRight->pUsing;
133164 pColExpr = pColExpr->pRight;
133329 ** pLimit expressions. pLimit->pLeft and pLimit->pRight hold the expressions
133337 ** a limit or offset is defined by pLimit->pLeft and pLimit->pRight. iLimit
133386 if( pLimit->pRight ){
133389 sqlite3ExprCode(pParse, pLimit->pRight, iOffset);
134685 assert( pExpr->pRight==0 );
134727 pExpr->pRight = substExpr(pSubst, pExpr->pRight);
135097 if( pSub->pLimit && pSub->pLimit->pRight ) return 0; /* Restriction (14) */
135536 Expr *pRight, *pLeft;
135540 findConstInWhere(pConst, pExpr->pRight);
135545 pRight = pExpr->pRight;
135547 assert( pRight!=0 );
135549 if( pRight->op==TK_COLUMN && sqlite3ExprIsConstant(pLeft) ){
135550 constInsert(pConst,pRight,pLeft,pExpr);
135552 if( pLeft->op==TK_COLUMN && sqlite3ExprIsConstant(pRight) ){
135553 constInsert(pConst,pLeft,pRight,pExpr);
135792 nChng += pushDownWhereTerms(pParse, pSubq, pWhere->pRight,
136355 Expr *pE, *pRight, *pExpr;
136479 assert( pE->op!=TK_DOT || pE->pRight!=0 );
136481 if( pE->op==TK_DOT && pE->pRight->op==TK_ASTERISK ) break;
136499 pRight = pE->pRight;
136500 assert( pE->op!=TK_DOT || pRight!=0 );
136502 && (pE->op!=TK_DOT || pRight->op!=TK_ASTERISK)
136579 pRight = sqlite3Expr(db, TK_ID, zName);
136585 pExpr = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);
136595 pExpr = pRight;
139360 assert( pTerm->pRight!=0 );
139362 if( pTerm->pRight->op!=TK_ASTERISK ) return 0;
143577 Bitmask prereqRight; /* Bitmask of tables used by pExpr->pRight */
144263 ** Expression pRight, which is the RHS of a comparison operation, is
144266 ** to the pRight values. This function modifies characters within the
144273 Expr *pRight, /* RHS of comparison */
144279 Expr *p = sqlite3VectorFieldSubexpr(pRight, i);
144415 iReg = sqlite3ExprCodeTarget(pParse, pX->pRight, iTarget);
144664 Expr *pRight = pTerm->pExpr->pRight;
144665 if( (pTerm->wtFlags & TERM_IS)==0 && sqlite3ExprCanBeNull(pRight) ){
144670 if( sqlite3CompareAffinity(pRight, zAff[j])==SQLITE_AFF_BLOB ){
144673 if( sqlite3ExprNeedsNoAffinityChange(pRight, zAff[j]) ){
145175 pTruth = pTruth->pRight;
145301 Expr *pRight = pTerm->pExpr->pRight;
145302 codeExprOrVector(pParse, pRight, iTarget, 1);
145328 Expr *pRight; /* RHS of the comparison */
145352 pCompare->pRight = pRight = sqlite3Expr(db, TK_REGISTER, 0);
145353 if( pRight ){
145354 pRight->iTable = iReg+j+2;
145442 if( sqlite3ExprIsVector(pX->pRight) ){
145444 codeExprOrVector(pParse, pX->pRight, r1, 1);
145455 r1 = sqlite3ExprCodeTemp(pParse, pX->pRight, &rTemp);
145479 codeExprOrVector(pParse, pX->pRight, memEndValue, 1);
145480 if( 0==sqlite3ExprIsVector(pX->pRight)
145487 if( 0==sqlite3ExprIsVector(pX->pRight) ){
145682 Expr *pRight = pRangeStart->pExpr->pRight;
145683 codeExprOrVector(pParse, pRight, regBase+nEq, nBtm);
145686 && sqlite3ExprCanBeNull(pRight)
145692 updateRangeAffinityStr(pRight, nBtm, &zStartAff[nEq]);
145696 if( sqlite3ExprIsVector(pRight)==0 ){
145771 Expr *pRight = pRangeEnd->pExpr->pRight;
145772 codeExprOrVector(pParse, pRight, regBase+nEq, nTop);
145775 && sqlite3ExprCanBeNull(pRight)
145781 updateRangeAffinityStr(pRight, nTop, zEndAff);
145789 if( sqlite3ExprIsVector(pRight)==0 ){
146519 || pExpr->pRight->op==TK_VECTOR
146520 || sqlite3BinaryCompareCollSeq(pParse, pExpr->pLeft, pExpr->pRight) !=
146521 sqlite3BinaryCompareCollSeq(pParse, pExpr->pRight, pExpr->pLeft)
146525 SWAP(Expr*,pExpr->pRight,pExpr->pLeft);
146586 Expr *pRight, *pLeft; /* Right and left size of LIKE operator */
146593 int op; /* Opcode of pRight */
146605 pRight = sqlite3ExprSkipCollate(pList->a[0].pExpr);
146606 op = pRight->op;
146609 int iCol = pRight->iColumn;
146615 assert( pRight->op==TK_VARIABLE || pRight->op==TK_REGISTER );
146617 z = (u8*)pRight->u.zToken;
146697 sqlite3VdbeSetVarmask(v, pRight->iColumn);
146698 if( *pisComplete && pRight->u.zToken[1] ){
146706 sqlite3ExprCodeTarget(pParse, pRight, r1);
146830 Expr *pRight = pExpr->pRight;
146835 testcase( pRight && pRight->op==TK_COLUMN && pRight->y.pTab==0 );
146836 if( pRight && ExprIsVtab(pRight) ){
146838 SWAP(Expr*, pLeft, pRight);
146841 *ppRight = pRight;
146923 assert( pOne->pExpr->pLeft!=0 && pOne->pExpr->pRight!=0 );
146924 assert( pTwo->pExpr->pLeft!=0 && pTwo->pExpr->pRight!=0 );
146926 if( sqlite3ExprCompare(0,pOne->pExpr->pRight, pTwo->pExpr->pRight,-1) )return;
147238 affRight = sqlite3ExprAffinity(pOrTerm->pExpr->pRight);
147264 pDup = sqlite3ExprDup(db, pOrTerm->pExpr->pRight, 0);
147311 aff2 = sqlite3ExprAffinity(pExpr->pRight);
147319 return sqlite3ExprCollSeqMatch(pParse, pExpr->pLeft, pExpr->pRight);
147505 if( exprExistsToInIter(p, &pExpr->pRight) ) return 1;
147509 int bRight = exprUsesSrclist(p->pSrc, pExpr->pRight, 0);
147512 p->pInLhs = bLeft ? pExpr->pLeft : pExpr->pRight;
147640 pRet = pEq->pRight;
147659 pEq->pRight = 0;
147662 Expr *pOther = (pAnd->pLeft==pEq) ? pAnd->pRight : pAnd->pLeft;
147663 pAnd->pLeft = pAnd->pRight = 0;
147735 assert( pExpr->pRight==0 );
147745 pTerm->prereqRight = sqlite3WhereExprUsage(pMaskSet, pExpr->pRight);
147767 Expr *pRight = sqlite3ExprSkipCollate(pExpr->pRight);
147782 if( pRight
147783 && exprMightBeIndexed(pSrc, pTerm->prereqRight, aiCurCol, pRight, op)
148017 && sqlite3ExprVectorSize(pExpr->pRight)==nLeft
148019 || (pExpr->pRight->flags & EP_xIsSelect)==0)
148027 Expr *pRight = sqlite3ExprForVectorField(pParse, pExpr->pRight, i);
148029 pNew = sqlite3PExpr(pParse, pExpr->op, pLeft, pRight);
148078 Expr *pRight = 0, *pLeft = 0;
148079 int res = isAuxiliaryVtabOperator(db, pExpr, &eOp2, &pLeft, &pRight);
148085 prereqExpr = sqlite3WhereExprUsage(pMaskSet, pRight);
148090 0, sqlite3ExprDup(db, pRight, 0));
148108 SWAP(Expr*, pLeft, pRight);
148152 sqlite3WhereSplit(pWC, pE2->pRight, op);
148211 if( p->pRight ){
148212 mask |= sqlite3WhereExprUsageNN(pMaskSet, p->pRight);
148571 p = sqlite3ExprSkipCollateAndLikely(p->pRight);
148638 && (pX = pTerm->pExpr->pRight)->op==TK_COLUMN
149360 && sqlite3ExprIsVector(pTerm->pExpr->pRight)
149713 rc = sqlite3Stat4ValueFromExpr(pParse, pLower->pExpr->pRight, aff, &p1);
149717 rc = sqlite3Stat4ValueFromExpr(pParse, pUpper->pExpr->pRight, aff, &p2);
149879 Expr *pExpr = pLower->pExpr->pRight;
149896 Expr *pExpr = pUpper->pExpr->pRight;
150647 Expr *pRight = pTerm->pExpr->pRight;
150650 if( sqlite3ExprIsInteger(pRight, &k) && k>=(-1) && k<=1 ){
150701 Expr *pRhs = pTerm->pExpr->pRight;
151000 rc = whereEqualScanEst(pParse, pBuilder, pExpr->pRight, &nOut);
151185 pWhere = pWhere->pRight;
157157 p->pLeft = p->pRight = 0;
157187 sqlite3ExprDelete(db, pA->pRight);
157188 pA->pRight = 0;
160885 Select *pRight, *pLeft = yymsp[-4].minor.yy307;
160886 pRight = sqlite3SelectNew(pParse,yymsp[-1].minor.yy338,0,0,0,0,0,SF_Values|SF_MultiValue,0);
160888 if( pRight ){
160889 pRight->op = TK_ALL;
160890 pRight->pPrior = pLeft;
160891 yymsp[-4].minor.yy307 = pRight;
160926 Expr *pRight = sqlite3PExpr(pParse, TK_ASTERISK, 0, 0);
160928 Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);
170099 Fts3Expr *pParent; /* pParent->pLeft==this or pParent->pRight==this */
170101 Fts3Expr *pRight; /* Right operand */
174180 fts3EvalAllocateReaders(pCsr, pExpr->pRight, pnToken, pnOr, pRc);
174222 char *pRight;
174230 pRight = pList;
174234 pRight = p->doclist.aAll;
174242 pTab->bDescIdx, nDiff, pLeft, nLeft, &pRight, &nRight
174245 p->doclist.aAll = pRight;
174833 fts3EvalStartReaders(pCsr, pExpr->pRight, pRc);
174834 pExpr->bDeferred = (pExpr->pLeft->bDeferred && pExpr->pRight->bDeferred);
174894 assert( pExpr->pLeft && pExpr->pRight );
174902 pRoot = pExpr->pRight;
174906 fts3EvalTokenCosts(pCsr, pRoot, pExpr->pRight, ppTC, ppOr, pRc);
175287 Fts3Expr *pRight = pExpr->pRight;
175288 assert( !pLeft->bDeferred || !pRight->bDeferred );
175293 fts3EvalNextRow(pCsr, pRight, pRc);
175294 pExpr->iDocid = pRight->iDocid;
175295 pExpr->bEof = pRight->bEof;
175296 }else if( pRight->bDeferred ){
175305 fts3EvalNextRow(pCsr, pRight, pRc);
175306 while( !pLeft->bEof && !pRight->bEof && *pRc==SQLITE_OK ){
175307 sqlite3_int64 iDiff = DOCID_CMP(pLeft->iDocid, pRight->iDocid);
175312 fts3EvalNextRow(pCsr, pRight, pRc);
175316 pExpr->bEof = (pLeft->bEof || pRight->bEof);
175318 assert( pRight->eType==FTSQUERY_PHRASE );
175319 if( pRight->pPhrase->doclist.aAll ){
175320 Fts3Doclist *pDl = &pRight->pPhrase->doclist;
175321 while( *pRc==SQLITE_OK && pRight->bEof==0 ){
175323 fts3EvalNextRow(pCsr, pRight, pRc);
175333 pRight->bEof = pLeft->bEof = 1;
175341 Fts3Expr *pRight = pExpr->pRight;
175342 sqlite3_int64 iCmp = DOCID_CMP(pLeft->iDocid, pRight->iDocid);
175344 assert( pLeft->bStart || pLeft->iDocid==pRight->iDocid );
175345 assert( pRight->bStart || pLeft->iDocid==pRight->iDocid );
175347 if( pRight->bEof || (pLeft->bEof==0 && iCmp<0) ){
175350 fts3EvalNextRow(pCsr, pRight, pRc);
175353 fts3EvalNextRow(pCsr, pRight, pRc);
175356 pExpr->bEof = (pLeft->bEof && pRight->bEof);
175357 iCmp = DOCID_CMP(pLeft->iDocid, pRight->iDocid);
175358 if( pRight->bEof || (pLeft->bEof==0 && iCmp<0) ){
175361 pExpr->iDocid = pRight->iDocid;
175369 Fts3Expr *pRight = pExpr->pRight;
175371 if( pRight->bStart==0 ){
175372 fts3EvalNextRow(pCsr, pRight, pRc);
175373 assert( *pRc!=SQLITE_OK || pRight->bStart );
175379 && !pRight->bEof
175380 && DOCID_CMP(pLeft->iDocid, pRight->iDocid)>0
175382 fts3EvalNextRow(pCsr, pRight, pRc);
175449 assert( p->pRight->pPhrase->doclist.nList>0 );
175450 nTmp += p->pRight->pPhrase->doclist.nList;
175462 Fts3Phrase *pPhrase = p->pRight->pPhrase;
175467 aPoslist = pExpr->pRight->pPhrase->doclist.pList;
175468 nToken = pExpr->pRight->pPhrase->nToken;
175475 p->eType==FTSQUERY_NEAR ? p->pRight->pPhrase : p->pPhrase
175510 && fts3EvalTestExpr(pCsr, pExpr->pRight, pRc)
175535 if( p->pRight->iDocid==pCsr->iPrevId ){
175536 fts3EvalInvalidatePoslist(p->pRight->pPhrase);
175548 int bHit2 = fts3EvalTestExpr(pCsr, pExpr->pRight, pRc);
175556 && !fts3EvalTestExpr(pCsr, pExpr->pRight, pRc)
175714 fts3EvalRestart(pCsr, pExpr->pRight, pRc);
175753 fts3EvalUpdateCounts(pExpr->pRight, nCol);
175795 Fts3Expr *pE = (p->eType==FTSQUERY_PHRASE?p:p->pRight);
175997 if( pTest->eType==FTSQUERY_NEAR ) pTest = pTest->pRight;
177251 assert( pSplit->pParent->pRight==pSplit );
177252 pSplit->pParent->pRight = pNew;
177306 pNot->pRight = p;
177364 assert( pPrev && pPrev->pLeft && pPrev->pRight==0 );
177365 pPrev->pRight = p;
177428 rc = fts3ExprCheckDepth(p->pRight, nMaxDepth-1);
177473 assert( p->pLeft && p->pRight );
177498 pFree->pRight = p;
177500 pFree->pRight->pParent = pFree;
177518 for(p=pParent->pRight; p->eType==eType; p=p->pLeft);
177522 pParent->pRight->pParent = pParent->pParent;
177524 pParent->pParent->pLeft = pParent->pRight;
177527 pRoot = pParent->pRight;
177545 pFree->pRight = p;
177548 pFree->pRight->pParent = pFree;
177576 Fts3Expr *pRight = pRoot->pRight;
177579 pRoot->pRight = 0;
177581 pRight->pParent = 0;
177585 rc = fts3ExprBalance(&pRight, nMaxDepth-1);
177589 sqlite3Fts3ExprFree(pRight);
177592 assert( pLeft && pRight );
177595 pRoot->pRight = pRight;
177596 pRight->pParent = pRoot;
177744 for(p=pDel; p && (p->pLeft||p->pRight); p=(p->pLeft ? p->pLeft : p->pRight)){
177745 assert( p->pParent==0 || p==p->pParent->pRight || p==p->pParent->pLeft );
177750 if( pParent && p==pParent->pLeft && pParent->pRight ){
177751 p = pParent->pRight;
177752 while( p && (p->pLeft || p->pRight) ){
177753 assert( p==p->pParent->pRight || p==p->pParent->pLeft );
177754 p = (p->pLeft ? p->pLeft : p->pRight);
177818 if( zBuf ) zBuf = exprToString(pExpr->pRight, zBuf);
180444 SegmentNode *pRight; /* Pointer to right-sibling */
182338 pTree->pRight = pNew;
182404 for(pIter=pTree->pLeftmost; pIter && rc==SQLITE_OK; pIter=pIter->pRight){
182431 SegmentNode *pRight = p->pRight;
182435 assert( pRight==0 || p->zMalloc==0 );
182438 p = pRight;
186281 assert( pExpr->pLeft && pExpr->pRight );
186284 rc = fts3ExprIterate2(pExpr->pRight, piPhrase, x, pCtx);
186930 assert( (pExpr->pLeft==0)==(pExpr->pRight==0) );
186934 if( rc==SQLITE_OK ) rc = fts3ExprLHitGather(pExpr->pRight, p);
193632 RtreeNode *pRight,
193713 RtreeNode *pTarget = (ii<iBestSplit)?pLeft:pRight;
193759 RtreeNode *pRight = 0;
193782 pRight = nodeNew(pRtree, pNode);
193789 pRight = nodeNew(pRtree, pLeft->pParent);
193793 if( !pLeft || !pRight ){
193799 memset(pRight->zData, 0, pRtree->iNodeSize);
193801 rc = splitNodeStartree(pRtree, aCell, nCell, pLeft, pRight,
193808 ** nodeWrite(). Node pRight always needs a node number, as it was created
193812 if( SQLITE_OK!=(rc = nodeWrite(pRtree, pRight))
193818 rightbbox.iRowid = pRight->iNode;
193838 if( (rc = rtreeInsertCell(pRtree, pRight->pParent, &rightbbox, iHeight+1)) ){
193842 for(i=0; i<NCELL(pRight); i++){
193843 i64 iRowid = nodeGetRowid(pRtree, pRight, i);
193844 rc = updateMapping(pRtree, iRowid, pRight, iHeight);
193865 rc = nodeRelease(pRtree, pRight);
193866 pRight = 0;
193874 nodeRelease(pRtree, pRight);
196523 static GeoEvent *geopolyEventMerge(GeoEvent *pLeft, GeoEvent *pRight){
196527 while( pRight && pLeft ){
196528 if( pRight->x <= pLeft->x ){
196529 pLast->pNext = pRight;
196530 pLast = pRight;
196531 pRight = pRight->pNext;
196538 pLast->pNext = pRight ? pRight : pLeft;
196570 static GeoSegment *geopolySegmentMerge(GeoSegment *pLeft, GeoSegment *pRight){
196574 while( pRight && pLeft ){
196575 double r = pRight->y - pLeft->y;
196576 if( r==0.0 ) r = pRight->C - pLeft->C;
196578 pLast->pNext = pRight;
196579 pLast = pRight;
196580 pRight = pRight->pNext;
196587 pLast->pNext = pRight ? pRight : pLeft;
210768 void *pRight, /* Rhs input changeset */
210780 rc = sqlite3changegroup_add(pGrp, nRight, pRight);
212522 Fts5ExprNode *pRight,
212529 Fts5ExprNode *pRight
218462 Fts5ExprNode *pRight, /* Right hand child expression */
218472 || (eType==FTS5_STRING && !pLeft && !pRight)
218475 if( eType!=FTS5_STRING && pLeft==0 ) return pRight;
218476 if( eType!=FTS5_STRING && pRight==0 ) return pLeft;
218489 if( pRight->eType==eType ) nChild += pRight->nChild-1;
218528 fts5ExprAddChildren(pRet, pRight);
218537 sqlite3Fts5ParseNodeFree(pRight);
218546 Fts5ExprNode *pRight /* Right hand child expression */
218553 sqlite3Fts5ParseNodeFree(pRight);
218561 assert( pRight->eType==FTS5_STRING
218562 || pRight->eType==FTS5_TERM
218563 || pRight->eType==FTS5_EOF
218576 if( pRight->eType==FTS5_EOF ){
218577 assert( pParse->apPhrase[pParse->nPhrase-1]==pRight->pNear->apPhrase[0] );
218578 sqlite3Fts5ParseNodeFree(pRight);
218586 pRet = pRight;
218588 pLeft->apChild[pLeft->nChild-1] = pRight;
218592 ap = &pParse->apPhrase[pParse->nPhrase-1-pRight->pNear->nPhrase];
218594 memmove(ap, &ap[1], sizeof(Fts5ExprPhrase*)*pRight->pNear->nPhrase);
218600 pRet = sqlite3Fts5ParseNode(pParse, FTS5_AND, pLeft, pRight, 0);
219637 ** Arguments pLeft and pRight point to linked-lists of hash-entry objects,
219643 Fts5HashEntry *pRight
219646 Fts5HashEntry *p2 = pRight;
220383 ** Compare the contents of the pLeft buffer with the pRight/nRight blob.
220385 ** Return -ve if pLeft is smaller than pRight, 0 if they are equal or
220386 ** +ve if pRight is smaller than pLeft. In other words:
220388 ** res = *pLeft - *pRight
220393 const u8 *pRight, int nRight /* Right hand side of comparison */
220396 int res = memcmp(pLeft->p, pRight, nCmp);
220405 ** Return -ve if pLeft is smaller than pRight, 0 if they are equal or
220406 ** +ve if pRight is smaller than pLeft. In other words:
220408 ** res = *pLeft - *pRight
220410 static int fts5BufferCompare(Fts5Buffer *pLeft, Fts5Buffer *pRight){
220411 int nCmp = MIN(pLeft->n, pRight->n);
220412 int res = fts5Memcmp(pLeft->p, pRight->p, nCmp);
220413 return (res==0 ? (pLeft->n - pRight->n) : res);