Lines Matching refs:pWith

18220   With *pWith;           /* WITH clause attached to this select. Or NULL. */  member
18562 With *pWith; /* Current WITH clause, or NULL */ member
30337 SQLITE_PRIVATE void sqlite3TreeViewWith(TreeView *pView, const With *pWith, u8 moreToFollow){
30339 if( pWith==0 ) return;
30340 if( pWith->nCte==0 ) return;
30341 if( pWith->pOuter ){
30342 sqlite3TreeViewLine(pView, "WITH (0x%p, pOuter=0x%p)",pWith,pWith->pOuter);
30344 sqlite3TreeViewLine(pView, "WITH (0x%p)", pWith);
30346 if( pWith->nCte>0 ){
30348 for(i=0; i<pWith->nCte; i++){
30351 const struct Cte *pCte = &pWith->a[i];
30368 sqlite3TreeViewItem(pView, zLine, i<pWith->nCte-1);
30426 if( p->pWith ){
30427 sqlite3TreeViewWith(pView, p->pWith, 1);
32239 pParse->pWith = 0;
103366 pNew->pWith = sqlite3WithDup(db, p->pWith);
108811 With *pWith = pSelect->pWith;
108812 if( pWith ){
108816 assert( pWith->nCte>0 );
108817 if( (pWith->a[0].pSelect->selFlags & SF_Expanded)==0 ){
108823 pCopy = sqlite3WithDup(pParse->db, pWith);
108826 for(i=0; i<pWith->nCte; i++){
108827 Select *p = pWith->a[i].pSelect;
108834 sqlite3RenameExprlistUnmap(pParse, pWith->a[i].pCols);
108836 if( pCopy && pParse->pWith==pCopy ){
108837 pParse->pWith = pCopy->pOuter;
112646 if( pSelect->pWith ){
112647 for(i=0; i<pSelect->pWith->nCte; i++){
112648 if( sqlite3WalkSelect(p, pSelect->pWith->a[i].pSelect) ){
118606 With *pWith, /* Existing WITH clause, or NULL */
118614 return pWith;
118620 if( zName && pWith ){
118622 for(i=0; i<pWith->nCte; i++){
118623 if( sqlite3StrICmp(zName, pWith->a[i].zName)==0 ){
118629 if( pWith ){
118630 sqlite3_int64 nByte = sizeof(*pWith) + (sizeof(pWith->a[1]) * pWith->nCte);
118631 pNew = sqlite3DbRealloc(db, pWith, nByte);
118633 pNew = sqlite3DbMallocZero(db, sizeof(*pWith));
118639 pNew = pWith;
118651 SQLITE_PRIVATE void sqlite3WithDelete(sqlite3 *db, With *pWith){
118652 if( pWith ){
118654 for(i=0; i<pWith->nCte; i++){
118655 cteClear(db, &pWith->a[i]);
118657 sqlite3DbFree(db, pWith);
126790 if( pParse->pWith || pSelect->pWith ){
133344 if( OK_IF_ALWAYS_TRUE(p->pWith) ) sqlite3WithDelete(db, p->pWith);
133417 pNew->pWith = 0;
138345 p->pWith = 0;
138383 With *pWith, /* Current innermost WITH clause */
138391 for(p=pWith; p; p=p->pOuter){
138421 SQLITE_PRIVATE With *sqlite3WithPush(Parse *pParse, With *pWith, u8 bFree){
138422 if( pWith ){
138424 pWith = (With*)sqlite3ParserAddCleanup(pParse,
138426 pWith);
138427 if( pWith==0 ) return 0;
138430 assert( pParse->pWith!=pWith );
138431 pWith->pOuter = pParse->pWith;
138432 pParse->pWith = pWith;
138435 return pWith;
138458 With *pWith; /* The matching WITH */
138461 if( pParse->pWith==0 ){
138483 pCte = searchWith(pParse->pWith, pFrom, &pWith);
138573 pSavedWith = pParse->pWith;
138574 pParse->pWith = pWith;
138581 assert( pRecTerm->pWith==0 );
138582 pRecTerm->pWith = pSel->pWith;
138584 pRecTerm->pWith = 0;
138586 pParse->pWith = pSavedWith;
138591 pParse->pWith = pSavedWith;
138595 pParse->pWith = pWith;
138604 pParse->pWith = pSavedWith;
138620 pParse->pWith = pSavedWith;
138638 if( OK_IF_ALWAYS_TRUE(pParse->pWith) && p->pPrior==0 ){
138639 With *pWith = findRightmost(p)->pWith;
138640 if( pWith!=0 ){
138641 assert( pParse->pWith==pWith || pParse->nErr );
138642 pParse->pWith = pWith->pOuter;
138732 if( pParse->pWith && (p->selFlags & SF_View) ){
138733 if( p->pWith==0 ){
138734 p->pWith = (With*)sqlite3DbMallocZero(db, sizeof(With));
138735 if( p->pWith==0 ){
138739 p->pWith->bView = 1;
138741 sqlite3WithPush(pParse, p->pWith, 0);
159608 static Select *attachWithToSelect(Parse *pParse, Select *pSelect, With *pWith){
159610 pSelect->pWith = pWith;
159613 sqlite3WithDelete(pParse->db, pWith);