/ Check-in [1dd82808]
Login

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

Overview
Comment:Add some OK_IF_ALWAYS_TRUE() marks on optimization branches in select.c.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 1dd828088d6981dfebf9f4d650dad8431bece4405650c61f90eb8d8f43289b52
User & Date: drh 2017-10-03 17:29:40
Context
2017-10-03
18:35
Do not enable SELECT tracing with -DSQLITE_DEBUG. Require the -DSQLITE_ENABLE_SELECTTRACE compile-time option to enable SELECT tracing. check-in: f5c39583 user: drh tags: trunk
17:29
Add some OK_IF_ALWAYS_TRUE() marks on optimization branches in select.c. check-in: 1dd82808 user: drh tags: trunk
17:17
Remove an unused variable from sqlite3Insert() and fix harmless compiler warnings associated with -DSQLITE_MUTATION_TEST. check-in: 7be760e9 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/select.c.

    71     71       sqlite3SrcListDelete(db, p->pSrc);
    72     72       sqlite3ExprDelete(db, p->pWhere);
    73     73       sqlite3ExprListDelete(db, p->pGroupBy);
    74     74       sqlite3ExprDelete(db, p->pHaving);
    75     75       sqlite3ExprListDelete(db, p->pOrderBy);
    76     76       sqlite3ExprDelete(db, p->pLimit);
    77     77       sqlite3ExprDelete(db, p->pOffset);
    78         -    if( p->pWith ) sqlite3WithDelete(db, p->pWith);
           78  +    if( OK_IF_ALWAYS_TRUE(p->pWith) ) sqlite3WithDelete(db, p->pWith);
    79     79       if( bFree ) sqlite3DbFreeNN(db, p);
    80     80       p = pPrior;
    81     81       bFree = 1;
    82     82     }
    83     83   }
    84     84   
    85     85   /*
................................................................................
   167    167   #endif
   168    168   
   169    169   
   170    170   /*
   171    171   ** Delete the given Select structure and all of its substructures.
   172    172   */
   173    173   void sqlite3SelectDelete(sqlite3 *db, Select *p){
   174         -  if( p ) clearSelect(db, p, 1);
          174  +  if( OK_IF_ALWAYS_TRUE(p) ) clearSelect(db, p, 1);
   175    175   }
   176    176   
   177    177   /*
   178    178   ** Return a pointer to the right-most SELECT statement in a compound.
   179    179   */
   180    180   static Select *findRightmost(Select *p){
   181    181     while( p->pNext ) p = p->pNext;