/ Check-in [b186d8d1]
Login

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

Overview
Comment:Make sure the where.c query planner never reports that the number of ORDER BY terms that are satisfied by indices is negative.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | orderby-planning
Files: files | file ages | folders
SHA1: b186d8d15a10d5e8fcae9ae72e8624d71831f5bd
User & Date: drh 2014-03-19 14:30:55
Context
2014-03-19
15:17
Avoid reusing temporary registers in co-routines when doing block-sorting. check-in: 463d921b user: drh tags: orderby-planning
14:30
Make sure the where.c query planner never reports that the number of ORDER BY terms that are satisfied by indices is negative. check-in: b186d8d1 user: drh tags: orderby-planning
14:10
First attempt at getting block-sort to work. This is an incremental check-in. There are many problems still to be worked out. check-in: 59742dd4 user: drh tags: orderby-planning
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/where.c.

  5201   5201     if( pWInfo->pOrderBy ){
  5202   5202       if( pWInfo->wctrlFlags & WHERE_DISTINCTBY ){
  5203   5203         if( pFrom->isOrdered==pWInfo->pOrderBy->nExpr ){
  5204   5204           pWInfo->eDistinct = WHERE_DISTINCT_ORDERED;
  5205   5205         }
  5206   5206       }else{
  5207   5207         pWInfo->nOBSat = pFrom->isOrdered;
         5208  +      if( pWInfo->nOBSat<0 ) pWInfo->nOBSat = 0;
  5208   5209         pWInfo->revMask = pFrom->revLoop;
  5209   5210       }
  5210   5211     }
  5211   5212     pWInfo->nRowOut = pFrom->nRow;
  5212   5213   
  5213   5214     /* Free temporary memory and return success */
  5214   5215     sqlite3DbFree(db, pSpace);