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

Overview
Comment:Have the planner always consider the PK index, even when it does not serve to satisfy any contraints or ordering requirements.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 95933bb7cafc6c39649515a8baf3041cc39b56b0
User & Date: dan 2013-06-25 14:47:11.198
Context
2013-06-25
15:28
Fix comments and a memory leak in analyze.c. check-in: 8a25008dfe user: dan tags: trunk
14:47
Have the planner always consider the PK index, even when it does not serve to satisfy any contraints or ordering requirements. check-in: 95933bb7ca user: dan tags: trunk
11:58
Run test files analyze5.test, analyze6.test and analyze7.test as part of src4.test. check-in: 8eb90b6647 user: dan tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/where.c.
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
      nEq, nInMul, (int)rangeDiv, bSort, bLookup, wsFlags,
      notReady, log10N, nRow, cost, used
    ));

    /* If this index is the best we have seen so far, then record this
    ** index and its cost in the pCost structure.
    */
    if( (pProbe==pFirst || wsFlags)
     && (cost<pCost->rCost || (cost<=pCost->rCost && nRow<pCost->plan.nRow))
    ){
      pCost->rCost = cost;
      pCost->used = used;
      pCost->plan.nRow = nRow;
      pCost->plan.wsFlags = wsFlags;
      pCost->plan.nEq = nEq;







|







3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
      nEq, nInMul, (int)rangeDiv, bSort, bLookup, wsFlags,
      notReady, log10N, nRow, cost, used
    ));

    /* If this index is the best we have seen so far, then record this
    ** index and its cost in the pCost structure.
    */
    if( (pProbe==pFirst || wsFlags || pProbe==pPk)
     && (cost<pCost->rCost || (cost<=pCost->rCost && nRow<pCost->plan.nRow))
    ){
      pCost->rCost = cost;
      pCost->used = used;
      pCost->plan.nRow = nRow;
      pCost->plan.wsFlags = wsFlags;
      pCost->plan.nEq = nEq;