/ Check-in [5a954533]
Login

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

Overview
Comment:Fix an unreachable branch in the new sqlite3WhereOrderByLimitOptLabel() function of the query planner.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5a954533edbde58aa7158572ece7ceeb1c6e610b71f3ae45d0b8371d74f9fea5
User & Date: drh 2018-09-08 20:29:04
Context
2018-09-10
12:17
Fix a problem with processing a "vtab.col IS NULL" expression within the WHERE clause of a query when "vtab" is a virtual table on the rhs of a LEFT JOIN. check-in: 83da4d41 user: dan tags: trunk
2018-09-08
20:29
Fix an unreachable branch in the new sqlite3WhereOrderByLimitOptLabel() function of the query planner. check-in: 5a954533 user: drh tags: trunk
20:09
Fix multiple issues with the ORDER BY LIMIT optimization. This is the proposed resolution to ticket [9936b2fa443fec03ff25]. check-in: 20672012 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/where.c.

    93     93     WhereLevel *pInner;
    94     94     if( !pWInfo->bOrderedInnerLoop ){
    95     95       /* The ORDER BY LIMIT optimization does not apply.  Jump to the 
    96     96       ** continuation of the inner-most loop. */
    97     97       return pWInfo->iContinue;
    98     98     }
    99     99     pInner = &pWInfo->a[pWInfo->nLevel-1];
   100         -  if( pInner->addrNxt ) return pInner->addrNxt;
   101         -  return pInner->addrBrk;
          100  +  assert( pInner->addrNxt!=0 );
          101  +  return pInner->addrNxt;
   102    102   }
   103    103   
   104    104   /*
   105    105   ** Return the VDBE address or label to jump to in order to continue
   106    106   ** immediately with the next row of a WHERE clause.
   107    107   */
   108    108   int sqlite3WhereContinueLabel(WhereInfo *pWInfo){