Lines Matching refs:pItem
20008 struct SrcList_item *pItem = &pSrc->a[k]; in sqlite3VXPrintf() local
20010 if( pItem->zDatabase ){ in sqlite3VXPrintf()
20011 sqlite3StrAccumAppend(pAccum, pItem->zDatabase, -1); in sqlite3VXPrintf()
20014 sqlite3StrAccumAppend(pAccum, pItem->zName, -1); in sqlite3VXPrintf()
73092 struct ExprList_item *pItem;
73094 for(i=p->nExpr, pItem=p->a; i>0; i--, pItem++){
73095 if( sqlite3WalkExpr(pWalker, pItem->pExpr) ) return WRC_Abort;
73128 struct SrcList_item *pItem;
73132 for(i=pSrc->nSrc, pItem=pSrc->a; i>0; i--, pItem++){
73133 if( sqlite3WalkSelect(pWalker, pItem->pSelect) ){
73324 struct SrcList_item *pItem; /* Use for looping over pSrcList items */
73345 for(i=0, pItem=pSrcList->a; i<pSrcList->nSrc; i++, pItem++){
73350 pTab = pItem->pTab;
73355 if( pItem->zAlias ){
73356 char *zTabName = pItem->zAlias;
73369 pExpr->iTable = pItem->iCursor;
73372 pMatch = pItem;
73381 if( pItem->jointype & JT_NATURAL ) continue;
73382 if( nameInUsingClause(pItem->pUsing, zCol) ) continue;
73385 pExpr->iTable = pItem->iCursor;
73387 pMatch = pItem;
73583 struct SrcList_item *pItem = &pSrc->a[iSrc];
73584 p->pTab = pItem->pTab;
73585 p->iTable = pItem->iCursor;
73592 pItem->colUsed |= ((Bitmask)1)<<(iCol>=BMS ? BMS-1 : iCol);
73639 struct SrcList_item *pItem;
73641 pItem = pSrcList->a;
73643 pExpr->pTab = pItem->pTab;
73644 pExpr->iTable = pItem->iCursor;
73934 struct ExprList_item *pItem;
73938 for(i=0, pItem=pOrderBy->a; i<pOrderBy->nExpr; i++, pItem++){
73941 if( pItem->done ) continue;
73942 pE = pItem->pExpr;
73963 pItem->pExpr = pE = sqlite3Expr(db, TK_INTEGER, 0);
73968 pItem->iOrderByCol = (u16)iCol;
73969 pItem->done = 1;
74005 struct ExprList_item *pItem;
74016 for(i=0, pItem=pOrderBy->a; i<pOrderBy->nExpr; i++, pItem++){
74017 if( pItem->iOrderByCol ){
74018 if( pItem->iOrderByCol>pEList->nExpr ){
74022 resolveAlias(pParse, pEList, pItem->iOrderByCol-1, pItem->pExpr, zType);
74054 struct ExprList_item *pItem; /* A term of the ORDER BY clause */
74061 for(i=0, pItem=pOrderBy->a; i<pOrderBy->nExpr; i++, pItem++){
74062 Expr *pE = pItem->pExpr;
74069 pItem->iOrderByCol = (u16)iCol;
74080 pItem->iOrderByCol = (u16)iCol;
74085 pItem->iOrderByCol = 0;
74168 struct SrcList_item *pItem = &p->pSrc->a[i];
74169 if( pItem->pSelect ){
74181 if( pItem->zName ) pParse->zAuthContext = pItem->zName;
74182 sqlite3ResolveSelectNames(pParse, pItem->pSelect, pOuterNC);
74187 assert( pItem->isCorrelated==0 && nRef<=0 );
74188 pItem->isCorrelated = (nRef!=0);
74247 struct ExprList_item *pItem;
74252 for(i=0, pItem=pGroupBy->a; i<pGroupBy->nExpr; i++, pItem++){
74253 if( ExprHasProperty(pItem->pExpr, EP_Agg) ){
75244 struct ExprList_item *pItem, *pOldItem;
75252 pNew->a = pItem = sqlite3DbMallocRaw(db, i*sizeof(p->a[0]) );
75253 if( pItem==0 ){
75258 for(i=0; i<p->nExpr; i++, pItem++, pOldItem++){
75260 pItem->pExpr = sqlite3ExprDup(db, pOldExpr, flags);
75261 pItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
75262 pItem->zSpan = sqlite3DbStrDup(db, pOldItem->zSpan);
75263 pItem->sortOrder = pOldItem->sortOrder;
75264 pItem->done = 0;
75265 pItem->iOrderByCol = pOldItem->iOrderByCol;
75266 pItem->iAlias = pOldItem->iAlias;
75403 struct ExprList_item *pItem = &pList->a[pList->nExpr++];
75404 memset(pItem, 0, sizeof(*pItem));
75405 pItem->pExpr = pExpr;
75432 struct ExprList_item *pItem;
75434 pItem = &pList->a[pList->nExpr-1];
75435 assert( pItem->zName==0 );
75436 pItem->zName = sqlite3DbStrNDup(pParse->db, pName->z, pName->n);
75437 if( dequote && pItem->zName ) sqlite3Dequote(pItem->zName);
75457 struct ExprList_item *pItem = &pList->a[pList->nExpr-1];
75459 assert( db->mallocFailed || pItem->pExpr==pSpan->pExpr );
75460 sqlite3DbFree(db, pItem->zSpan);
75461 pItem->zSpan = sqlite3DbStrNDup(db, (char*)pSpan->zStart,
75488 struct ExprList_item *pItem;
75491 for(pItem=pList->a, i=0; i<pList->nExpr; i++, pItem++){
75492 sqlite3ExprDelete(db, pItem->pExpr);
75493 sqlite3DbFree(db, pItem->zName);
75494 sqlite3DbFree(db, pItem->zSpan);
76084 struct ExprList_item *pItem;
76096 for(i=pList->nExpr, pItem=pList->a; i>0; i--, pItem++){
76097 Expr *pE2 = pItem->pExpr;
77686 struct ExprList_item *pItem = pList->a;
77687 for(; i>0; i--, pItem++){
77688 if( ALWAYS(pItem->pExpr) ) pItem->pExpr->flags |= EP_FixedDest;
77746 struct ExprList_item *pItem;
77752 for(pItem=pList->a, i=0; i<n; i++, pItem++){
77753 Expr *pExpr = pItem->pExpr;
78213 struct SrcList_item *pItem = pSrcList->a;
78214 for(i=0; i<pSrcList->nSrc; i++, pItem++){
78217 if( pExpr->iTable==pItem->iCursor ){
78282 struct AggInfo_func *pItem = pAggInfo->aFunc;
78283 for(i=0; i<pAggInfo->nFunc; i++, pItem++){
78284 if( sqlite3ExprCompare(pItem->pExpr, pExpr)==0 ){
78295 pItem = &pAggInfo->aFunc[i];
78296 pItem->pExpr = pExpr;
78297 pItem->iMem = ++pParse->nMem;
78299 pItem->pFunc = sqlite3FindFunction(pParse->db,
78303 pItem->iDistinct = pParse->nTab++;
78305 pItem->iDistinct = -1;
78357 struct ExprList_item *pItem;
78360 for(pItem=pList->a, i=0; i<pList->nExpr; i++, pItem++){
78361 sqlite3ExprAnalyzeAggregates(pNC, pItem->pExpr);
80848 struct SrcList_item *pItem;
80852 for(i=0, pItem=pList->a; i<pList->nSrc; i++, pItem++){
80853 if( pItem->zDatabase==0 ){
80854 pItem->zDatabase = sqlite3DbStrDup(pFix->pParse->db, zDb);
80855 }else if( sqlite3StrICmp(pItem->zDatabase,zDb)!=0 ){
80858 pFix->zType, pFix->pName, pItem->zDatabase);
80862 if( sqlite3FixSelect(pFix, pItem->pSelect) ) return 1;
80863 if( sqlite3FixExpr(pFix, pItem->pOn) ) return 1;
80913 struct ExprList_item *pItem;
80915 for(i=0, pItem=pList->a; i<pList->nExpr; i++, pItem++){
80916 if( sqlite3FixExpr(pFix, pItem->pExpr) ){
84438 struct SrcList_item *pItem;
84450 pItem = &pList->a[pList->nSrc-1];
84459 pItem->zName = sqlite3NameFromToken(db, pTable);
84460 pItem->zDatabase = sqlite3NameFromToken(db, pDatabase);
84469 struct SrcList_item *pItem;
84472 for(i=0, pItem=pList->a; i<pList->nSrc; i++, pItem++){
84473 if( pItem->iCursor>=0 ) break;
84474 pItem->iCursor = pParse->nTab++;
84475 if( pItem->pSelect ){
84476 sqlite3SrcListAssignCursors(pParse, pItem->pSelect->pSrc);
84487 struct SrcList_item *pItem;
84489 for(pItem=pList->a, i=0; i<pList->nSrc; i++, pItem++){
84490 sqlite3DbFree(db, pItem->zDatabase);
84491 sqlite3DbFree(db, pItem->zName);
84492 sqlite3DbFree(db, pItem->zAlias);
84493 sqlite3DbFree(db, pItem->zIndex);
84494 sqlite3DeleteTable(db, pItem->pTab);
84495 sqlite3SelectDelete(db, pItem->pSelect);
84496 sqlite3ExprDelete(db, pItem->pOn);
84497 sqlite3IdListDelete(db, pItem->pUsing);
84528 struct SrcList_item *pItem;
84540 pItem = &p->a[p->nSrc-1];
84543 pItem->zAlias = sqlite3NameFromToken(db, pAlias);
84545 pItem->pSelect = pSubquery;
84546 pItem->pOn = pOn;
84547 pItem->pUsing = pUsing;
84565 struct SrcList_item *pItem = &p->a[p->nSrc-1];
84566 assert( pItem->notIndexed==0 && pItem->zIndex==0 );
84570 pItem->notIndexed = 1;
84572 pItem->zIndex = sqlite3NameFromToken(pParse->db, pIndexedBy);
85503 struct SrcList_item *pItem = pSrc->a;
85505 assert( pItem && pSrc->nSrc==1 );
85506 pTab = sqlite3LocateTable(pParse, 0, pItem->zName, pItem->zDatabase);
85507 sqlite3DeleteTable(pParse->db, pItem->pTab);
85508 pItem->pTab = pTab;
85512 if( sqlite3IndexedByLookup(pParse, pItem) ){
88568 struct SrcList_item *pItem = pSrc->a;
88569 pItem->pTab = pFKey->pFrom;
88570 pItem->zName = pFKey->pFrom->zName;
88571 pItem->pTab->nRef++;
88572 pItem->iCursor = pParse->nTab++;
88586 pItem->zName = 0;
90574 struct SrcList_item *pItem; /* An element of pSelect->pSrc */
90644 pItem = pSelect->pSrc->a;
90645 pSrc = sqlite3LocateTable(pParse, 0, pItem->zName, pItem->zDatabase);
95263 struct ExprList_item *pItem;
95273 for(i=0, pItem=pList->a; i<nExpr; i++, pItem++){
95275 pColl = sqlite3ExprCollSeq(pParse, pItem->pExpr);
95280 pInfo->aSortOrder[i] = pItem->sortOrder;
96726 struct ExprList_item *pItem;
96727 for(j=0, pItem=pOrderBy->a; j<nOrderBy; j++, pItem++){
96728 assert( pItem->iOrderByCol>0 );
96729 if( pItem->iOrderByCol==i ) break;
96751 struct ExprList_item *pItem;
96752 for(i=0, pItem=pOrderBy->a; i<nOrderBy; i++, pItem++){
96753 assert( pItem->iOrderByCol>0 && pItem->iOrderByCol<=p->pEList->nExpr );
96754 aPermute[i] = pItem->iOrderByCol - 1;
97076 struct SrcList_item *pItem;
97088 for(i=pSrc->nSrc, pItem=pSrc->a; i>0; i--, pItem++){
97089 substSelect(db, pItem->pSelect, iTable, pEList);
98128 struct ExprList_item *pItem;
98131 for(j=0, pItem=pList->a; !pColl && j<nArg; j++, pItem++){
98132 pColl = sqlite3ExprCollSeq(pParse, pItem->pExpr);
98328 struct SrcList_item *pItem = &pTabList->a[i];
98330 Select *pSub = pItem->pSelect;
98334 if( pItem->addrFillSub ){
98335 sqlite3VdbeAddOp2(v, OP_Gosub, pItem->regReturn, pItem->addrFillSub);
98365 assert( pItem->addrFillSub==0 );
98366 pItem->regReturn = ++pParse->nMem;
98367 topAddr = sqlite3VdbeAddOp2(v, OP_Integer, 0, pItem->regReturn);
98368 pItem->addrFillSub = topAddr+1;
98369 VdbeNoopComment((v, "materialize %s", pItem->pTab->zName));
98370 if( pItem->isCorrelated==0 ){
98376 sqlite3SelectDestInit(&dest, SRT_EphemTab, pItem->iCursor);
98377 explainSetInteger(pItem->iSelectId, (u8)pParse->iNextSelectId);
98379 pItem->pTab->nRowEst = (unsigned)pSub->nSelectRow;
98381 retAddr = sqlite3VdbeAddOp1(v, OP_Return, pItem->regReturn);
98382 VdbeComment((v, "end %s", pItem->pTab->zName));
98599 struct ExprList_item *pItem; /* For looping over expression in a list */
98601 for(k=p->pEList->nExpr, pItem=p->pEList->a; k>0; k--, pItem++){
98602 pItem->iAlias = 0;
98604 for(k=pGroupBy->nExpr, pItem=pGroupBy->a; k>0; k--, pItem++){
98605 pItem->iAlias = 0;
99042 struct SrcList_item *pItem = &p->pSrc->a[i];
99043 sqlite3ExplainPrintf(pVdbe, "{%d,*} = ", pItem->iCursor);
99044 if( pItem->pSelect ){
99045 sqlite3ExplainSelect(pVdbe, pItem->pSelect);
99046 if( pItem->pTab ){
99047 sqlite3ExplainPrintf(pVdbe, " (tabname=%s)", pItem->pTab->zName);
99049 }else if( pItem->zName ){
99050 sqlite3ExplainPrintf(pVdbe, "%s", pItem->zName);
99052 if( pItem->zAlias ){
99053 sqlite3ExplainPrintf(pVdbe, " (AS %s)", pItem->zAlias);
99055 if( pItem->jointype & JT_LEFT ){
106260 struct SrcList_item *pItem = &pTabList->a[pLevel->iFrom];
106275 if( pItem->pSelect ){
106276 zMsg = sqlite3MAppendf(db, zMsg, "%s SUBQUERY %d", zMsg,pItem->iSelectId);
106278 zMsg = sqlite3MAppendf(db, zMsg, "%s TABLE %s", zMsg, pItem->zName);
106281 if( pItem->zAlias ){
106282 zMsg = sqlite3MAppendf(db, zMsg, "%s AS %s", zMsg, pItem->zAlias);
106285 char *zWhere = explainIndexRange(db, pLevel, pItem->pTab);