/ Check-in [b519c0d6]
Login

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

Overview
Comment:Merge latest trunk change into this branch.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | vtab-onepass
Files: files | file ages | folders
SHA1: b519c0d67a8fc39d65c17eccc9300a6187bd5661
User & Date: dan 2015-09-29 11:59:25
Context
2015-09-29
12:32
Fix compiler warnings. check-in: d1a07838 user: drh tags: vtab-onepass
11:59
Merge latest trunk change into this branch. check-in: b519c0d6 user: dan tags: vtab-onepass
11:57
Change the name of the new sqlite3_index_info.flags field to "idxFlags". Add documentation for the same to sqlite.h.in. check-in: f61203bc user: dan tags: vtab-onepass
2015-09-28
17:05
Extra information provided by .wheretrace on input flags to the query planner and on the result of sqlite3WhereOkOnePass(). check-in: c5566bb3 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/where.c.

    83     83   ** Any cursors returned will have been opened for writing.
    84     84   **
    85     85   ** aiCur[0] and aiCur[1] both get -1 if the where-clause logic is
    86     86   ** unable to use the ONEPASS optimization.
    87     87   */
    88     88   int sqlite3WhereOkOnePass(WhereInfo *pWInfo, int *aiCur){
    89     89     memcpy(aiCur, pWInfo->aiCurOnePass, sizeof(int)*2);
           90  +#ifdef WHERETRACE_ENABLED
           91  +  if( sqlite3WhereTrace && pWInfo->eOnePass!=ONEPASS_OFF ){
           92  +    sqlite3DebugPrintf("%s cursors: %d %d\n",
           93  +         pWInfo->eOnePass==ONEPASS_SINGLE ? "ONEPASS_SINGLE" : "ONEPASS_MULTI",
           94  +         aiCur[0], aiCur[1]);
           95  +  }
           96  +#endif
    90     97     return pWInfo->eOnePass;
    91     98   }
    92     99   
    93    100   /*
    94    101   ** Move the content of pSrc into pDest
    95    102   */
    96    103   static void whereOrMove(WhereOrSet *pDest, WhereOrSet *pSrc){
................................................................................
  4116   4123         /* Try to ORDER BY the result set to make distinct processing easier */
  4117   4124         pWInfo->wctrlFlags |= WHERE_DISTINCTBY;
  4118   4125         pWInfo->pOrderBy = pResultSet;
  4119   4126       }
  4120   4127     }
  4121   4128   
  4122   4129     /* Construct the WhereLoop objects */
  4123         -  WHERETRACE(0xffff,("*** Optimizer Start ***\n"));
         4130  +  WHERETRACE(0xffff,("*** Optimizer Start *** (wctrlFlags: 0x%x)\n",
         4131  +             wctrlFlags));
  4124   4132   #if defined(WHERETRACE_ENABLED)
  4125   4133     if( sqlite3WhereTrace & 0x100 ){ /* Display all terms of the WHERE clause */
  4126   4134       int i;
  4127   4135       for(i=0; i<sWLB.pWC->nTerm; i++){
  4128   4136         whereTermPrint(&sWLB.pWC->a[i], i);
  4129   4137       }
  4130   4138     }