Lines Matching refs:pOrderBy

1187   ExprList *pOrderBy = pWInfo->pOrderBy;  in allocateIndexInfo()  local
1227 if( pOrderBy ){ in allocateIndexInfo()
1228 int n = pOrderBy->nExpr; in allocateIndexInfo()
1230 Expr *pExpr = pOrderBy->a[i].pExpr; in allocateIndexInfo()
1239 if( pOrderBy->a[i].fg.sortFlags & KEYINFO_ORDER_BIGNULL ) break; in allocateIndexInfo()
1345 Expr *pExpr = pOrderBy->a[i].pExpr; in allocateIndexInfo()
1351 pIdxOrderBy[j].desc = pOrderBy->a[i].fg.sortFlags & KEYINFO_ORDER_DESC; in allocateIndexInfo()
3195 if( (pOB = pBuilder->pWInfo->pOrderBy)==0 ) return 0; in indexMightHelpWithOrderBy()
4356 ExprList *pOrderBy, /* ORDER BY or GROUP BY or DISTINCT clause to check */ in wherePathSatisfiesOrderBy() argument
4410 assert( pOrderBy!=0 ); in wherePathSatisfiesOrderBy()
4413 nOrderBy = pOrderBy->nExpr; in wherePathSatisfiesOrderBy()
4451 pOBExpr = sqlite3ExprSkipCollateAndLikely(pOrderBy->a[i].pExpr); in wherePathSatisfiesOrderBy()
4469 CollSeq *pColl1 = sqlite3ExprNNCollSeq(pParse, pOrderBy->a[i].pExpr); in wherePathSatisfiesOrderBy()
4584 pOBExpr = sqlite3ExprSkipCollateAndLikely(pOrderBy->a[i].pExpr); in wherePathSatisfiesOrderBy()
4600 pColl = sqlite3ExprNNCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr); in wherePathSatisfiesOrderBy()
4614 != (pOrderBy->a[i].fg.sortFlags&KEYINFO_ORDER_DESC) in wherePathSatisfiesOrderBy()
4619 rev = revIdx ^ (pOrderBy->a[i].fg.sortFlags & KEYINFO_ORDER_DESC); in wherePathSatisfiesOrderBy()
4624 if( isMatch && (pOrderBy->a[i].fg.sortFlags & KEYINFO_ORDER_BIGNULL) ){ in wherePathSatisfiesOrderBy()
4659 p = pOrderBy->a[i].pExpr; in wherePathSatisfiesOrderBy()
4814 if( pWInfo->pOrderBy==0 || nRowEst==0 ){ in wherePathSolver()
4817 nOrderBy = pWInfo->pOrderBy->nExpr; in wherePathSolver()
4898 pWInfo->pOrderBy, pFrom, pWInfo->wctrlFlags, in wherePathSolver()
5111 if( pWInfo->pOrderBy ){ in wherePathSolver()
5114 if( pFrom->isOrdered==pWInfo->pOrderBy->nExpr ){ in wherePathSolver()
5127 int rc = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pOrderBy, pFrom, in wherePathSolver()
5131 if( rc==pWInfo->pOrderBy->nExpr ){ in wherePathSolver()
5145 && pWInfo->nOBSat==pWInfo->pOrderBy->nExpr && nLoop>0 in wherePathSolver()
5148 int nOrder = wherePathSatisfiesOrderBy(pWInfo, pWInfo->pOrderBy, in wherePathSolver()
5152 if( nOrder==pWInfo->pOrderBy->nExpr ){ in wherePathSolver()
5252 if( pWInfo->pOrderBy ) pWInfo->nOBSat = pWInfo->pOrderBy->nExpr; in whereShortCut()
5364 if( pWInfo->pOrderBy ){ in whereOmitNoopJoin()
5365 tabUsed |= sqlite3WhereExprListUsage(&pWInfo->sMaskSet, pWInfo->pOrderBy); in whereOmitNoopJoin()
5625 ExprList *pOrderBy, /* An ORDER BY (or GROUP BY) clause, or NULL */ in sqlite3WhereBegin() argument
5660 testcase( pOrderBy && pOrderBy->nExpr==BMS-1 ); in sqlite3WhereBegin()
5661 if( pOrderBy && pOrderBy->nExpr>=BMS ) pOrderBy = 0; in sqlite3WhereBegin()
5695 pWInfo->pOrderBy = pOrderBy; in sqlite3WhereBegin()
5734 if( pOrderBy ) pWInfo->nOBSat = pOrderBy->nExpr; in sqlite3WhereBegin()
5809 }else if( pOrderBy==0 ){ in sqlite3WhereBegin()
5812 pWInfo->pOrderBy = pResultSet; in sqlite3WhereBegin()
5830 sSelect.pOrderBy = pOrderBy; in sqlite3WhereBegin()
5869 if( pWInfo->pOrderBy ){ in sqlite3WhereBegin()
5874 if( pWInfo->pOrderBy==0 && (db->flags & SQLITE_ReverseOrder)!=0 ){ in sqlite3WhereBegin()