Lines Matching refs:pSub

74615   Mem *pSub = 0;                       /* Memory cell hold array of subprogs */
74655 pSub = &p->aMem[9];
74656 if( pSub->flags&MEM_Blob ){
74659 nSub = pSub->n/sizeof(Vdbe*);
74660 apSub = (SubProgram **)pSub->z;
74701 p->rc = sqlite3VdbeMemGrow(pSub, nByte, nSub!=0);
74706 apSub = (SubProgram **)pSub->z;
74708 pSub->flags |= MEM_Blob;
74709 pSub->n = nSub*sizeof(SubProgram*);
76004 SubProgram *pSub, *pNext;
76007 for(pSub=p->pProgram; pSub; pSub=pNext){
76008 pNext = pSub->pNext;
76009 vdbeFreeOpArray(db, pSub->aOp, pSub->nOp);
76010 sqlite3DbFree(db, pSub);
92379 Select *pSub = p->pSrc->a[0].pSelect;
92381 assert( pSub->pPrior && pSub->pOrderBy==0 );
92382 pSub->pOrderBy = p->pOrderBy;
92476 Select *pSub = p->pSrc->a[0].pSelect;
92477 p->pOrderBy = pSub->pOrderBy;
92478 pSub->pOrderBy = 0;
122119 Select *pSub; /* The inner query or "subquery" */
122140 pSub = pSubitem->pSelect;
122141 assert( pSub!=0 );
122143 pSubSrc = pSub->pSrc;
122150 if( pSub->pLimit && p->pLimit ) return 0; /* Restriction (13) */
122151 if( pSub->pLimit && pSub->pLimit->pRight ) return 0; /* Restriction (14) */
122152 if( (p->selFlags & SF_Compound)!=0 && pSub->pLimit ){
122156 if( pSub->selFlags & SF_Distinct ) return 0; /* Restriction (4) */
122157 if( pSub->pLimit && (pSrc->nSrc>1 || isAgg) ){
122160 if( p->pOrderBy && pSub->pOrderBy ){
122163 if( isAgg && pSub->pOrderBy ) return 0; /* Restriction (16) */
122164 if( pSub->pLimit && p->pWhere ) return 0; /* Restriction (19) */
122165 if( pSub->pLimit && (p->selFlags & SF_Distinct)!=0 ){
122168 if( pSub->selFlags & (SF_Recursive) ){
122214 if( pSub->pPrior ){
122215 if( pSub->pOrderBy ){
122221 for(pSub1=pSub; pSub1; pSub1=pSub1->pPrior){
122224 assert( pSub->pSrc!=0 );
122225 assert( pSub->pEList->nExpr==pSub1->pEList->nExpr );
122250 assert( (p->selFlags & SF_Recursive)==0 || pSub->pPrior==0 );
122254 pSub->zSelName, pSub, iFrom));
122295 for(pSub=pSub->pPrior; pSub; pSub=pSub->pPrior){
122305 sqlite3SelectSetName(pNew, pSub->zSelName);
122327 pSub = pSub1 = pSubitem->pSelect;
122372 for(pParent=p; pParent; pParent=pParent->pPrior, pSub=pSub->pPrior){
122375 pSubSrc = pSub->pSrc; /* FROM clause of subquery */
122437 if( pSub->pOrderBy ){
122448 ExprList *pOrderBy = pSub->pOrderBy;
122453 assert( pSub->pPrior==0 );
122455 pSub->pOrderBy = 0;
122457 pWhere = sqlite3ExprDup(db, pSub->pWhere, 0);
122468 x.pEList = pSub->pEList;
122475 pParent->selFlags |= pSub->selFlags & SF_Distinct;
122483 if( pSub->pLimit ){
122484 pParent->pLimit = pSub->pLimit;
122485 pSub->pLimit = 0;
123184 Select *pSub = pFrom->pSelect;
123192 if( pSub==0 || (pSub->selFlags & SF_NestedFrom)==0 ){
123193 pSub = 0;
123207 if( zTName && pSub
123208 && sqlite3MatchSpanName(pSub->pEList->a[j].zSpan, 0, zTName, 0)==0
123261 if( pSub ){
123262 pX->zSpan = sqlite3DbStrDup(db, pSub->pEList->a[j].zSpan);
123733 Select *pSub, *pPrior;
123744 pSub = p->pSrc->a[0].pSelect;
123745 if( pSub==0 ) return 0; /* The FROM is a subquery */
123746 if( pSub->pPrior==0 ) return 0; /* Must be a compound ry */
123748 if( pSub->op!=TK_ALL && pSub->pPrior ) return 0; /* Must be UNION ALL */
123749 if( pSub->pWhere ) return 0; /* No WHERE clause */
123750 if( pSub->selFlags & SF_Aggregate ) return 0; /* Not an aggregate */
123751 pSub = pSub->pPrior; /* Repeat over compound */
123752 }while( pSub );
123759 pSub = p->pSrc->a[0].pSelect;
123763 while( pSub ){
123765 pPrior = pSub->pPrior;
123766 pSub->pPrior = 0;
123767 pSub->pNext = 0;
123768 pSub->selFlags |= SF_Aggregate;
123769 pSub->selFlags &= ~SF_Compound;
123770 pSub->nSelectRow = 0;
123771 sqlite3ExprListDelete(db, pSub->pEList);
123773 pSub->pEList = sqlite3ExprListAppend(pParse, 0, pTerm);
123775 sqlite3PExprAddSelect(pParse, pTerm, pSub);
123781 pSub = pPrior;
123895 Select *pSub = pItem->pSelect;
123897 if( pSub==0 ) continue;
123901 if( pTab->nCol!=pSub->pEList->nExpr ){
123903 pTab->nCol, pTab->zName, pSub->pEList->nExpr);
123914 if( (pSub->selFlags & SF_Aggregate)!=0 ) continue;
123915 assert( pSub->pGroupBy==0 );
123935 if( pSub->pOrderBy!=0
123978 Select *pSub;
124006 pSub = pItem->pSelect;
124007 if( pSub==0 ) continue;
124039 && pushDownWhereTerms(pParse, pSub, p->pWhere, pItem->iCursor)
124076 sqlite3Select(pParse, pSub, &dest);
124077 pItem->pTab->nRowLogEst = pSub->nSelectRow;
124112 pSub->nSelectRow = pPrior->pSelect->nSelectRow;
124116 sqlite3Select(pParse, pSub, &dest);
124118 pItem->pTab->nRowLogEst = pSub->nSelectRow;
192969 static void fts5ExprAddChildren(Fts5ExprNode *p, Fts5ExprNode *pSub){
192970 if( p->eType!=FTS5_NOT && pSub->eType==p->eType ){
192971 int nByte = sizeof(Fts5ExprNode*) * pSub->nChild;
192972 memcpy(&p->apChild[p->nChild], pSub->apChild, nByte);
192973 p->nChild += pSub->nChild;
192974 sqlite3_free(pSub);
192976 p->apChild[p->nChild++] = pSub;
197459 const u8 *pSub = pPos;
197460 int nSub = fts5IndexExtractCol(&pSub, nPos, pColset->aiCol[i]);
197462 fts5BufferAppendBlob(pRc, pBuf, nSub, pSub);