/ Check-in [e7653dec]
Login

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

Overview
Comment:Add WHERETRACE macros showing every entry and exit from whereLoopAddBtreeIndex().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e7653decdcee161d379ced40aa1b27246337b000
User & Date: drh 2016-09-16 14:50:38
Context
2016-09-16
15:42
Replace a faulty assert() with a testcase() to assure the condition is tested. Ticket [0eab1ac7591f]. check-in: a49bc0a8 user: drh tags: trunk
14:50
Add WHERETRACE macros showing every entry and exit from whereLoopAddBtreeIndex(). check-in: e7653dec user: drh tags: trunk
11:53
Fix SQLITE_OMIT_AUTHORIZATION so that it compiles cleanly. check-in: a3e3b3e1 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/where.c.

  2318   2318     int rc = SQLITE_OK;             /* Return code */
  2319   2319     LogEst rSize;                   /* Number of rows in the table */
  2320   2320     LogEst rLogSize;                /* Logarithm of table size */
  2321   2321     WhereTerm *pTop = 0, *pBtm = 0; /* Top and bottom range constraints */
  2322   2322   
  2323   2323     pNew = pBuilder->pNew;
  2324   2324     if( db->mallocFailed ) return SQLITE_NOMEM_BKPT;
         2325  +  WHERETRACE(0x800, ("BEGIN addBtreeIdx(%s), nEq=%d\n",
         2326  +                     pProbe->zName, pNew->u.btree.nEq));
  2325   2327   
  2326   2328     assert( (pNew->wsFlags & WHERE_VIRTUALTABLE)==0 );
  2327   2329     assert( (pNew->wsFlags & WHERE_TOP_LIMIT)==0 );
  2328   2330     if( pNew->wsFlags & WHERE_BTM_LIMIT ){
  2329   2331       opMask = WO_LT|WO_LE;
  2330   2332     }else{
  2331   2333       assert( pNew->u.btree.nBtm==0 );
................................................................................
  2596   2598       whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nIter + nInMul);
  2597   2599       pNew->nOut = saved_nOut;
  2598   2600       pNew->u.btree.nEq = saved_nEq;
  2599   2601       pNew->nSkip = saved_nSkip;
  2600   2602       pNew->wsFlags = saved_wsFlags;
  2601   2603     }
  2602   2604   
         2605  +  WHERETRACE(0x800, ("END addBtreeIdx(%s), nEq=%d, rc=%d\n",
         2606  +                      pProbe->zName, saved_nEq, rc));
  2603   2607     return rc;
  2604   2608   }
  2605   2609   
  2606   2610   /*
  2607   2611   ** Return True if it is possible that pIndex might be useful in
  2608   2612   ** implementing the ORDER BY clause in pBuilder.
  2609   2613   **