• Home
  • Raw
  • Download

Lines Matching refs:pSub

79522   Mem *pSub,       /* Storage for keeping track of subprogram nesting */
79544 if( pSub!=0 ){
79545 if( pSub->flags&MEM_Blob ){
79548 nSub = pSub->n/sizeof(Vdbe*);
79549 apSub = (SubProgram **)pSub->z;
79586 if( pSub!=0 && aOp[i].p4type==P4_SUBPROGRAM ){
79593 p->rc = sqlite3VdbeMemGrow(pSub, nByte, nSub!=0);
79598 apSub = (SubProgram **)pSub->z;
79600 MemSetTypeFlag(pSub, MEM_Blob);
79601 pSub->n = nSub*sizeof(SubProgram*);
79667 Mem *pSub = 0; /* Memory cell hold array of subprogs */
79700 pSub = &p->aMem[9];
79702 pSub = 0;
79706 rc = sqlite3VdbeNextOpcode(p, pSub, p->explain==2, &p->pc, &i, &aOp);
80993 SubProgram *pSub, *pNext;
80996 for(pSub=p->pProgram; pSub; pSub=pNext){
80997 pNext = pSub->pNext;
80998 vdbeFreeOpArray(db, pSub->aOp, pSub->nOp);
80999 sqlite3DbFree(db, pSub);
99121 Select *pSub = p->pSrc->a[0].pSelect;
99123 assert( pSub->pPrior && pSub->pOrderBy==0 );
99124 pSub->pOrderBy = p->pOrderBy;
99221 Select *pSub = p->pSrc->a[0].pSelect;
99222 p->pOrderBy = pSub->pOrderBy;
99223 pSub->pOrderBy = 0;
132733 Select *pSub; /* The inner query or "subquery" */
132755 pSub = pSubitem->pSelect;
132756 assert( pSub!=0 );
132759 if( p->pWin || pSub->pWin ) return 0; /* Restriction (25) */
132762 pSubSrc = pSub->pSrc;
132769 if( pSub->pLimit && p->pLimit ) return 0; /* Restriction (13) */
132770 if( pSub->pLimit && pSub->pLimit->pRight ) return 0; /* Restriction (14) */
132771 if( (p->selFlags & SF_Compound)!=0 && pSub->pLimit ){
132775 if( pSub->selFlags & SF_Distinct ) return 0; /* Restriction (4) */
132776 if( pSub->pLimit && (pSrc->nSrc>1 || isAgg) ){
132779 if( p->pOrderBy && pSub->pOrderBy ){
132782 if( isAgg && pSub->pOrderBy ) return 0; /* Restriction (16) */
132783 if( pSub->pLimit && p->pWhere ) return 0; /* Restriction (19) */
132784 if( pSub->pLimit && (p->selFlags & SF_Distinct)!=0 ){
132787 if( pSub->selFlags & (SF_Recursive) ){
132836 if( pSub->pPrior ){
132837 if( pSub->pOrderBy ){
132843 for(pSub1=pSub; pSub1; pSub1=pSub1->pPrior){
132846 assert( pSub->pSrc!=0 );
132847 assert( pSub->pEList->nExpr==pSub1->pEList->nExpr );
132875 assert( (p->selFlags & SF_Recursive)==0 || pSub->pPrior==0 );
132879 pSub->selId, pSub, iFrom));
132920 for(pSub=pSub->pPrior; pSub; pSub=pSub->pPrior){
132950 pSub = pSub1 = pSubitem->pSelect;
132995 for(pParent=p; pParent; pParent=pParent->pPrior, pSub=pSub->pPrior){
132998 assert( pSub!=0 );
132999 pSubSrc = pSub->pSrc; /* FROM clause of subquery */
133058 if( pSub->pOrderBy && (pParent->selFlags & SF_NoopOrderBy)==0 ){
133069 ExprList *pOrderBy = pSub->pOrderBy;
133075 pSub->pOrderBy = 0;
133077 pWhere = pSub->pWhere;
133078 pSub->pWhere = 0;
133089 x.pEList = pSub->pEList;
133095 pParent->selFlags |= pSub->selFlags & SF_Compound;
133096 assert( (pSub->selFlags & SF_Distinct)==0 ); /* restriction (17b) */
133104 if( pSub->pLimit ){
133105 pParent->pLimit = pSub->pLimit;
133106 pSub->pLimit = 0;
134069 Select *pSub = pFrom->pSelect;
134077 if( pSub==0 || (pSub->selFlags & SF_NestedFrom)==0 ){
134078 pSub = 0;
134092 if( zTName && pSub
134093 && sqlite3MatchEName(&pSub->pEList->a[j], 0, zTName, 0)==0
134147 if( pSub ){
134148 pX->zEName = sqlite3DbStrDup(db, pSub->pEList->a[j].zEName);
134612 Select *pSub, *pPrior;
134625 pSub = p->pSrc->a[0].pSelect;
134626 if( pSub==0 ) return 0; /* The FROM is a subquery */
134627 if( pSub->pPrior==0 ) return 0; /* Must be a compound ry */
134629 if( pSub->op!=TK_ALL && pSub->pPrior ) return 0; /* Must be UNION ALL */
134630 if( pSub->pWhere ) return 0; /* No WHERE clause */
134631 if( pSub->pLimit ) return 0; /* No LIMIT clause */
134632 if( pSub->selFlags & SF_Aggregate ) return 0; /* Not an aggregate */
134633 pSub = pSub->pPrior; /* Repeat over compound */
134634 }while( pSub );
134641 pSub = p->pSrc->a[0].pSelect;
134645 while( pSub ){
134647 pPrior = pSub->pPrior;
134648 pSub->pPrior = 0;
134649 pSub->pNext = 0;
134650 pSub->selFlags |= SF_Aggregate;
134651 pSub->selFlags &= ~SF_Compound;
134652 pSub->nSelectRow = 0;
134653 sqlite3ExprListDelete(db, pSub->pEList);
134655 pSub->pEList = sqlite3ExprListAppend(pParse, 0, pTerm);
134657 sqlite3PExprAddSelect(pParse, pTerm, pSub);
134663 pSub = pPrior;
134783 Select *pSub = pItem->pSelect;
134800 if( pSub==0 ) continue;
134804 if( pTab->nCol!=pSub->pEList->nExpr ){
134806 pTab->nCol, pTab->zName, pSub->pEList->nExpr);
134817 if( (pSub->selFlags & SF_Aggregate)!=0 ) continue;
134818 assert( pSub->pGroupBy==0 );
134838 if( pSub->pOrderBy!=0
134913 Select *pSub;
134941 pSub = pItem->pSelect;
134942 if( pSub==0 ) continue;
134971 && pushDownWhereTerms(pParse, pSub, p->pWhere, pItem->iCursor,
134977 ("After WHERE-clause push-down into subquery %d:\n", pSub->selId));
135011 ExplainQueryPlan((pParse, 1, "CO-ROUTINE %u", pSub->selId));
135012 sqlite3Select(pParse, pSub, &dest);
135013 pItem->pTab->nRowLogEst = pSub->nSelectRow;
135047 pSub->nSelectRow = pPrior->pSelect->nSelectRow;
135050 ExplainQueryPlan((pParse, 1, "MATERIALIZE %u", pSub->selId));
135051 sqlite3Select(pParse, pSub, &dest);
135053 pItem->pTab->nRowLogEst = pSub->nSelectRow;
151245 ExprList *pSub;
151298 if( p->pSub ){
151300 for(i=0; i<p->pSub->nExpr; i++){
151301 if( 0==sqlite3ExprCompare(0, p->pSub->a[i].pExpr, pExpr, -1) ){
151310 p->pSub = sqlite3ExprListAppend(pParse, p->pSub, pDup);
151312 if( p->pSub ){
151320 pExpr->iColumn = (iCol<0 ? p->pSub->nExpr-1: iCol);
151376 sRewrite.pSub = *ppSub;
151388 *ppSub = sRewrite.pSub;
151409 Expr *pSub;
151410 for(pSub=pDup; ExprHasProperty(pSub, EP_Skip); pSub=pSub->pLeft){
151411 assert( pSub );
151413 if( sqlite3ExprIsInteger(pSub, &iDummy) ){
151414 pSub->op = TK_NULL;
151415 pSub->flags &= ~(EP_IntValue|EP_IsTrue|EP_IsFalse);
151416 pSub->u.zToken = 0;
151455 Select *pSub = 0; /* The subquery */
151550 pSub = sqlite3SelectNew(
151556 p->pSrc->a[0].pSelect = pSub;
151558 pSub->selFlags |= SF_Expanded;
151559 pTab2 = sqlite3ResultSetOfSelect(pParse, pSub, SQLITE_AFF_NONE);
151560 pSub->selFlags |= (selFlags & SF_Aggregate);
151575 sqlite3WalkSelect(&w, pSub);
151578 sqlite3SelectDelete(db, pSub);
214262 static void fts5ExprAddChildren(Fts5ExprNode *p, Fts5ExprNode *pSub){
214263 if( p->eType!=FTS5_NOT && pSub->eType==p->eType ){
214264 int nByte = sizeof(Fts5ExprNode*) * pSub->nChild;
214265 memcpy(&p->apChild[p->nChild], pSub->apChild, nByte);
214266 p->nChild += pSub->nChild;
214267 sqlite3_free(pSub);
214269 p->apChild[p->nChild++] = pSub;
218800 const u8 *pSub = pPos;
218801 int nSub = fts5IndexExtractCol(&pSub, nPos, pColset->aiCol[i]);
218803 fts5BufferAppendBlob(pRc, pBuf, nSub, pSub);