/ 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 Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/select.c.

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