SQLite

Check-in [b3c6b8a3c1]
Login

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

Overview
Comment:In selecttrace mode 0x100, show a complete parse-tree both before and after query flattening. This is a change to debugging code only.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b3c6b8a3c1075d2a87cef68f061d6a0098e6d8d0
User & Date: drh 2015-02-09 11:54:41.074
Context
2015-02-09
13:42
In selecttrace 0x100 mode, show the parse tree after name resolution instead of before flattening, so that it is always seen even if flattening does not occur. Also: add the hex pointer value to the top of each SELECT tree. (check-in: aa093fef2d user: drh tags: trunk)
11:54
In selecttrace mode 0x100, show a complete parse-tree both before and after query flattening. This is a change to debugging code only. (check-in: b3c6b8a3c1 user: drh tags: trunk)
10:20
Fix over-length source code lines in resolver.c. No logic changes. (check-in: c12edb8507 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/select.c.
3440
3441
3442
3443
3444
3445
3446







3447
3448
3449
3450
3451
3452
3453
      }
    }
  }

  /***** If we reach this point, flattening is permitted. *****/
  SELECTTRACE(1,pParse,p,("flatten %s.%p from term %d\n",
                   pSub->zSelName, pSub, iFrom));








  /* Authorize the subquery */
  pParse->zAuthContext = pSubitem->zName;
  TESTONLY(i =) sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0);
  testcase( i==SQLITE_DENY );
  pParse->zAuthContext = zSavedAuthContext;








>
>
>
>
>
>
>







3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
      }
    }
  }

  /***** If we reach this point, flattening is permitted. *****/
  SELECTTRACE(1,pParse,p,("flatten %s.%p from term %d\n",
                   pSub->zSelName, pSub, iFrom));
#if SELECTTRACE_ENABLED
  if( sqlite3SelectTrace & 0x100 ){
    sqlite3DebugPrintf("Befor flattening:\n");
    sqlite3TreeViewSelect(0, p, 0);
  }
#endif


  /* Authorize the subquery */
  pParse->zAuthContext = pSubitem->zName;
  TESTONLY(i =) sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0);
  testcase( i==SQLITE_DENY );
  pParse->zAuthContext = zSavedAuthContext;