• Home
  • Raw
  • Download

Lines Matching refs:pSelect

10182   Select *pSelect;     /* NULL for tables.  Points to definition if a view. */  member
10564 Select *pSelect; /* Used for sub-selects and "<expr> IN (<select>)" */ member
10748 Select *pSelect; /* A SELECT statement used in place of a table name */ member
11281 Select *pSelect; /* SELECT statment or RHS of INSERT INTO .. SELECT ... */ member
71355 if( pTab && pTab->pSelect ){
73078 if( sqlite3WalkSelect(pWalker, pExpr->x.pSelect) ) return WRC_Abort;
73133 if( sqlite3WalkSelect(pWalker, pItem->pSelect) ){
73478 assert( pExpr->x.pSelect==0 );
73762 sqlite3WalkSelect(pWalker, pExpr->x.pSelect);
73835 Select *pSelect, /* The SELECT statement with the ORDER BY clause */
73846 pEList = pSelect->pEList;
73852 nc.pSrcList = pSelect->pSrc;
73908 Select *pSelect /* The SELECT statement containing the ORDER BY */
73916 pOrderBy = pSelect->pOrderBy;
73928 pSelect->pNext = 0;
73929 while( pSelect->pPrior ){
73930 pSelect->pPrior->pNext = pSelect;
73931 pSelect = pSelect->pPrior;
73933 while( pSelect && moreToDo ){
73936 pEList = pSelect->pEList;
73954 iCol = resolveOrderByTermToExprList(pParse, pSelect, pDup);
73974 pSelect = pSelect->pNext;
73998 Select *pSelect, /* The SELECT statement containing the clause */
74014 pEList = pSelect->pEList;
74048 Select *pSelect, /* The SELECT statement holding pOrderBy */
74059 nResult = pSelect->pEList->nExpr;
74063 iCol = resolveAsName(pParse, pSelect->pEList, pE);
74090 return sqlite3ResolveOrderGroupBy(pParse, pSelect, pOrderBy, zType);
74169 if( pItem->pSelect ){
74182 sqlite3ResolveSelectNames(pParse, pItem->pSelect, pOuterNC);
74428 return sqlite3ExprAffinity(pExpr->x.pSelect->pEList->a[0].pExpr);
74559 aff = sqlite3CompareAffinity(pExpr->x.pSelect->pEList->a[0].pExpr, aff);
74719 heightOfSelect(p->x.pSelect, &nHeight);
75019 sqlite3SelectDelete(db, p->x.pSelect);
75193 pNew->x.pSelect = sqlite3SelectDup(db, p->x.pSelect, isReduced);
75307 pNewItem->pSelect = sqlite3SelectDup(db, pOldItem->pSelect, flags);
75759 if( pSrc->a[0].pSelect ) return 0; /* FROM is not a subquery or view */
75762 assert( pTab->pSelect==0 ); /* FROM clause is not a view */
75848 p = (ExprHasProperty(pX, EP_xIsSelect) ? pX->x.pSelect : 0);
76065 pExpr->x.pSelect->iLimit = 0;
76066 if( sqlite3Select(pParse, pExpr->x.pSelect, &dest) ){
76069 pEList = pExpr->x.pSelect->pEList;
76152 pSel = pExpr->x.pSelect;
77481 sqlite3ExplainSelect(pOut, pExpr->x.pSelect);
77487 sqlite3ExplainSelect(pOut, pExpr->x.pSelect);
77496 sqlite3ExplainSelect(pOut, pExpr->x.pSelect);
78321 static int analyzeAggregatesInSelect(Walker *pWalker, Select *pSelect){
78325 sqlite3WalkSelect(pWalker, pSelect);
78878 if( pTab->pSelect ){
79202 if( pTab->pSelect ){
80862 if( sqlite3FixSelect(pFix, pItem->pSelect) ) return 1;
80871 Select *pSelect /* The SELECT statement to be fixed to one database */
80873 while( pSelect ){
80874 if( sqlite3FixExprList(pFix, pSelect->pEList) ){
80877 if( sqlite3FixSrcList(pFix, pSelect->pSrc) ){
80880 if( sqlite3FixExpr(pFix, pSelect->pWhere) ){
80883 if( sqlite3FixExpr(pFix, pSelect->pHaving) ){
80886 pSelect = pSelect->pPrior;
80897 if( sqlite3FixSelect(pFix, pExpr->x.pSelect) ) return 1;
80930 if( sqlite3FixSelect(pFix, pStep->pSelect) ){
81734 sqlite3SelectDelete(db, pTable->pSelect);
82655 Select *pSelect /* Select from a "CREATE ... AS SELECT" */
82661 if( (pEnd==0 && pSelect==0) || db->mallocFailed ){
82667 assert( !db->init.busy || !pSelect );
82724 if( p->pSelect==0 ){
82749 if( pSelect ){
82758 sqlite3Select(pParse, pSelect, &dest);
82761 pSelTab = sqlite3ResultSetOfSelect(pParse, pSelect);
82773 if( pSelect ){
82840 if( !p->pSelect ){
82843 assert( !pSelect && pCons && pEnd );
82863 Select *pSelect, /* A SELECT statement that will become the new view */
82878 sqlite3SelectDelete(db, pSelect);
82884 sqlite3SelectDelete(db, pSelect);
82890 && sqlite3FixSelect(&sFix, pSelect)
82892 sqlite3SelectDelete(db, pSelect);
82901 p->pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE);
82902 sqlite3SelectDelete(db, pSelect);
82987 assert( pTable->pSelect );
82988 pSel = sqlite3SelectDup(db, pTable->pSelect, 0);
83037 if( pTab->pSelect ){
83350 if( isView && pTab->pSelect==0 ){
83354 if( !isView && pTab->pSelect ){
83752 if( pTab->pSelect ){
84475 if( pItem->pSelect ){
84476 sqlite3SrcListAssignCursors(pParse, pItem->pSelect->pSrc);
84495 sqlite3SelectDelete(db, pItem->pSelect);
84545 pItem->pSelect = pSubquery;
85545 if( !viewOk && pTab->pSelect ){
85570 pDup = sqlite3SelectDup(db, pView->pSelect, 0);
85579 pFrom->a[0].pSelect = pDup;
85616 Select *pSelect = NULL; /* Complete SELECT tree */
85657 pSelect = sqlite3SelectNew(pParse,pEList,pSelectSrc,pWhere,0,0,
85659 if( pSelect == 0 ) return 0;
85667 pInClause->x.pSelect = pSelect;
85674 sqlite3SelectDelete(pParse->db, pSelect);
85738 isView = pTab->pSelect!=0;
86017 if( pTab->pSelect==0 ){
86112 if( pTab->pSelect || (pParse->db->flags & SQLITE_IdxRealAsInt)!=0 ){
88352 sqlite3SelectDelete(dbMem, pStep->pSelect);
88377 if( (db->flags&SQLITE_ForeignKeys) && !IsVirtual(pTab) && !pTab->pSelect ){
88733 Select *pSelect = 0; /* If RESTRICT, "SELECT RAISE(...)" */
88824 pSelect = sqlite3SelectNew(pParse,
88850 pStep->pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE);
88863 sqlite3SelectDelete(db, pSelect);
89289 Select *pSelect, /* A SELECT statement to use as the data source */
89400 Select *pSelect, /* A SELECT statement to use as the data source */
89470 isView = pTab->pSelect!=0;
89503 sqlite3BeginWriteOperation(pParse, pSelect || pTrigger, iDb);
89515 if( pColumn==0 && xferOptimization(pParse, pTab, pSelect, onError, iDb) ){
89532 if( pSelect ){
89567 rc = sqlite3Select(pParse, pSelect, &dest);
89579 assert( pSelect->pEList );
89580 nColumn = pSelect->pEList->nExpr;
89744 }else if( pSelect ){
89788 assert( pSelect==0 ); /* Otherwise useTempTable is true */
89817 assert( pSelect==0 ); /* Otherwise useTempTable is true */
89852 }else if( pSelect ){
89920 }else if( pSelect ){
89971 }else if( pSelect ){
90007 sqlite3SelectDelete(db, pSelect);
90127 assert( pTab->pSelect==0 ); /* This table is not a VIEW */
90407 assert( pTab->pSelect==0 ); /* This table is not a VIEW */
90567 Select *pSelect, /* A SELECT statement to use as the data source */
90587 if( pSelect==0 ){
90602 assert(pSelect->pSrc); /* allocated even if there is no FROM clause */
90603 if( pSelect->pSrc->nSrc!=1 ){
90606 if( pSelect->pSrc->a[0].pSelect ){
90609 if( pSelect->pWhere ){
90612 if( pSelect->pOrderBy ){
90617 if( pSelect->pGroupBy ){
90620 if( pSelect->pLimit ){
90623 assert( pSelect->pOffset==0 ); /* Must be so if pLimit==0 */
90624 if( pSelect->pPrior ){
90627 if( pSelect->selFlags & SF_Distinct ){
90630 pEList = pSelect->pEList;
90644 pItem = pSelect->pSrc->a;
90657 if( pSrc->pSelect ){
94921 Select *pSelect, /* The whole SELECT statement */
94934 if( pSelect->selFlags & SF_UseSorter ){
94942 if( pSelect->iLimit ){
94945 if( pSelect->iOffset ){
94946 iLimit = pSelect->iOffset+1;
94948 iLimit = pSelect->iLimit;
95534 pS = pTabList->a[j].pSelect;
95606 Select *pS = pExpr->x.pSelect;
95845 Select *pSelect /* SELECT used to determine types and collations */
95855 assert( pSelect!=0 );
95856 assert( (pSelect->selFlags & SF_Resolved)!=0 );
95857 assert( nCol==pSelect->pEList->nExpr || db->mallocFailed );
95860 sNC.pSrcList = pSelect->pSrc;
95861 a = pSelect->pEList->a;
95878 SQLITE_PRIVATE Table *sqlite3ResultSetOfSelect(Parse *pParse, Select *pSelect){
95886 sqlite3SelectPrep(pParse, pSelect, 0);
95888 while( pSelect->pPrior ) pSelect = pSelect->pPrior;
95900 selectColumnsFromExprList(pParse, pSelect->pEList, &pTab->nCol, &pTab->aCol);
95901 selectAddColumnTypeAndCollation(pParse, pTab->nCol, pTab->aCol, pSelect);
97050 substSelect(db, pExpr->x.pSelect, iTable, pEList);
97089 substSelect(db, pItem->pSelect, iTable, pEList);
97240 pSub = pSubitem->pSelect;
97411 pSub = pSub1 = pSubitem->pSelect;
97422 pSubitem->pSelect = 0;
97634 || p->pSrc->nSrc!=1 || p->pSrc->a[0].pSelect
97640 assert( pTab && !pTab->pSelect && pExpr );
97737 Select *pSel = pFrom->pSelect;
97760 if( pTab->pSelect || IsVirtual(pTab) ){
97763 assert( pFrom->pSelect==0 );
97764 pFrom->pSelect = sqlite3SelectDup(db, pTab->pSelect, 0);
97765 sqlite3WalkSelect(pWalker, pFrom->pSelect);
97946 static void sqlite3SelectExpand(Parse *pParse, Select *pSelect){
97951 sqlite3WalkSelect(&w, pSelect);
97984 Select *pSel = pFrom->pSelect;
98003 static void sqlite3SelectAddTypeInfo(Parse *pParse, Select *pSelect){
98009 sqlite3WalkSelect(&w, pSelect);
98330 Select *pSub = pItem->pSelect;
99044 if( pItem->pSelect ){
99045 sqlite3ExplainSelect(pVdbe, pItem->pSelect);
99340 sqlite3SelectDelete(db, pTmp->pSelect);
99518 if( pTab->pSelect && tr_tm!=TK_INSTEAD ){
99523 if( !pTab->pSelect && tr_tm==TK_INSTEAD ){
99665 SQLITE_PRIVATE TriggerStep *sqlite3TriggerSelectStep(sqlite3 *db, Select *pSelect){
99668 sqlite3SelectDelete(db, pSelect);
99672 pTriggerStep->pSelect = pSelect;
99713 Select *pSelect, /* A SELECT statement that supplies values */
99718 assert(pEList == 0 || pSelect == 0);
99719 assert(pEList != 0 || pSelect != 0 || db->mallocFailed);
99723 pTriggerStep->pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE);
99731 sqlite3SelectDelete(db, pSelect);
100060 sqlite3SelectDup(db, pStep->pSelect, 0),
100075 Select *pSelect = sqlite3SelectDup(db, pStep->pSelect, 0);
100077 sqlite3Select(pParse, pSelect, &sDest);
100078 sqlite3SelectDelete(db, pSelect);
100503 if( !pTab->pSelect ){
100591 isView = pTab->pSelect!=0;
101051 Select *pSelect = 0; /* The SELECT statement */
101078 pSelect = sqlite3SelectNew(pParse, pEList, pSrc, pWhere, 0, 0, 0, 0, 0, 0);
101091 sqlite3Select(pParse, pSelect, &dest);
101111 sqlite3SelectDelete(db, pSelect);
102151 && !pParse->pNewTable->pSelect
102996 mask |= exprSelectTableUsage(pMaskSet, p->x.pSelect);
103024 mask |= exprSelectTableUsage(pMaskSet, pSrc->a[i].pSelect);
103681 pTerm->prereqRight = exprSelectTableUsage(pMaskSet, pExpr->x.pSelect);
106275 if( pItem->pSelect ){
107539 if( (pTab->tabFlags & TF_Ephemeral)!=0 || pTab->pSelect ){
107729 && pTab->pSelect==0
107855 Select *pSelect;
109242 sqlite3SelectDelete(pParse->db, (yypminor->yy487).pSelect);
110374 … yymsp[-2].minor.yy347, yymsp[0].minor.yy487.pList, yymsp[0].minor.yy487.pSelect, yymsp[-1].minor.…
110391 yygotominor.yy487.pSelect = 0;
110398 …yymsp[-4].minor.yy487.pSelect = sqlite3SelectNew(pParse, yymsp[-4].minor.yy487.pList, 0, 0, 0, 0, …
110402 if( yymsp[-4].minor.yy487.pSelect==0 || pRight==0 ){
110404 sqlite3SelectDelete(pParse->db, yymsp[-4].minor.yy487.pSelect);
110405 yygotominor.yy487.pSelect = 0;
110408 pRight->pPrior = yymsp[-4].minor.yy487.pSelect;
110411 yygotominor.yy487.pSelect = pRight;
110635 yygotominor.yy342.pExpr->x.pSelect = yymsp[-1].minor.yy159;
110649 yygotominor.yy342.pExpr->x.pSelect = yymsp[-1].minor.yy159;
110665 yygotominor.yy342.pExpr->x.pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0,0);
110680 p->x.pSelect = yymsp[-1].minor.yy159;
110866 … yymsp[-1].minor.yy180, yymsp[0].minor.yy487.pList, yymsp[0].minor.yy487.pSelect, yymsp[-4].minor.…
115037 if( !pTab || pTab->pSelect ){
125999 static int langidFromSelect(Fts3Table *p, sqlite3_stmt *pSelect){
126001 if( p->zLanguageid ) iLangid = sqlite3_column_int(pSelect, p->nColumn+1);
126017 sqlite3_stmt *pSelect;
126020 rc = fts3SqlStmt(p, SQL_SELECT_CONTENT_BY_ROWID, &pSelect, &pRowid);
126022 if( SQLITE_ROW==sqlite3_step(pSelect) ){
126024 int iLangid = langidFromSelect(p, pSelect);
126025 rc = fts3PendingTermsDocid(p, iLangid, sqlite3_column_int64(pSelect, 0));
126027 const char *zText = (const char *)sqlite3_column_text(pSelect, i);
126029 aSz[p->nColumn] += sqlite3_column_bytes(pSelect, i);
126032 sqlite3_reset(pSelect);
126037 rc = sqlite3_reset(pSelect);
126039 sqlite3_reset(pSelect);
129624 sqlite3_stmt *pSelect = 0;
129640 rc = fts3MatchinfoSelectDoctotal(pTab, &pSelect, &nDoc, 0);
129650 rc = fts3MatchinfoSelectDoctotal(pTab, &pSelect, &nDoc, &a);
129695 rc = fts3MatchinfoSelectDoctotal(pTab, &pSelect, &pInfo->nDoc, 0);
129709 sqlite3_reset(pSelect);