Lines Matching refs:pSub
74599 Mem *pSub = 0; /* Memory cell hold array of subprogs */
74639 pSub = &p->aMem[9];
74640 if( pSub->flags&MEM_Blob ){
74643 nSub = pSub->n/sizeof(Vdbe*);
74644 apSub = (SubProgram **)pSub->z;
74685 p->rc = sqlite3VdbeMemGrow(pSub, nByte, nSub!=0);
74690 apSub = (SubProgram **)pSub->z;
74692 pSub->flags |= MEM_Blob;
74693 pSub->n = nSub*sizeof(SubProgram*);
75988 SubProgram *pSub, *pNext;
75991 for(pSub=p->pProgram; pSub; pSub=pNext){
75992 pNext = pSub->pNext;
75993 vdbeFreeOpArray(db, pSub->aOp, pSub->nOp);
75994 sqlite3DbFree(db, pSub);
92363 Select *pSub = p->pSrc->a[0].pSelect;
92365 assert( pSub->pPrior && pSub->pOrderBy==0 );
92366 pSub->pOrderBy = p->pOrderBy;
92460 Select *pSub = p->pSrc->a[0].pSelect;
92461 p->pOrderBy = pSub->pOrderBy;
92462 pSub->pOrderBy = 0;
122103 Select *pSub; /* The inner query or "subquery" */
122124 pSub = pSubitem->pSelect;
122125 assert( pSub!=0 );
122127 pSubSrc = pSub->pSrc;
122134 if( pSub->pLimit && p->pLimit ) return 0; /* Restriction (13) */
122135 if( pSub->pLimit && pSub->pLimit->pRight ) return 0; /* Restriction (14) */
122136 if( (p->selFlags & SF_Compound)!=0 && pSub->pLimit ){
122140 if( pSub->selFlags & SF_Distinct ) return 0; /* Restriction (4) */
122141 if( pSub->pLimit && (pSrc->nSrc>1 || isAgg) ){
122144 if( p->pOrderBy && pSub->pOrderBy ){
122147 if( isAgg && pSub->pOrderBy ) return 0; /* Restriction (16) */
122148 if( pSub->pLimit && p->pWhere ) return 0; /* Restriction (19) */
122149 if( pSub->pLimit && (p->selFlags & SF_Distinct)!=0 ){
122152 if( pSub->selFlags & (SF_Recursive) ){
122198 if( pSub->pPrior ){
122199 if( pSub->pOrderBy ){
122205 for(pSub1=pSub; pSub1; pSub1=pSub1->pPrior){
122208 assert( pSub->pSrc!=0 );
122209 assert( pSub->pEList->nExpr==pSub1->pEList->nExpr );
122234 assert( (p->selFlags & SF_Recursive)==0 || pSub->pPrior==0 );
122238 pSub->zSelName, pSub, iFrom));
122279 for(pSub=pSub->pPrior; pSub; pSub=pSub->pPrior){
122289 sqlite3SelectSetName(pNew, pSub->zSelName);
122311 pSub = pSub1 = pSubitem->pSelect;
122356 for(pParent=p; pParent; pParent=pParent->pPrior, pSub=pSub->pPrior){
122359 pSubSrc = pSub->pSrc; /* FROM clause of subquery */
122421 if( pSub->pOrderBy ){
122432 ExprList *pOrderBy = pSub->pOrderBy;
122437 assert( pSub->pPrior==0 );
122439 pSub->pOrderBy = 0;
122441 pWhere = sqlite3ExprDup(db, pSub->pWhere, 0);
122452 x.pEList = pSub->pEList;
122459 pParent->selFlags |= pSub->selFlags & SF_Distinct;
122467 if( pSub->pLimit ){
122468 pParent->pLimit = pSub->pLimit;
122469 pSub->pLimit = 0;
123168 Select *pSub = pFrom->pSelect;
123176 if( pSub==0 || (pSub->selFlags & SF_NestedFrom)==0 ){
123177 pSub = 0;
123191 if( zTName && pSub
123192 && sqlite3MatchSpanName(pSub->pEList->a[j].zSpan, 0, zTName, 0)==0
123245 if( pSub ){
123246 pX->zSpan = sqlite3DbStrDup(db, pSub->pEList->a[j].zSpan);
123717 Select *pSub, *pPrior;
123728 pSub = p->pSrc->a[0].pSelect;
123729 if( pSub==0 ) return 0; /* The FROM is a subquery */
123730 if( pSub->pPrior==0 ) return 0; /* Must be a compound ry */
123732 if( pSub->op!=TK_ALL && pSub->pPrior ) return 0; /* Must be UNION ALL */
123733 if( pSub->pWhere ) return 0; /* No WHERE clause */
123734 if( pSub->selFlags & SF_Aggregate ) return 0; /* Not an aggregate */
123735 pSub = pSub->pPrior; /* Repeat over compound */
123736 }while( pSub );
123743 pSub = p->pSrc->a[0].pSelect;
123747 while( pSub ){
123749 pPrior = pSub->pPrior;
123750 pSub->pPrior = 0;
123751 pSub->pNext = 0;
123752 pSub->selFlags |= SF_Aggregate;
123753 pSub->selFlags &= ~SF_Compound;
123754 pSub->nSelectRow = 0;
123755 sqlite3ExprListDelete(db, pSub->pEList);
123757 pSub->pEList = sqlite3ExprListAppend(pParse, 0, pTerm);
123759 sqlite3PExprAddSelect(pParse, pTerm, pSub);
123765 pSub = pPrior;
123879 Select *pSub = pItem->pSelect;
123881 if( pSub==0 ) continue;
123885 if( pTab->nCol!=pSub->pEList->nExpr ){
123887 pTab->nCol, pTab->zName, pSub->pEList->nExpr);
123898 if( (pSub->selFlags & SF_Aggregate)!=0 ) continue;
123899 assert( pSub->pGroupBy==0 );
123919 if( pSub->pOrderBy!=0
123962 Select *pSub;
123990 pSub = pItem->pSelect;
123991 if( pSub==0 ) continue;
124023 && pushDownWhereTerms(pParse, pSub, p->pWhere, pItem->iCursor)
124060 sqlite3Select(pParse, pSub, &dest);
124061 pItem->pTab->nRowLogEst = pSub->nSelectRow;
124096 pSub->nSelectRow = pPrior->pSelect->nSelectRow;
124100 sqlite3Select(pParse, pSub, &dest);
124102 pItem->pTab->nRowLogEst = pSub->nSelectRow;
192941 static void fts5ExprAddChildren(Fts5ExprNode *p, Fts5ExprNode *pSub){
192942 if( p->eType!=FTS5_NOT && pSub->eType==p->eType ){
192943 int nByte = sizeof(Fts5ExprNode*) * pSub->nChild;
192944 memcpy(&p->apChild[p->nChild], pSub->apChild, nByte);
192945 p->nChild += pSub->nChild;
192946 sqlite3_free(pSub);
192948 p->apChild[p->nChild++] = pSub;
197431 const u8 *pSub = pPos;
197432 int nSub = fts5IndexExtractCol(&pSub, nPos, pColset->aiCol[i]);
197434 fts5BufferAppendBlob(pRc, pBuf, nSub, pSub);