Lines Matching defs:pRight
18257 ** Expr.pRight and Expr.pLeft are the left and right subexpressions of a
18299 ** the child Expr objects in the Expr.pLeft and Expr.pRight subtrees
18326 Expr *pRight; /* Right subnode */
18396 #define EP_Leaf 0x800000 /* Expr.pLeft, .pRight, .u.pSelect all NULL */
31669 sqlite3TreeViewExpr(pView, p->pLimit->pLeft, p->pLimit->pRight!=0);
31670 if( p->pLimit->pRight ){
31672 sqlite3TreeViewExpr(pView, p->pLimit->pRight, 0);
31966 assert( pExpr->pRight );
31967 assert( sqlite3ExprSkipCollate(pExpr->pRight)->op==TK_TRUEFALSE );
31968 x = (pExpr->op2==TK_ISNOT)*2 + sqlite3ExprTruthValue(pExpr->pRight);
32135 sqlite3TreeViewExpr(pView, pExpr->pRight, 0);
32148 pExpr->pRight==pExpr->pLeft ? " (SELECT-owner)" : "");
32183 sqlite3TreeViewExpr(pView, pExpr->pRight, 0);
54899 ** objects. In that alternative use, pRight points to the next entry
54905 struct RowSetEntry *pRight; /* Right subtree (larger entries) or list */
54928 struct RowSetEntry *pEntry; /* List of entries using pRight */
55037 pEntry->pRight = 0;
55045 pLast->pRight = pEntry;
55055 ** The input lists are connected via pRight pointers and are
55068 assert( pA->pRight==0 || pA->v<=pA->pRight->v );
55069 assert( pB->pRight==0 || pB->v<=pB->pRight->v );
55071 if( pA->v<pB->v ) pTail = pTail->pRight = pA;
55072 pA = pA->pRight;
55074 pTail->pRight = pB;
55078 pTail = pTail->pRight = pB;
55079 pB = pB->pRight;
55081 pTail->pRight = pA;
55086 return head.pRight;
55099 pNext = pIn->pRight;
55100 pIn->pRight = 0;
55119 ** Convert this tree into a linked list connected by the pRight pointers
55131 p->pRight = pIn;
55135 if( pIn->pRight ){
55136 rowSetTreeToList(pIn->pRight, &pIn->pRight, ppLast);
55140 assert( (*ppLast)->pRight==0 );
55145 ** Convert a sorted list of elements (connected by pRight) into a binary
55179 *ppList = p->pRight;
55180 p->pRight = rowSetNDeepTree(ppList, iDepth-1);
55183 *ppList = p->pRight;
55184 p->pLeft = p->pRight = 0;
55200 pList = p->pRight;
55201 p->pLeft = p->pRight = 0;
55205 pList = p->pRight;
55207 p->pRight = rowSetNDeepTree(&pList, iDepth);
55240 p->pEntry = p->pEntry->pRight;
55276 for(pTree = pRowSet->pForest; pTree; pTree=pTree->pRight){
55277 ppPrevTree = &pTree->pRight;
55292 pTree->pRight = 0;
55306 for(pTree = pRowSet->pForest; pTree; pTree=pTree->pRight){
55310 p = p->pRight;
76522 u8 *pRight; /* Location in parent of right-sibling pointer */
76579 pRight = &pParent->aData[pParent->hdrOffset+8];
76581 pRight = findCell(pParent, i+nxDiv-pParent->nOverflow);
76583 pgno = get4byte(pRight);
77006 put4byte(pRight, apNew[nNew-1]->pgno);
84268 if( pExpr->pRight ){
84270 displayP4Expr(p, pExpr->pRight);
103487 assert( pExpr->x.pList==0 || pExpr->pRight==0 );
103489 if( pExpr->pRight ){
103491 pExpr = pExpr->pRight;
103895 ** pExpr->pRight Any expression this points to is deleted.
104254 assert( pExpr->pLeft==0 && pExpr->pRight==0 );
104354 sqlite3ExprDelete(db, pExpr->pRight);
104355 pExpr->pRight = 0;
104386 sqlite3ExprDelete(db, pExpr->pRight);
104387 pExpr->pRight = 0;
104626 Expr *pRight;
104639 pRight = pExpr->pRight;
104640 if( pRight->op==TK_ID ){
104643 assert( pRight->op==TK_DOT );
104644 assert( !ExprHasProperty(pRight, EP_IntValue) );
104646 pLeft = pRight->pLeft;
104647 pRight = pRight->pRight;
104649 assert( ExprUseUToken(pLeft) && ExprUseUToken(pRight) );
104651 zColumn = pRight->u.zToken;
104654 sqlite3RenameTokenRemap(pParse, (void*)pExpr, (void*)pRight);
104921 Expr *pRight = sqlite3ExprSkipCollateAndLikely(pExpr->pRight);
104925 if( ALWAYS(pRight) && (pRight->op==TK_ID || pRight->op==TK_TRUEFALSE) ){
104926 int rc = resolveExprStep(pWalker, pRight);
104928 if( pRight->op==TK_TRUEFALSE ){
104954 assert( pExpr->pRight!=0 );
104955 nRight = sqlite3ExprVectorSize(pExpr->pRight);
106017 Expr *pNext = p->pRight;
106018 /* The Expr.x union is never used at the same time as Expr.pRight */
106020 assert( p->x.pList==0 || p->pRight==0 );
106102 if( pExpr->pRight ){
106103 aff = sqlite3CompareAffinity(pExpr->pRight, aff);
106145 ** a binary comparison operator comparing pLeft and pRight.
106152 ** Argument pRight (but not pLeft) may be a null pointer. In this case,
106158 const Expr *pRight
106164 }else if( pRight && (pRight->flags & EP_Collate)!=0 ){
106165 pColl = sqlite3ExprCollSeq(pParse, pRight);
106169 pColl = sqlite3ExprCollSeq(pParse, pRight);
106185 return sqlite3BinaryCompareCollSeq(pParse, p->pRight, p->pLeft);
106187 return sqlite3BinaryCompareCollSeq(pParse, p->pLeft, p->pRight);
106197 Expr *pRight, /* The right operand */
106210 p4 = sqlite3BinaryCompareCollSeq(pParse, pRight, pLeft);
106212 p4 = sqlite3BinaryCompareCollSeq(pParse, pLeft, pRight);
106214 p5 = binaryCompareP5(pLeft, pRight, jumpIfNull);
106302 ** the returned Expr object is to attach the pVector to the pRight field
106317 ** pRight: not used. But recursively deleted.
106324 ** pLeft on TK_SELECT_COLUMN nodes. But pRight is followed, so pVector
106325 ** can be attached to pRight to cause this node to take ownership of
106436 Expr *pRight = pExpr->pRight;
106448 if( nLeft!=sqlite3ExprVectorSize(pRight) ){
106467 regRight = exprCodeSubselect(pParse, pRight);
106477 r2 = exprVectorRegister(pParse, pRight, i, regRight, &pR, ®Free2);
106582 if( NEVER(p->pRight) && p->pRight->nHeight>nHeight ){
106583 nHeight = p->pRight->nHeight;
106711 ** Attach subtrees pLeft and pRight to the Expr node pRoot.
106714 ** In that case, delete the subtrees pLeft and pRight.
106720 Expr *pRight
106725 sqlite3ExprDelete(db, pRight);
106729 if( pRight ){
106730 pRoot->pRight = pRight;
106731 pRoot->flags |= EP_Propagate & pRight->flags;
106733 pRoot->nHeight = pRight->nHeight+1;
106761 Expr *pRight /* Right operand */
106769 sqlite3ExprAttachSubtrees(pParse->db, p, pLeft, pRight);
106773 sqlite3ExprDelete(pParse->db, pRight);
106859 SQLITE_PRIVATE Expr *sqlite3ExprAnd(Parse *pParse, Expr *pLeft, Expr *pRight){
106862 return pRight;
106863 }else if( pRight==0 ){
106865 }else if( (ExprAlwaysFalse(pLeft) || ExprAlwaysFalse(pRight))
106869 sqlite3ExprDeferredDelete(pParse, pRight);
106872 return sqlite3PExpr(pParse, TK_AND, pLeft, pRight);
107040 assert( p->pRight==0 );
107046 /* The Expr.x union is never used at the same time as Expr.pRight */
107047 assert( (ExprUseXList(p) && p->x.pList==0) || p->pRight==0 );
107049 if( p->pRight ){
107051 sqlite3ExprDeleteNN(db, p->pRight);
107176 assert( p->pRight==0 );
107206 ** and Expr.pRight variables (but not for any structures pointed to or
107214 nByte += dupedExprSize(p->pLeft, flags) + dupedExprSize(p->pRight, flags);
107224 ** (if applicable), and the copies of the p->pLeft and p->pRight expressions,
107298 /* Fill in pNew->pLeft and pNew->pRight. */
107304 pNew->pRight = p->pRight ?
107305 exprDup(db, p->pRight, EXPRDUP_REDUCE, &zAlloc) : 0;
107320 assert( p->pRight==0 || p->pRight==p->pLeft
107325 pNew->pRight = sqlite3ExprDup(db, p->pRight, 0);
107437 if( pNewExpr->pRight ){
107438 pPriorSelectColOld = pOldExpr->pRight;
107439 pPriorSelectColNew = pNewExpr->pRight;
107440 pNewExpr->pLeft = pNewExpr->pRight;
107445 pNewExpr->pRight = pPriorSelectColNew;
107717 /* Store the SELECT statement in pRight so it will be deleted when
107719 pFirst->pRight = pExpr;
107954 Expr *pRight = sqlite3ExprSimplifiedAndOr(pExpr->pRight);
107956 if( ExprAlwaysTrue(pLeft) || ExprAlwaysFalse(pRight) ){
107957 pExpr = pExpr->op==TK_AND ? pRight : pLeft;
107958 }else if( ExprAlwaysTrue(pRight) || ExprAlwaysFalse(pLeft) ){
107959 pExpr = pExpr->op==TK_AND ? pLeft : pRight;
110137 r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, ®Free2);
110139 codeCompare(pParse, pLeft, pExpr->pRight, op, r1, r2,
110182 r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, ®Free2);
110226 isTrue = sqlite3ExprTruthValue(pExpr->pRight);
110632 opCompare.pRight = aListelem[i].pExpr;
110956 exprAnd.pRight = &compRight;
110959 compLeft.pRight = pExpr->x.pList->a[0].pExpr;
110962 compRight.pRight = pExpr->x.pList->a[1].pExpr;
111028 sqlite3ExprIfTrue(pParse, pExpr->pRight, dest, jumpIfNull);
111033 sqlite3ExprIfTrue(pParse, pExpr->pRight, dest, jumpIfNull);
111047 isTrue = sqlite3ExprTruthValue(pExpr->pRight);
111075 r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, ®Free2);
111076 codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
111200 sqlite3ExprIfFalse(pParse, pExpr->pRight, dest, jumpIfNull);
111206 sqlite3ExprIfFalse(pParse, pExpr->pRight, dest, jumpIfNull);
111221 isTrue = sqlite3ExprTruthValue(pExpr->pRight);
111252 r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, ®Free2);
111253 codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
111469 if( sqlite3ExprCompare(pParse, pA->pRight, pB->pRight, iTab) ) return 2;
111583 if( exprImpliesNotNull(pParse, p->pRight, pNN, iTab, seenNot) ) return 1;
111641 || sqlite3ExprImpliesExpr(pParse, pE1, pE2->pRight, iTab) )
111700 sqlite3WalkExpr(pWalker, pExpr->pRight);
111722 Expr *pRight = pExpr->pRight;
111732 assert( pRight->op!=TK_COLUMN || ExprUseYTab(pRight) );
111736 || (pRight->op==TK_COLUMN
111737 && ALWAYS(pRight->y.pTab!=0)
111738 && IsVirtual(pRight->y.pTab))
111780 p = p->pRight;
127709 Expr *pRight; /* Column ref to child table */
127710 Expr *pEq; /* Expression (pLeft = pRight) */
127719 pRight = sqlite3Expr(db, TK_ID, zCol);
127720 pEq = sqlite3PExpr(pParse, TK_EQ, pLeft, pRight);
127739 Expr *pNe; /* Expression (pLeft != pRight) */
127741 Expr *pRight; /* Column ref to child table */
127744 pRight = exprTableColumn(db, pTab, pSrc->a[0].iCursor, -1);
127745 pNe = sqlite3PExpr(pParse, TK_NE, pLeft, pRight);
127753 pRight = sqlite3Expr(db, TK_ID, pTab->aCol[iCol].zCnName);
127754 pEq = sqlite3PExpr(pParse, TK_IS, pLeft, pRight);
138634 p = p->pRight;
138671 p = p->pRight;
138700 SrcItem *pRight; /* Right table being joined */
138704 pRight = &pLeft[1];
138705 for(i=0; i<pSrc->nSrc-1; i++, pRight++, pLeft++){
138706 Table *pRightTab = pRight->pTab;
138710 joinType = (pRight->fg.jointype & JT_OUTER)!=0 ? EP_OuterON : EP_InnerON;
138715 if( pRight->fg.jointype & JT_NATURAL ){
138717 if( pRight->fg.isUsing || pRight->u3.pOn ){
138737 pRight->fg.isUsing = 1;
138738 pRight->fg.isSynthUsing = 1;
138739 pRight->u3.pUsing = pUsing;
138751 if( pRight->fg.isUsing ){
138752 IdList *pList = pRight->u3.pUsing;
138768 pRight->fg.isSynthUsing)==0
138793 pRight->fg.isSynthUsing)!=0 ){
138811 sqlite3SrcItemColumnUsed(pRight, iRightCol);
138827 else if( pRight->u3.pOn ){
138828 sqlite3SetJoinExpr(pRight->u3.pOn, pRight->iCursor, joinType);
138829 p->pWhere = sqlite3ExprAnd(pParse, p->pWhere, pRight->u3.pOn);
138830 pRight->u3.pOn = 0;
138831 pRight->fg.isOn = 1;
140454 pColExpr = pColExpr->pRight;
140633 ** pLimit expressions. pLimit->pLeft and pLimit->pRight hold the expressions
140641 ** a limit or offset is defined by pLimit->pLeft and pLimit->pRight. iLimit
140690 if( pLimit->pRight ){
140693 sqlite3ExprCode(pParse, pLimit->pRight, iOffset);
142052 assert( pExpr->pRight==0 );
142108 pExpr->pRight = substExpr(pSubst, pExpr->pRight);
142522 if( pSub->pLimit && pSub->pLimit->pRight ) return 0; /* Restriction (14) */
142990 Expr *pRight, *pLeft;
142998 findConstInWhere(pConst, pExpr->pRight);
143003 pRight = pExpr->pRight;
143005 assert( pRight!=0 );
143007 if( pRight->op==TK_COLUMN && sqlite3ExprIsConstant(pLeft) ){
143008 constInsert(pConst,pRight,pLeft,pExpr);
143010 if( pLeft->op==TK_COLUMN && sqlite3ExprIsConstant(pRight) ){
143011 constInsert(pConst,pLeft,pRight,pExpr);
143087 propagateConstantExprRewriteOne(pConst, pExpr->pRight, 0);
143336 nChng += pushDownWhereTerms(pParse, pSubq, pWhere->pRight, pSrc);
143980 Expr *pE, *pRight, *pExpr;
144116 assert( pE->op!=TK_DOT || pE->pRight!=0 );
144118 if( pE->op==TK_DOT && pE->pRight->op==TK_ASTERISK ) break;
144136 pRight = pE->pRight;
144137 assert( pE->op!=TK_DOT || pRight!=0 );
144139 && (pE->op!=TK_DOT || pRight->op!=TK_ASTERISK)
144194 pRight = sqlite3Expr(db, TK_ID, zUName);
144195 pNew = sqlite3ExprListAppend(pParse, pNew, pRight);
144245 pRight = sqlite3Expr(db, TK_ID, zName);
144256 pExpr = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);
144265 pExpr = pRight;
147260 assert( pTerm->pRight!=0 );
147262 if( pTerm->pRight->op!=TK_ASTERISK ) return 0;
151591 Bitmask prereqRight; /* Bitmask of tables used by pExpr->pRight */
152341 ** Expression pRight, which is the RHS of a comparison operation, is
152344 ** to the pRight values. This function modifies characters within the
152351 Expr *pRight, /* RHS of comparison */
152357 Expr *p = sqlite3VectorFieldSubexpr(pRight, i);
152500 iReg = sqlite3ExprCodeTarget(pParse, pX->pRight, iTarget);
152776 Expr *pRight = pTerm->pExpr->pRight;
152777 if( (pTerm->wtFlags & TERM_IS)==0 && sqlite3ExprCanBeNull(pRight) ){
152783 if( sqlite3CompareAffinity(pRight, zAff[j])==SQLITE_AFF_BLOB ){
152786 if( sqlite3ExprNeedsNoAffinityChange(pRight, zAff[j]) ){
153162 pTruth = pTruth->pRight;
153361 Expr *pRight = pTerm->pExpr->pRight;
153362 codeExprOrVector(pParse, pRight, iTarget, 1);
153400 Expr *pRight; /* RHS of the comparison */
153436 pCompare->pRight = pRight = sqlite3Expr(db, TK_REGISTER, 0);
153437 if( pRight ){
153438 pRight->iTable = iReg+j+2;
153531 if( sqlite3ExprIsVector(pX->pRight) ){
153533 codeExprOrVector(pParse, pX->pRight, r1, 1);
153544 r1 = sqlite3ExprCodeTemp(pParse, pX->pRight, &rTemp);
153568 codeExprOrVector(pParse, pX->pRight, memEndValue, 1);
153569 if( 0==sqlite3ExprIsVector(pX->pRight)
153576 if( 0==sqlite3ExprIsVector(pX->pRight) ){
153769 Expr *pRight = pRangeStart->pExpr->pRight;
153770 codeExprOrVector(pParse, pRight, regBase+nEq, nBtm);
153773 && sqlite3ExprCanBeNull(pRight)
153779 updateRangeAffinityStr(pRight, nBtm, &zStartAff[nEq]);
153783 if( sqlite3ExprIsVector(pRight)==0 ){
153870 Expr *pRight = pRangeEnd->pExpr->pRight;
153881 codeExprOrVector(pParse, pRight, regBase+nEq, nTop);
153884 && sqlite3ExprCanBeNull(pRight)
153890 updateRangeAffinityStr(pRight, nTop, zEndAff);
153898 if( sqlite3ExprIsVector(pRight)==0 ){
154810 || pExpr->pRight->op==TK_VECTOR
154811 || sqlite3BinaryCompareCollSeq(pParse, pExpr->pLeft, pExpr->pRight) !=
154812 sqlite3BinaryCompareCollSeq(pParse, pExpr->pRight, pExpr->pLeft)
154816 SWAP(Expr*,pExpr->pRight,pExpr->pLeft);
154877 Expr *pRight, *pLeft; /* Right and left size of LIKE operator */
154884 int op; /* Opcode of pRight */
154897 pRight = sqlite3ExprSkipCollate(pList->a[0].pExpr);
154898 op = pRight->op;
154901 int iCol = pRight->iColumn;
154907 assert( pRight->op==TK_VARIABLE || pRight->op==TK_REGISTER );
154909 assert( !ExprHasProperty(pRight, EP_IntValue) );
154910 z = (u8*)pRight->u.zToken;
154994 sqlite3VdbeSetVarmask(v, pRight->iColumn);
154995 assert( !ExprHasProperty(pRight, EP_IntValue) );
154996 if( *pisComplete && pRight->u.zToken[1] ){
155004 sqlite3ExprCodeTarget(pParse, pRight, r1);
155132 Expr *pRight = pExpr->pRight;
155137 assert( pRight==0 || pRight->op!=TK_COLUMN
155138 || (ExprUseYTab(pRight) && pRight->y.pTab!=0) );
155139 if( pRight && ExprIsVtab(pRight) ){
155141 SWAP(Expr*, pLeft, pRight);
155144 *ppRight = pRight;
155226 assert( pOne->pExpr->pLeft!=0 && pOne->pExpr->pRight!=0 );
155227 assert( pTwo->pExpr->pLeft!=0 && pTwo->pExpr->pRight!=0 );
155229 if( sqlite3ExprCompare(0,pOne->pExpr->pRight, pTwo->pExpr->pRight,-1) )return;
155543 affRight = sqlite3ExprAffinity(pOrTerm->pExpr->pRight);
155570 pDup = sqlite3ExprDup(db, pOrTerm->pExpr->pRight, 0);
155617 aff2 = sqlite3ExprAffinity(pExpr->pRight);
155625 return sqlite3ExprCollSeqMatch(pParse, pExpr->pLeft, pExpr->pRight);
155779 assert( pExpr->pRight==0 );
155788 pTerm->prereqRight = sqlite3WhereExprUsage(pMaskSet, pExpr->pRight);
155839 Expr *pRight = sqlite3ExprSkipCollate(pExpr->pRight);
155856 if( pRight
155857 && exprMightBeIndexed(pSrc, pTerm->prereqRight, aiCurCol, pRight, op)
155858 && !ExprHasProperty(pRight, EP_FixedCol)
156097 && sqlite3ExprVectorSize(pExpr->pRight)==nLeft
156099 || (pExpr->pRight->flags & EP_xIsSelect)==0)
156107 Expr *pRight = sqlite3ExprForVectorField(pParse, pExpr->pRight, i, nLeft);
156109 pNew = sqlite3PExpr(pParse, pExpr->op, pLeft, pRight);
156159 Expr *pRight = 0, *pLeft = 0;
156160 int res = isAuxiliaryVtabOperator(db, pExpr, &eOp2, &pLeft, &pRight);
156166 prereqExpr = sqlite3WhereExprUsage(pMaskSet, pRight);
156171 0, sqlite3ExprDup(db, pRight, 0));
156189 SWAP(Expr*, pLeft, pRight);
156233 sqlite3WhereSplit(pWC, pE2->pRight, op);
156338 whereAddLimitExpr(pWC, p->iOffset, p->pLimit->pRight,
156437 if( p->pRight ){
156438 mask |= sqlite3WhereExprUsageNN(pMaskSet, p->pRight);
156848 p = sqlite3ExprSkipCollateAndLikely(p->pRight);
156919 && (pX = pTerm->pExpr->pRight, ALWAYS(pX!=0))
157881 && sqlite3ExprIsVector(pTerm->pExpr->pRight)
158261 rc = sqlite3Stat4ValueFromExpr(pParse, pLower->pExpr->pRight, aff, &p1);
158265 rc = sqlite3Stat4ValueFromExpr(pParse, pUpper->pExpr->pRight, aff, &p2);
158427 Expr *pExpr = pLower->pExpr->pRight;
158444 Expr *pExpr = pUpper->pExpr->pRight;
159222 Expr *pRight = pTerm->pExpr->pRight;
159225 if( sqlite3ExprIsInteger(pRight, &k) && k>=(-1) && k<=1 ){
159281 pRhs = pTerm->pExpr->pRight;
159593 rc = whereEqualScanEst(pParse, pBuilder, pExpr->pRight, &nOut);
159783 pWhere = pWhere->pRight;
160468 pH->pParse->db, pTerm->pExpr->pRight, ENC(pH->pParse->db),
166396 p->pLeft = p->pRight = 0;
166427 sqlite3ExprDelete(db, pA->pRight);
166428 pA->pRight = 0;
170190 Select *pRight, *pLeft = yymsp[-4].minor.yy47;
170191 pRight = sqlite3SelectNew(pParse,yymsp[-1].minor.yy322,0,0,0,0,0,SF_Values|SF_MultiValue,0);
170193 if( pRight ){
170194 pRight->op = TK_ALL;
170195 pRight->pPrior = pLeft;
170196 yymsp[-4].minor.yy47 = pRight;
170231 Expr *pRight = sqlite3PExpr(pParse, TK_ASTERISK, 0, 0);
170233 Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);
179735 Fts3Expr *pParent; /* pParent->pLeft==this or pParent->pRight==this */
179737 Fts3Expr *pRight; /* Right operand */
183831 fts3EvalAllocateReaders(pCsr, pExpr->pRight, pnToken, pnOr, pRc);
183873 char *pRight;
183881 pRight = pList;
183885 pRight = p->doclist.aAll;
183893 pTab->bDescIdx, nDiff, pLeft, nLeft, &pRight, &nRight
183896 p->doclist.aAll = pRight;
184487 fts3EvalStartReaders(pCsr, pExpr->pRight, pRc);
184488 pExpr->bDeferred = (pExpr->pLeft->bDeferred && pExpr->pRight->bDeferred);
184548 assert( pExpr->pLeft && pExpr->pRight );
184556 pRoot = pExpr->pRight;
184560 fts3EvalTokenCosts(pCsr, pRoot, pExpr->pRight, ppTC, ppOr, pRc);
184940 Fts3Expr *pRight = pExpr->pRight;
184941 assert( !pLeft->bDeferred || !pRight->bDeferred );
184946 fts3EvalNextRow(pCsr, pRight, pRc);
184947 pExpr->iDocid = pRight->iDocid;
184948 pExpr->bEof = pRight->bEof;
184949 }else if( pRight->bDeferred ){
184958 fts3EvalNextRow(pCsr, pRight, pRc);
184959 while( !pLeft->bEof && !pRight->bEof && *pRc==SQLITE_OK ){
184960 sqlite3_int64 iDiff = DOCID_CMP(pLeft->iDocid, pRight->iDocid);
184965 fts3EvalNextRow(pCsr, pRight, pRc);
184969 pExpr->bEof = (pLeft->bEof || pRight->bEof);
184971 assert( pRight->eType==FTSQUERY_PHRASE );
184972 if( pRight->pPhrase->doclist.aAll ){
184973 Fts3Doclist *pDl = &pRight->pPhrase->doclist;
184974 while( *pRc==SQLITE_OK && pRight->bEof==0 ){
184976 fts3EvalNextRow(pCsr, pRight, pRc);
184986 pRight->bEof = pLeft->bEof = 1;
184994 Fts3Expr *pRight = pExpr->pRight;
184995 sqlite3_int64 iCmp = DOCID_CMP(pLeft->iDocid, pRight->iDocid);
184997 assert_fts3_nc( pLeft->bStart || pLeft->iDocid==pRight->iDocid );
184998 assert_fts3_nc( pRight->bStart || pLeft->iDocid==pRight->iDocid );
185000 if( pRight->bEof || (pLeft->bEof==0 && iCmp<0) ){
185003 fts3EvalNextRow(pCsr, pRight, pRc);
185006 fts3EvalNextRow(pCsr, pRight, pRc);
185009 pExpr->bEof = (pLeft->bEof && pRight->bEof);
185010 iCmp = DOCID_CMP(pLeft->iDocid, pRight->iDocid);
185011 if( pRight->bEof || (pLeft->bEof==0 && iCmp<0) ){
185014 pExpr->iDocid = pRight->iDocid;
185022 Fts3Expr *pRight = pExpr->pRight;
185024 if( pRight->bStart==0 ){
185025 fts3EvalNextRow(pCsr, pRight, pRc);
185026 assert( *pRc!=SQLITE_OK || pRight->bStart );
185032 && !pRight->bEof
185033 && DOCID_CMP(pLeft->iDocid, pRight->iDocid)>0
185035 fts3EvalNextRow(pCsr, pRight, pRc);
185102 assert( p->pRight->pPhrase->doclist.nList>0 );
185103 nTmp += p->pRight->pPhrase->doclist.nList;
185115 Fts3Phrase *pPhrase = p->pRight->pPhrase;
185120 aPoslist = pExpr->pRight->pPhrase->doclist.pList;
185121 nToken = pExpr->pRight->pPhrase->nToken;
185128 p->eType==FTSQUERY_NEAR ? p->pRight->pPhrase : p->pPhrase
185163 && fts3EvalTestExpr(pCsr, pExpr->pRight, pRc)
185188 if( p->pRight->iDocid==pCsr->iPrevId ){
185189 fts3EvalInvalidatePoslist(p->pRight->pPhrase);
185201 int bHit2 = fts3EvalTestExpr(pCsr, pExpr->pRight, pRc);
185209 && !fts3EvalTestExpr(pCsr, pExpr->pRight, pRc)
185366 fts3EvalRestart(pCsr, pExpr->pRight, pRc);
185405 fts3EvalUpdateCounts(pExpr->pRight, nCol);
185447 Fts3Expr *pE = (p->eType==FTSQUERY_PHRASE?p:p->pRight);
185652 if( pTest->eType==FTSQUERY_NEAR ) pTest = pTest->pRight;
186911 assert( pSplit->pParent->pRight==pSplit );
186912 pSplit->pParent->pRight = pNew;
186966 pNot->pRight = p;
187024 assert( pPrev && pPrev->pLeft && pPrev->pRight==0 );
187025 pPrev->pRight = p;
187088 rc = fts3ExprCheckDepth(p->pRight, nMaxDepth-1);
187133 assert( p->pLeft && p->pRight );
187158 pFree->pRight = p;
187160 pFree->pRight->pParent = pFree;
187178 for(p=pParent->pRight; p->eType==eType; p=p->pLeft);
187182 pParent->pRight->pParent = pParent->pParent;
187184 pParent->pParent->pLeft = pParent->pRight;
187187 pRoot = pParent->pRight;
187205 pFree->pRight = p;
187208 pFree->pRight->pParent = pFree;
187236 Fts3Expr *pRight = pRoot->pRight;
187239 pRoot->pRight = 0;
187241 pRight->pParent = 0;
187245 rc = fts3ExprBalance(&pRight, nMaxDepth-1);
187249 sqlite3Fts3ExprFree(pRight);
187252 assert( pLeft && pRight );
187255 pRoot->pRight = pRight;
187256 pRight->pParent = pRoot;
187404 for(p=pDel; p && (p->pLeft||p->pRight); p=(p->pLeft ? p->pLeft : p->pRight)){
187405 assert( p->pParent==0 || p==p->pParent->pRight || p==p->pParent->pLeft );
187410 if( pParent && p==pParent->pLeft && pParent->pRight ){
187411 p = pParent->pRight;
187412 while( p && (p->pLeft || p->pRight) ){
187413 assert( p==p->pParent->pRight || p==p->pParent->pLeft );
187414 p = (p->pLeft ? p->pLeft : p->pRight);
187478 if( zBuf ) zBuf = exprToString(pExpr->pRight, zBuf);
190106 SegmentNode *pRight; /* Pointer to right-sibling */
192008 pTree->pRight = pNew;
192074 for(pIter=pTree->pLeftmost; pIter && rc==SQLITE_OK; pIter=pIter->pRight){
192101 SegmentNode *pRight = p->pRight;
192105 assert( pRight==0 || p->zMalloc==0 );
192108 p = pRight;
195963 assert( pExpr->pLeft && pExpr->pRight );
195966 rc = fts3ExprIterate2(pExpr->pRight, piPhrase, x, pCtx);
196611 assert( (pExpr->pLeft==0)==(pExpr->pRight==0) );
196615 if( rc==SQLITE_OK ) rc = fts3ExprLHitGather(pExpr->pRight, p);
203408 RtreeNode *pRight,
203489 RtreeNode *pTarget = (ii<iBestSplit)?pLeft:pRight;
203540 RtreeNode *pRight = 0;
203563 pRight = nodeNew(pRtree, pNode);
203570 pRight = nodeNew(pRtree, pLeft->pParent);
203574 if( !pLeft || !pRight ){
203580 memset(pRight->zData, 0, pRtree->iNodeSize);
203582 rc = splitNodeStartree(pRtree, aCell, nCell, pLeft, pRight,
203589 ** nodeWrite(). Node pRight always needs a node number, as it was created
203593 if( SQLITE_OK!=(rc = nodeWrite(pRtree, pRight))
203599 rightbbox.iRowid = pRight->iNode;
203620 if( (rc = rtreeInsertCell(pRtree, pRight->pParent, &rightbbox, iHeight+1)) ){
203624 for(i=0; i<NCELL(pRight); i++){
203625 i64 iRowid = nodeGetRowid(pRtree, pRight, i);
203626 rc = updateMapping(pRtree, iRowid, pRight, iHeight);
203647 rc = nodeRelease(pRtree, pRight);
203648 pRight = 0;
203656 nodeRelease(pRtree, pRight);
206309 static GeoEvent *geopolyEventMerge(GeoEvent *pLeft, GeoEvent *pRight){
206313 while( pRight && pLeft ){
206314 if( pRight->x <= pLeft->x ){
206315 pLast->pNext = pRight;
206316 pLast = pRight;
206317 pRight = pRight->pNext;
206324 pLast->pNext = pRight ? pRight : pLeft;
206356 static GeoSegment *geopolySegmentMerge(GeoSegment *pLeft, GeoSegment *pRight){
206360 while( pRight && pLeft ){
206361 double r = pRight->y - pLeft->y;
206362 if( r==0.0 ) r = pRight->C - pLeft->C;
206364 pLast->pNext = pRight;
206365 pLast = pRight;
206366 pRight = pRight->pNext;
206373 pLast->pNext = pRight ? pRight : pLeft;
220924 void *pRight, /* Rhs input changeset */
220936 rc = sqlite3changegroup_add(pGrp, nRight, pRight);
222693 Fts5ExprNode *pRight,
222700 Fts5ExprNode *pRight
228646 Fts5ExprNode *pRight, /* Right hand child expression */
228656 || (eType==FTS5_STRING && !pLeft && !pRight)
228659 if( eType!=FTS5_STRING && pLeft==0 ) return pRight;
228660 if( eType!=FTS5_STRING && pRight==0 ) return pLeft;
228673 if( pRight->eType==eType ) nChild += pRight->nChild-1;
228709 fts5ExprAddChildren(pRet, pRight);
228718 sqlite3Fts5ParseNodeFree(pRight);
228727 Fts5ExprNode *pRight /* Right hand child expression */
228734 sqlite3Fts5ParseNodeFree(pRight);
228742 assert( pRight->eType==FTS5_STRING
228743 || pRight->eType==FTS5_TERM
228744 || pRight->eType==FTS5_EOF
228757 if( pRight->eType==FTS5_EOF ){
228758 assert( pParse->apPhrase[pParse->nPhrase-1]==pRight->pNear->apPhrase[0] );
228759 sqlite3Fts5ParseNodeFree(pRight);
228767 pRet = pRight;
228769 pLeft->apChild[pLeft->nChild-1] = pRight;
228773 ap = &pParse->apPhrase[pParse->nPhrase-1-pRight->pNear->nPhrase];
228775 memmove(ap, &ap[1], sizeof(Fts5ExprPhrase*)*pRight->pNear->nPhrase);
228781 pRet = sqlite3Fts5ParseNode(pParse, FTS5_AND, pLeft, pRight, 0);
229834 ** Arguments pLeft and pRight point to linked-lists of hash-entry objects,
229840 Fts5HashEntry *pRight
229843 Fts5HashEntry *p2 = pRight;
230580 ** Compare the contents of the pLeft buffer with the pRight/nRight blob.
230582 ** Return -ve if pLeft is smaller than pRight, 0 if they are equal or
230583 ** +ve if pRight is smaller than pLeft. In other words:
230585 ** res = *pLeft - *pRight
230590 const u8 *pRight, int nRight /* Right hand side of comparison */
230593 int res = memcmp(pLeft->p, pRight, nCmp);
230602 ** Return -ve if pLeft is smaller than pRight, 0 if they are equal or
230603 ** +ve if pRight is smaller than pLeft. In other words:
230605 ** res = *pLeft - *pRight
230607 static int fts5BufferCompare(Fts5Buffer *pLeft, Fts5Buffer *pRight){
230609 nCmp = MIN(pLeft->n, pRight->n);
230611 assert( nCmp<=0 || pRight->p!=0 );
230612 res = fts5Memcmp(pLeft->p, pRight->p, nCmp);
230613 return (res==0 ? (pLeft->n - pRight->n) : res);