/ Check-in [604c3c5d]
Login

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

Overview
Comment:Add a NEVER() macro and an explanation comment around an unreachable branch in the STAT3 logic.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | nextgen-query-plan-exp
Files: files | file ages | folders
SHA1: 604c3c5de6fd8f8a569aa9ed981055a5b0123ba1
User & Date: drh 2013-06-20 17:32:28
Context
2013-06-26
00:34
Fix an uninitialized variable detected by valgrind. Unclear whether or not this should apply to trunk. Closed-Leaf check-in: 19ab4811 user: drh tags: nextgen-query-plan-exp
2013-06-21
00:35
Modify the query planner interface so that it always passes in the result set. This is the first step toward adding an optimization that will omit tables from a join that do not contribute to the result. check-in: 2c2577e6 user: drh tags: omit-join-table-opt
2013-06-20
17:32
Add a NEVER() macro and an explanation comment around an unreachable branch in the STAT3 logic. check-in: 604c3c5d user: drh tags: nextgen-query-plan-exp
14:17
Pull in the posix_fallocate() change from trunk. check-in: d94db3fd user: drh tags: nextgen-query-plan-exp
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/where.c.

  2405   2405         const u8 *z;
  2406   2406         if( eType==SQLITE_BLOB ){
  2407   2407           z = (const u8 *)sqlite3_value_blob(pVal);
  2408   2408           pColl = db->pDfltColl;
  2409   2409           assert( pColl->enc==SQLITE_UTF8 );
  2410   2410         }else{
  2411   2411           pColl = sqlite3GetCollSeq(pParse, SQLITE_UTF8, 0, *pIdx->azColl);
  2412         -        if( pColl==0 ){
  2413         -          return SQLITE_ERROR;
  2414         -        }
         2412  +        /* If the collating sequence was unavailable, we should have failed
         2413  +        ** long ago and never reached this point.  But we'll check just to
         2414  +        ** be doubly sure. */
         2415  +        if( NEVER(pColl==0) ) return SQLITE_ERROR;
  2415   2416           z = (const u8 *)sqlite3ValueText(pVal, pColl->enc);
  2416   2417           if( !z ){
  2417   2418             return SQLITE_NOMEM;
  2418   2419           }
  2419   2420           assert( z && pColl && pColl->xCmp );
  2420   2421         }
  2421   2422         n = sqlite3ValueBytes(pVal, pColl->enc);