/ Check-in [3a4ffb21]
Login

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

Overview
Comment:Mark a single branch within sqlite3SelectExpand() as an optimization.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 3a4ffb21d0ee2326c31b9ddc512d79d4ebf3a249a2840e88e99165978eec31fd
User & Date: drh 2017-10-02 23:50:08
References
2017-10-03
14:24
The simplification to sqlite3SelectExpand() in last night's [3a4ffb21] check-in was not completely correct. This adjustment is needed for correct OOM handling in some configurations. check-in: c5ad5e16 user: drh tags: trunk
Context
2017-10-03
03:01
Do not compute column and row size estimates for the transient Table objects associated with the result set of a SELECT statement, since those estimates are never used for anything constructive. check-in: e4342fd4 user: drh tags: trunk
2017-10-02
23:50
Mark a single branch within sqlite3SelectExpand() as an optimization. check-in: 3a4ffb21 user: drh tags: trunk
23:30
Simplification to sqlite3SelectPrep() for improved testability. check-in: 5bf2ccb9 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to src/select.c.

4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
** The calling function can detect the problem by looking at pParse->nErr
** and/or pParse->db->mallocFailed.
*/
static void sqlite3SelectExpand(Parse *pParse, Select *pSelect){
  Walker w;
  w.xExprCallback = sqlite3ExprWalkNoop;
  w.pParse = pParse;
  if( pParse->hasCompound ){
    w.xSelectCallback = convertCompoundSelectToSubquery;
    w.xSelectCallback2 = 0;
    sqlite3WalkSelect(&w, pSelect);
  }
  w.xSelectCallback = selectExpander;
  w.xSelectCallback2 = selectPopWith;
  sqlite3WalkSelect(&w, pSelect);







|







4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
** The calling function can detect the problem by looking at pParse->nErr
** and/or pParse->db->mallocFailed.
*/
static void sqlite3SelectExpand(Parse *pParse, Select *pSelect){
  Walker w;
  w.xExprCallback = sqlite3ExprWalkNoop;
  w.pParse = pParse;
  if( OK_IF_ALWAYS_TRUE(pParse->hasCompound) ){
    w.xSelectCallback = convertCompoundSelectToSubquery;
    w.xSelectCallback2 = 0;
    sqlite3WalkSelect(&w, pSelect);
  }
  w.xSelectCallback = selectExpander;
  w.xSelectCallback2 = selectPopWith;
  sqlite3WalkSelect(&w, pSelect);