/ Check-in [d9ae0f5d]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a header comment to the searchWith() routine.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | common-table-expr
Files: files | file ages | folders
SHA1: d9ae0f5d9f8230ca7ca10ebed300e2f6635a0614
User & Date: drh 2014-01-15 18:23:00
Context
2014-01-15
18:35
Further comments on WITH-clause processing routines in select.c. check-in: c948384d user: drh tags: common-table-expr
18:23
Add a header comment to the searchWith() routine. check-in: d9ae0f5d user: drh tags: common-table-expr
18:21
Disable automatic indices on recursive CTE references. check-in: 28aa6db8 user: dan tags: common-table-expr
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/select.c.

3478
3479
3480
3481
3482
3483
3484




3485
3486
3487
3488
3489
3490
3491
  pNew->pOrderBy = 0;
  p->pPrior = 0;
  pNew->pLimit = 0;
  pNew->pOffset = 0;
  return WRC_Continue;
}





static struct Cte *searchWith(Parse *pParse, struct SrcList_item *p){
  if( p->zDatabase==0 ){
    char *zName = p->zName;
    With *pWith;

    for(pWith=pParse->pWith; pWith; pWith=pWith->pOuter){
      int i;







>
>
>
>







3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
  pNew->pOrderBy = 0;
  p->pPrior = 0;
  pNew->pLimit = 0;
  pNew->pOffset = 0;
  return WRC_Continue;
}

/* If the table identified by p is a transient table of 
** a common-table-expression (CTE) then return a pointer to the
** CTE that defines table p.  If p is not a CTE, then return NULL.
*/
static struct Cte *searchWith(Parse *pParse, struct SrcList_item *p){
  if( p->zDatabase==0 ){
    char *zName = p->zName;
    With *pWith;

    for(pWith=pParse->pWith; pWith; pWith=pWith->pOuter){
      int i;