• Home
  • Raw
  • Download

Lines Matching refs:pSub

79698   Mem *pSub,       /* Storage for keeping track of subprogram nesting */
79720 if( pSub!=0 ){
79721 if( pSub->flags&MEM_Blob ){
79724 nSub = pSub->n/sizeof(Vdbe*);
79725 apSub = (SubProgram **)pSub->z;
79762 if( pSub!=0 && aOp[i].p4type==P4_SUBPROGRAM ){
79769 p->rc = sqlite3VdbeMemGrow(pSub, nByte, nSub!=0);
79774 apSub = (SubProgram **)pSub->z;
79776 MemSetTypeFlag(pSub, MEM_Blob);
79777 pSub->n = nSub*sizeof(SubProgram*);
79843 Mem *pSub = 0; /* Memory cell hold array of subprogs */
79876 pSub = &p->aMem[9];
79878 pSub = 0;
79882 rc = sqlite3VdbeNextOpcode(p, pSub, p->explain==2, &p->pc, &i, &aOp);
81175 SubProgram *pSub, *pNext;
81178 for(pSub=p->pProgram; pSub; pSub=pNext){
81179 pNext = pSub->pNext;
81180 vdbeFreeOpArray(db, pSub->aOp, pSub->nOp);
81181 sqlite3DbFree(db, pSub);
99323 Select *pSub = p->pSrc->a[0].pSelect;
99325 assert( pSub->pPrior && pSub->pOrderBy==0 );
99326 pSub->pOrderBy = p->pOrderBy;
99423 Select *pSub = p->pSrc->a[0].pSelect;
99424 p->pOrderBy = pSub->pOrderBy;
99425 pSub->pOrderBy = 0;
133091 Select *pSub; /* The inner query or "subquery" */
133113 pSub = pSubitem->pSelect;
133114 assert( pSub!=0 );
133117 if( p->pWin || pSub->pWin ) return 0; /* Restriction (25) */
133120 pSubSrc = pSub->pSrc;
133127 if( pSub->pLimit && p->pLimit ) return 0; /* Restriction (13) */
133128 if( pSub->pLimit && pSub->pLimit->pRight ) return 0; /* Restriction (14) */
133129 if( (p->selFlags & SF_Compound)!=0 && pSub->pLimit ){
133133 if( pSub->selFlags & SF_Distinct ) return 0; /* Restriction (4) */
133134 if( pSub->pLimit && (pSrc->nSrc>1 || isAgg) ){
133137 if( p->pOrderBy && pSub->pOrderBy ){
133140 if( isAgg && pSub->pOrderBy ) return 0; /* Restriction (16) */
133141 if( pSub->pLimit && p->pWhere ) return 0; /* Restriction (19) */
133142 if( pSub->pLimit && (p->selFlags & SF_Distinct)!=0 ){
133145 if( pSub->selFlags & (SF_Recursive) ){
133194 if( pSub->pPrior ){
133195 if( pSub->pOrderBy ){
133201 for(pSub1=pSub; pSub1; pSub1=pSub1->pPrior){
133204 assert( pSub->pSrc!=0 );
133205 assert( pSub->pEList->nExpr==pSub1->pEList->nExpr );
133233 assert( (p->selFlags & SF_Recursive)==0 || pSub->pPrior==0 );
133237 pSub->selId, pSub, iFrom));
133278 for(pSub=pSub->pPrior; pSub; pSub=pSub->pPrior){
133308 pSub = pSub1 = pSubitem->pSelect;
133353 for(pParent=p; pParent; pParent=pParent->pPrior, pSub=pSub->pPrior){
133356 assert( pSub!=0 );
133357 pSubSrc = pSub->pSrc; /* FROM clause of subquery */
133416 if( pSub->pOrderBy && (pParent->selFlags & SF_NoopOrderBy)==0 ){
133427 ExprList *pOrderBy = pSub->pOrderBy;
133433 pSub->pOrderBy = 0;
133435 pWhere = pSub->pWhere;
133436 pSub->pWhere = 0;
133453 x.pEList = pSub->pEList;
133459 pParent->selFlags |= pSub->selFlags & SF_Compound;
133460 assert( (pSub->selFlags & SF_Distinct)==0 ); /* restriction (17b) */
133468 if( pSub->pLimit ){
133469 pParent->pLimit = pSub->pLimit;
133470 pSub->pLimit = 0;
134444 Select *pSub = pFrom->pSelect;
134452 if( pSub==0 || (pSub->selFlags & SF_NestedFrom)==0 ){
134453 pSub = 0;
134467 if( zTName && pSub
134468 && sqlite3MatchEName(&pSub->pEList->a[j], 0, zTName, 0)==0
134522 if( pSub ){
134523 pX->zEName = sqlite3DbStrDup(db, pSub->pEList->a[j].zEName);
134991 Select *pSub, *pPrior;
135004 pSub = p->pSrc->a[0].pSelect;
135005 if( pSub==0 ) return 0; /* The FROM is a subquery */
135006 if( pSub->pPrior==0 ) return 0; /* Must be a compound ry */
135008 if( pSub->op!=TK_ALL && pSub->pPrior ) return 0; /* Must be UNION ALL */
135009 if( pSub->pWhere ) return 0; /* No WHERE clause */
135010 if( pSub->pLimit ) return 0; /* No LIMIT clause */
135011 if( pSub->selFlags & SF_Aggregate ) return 0; /* Not an aggregate */
135012 pSub = pSub->pPrior; /* Repeat over compound */
135013 }while( pSub );
135020 pSub = p->pSrc->a[0].pSelect;
135024 while( pSub ){
135026 pPrior = pSub->pPrior;
135027 pSub->pPrior = 0;
135028 pSub->pNext = 0;
135029 pSub->selFlags |= SF_Aggregate;
135030 pSub->selFlags &= ~SF_Compound;
135031 pSub->nSelectRow = 0;
135032 sqlite3ExprListDelete(db, pSub->pEList);
135034 pSub->pEList = sqlite3ExprListAppend(pParse, 0, pTerm);
135036 sqlite3PExprAddSelect(pParse, pTerm, pSub);
135042 pSub = pPrior;
135180 Select *pSub = pItem->pSelect;
135202 if( pSub==0 ) continue;
135206 if( pTab->nCol!=pSub->pEList->nExpr ){
135208 pTab->nCol, pTab->zName, pSub->pEList->nExpr);
135219 if( (pSub->selFlags & SF_Aggregate)!=0 ) continue;
135220 assert( pSub->pGroupBy==0 );
135240 if( pSub->pOrderBy!=0
135315 Select *pSub;
135343 pSub = pItem->pSelect;
135344 if( pSub==0 ) continue;
135373 && pushDownWhereTerms(pParse, pSub, p->pWhere, pItem->iCursor,
135379 ("After WHERE-clause push-down into subquery %d:\n", pSub->selId));
135413 ExplainQueryPlan((pParse, 1, "CO-ROUTINE %u", pSub->selId));
135414 sqlite3Select(pParse, pSub, &dest);
135415 pItem->pTab->nRowLogEst = pSub->nSelectRow;
135449 pSub->nSelectRow = pPrior->pSelect->nSelectRow;
135452 ExplainQueryPlan((pParse, 1, "MATERIALIZE %u", pSub->selId));
135453 sqlite3Select(pParse, pSub, &dest);
135455 pItem->pTab->nRowLogEst = pSub->nSelectRow;
151903 ExprList *pSub;
151956 if( p->pSub ){
151958 for(i=0; i<p->pSub->nExpr; i++){
151959 if( 0==sqlite3ExprCompare(0, p->pSub->a[i].pExpr, pExpr, -1) ){
151968 p->pSub = sqlite3ExprListAppend(pParse, p->pSub, pDup);
151970 if( p->pSub ){
151979 pExpr->iColumn = (iCol<0 ? p->pSub->nExpr-1: iCol);
152036 sRewrite.pSub = *ppSub;
152048 *ppSub = sRewrite.pSub;
152069 Expr *pSub;
152070 for(pSub=pDup; ExprHasProperty(pSub, EP_Skip); pSub=pSub->pLeft){
152071 assert( pSub );
152073 if( sqlite3ExprIsInteger(pSub, &iDummy) ){
152074 pSub->op = TK_NULL;
152075 pSub->flags &= ~(EP_IntValue|EP_IsTrue|EP_IsFalse);
152076 pSub->u.zToken = 0;
152115 Select *pSub = 0; /* The subquery */
152210 pSub = sqlite3SelectNew(
152213 SELECTTRACE(1,pParse,pSub,
152219 p->pSrc->a[0].pSelect = pSub;
152221 pSub->selFlags |= SF_Expanded;
152222 pTab2 = sqlite3ResultSetOfSelect(pParse, pSub, SQLITE_AFF_NONE);
152223 pSub->selFlags |= (selFlags & SF_Aggregate);
152238 sqlite3WalkSelect(&w, pSub);
152241 sqlite3SelectDelete(db, pSub);
215004 static void fts5ExprAddChildren(Fts5ExprNode *p, Fts5ExprNode *pSub){
215005 if( p->eType!=FTS5_NOT && pSub->eType==p->eType ){
215006 int nByte = sizeof(Fts5ExprNode*) * pSub->nChild;
215007 memcpy(&p->apChild[p->nChild], pSub->apChild, nByte);
215008 p->nChild += pSub->nChild;
215009 sqlite3_free(pSub);
215011 p->apChild[p->nChild++] = pSub;
219542 const u8 *pSub = pPos;
219543 int nSub = fts5IndexExtractCol(&pSub, nPos, pColset->aiCol[i]);
219545 fts5BufferAppendBlob(pRc, pBuf, nSub, pSub);