Lines Matching refs:pRight
18992 Expr *pRight; /* Right subnode */ member
32933 sqlite3TreeViewExpr(pView, p->pLimit->pLeft, p->pLimit->pRight!=0); in sqlite3TreeViewSelect()
32934 if( p->pLimit->pRight ){ in sqlite3TreeViewSelect()
32936 sqlite3TreeViewExpr(pView, p->pLimit->pRight, 0); in sqlite3TreeViewSelect()
33234 assert( pExpr->pRight ); in sqlite3TreeViewExpr()
33235 assert( sqlite3ExprSkipCollateAndLikely(pExpr->pRight)->op in sqlite3TreeViewExpr()
33237 x = (pExpr->op2==TK_ISNOT)*2 + sqlite3ExprTruthValue(pExpr->pRight); in sqlite3TreeViewExpr()
33414 sqlite3TreeViewExpr(pView, pExpr->pRight, 0); in sqlite3TreeViewExpr()
33427 pExpr->pRight==pExpr->pLeft ? " (SELECT-owner)" : ""); in sqlite3TreeViewExpr()
33462 sqlite3TreeViewExpr(pView, pExpr->pRight, 0); in sqlite3TreeViewExpr()
56527 struct RowSetEntry *pRight; /* Right subtree (larger entries) or list */
56659 pEntry->pRight = 0;
56667 pLast->pRight = pEntry;
56690 assert( pA->pRight==0 || pA->v<=pA->pRight->v );
56691 assert( pB->pRight==0 || pB->v<=pB->pRight->v );
56693 if( pA->v<pB->v ) pTail = pTail->pRight = pA;
56694 pA = pA->pRight;
56696 pTail->pRight = pB;
56700 pTail = pTail->pRight = pB;
56701 pB = pB->pRight;
56703 pTail->pRight = pA;
56708 return head.pRight;
56721 pNext = pIn->pRight;
56722 pIn->pRight = 0;
56753 p->pRight = pIn;
56757 if( pIn->pRight ){
56758 rowSetTreeToList(pIn->pRight, &pIn->pRight, ppLast);
56762 assert( (*ppLast)->pRight==0 );
56801 *ppList = p->pRight;
56802 p->pRight = rowSetNDeepTree(ppList, iDepth-1);
56805 *ppList = p->pRight;
56806 p->pLeft = p->pRight = 0;
56822 pList = p->pRight;
56823 p->pLeft = p->pRight = 0;
56827 pList = p->pRight;
56829 p->pRight = rowSetNDeepTree(&pList, iDepth);
56862 p->pEntry = p->pEntry->pRight;
56898 for(pTree = pRowSet->pForest; pTree; pTree=pTree->pRight){
56899 ppPrevTree = &pTree->pRight;
56914 pTree->pRight = 0;
56928 for(pTree = pRowSet->pForest; pTree; pTree=pTree->pRight){
56932 p = p->pRight;
78704 u8 *pRight; /* Location in parent of right-sibling pointer */
78761 pRight = &pParent->aData[pParent->hdrOffset+8];
78763 pRight = findCell(pParent, i+nxDiv-pParent->nOverflow);
78765 pgno = get4byte(pRight);
79190 put4byte(pRight, apNew[nNew-1]->pgno);
86716 if( pExpr->pRight ){
86718 displayP4Expr(p, pExpr->pRight);
106534 assert( pExpr->x.pList==0 || pExpr->pRight==0 );
106538 if( pExpr->pRight ){
106540 pExpr = pExpr->pRight;
107006 const Expr *pRight, /* Name of the column. */
107023 const char *zCol = pRight->u.zToken;
107399 assert( pExpr->pLeft==0 && pExpr->pRight==0 );
107499 sqlite3ExprDelete(db, pExpr->pRight);
107500 pExpr->pRight = 0;
107518 }else if( cnt==0 && ExprHasProperty(pRight,EP_DblQuoted) ){
107536 sqlite3ExprDelete(db, pExpr->pRight);
107537 pExpr->pRight = 0;
107805 Expr *pRight;
107811 pRight = pExpr;
107818 pRight = pExpr->pRight;
107819 if( pRight->op==TK_ID ){
107822 assert( pRight->op==TK_DOT );
107823 assert( !ExprHasProperty(pRight, EP_IntValue) );
107825 pLeft = pRight->pLeft;
107826 pRight = pRight->pRight;
107828 assert( ExprUseUToken(pLeft) && ExprUseUToken(pRight) );
107832 sqlite3RenameTokenRemap(pParse, (void*)pExpr, (void*)pRight);
107836 return lookupName(pParse, zDb, zTable, pRight, pNC, pExpr);
108110 Expr *pRight = sqlite3ExprSkipCollateAndLikely(pExpr->pRight);
108114 if( ALWAYS(pRight) && (pRight->op==TK_ID || pRight->op==TK_TRUEFALSE) ){
108115 int rc = resolveExprStep(pWalker, pRight);
108117 if( pRight->op==TK_TRUEFALSE ){
108143 assert( pExpr->pRight!=0 );
108144 nRight = sqlite3ExprVectorSize(pExpr->pRight);
109292 Expr *pNext = p->pRight;
109294 assert( !ExprUseXList(p) || p->x.pList==0 || p->pRight==0 );
109376 if( pExpr->pRight ){
109377 aff = sqlite3CompareAffinity(pExpr->pRight, aff);
109432 const Expr *pRight
109438 }else if( pRight && (pRight->flags & EP_Collate)!=0 ){
109439 pColl = sqlite3ExprCollSeq(pParse, pRight);
109443 pColl = sqlite3ExprCollSeq(pParse, pRight);
109459 return sqlite3BinaryCompareCollSeq(pParse, p->pRight, p->pLeft);
109461 return sqlite3BinaryCompareCollSeq(pParse, p->pLeft, p->pRight);
109471 Expr *pRight, /* The right operand */
109484 p4 = sqlite3BinaryCompareCollSeq(pParse, pRight, pLeft);
109486 p4 = sqlite3BinaryCompareCollSeq(pParse, pLeft, pRight);
109488 p5 = binaryCompareP5(pLeft, pRight, jumpIfNull);
109711 Expr *pRight = pExpr->pRight;
109723 if( nLeft!=sqlite3ExprVectorSize(pRight) ){
109742 regRight = exprCodeSubselect(pParse, pRight);
109752 r2 = exprVectorRegister(pParse, pRight, i, regRight, &pR, ®Free2);
109857 if( NEVER(p->pRight) && p->pRight->nHeight>nHeight ){
109858 nHeight = p->pRight->nHeight;
110005 Expr *pRight
110010 sqlite3ExprDelete(db, pRight);
110014 if( pRight ){
110015 pRoot->pRight = pRight;
110016 pRoot->flags |= EP_Propagate & pRight->flags;
110018 pRoot->nHeight = pRight->nHeight+1;
110046 Expr *pRight /* Right operand */
110054 sqlite3ExprAttachSubtrees(pParse->db, p, pLeft, pRight);
110058 sqlite3ExprDelete(pParse->db, pRight);
110144 SQLITE_PRIVATE Expr *sqlite3ExprAnd(Parse *pParse, Expr *pLeft, Expr *pRight){
110147 return pRight;
110148 }else if( pRight==0 ){
110151 u32 f = pLeft->flags | pRight->flags;
110156 sqlite3ExprDeferredDelete(pParse, pRight);
110159 return sqlite3PExpr(pParse, TK_AND, pLeft, pRight);
110390 assert( p->pRight==0 );
110397 assert( (ExprUseXList(p) && p->x.pList==0) || p->pRight==0 );
110398 if( p->pRight ){
110400 sqlite3ExprDeleteNN(db, p->pRight);
110535 assert( p->pRight==0 );
110571 if( p->pRight ) nByte += dupedExprSize(p->pRight);
110714 assert( p->pRight==0
110715 || p->pRight==p->pLeft
110721 pNew->pRight = p->pRight ?
110722 exprDup(db, p->pRight, EXPRDUP_REDUCE, &sEdupBuf) : 0;
110726 assert( p->pRight==0
110727 || p->pRight==p->pLeft
110732 pNew->pRight = sqlite3ExprDup(db, p->pRight, 0);
110846 if( pNewExpr->pRight ){
110847 pPriorSelectColOld = pOldExpr->pRight;
110848 pPriorSelectColNew = pNewExpr->pRight;
110849 pNewExpr->pLeft = pNewExpr->pRight;
110854 pNewExpr->pRight = pPriorSelectColNew;
111126 pFirst->pRight = pExpr;
111364 Expr *pRight = sqlite3ExprSimplifiedAndOr(pExpr->pRight);
111366 if( ExprAlwaysTrue(pLeft) || ExprAlwaysFalse(pRight) ){
111367 pExpr = pExpr->op==TK_AND ? pRight : pLeft;
111368 }else if( ExprAlwaysTrue(pRight) || ExprAlwaysFalse(pLeft) ){
111369 pExpr = pExpr->op==TK_AND ? pLeft : pRight;
113779 r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, ®Free2);
113781 codeCompare(pParse, pLeft, pExpr->pRight, op, r1, r2,
113824 r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, ®Free2);
113868 isTrue = sqlite3ExprTruthValue(pExpr->pRight);
114281 opCompare.pRight = aListelem[i].pExpr;
114610 exprAnd.pRight = &compRight;
114613 compLeft.pRight = pExpr->x.pList->a[0].pExpr;
114616 compRight.pRight = pExpr->x.pList->a[1].pExpr;
114682 sqlite3ExprIfTrue(pParse, pExpr->pRight, dest, jumpIfNull);
114687 sqlite3ExprIfTrue(pParse, pExpr->pRight, dest, jumpIfNull);
114701 isTrue = sqlite3ExprTruthValue(pExpr->pRight);
114729 r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, ®Free2);
114730 codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
114854 sqlite3ExprIfFalse(pParse, pExpr->pRight, dest, jumpIfNull);
114860 sqlite3ExprIfFalse(pParse, pExpr->pRight, dest, jumpIfNull);
114875 isTrue = sqlite3ExprTruthValue(pExpr->pRight);
114906 r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, ®Free2);
114907 codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
115123 if( sqlite3ExprCompare(pParse, pA->pRight, pB->pRight, iTab) ) return 2;
115237 if( exprImpliesNotNull(pParse, p->pRight, pNN, iTab, seenNot) ) return 1;
115295 || sqlite3ExprImpliesExpr(pParse, pE1, pE2->pRight, iTab) )
115383 bothImplyNotNullRow(pWalker, pExpr->pLeft, pExpr->pRight);
115416 Expr *pRight = pExpr->pRight;
115426 assert( pRight->op!=TK_COLUMN || ExprUseYTab(pRight) );
115430 || (pRight->op==TK_COLUMN
115431 && ALWAYS(pRight->y.pTab!=0)
115432 && IsVirtual(pRight->y.pTab))
115474 p = p->pRight;
131993 Expr *pRight; /* Column ref to child table */
132003 pRight = sqlite3Expr(db, TK_ID, zCol);
132004 pEq = sqlite3PExpr(pParse, TK_EQ, pLeft, pRight);
132025 Expr *pRight; /* Column ref to child table */
132028 pRight = exprTableColumn(db, pTab, pSrc->a[0].iCursor, -1);
132029 pNe = sqlite3PExpr(pParse, TK_NE, pLeft, pRight);
132037 pRight = sqlite3Expr(db, TK_ID, pTab->aCol[iCol].zCnName);
132038 pEq = sqlite3PExpr(pParse, TK_IS, pLeft, pRight);
143322 p = p->pRight;
143360 p = p->pRight;
143389 SrcItem *pRight; /* Right table being joined */
143393 pRight = &pLeft[1];
143394 for(i=0; i<pSrc->nSrc-1; i++, pRight++, pLeft++){
143395 Table *pRightTab = pRight->pTab;
143399 joinType = (pRight->fg.jointype & JT_OUTER)!=0 ? EP_OuterON : EP_InnerON;
143404 if( pRight->fg.jointype & JT_NATURAL ){
143406 if( pRight->fg.isUsing || pRight->u3.pOn ){
143426 pRight->fg.isUsing = 1;
143427 pRight->fg.isSynthUsing = 1;
143428 pRight->u3.pUsing = pUsing;
143440 if( pRight->fg.isUsing ){
143441 IdList *pList = pRight->u3.pUsing;
143457 pRight->fg.isSynthUsing)==0
143482 pRight->fg.isSynthUsing)!=0 ){
143500 sqlite3SrcItemColumnUsed(pRight, iRightCol);
143516 else if( pRight->u3.pOn ){
143517 sqlite3SetJoinExpr(pRight->u3.pOn, pRight->iCursor, joinType);
143518 p->pWhere = sqlite3ExprAnd(pParse, p->pWhere, pRight->u3.pOn);
143519 pRight->u3.pOn = 0;
143520 pRight->fg.isOn = 1;
145124 pColExpr = pColExpr->pRight;
145401 if( pLimit->pRight ){
145404 sqlite3ExprCode(pParse, pLimit->pRight, iOffset);
146762 assert( pExpr->pRight==0 );
146821 pExpr->pRight = substExpr(pSubst, pExpr->pRight);
147264 if( pSub->pLimit && pSub->pLimit->pRight ) return 0; /* Restriction (14) */
147717 Expr *pRight, *pLeft;
147725 findConstInWhere(pConst, pExpr->pRight);
147730 pRight = pExpr->pRight;
147732 assert( pRight!=0 );
147734 if( pRight->op==TK_COLUMN && sqlite3ExprIsConstant(pConst->pParse, pLeft) ){
147735 constInsert(pConst,pRight,pLeft,pExpr);
147737 if( pLeft->op==TK_COLUMN && sqlite3ExprIsConstant(pConst->pParse, pRight) ){
147738 constInsert(pConst,pLeft,pRight,pExpr);
147814 propagateConstantExprRewriteOne(pConst, pExpr->pRight, 0);
148123 nChng += pushDownWhereTerms(pParse, pSubq, pWhere->pRight, pSrcList, iSrc);
148866 Expr *pE, *pRight, *pExpr;
149002 assert( pE->op!=TK_DOT || pE->pRight!=0 );
149004 if( pE->op==TK_DOT && pE->pRight->op==TK_ASTERISK ) break;
149022 pRight = pE->pRight;
149023 assert( pE->op!=TK_DOT || pRight!=0 );
149025 && (pE->op!=TK_DOT || pRight->op!=TK_ASTERISK)
149048 iErrOfst = pE->pRight->w.iOfst;
149089 pRight = sqlite3Expr(db, TK_ID, zUName);
149090 sqlite3ExprSetErrorOffset(pRight, iErrOfst);
149091 pNew = sqlite3ExprListAppend(pParse, pNew, pRight);
149157 pRight = sqlite3Expr(db, TK_ID, zName);
149168 pExpr = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);
149177 pExpr = pRight;
152615 assert( pTerm->pRight!=0 );
152617 if( pTerm->pRight->op!=TK_ASTERISK ) return 0;
157859 Expr *pRight, /* RHS of comparison */
157865 Expr *p = sqlite3VectorFieldSubexpr(pRight, i);
158015 iReg = sqlite3ExprCodeTarget(pParse, pX->pRight, iTarget);
158288 Expr *pRight = pTerm->pExpr->pRight;
158289 if( (pTerm->wtFlags & TERM_IS)==0 && sqlite3ExprCanBeNull(pRight) ){
158295 if( sqlite3CompareAffinity(pRight, zAff[j])==SQLITE_AFF_BLOB ){
158298 if( sqlite3ExprNeedsNoAffinityChange(pRight, zAff[j]) ){
158675 pTruth = pTruth->pRight;
158897 Expr *pRight = pTerm->pExpr->pRight;
158898 codeExprOrVector(pParse, pRight, iTarget, 1);
158936 Expr *pRight; /* RHS of the comparison */
158972 pCompare->pRight = pRight = sqlite3Expr(db, TK_REGISTER, 0);
158973 if( pRight ){
158974 pRight->iTable = iReg+j+2;
159067 if( sqlite3ExprIsVector(pX->pRight) ){
159069 codeExprOrVector(pParse, pX->pRight, r1, 1);
159080 r1 = sqlite3ExprCodeTemp(pParse, pX->pRight, &rTemp);
159104 codeExprOrVector(pParse, pX->pRight, memEndValue, 1);
159105 if( 0==sqlite3ExprIsVector(pX->pRight)
159112 if( 0==sqlite3ExprIsVector(pX->pRight) ){
159305 Expr *pRight = pRangeStart->pExpr->pRight;
159306 codeExprOrVector(pParse, pRight, regBase+nEq, nBtm);
159309 && sqlite3ExprCanBeNull(pRight)
159315 updateRangeAffinityStr(pRight, nBtm, &zStartAff[nEq]);
159319 if( sqlite3ExprIsVector(pRight)==0 ){
159406 Expr *pRight = pRangeEnd->pExpr->pRight;
159408 codeExprOrVector(pParse, pRight, regBase+nEq, nTop);
159411 && sqlite3ExprCanBeNull(pRight)
159417 updateRangeAffinityStr(pRight, nTop, zEndAff);
159425 if( sqlite3ExprIsVector(pRight)==0 ){
160167 SrcItem *pRight;
160169 pRight = &pWInfo->pTabList->a[pWInfo->a[k].iFrom];
160171 if( pRight->fg.viaCoroutine ){
160173 v, OP_Null, 0, pRight->regResult,
160174 pRight->regResult + pRight->pSelect->pEList->nExpr-1
160354 || pExpr->pRight->op==TK_VECTOR
160355 || sqlite3BinaryCompareCollSeq(pParse, pExpr->pLeft, pExpr->pRight) !=
160356 sqlite3BinaryCompareCollSeq(pParse, pExpr->pRight, pExpr->pLeft)
160360 SWAP(Expr*,pExpr->pRight,pExpr->pLeft);
160421 Expr *pRight, *pLeft; /* Right and left size of LIKE operator */
160441 pRight = sqlite3ExprSkipCollate(pList->a[0].pExpr);
160442 op = pRight->op;
160445 int iCol = pRight->iColumn;
160451 assert( pRight->op==TK_VARIABLE || pRight->op==TK_REGISTER );
160453 assert( !ExprHasProperty(pRight, EP_IntValue) );
160454 z = (u8*)pRight->u.zToken;
160538 sqlite3VdbeSetVarmask(v, pRight->iColumn);
160539 assert( !ExprHasProperty(pRight, EP_IntValue) );
160540 if( *pisComplete && pRight->u.zToken[1] ){
160548 sqlite3ExprCodeTarget(pParse, pRight, r1);
160676 Expr *pRight = pExpr->pRight;
160681 assert( pRight==0 || pRight->op!=TK_COLUMN
160682 || (ExprUseYTab(pRight) && pRight->y.pTab!=0) );
160683 if( pRight && ExprIsVtab(pRight) ){
160685 SWAP(Expr*, pLeft, pRight);
160688 *ppRight = pRight;
160770 assert( pOne->pExpr->pLeft!=0 && pOne->pExpr->pRight!=0 );
160771 assert( pTwo->pExpr->pLeft!=0 && pTwo->pExpr->pRight!=0 );
160773 if( sqlite3ExprCompare(0,pOne->pExpr->pRight, pTwo->pExpr->pRight,-1) )return;
161087 affRight = sqlite3ExprAffinity(pOrTerm->pExpr->pRight);
161114 pDup = sqlite3ExprDup(db, pOrTerm->pExpr->pRight, 0);
161161 aff2 = sqlite3ExprAffinity(pExpr->pRight);
161169 return sqlite3ExprCollSeqMatch(pParse, pExpr->pLeft, pExpr->pRight);
161333 assert( pExpr->pRight==0 );
161342 pTerm->prereqRight = sqlite3WhereExprUsage(pMaskSet, pExpr->pRight);
161393 Expr *pRight = sqlite3ExprSkipCollate(pExpr->pRight);
161410 if( pRight
161411 && exprMightBeIndexed(pSrc, aiCurCol, pRight, op)
161412 && !ExprHasProperty(pRight, EP_FixedCol)
161651 && sqlite3ExprVectorSize(pExpr->pRight)==nLeft
161653 || (pExpr->pRight->flags & EP_xIsSelect)==0)
161661 Expr *pRight = sqlite3ExprForVectorField(pParse, pExpr->pRight, i, nLeft);
161663 pNew = sqlite3PExpr(pParse, pExpr->op, pLeft, pRight);
161713 Expr *pRight = 0, *pLeft = 0;
161714 int res = isAuxiliaryVtabOperator(db, pExpr, &eOp2, &pLeft, &pRight);
161720 prereqExpr = sqlite3WhereExprUsage(pMaskSet, pRight);
161725 0, sqlite3ExprDup(db, pRight, 0));
161743 SWAP(Expr*, pLeft, pRight);
161787 sqlite3WhereSplit(pWC, pE2->pRight, op);
161898 whereAddLimitExpr(pWC, p->iOffset, p->pLimit->pRight,
162001 if( p->pRight ){
162002 mask |= sqlite3WhereExprUsageNN(pMaskSet, p->pRight);
162415 p = sqlite3ExprSkipCollateAndLikely(p->pRight);
162447 inexpr.pRight = pX->x.pSelect->pEList->a[iField].pExpr;
162530 && (pX = pTerm->pExpr->pRight, ALWAYS(pX!=0))
163598 && sqlite3ExprIsVector(pTerm->pExpr->pRight)
163987 rc = sqlite3Stat4ValueFromExpr(pParse, pLower->pExpr->pRight, aff, &p1);
163991 rc = sqlite3Stat4ValueFromExpr(pParse, pUpper->pExpr->pRight, aff, &p2);
164153 Expr *pExpr = pLower->pExpr->pRight;
164170 Expr *pExpr = pUpper->pExpr->pRight;
164990 Expr *pRight = pTerm->pExpr->pRight;
164993 if( sqlite3ExprIsInteger(pRight, &k) && k>=(-1) && k<=1 ){
165049 pRhs = pTerm->pExpr->pRight;
165369 rc = whereEqualScanEst(pParse, pBuilder, pExpr->pRight, &nOut);
165583 pWhere = pWhere->pRight;
165796 wherePartIdxExpr(pParse, pIdx, pPart->pRight, pMask, iIdxCur, pItem);
165802 Expr *pRight = pPart->pRight;
165806 if( !sqlite3ExprIsConstant(0, pRight) ) return;
165816 p->pExpr = sqlite3ExprDup(db, pRight, 0);
166468 pH->pParse->db, pTerm->pExpr->pRight, ENC(pH->pParse->db),
172625 p->pLeft = p->pRight = 0;
172656 sqlite3ExprDelete(db, pA->pRight);
172657 pA->pRight = 0;
176517 Expr *pRight, *pLeft, *pDot;
176518 pRight = sqlite3PExpr(pParse, TK_ASTERISK, 0, 0);
176519 sqlite3ExprSetErrorOffset(pRight, (int)(yymsp[0].minor.yy0.z - pParse->zTail));
176521 pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);
186242 Fts3Expr *pRight; /* Right operand */
190397 fts3EvalAllocateReaders(pCsr, pExpr->pRight, pnToken, pnOr, pRc);
190439 char *pRight;
190447 pRight = pList;
190451 pRight = p->doclist.aAll;
190459 pTab->bDescIdx, nDiff, pLeft, nLeft, &pRight, &nRight
190462 p->doclist.aAll = pRight;
191053 fts3EvalStartReaders(pCsr, pExpr->pRight, pRc);
191054 pExpr->bDeferred = (pExpr->pLeft->bDeferred && pExpr->pRight->bDeferred);
191114 assert( pExpr->pLeft && pExpr->pRight );
191122 pRoot = pExpr->pRight;
191126 fts3EvalTokenCosts(pCsr, pRoot, pExpr->pRight, ppTC, ppOr, pRc);
191505 Fts3Expr *pRight = pExpr->pRight;
191506 assert( !pLeft->bDeferred || !pRight->bDeferred );
191511 fts3EvalNextRow(pCsr, pRight, pRc);
191512 pExpr->iDocid = pRight->iDocid;
191513 pExpr->bEof = pRight->bEof;
191514 }else if( pRight->bDeferred ){
191523 fts3EvalNextRow(pCsr, pRight, pRc);
191524 while( !pLeft->bEof && !pRight->bEof && *pRc==SQLITE_OK ){
191525 sqlite3_int64 iDiff = DOCID_CMP(pLeft->iDocid, pRight->iDocid);
191530 fts3EvalNextRow(pCsr, pRight, pRc);
191534 pExpr->bEof = (pLeft->bEof || pRight->bEof);
191536 assert( pRight->eType==FTSQUERY_PHRASE );
191537 if( pRight->pPhrase->doclist.aAll ){
191538 Fts3Doclist *pDl = &pRight->pPhrase->doclist;
191539 while( *pRc==SQLITE_OK && pRight->bEof==0 ){
191541 fts3EvalNextRow(pCsr, pRight, pRc);
191551 pRight->bEof = pLeft->bEof = 1;
191559 Fts3Expr *pRight = pExpr->pRight;
191560 sqlite3_int64 iCmp = DOCID_CMP(pLeft->iDocid, pRight->iDocid);
191562 assert_fts3_nc( pLeft->bStart || pLeft->iDocid==pRight->iDocid );
191563 assert_fts3_nc( pRight->bStart || pLeft->iDocid==pRight->iDocid );
191565 if( pRight->bEof || (pLeft->bEof==0 && iCmp<0) ){
191568 fts3EvalNextRow(pCsr, pRight, pRc);
191571 fts3EvalNextRow(pCsr, pRight, pRc);
191574 pExpr->bEof = (pLeft->bEof && pRight->bEof);
191575 iCmp = DOCID_CMP(pLeft->iDocid, pRight->iDocid);
191576 if( pRight->bEof || (pLeft->bEof==0 && iCmp<0) ){
191579 pExpr->iDocid = pRight->iDocid;
191587 Fts3Expr *pRight = pExpr->pRight;
191589 if( pRight->bStart==0 ){
191590 fts3EvalNextRow(pCsr, pRight, pRc);
191591 assert( *pRc!=SQLITE_OK || pRight->bStart );
191597 && !pRight->bEof
191598 && DOCID_CMP(pLeft->iDocid, pRight->iDocid)>0
191600 fts3EvalNextRow(pCsr, pRight, pRc);
191667 assert( p->pRight->pPhrase->doclist.nList>0 );
191668 nTmp += p->pRight->pPhrase->doclist.nList;
191680 Fts3Phrase *pPhrase = p->pRight->pPhrase;
191685 aPoslist = pExpr->pRight->pPhrase->doclist.pList;
191686 nToken = pExpr->pRight->pPhrase->nToken;
191693 p->eType==FTSQUERY_NEAR ? p->pRight->pPhrase : p->pPhrase
191728 && fts3EvalTestExpr(pCsr, pExpr->pRight, pRc)
191753 if( p->pRight->iDocid==pCsr->iPrevId ){
191754 fts3EvalInvalidatePoslist(p->pRight->pPhrase);
191766 int bHit2 = fts3EvalTestExpr(pCsr, pExpr->pRight, pRc);
191774 && !fts3EvalTestExpr(pCsr, pExpr->pRight, pRc)
191931 fts3EvalRestart(pCsr, pExpr->pRight, pRc);
191970 fts3EvalUpdateCounts(pExpr->pRight, nCol);
192234 if( pTest->eType==FTSQUERY_NEAR ) pTest = pTest->pRight;
193494 assert( pSplit->pParent->pRight==pSplit );
193495 pSplit->pParent->pRight = pNew;
193549 pNot->pRight = p;
193607 assert( pPrev && pPrev->pLeft && pPrev->pRight==0 );
193608 pPrev->pRight = p;
193671 rc = fts3ExprCheckDepth(p->pRight, nMaxDepth-1);
193716 assert( p->pLeft && p->pRight );
193741 pFree->pRight = p;
193743 pFree->pRight->pParent = pFree;
193761 for(p=pParent->pRight; p->eType==eType; p=p->pLeft);
193765 pParent->pRight->pParent = pParent->pParent;
193767 pParent->pParent->pLeft = pParent->pRight;
193770 pRoot = pParent->pRight;
193788 pFree->pRight = p;
193791 pFree->pRight->pParent = pFree;
193819 Fts3Expr *pRight = pRoot->pRight;
193822 pRoot->pRight = 0;
193824 pRight->pParent = 0;
193828 rc = fts3ExprBalance(&pRight, nMaxDepth-1);
193832 sqlite3Fts3ExprFree(pRight);
193835 assert( pLeft && pRight );
193838 pRoot->pRight = pRight;
193839 pRight->pParent = pRoot;
193987 for(p=pDel; p && (p->pLeft||p->pRight); p=(p->pLeft ? p->pLeft : p->pRight)){
193988 assert( p->pParent==0 || p==p->pParent->pRight || p==p->pParent->pLeft );
193993 if( pParent && p==pParent->pLeft && pParent->pRight ){
193994 p = pParent->pRight;
193995 while( p && (p->pLeft || p->pRight) ){
193996 assert( p==p->pParent->pRight || p==p->pParent->pLeft );
193997 p = (p->pLeft ? p->pLeft : p->pRight);
194061 if( zBuf ) zBuf = exprToString(pExpr->pRight, zBuf);
196690 SegmentNode *pRight; /* Pointer to right-sibling */
198592 pTree->pRight = pNew;
198658 for(pIter=pTree->pLeftmost; pIter && rc==SQLITE_OK; pIter=pIter->pRight){
198685 SegmentNode *pRight = p->pRight;
198689 assert( pRight==0 || p->zMalloc==0 );
198692 p = pRight;
202567 assert( pExpr->pLeft && pExpr->pRight );
202570 rc = fts3ExprIterate2(pExpr->pRight, piPhrase, x, pCtx);
203217 assert( (pExpr->pLeft==0)==(pExpr->pRight==0) );
203221 if( rc==SQLITE_OK ) rc = fts3ExprLHitGather(pExpr->pRight, p);
212745 RtreeNode *pRight,
212826 RtreeNode *pTarget = (ii<iBestSplit)?pLeft:pRight;
212877 RtreeNode *pRight = 0;
212900 pRight = nodeNew(pRtree, pNode);
212907 pRight = nodeNew(pRtree, pLeft->pParent);
212911 if( !pLeft || !pRight ){
212917 memset(pRight->zData, 0, pRtree->iNodeSize);
212919 rc = splitNodeStartree(pRtree, aCell, nCell, pLeft, pRight,
212930 if( SQLITE_OK!=(rc = nodeWrite(pRtree, pRight))
212936 rightbbox.iRowid = pRight->iNode;
212957 if( (rc = rtreeInsertCell(pRtree, pRight->pParent, &rightbbox, iHeight+1)) ){
212961 for(i=0; i<NCELL(pRight); i++){
212962 i64 iRowid = nodeGetRowid(pRtree, pRight, i);
212963 rc = updateMapping(pRtree, iRowid, pRight, iHeight);
212984 rc = nodeRelease(pRtree, pRight);
212985 pRight = 0;
212993 nodeRelease(pRtree, pRight);
215571 static GeoEvent *geopolyEventMerge(GeoEvent *pLeft, GeoEvent *pRight){
215575 while( pRight && pLeft ){
215576 if( pRight->x <= pLeft->x ){
215577 pLast->pNext = pRight;
215578 pLast = pRight;
215579 pRight = pRight->pNext;
215586 pLast->pNext = pRight ? pRight : pLeft;
215618 static GeoSegment *geopolySegmentMerge(GeoSegment *pLeft, GeoSegment *pRight){
215622 while( pRight && pLeft ){
215623 double r = pRight->y - pLeft->y;
215624 if( r==0.0 ) r = pRight->C - pLeft->C;
215626 pLast->pNext = pRight;
215627 pLast = pRight;
215628 pRight = pRight->pNext;
215635 pLast->pNext = pRight ? pRight : pLeft;
230990 void *pRight, /* Rhs input changeset */
231002 rc = sqlite3changegroup_add(pGrp, nRight, pRight);
232850 Fts5ExprNode *pRight,
232857 Fts5ExprNode *pRight
239022 Fts5ExprNode *pRight, /* Right hand child expression */
239032 || (eType==FTS5_STRING && !pLeft && !pRight)
239035 if( eType!=FTS5_STRING && pLeft==0 ) return pRight;
239036 if( eType!=FTS5_STRING && pRight==0 ) return pLeft;
239049 if( pRight->eType==eType ) nChild += pRight->nChild-1;
239085 fts5ExprAddChildren(pRet, pRight);
239102 sqlite3Fts5ParseNodeFree(pRight);
239111 Fts5ExprNode *pRight /* Right hand child expression */
239118 sqlite3Fts5ParseNodeFree(pRight);
239126 assert( pRight->eType==FTS5_STRING
239127 || pRight->eType==FTS5_TERM
239128 || pRight->eType==FTS5_EOF
239129 || (pRight->eType==FTS5_AND && pParse->bPhraseToAnd)
239142 if( pRight->eType==FTS5_EOF ){
239143 assert( pParse->apPhrase[pParse->nPhrase-1]==pRight->pNear->apPhrase[0] );
239144 sqlite3Fts5ParseNodeFree(pRight);
239152 pRet = pRight;
239154 pLeft->apChild[pLeft->nChild-1] = pRight;
239158 ap = &pParse->apPhrase[pParse->nPhrase-1-pRight->pNear->nPhrase];
239160 memmove(ap, &ap[1], sizeof(Fts5ExprPhrase*)*pRight->pNear->nPhrase);
239166 pRet = sqlite3Fts5ParseNode(pParse, FTS5_AND, pLeft, pRight, 0);
240333 Fts5HashEntry *pRight
240336 Fts5HashEntry *p2 = pRight;
241270 const u8 *pRight, int nRight /* Right hand side of comparison */
241273 int res = memcmp(pLeft->p, pRight, nCmp);
241287 static int fts5BufferCompare(Fts5Buffer *pLeft, Fts5Buffer *pRight){
241289 nCmp = MIN(pLeft->n, pRight->n);
241291 assert( nCmp<=0 || pRight->p!=0 );
241292 res = fts5Memcmp(pLeft->p, pRight->p, nCmp);
241293 return (res==0 ? (pLeft->n - pRight->n) : res);