/ Check-in [63fd025a]
Login

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

Overview
Comment:Better determination of when an index is UNIQUE.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | nextgen-query-plan-exp
Files: files | file ages | folders
SHA1:63fd025ad98c33826342824c51436ac92e2bb579
User & Date: drh 2013-06-04 13:37:26
Context
2013-06-04
15:31
Test case updates. check-in: 0360fec7 user: drh tags: nextgen-query-plan-exp
13:37
Better determination of when an index is UNIQUE. check-in: 63fd025a user: drh tags: nextgen-query-plan-exp
13:07
Increase the estimated full-scan cost for an FTS3 table. check-in: 8d9f29f8 user: drh tags: nextgen-query-plan-exp
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/where.c.

  4020   4020         pNew->u.btree.nEq++;
  4021   4021         pNew->nOut = (double)iRowEst * nInMul * nIn;
  4022   4022       }else if( pTerm->eOperator & (WO_EQ) ){
  4023   4023         assert( (pNew->wsFlags & (WHERE_COLUMN_NULL|WHERE_COLUMN_IN))!=0
  4024   4024                     || nInMul==1 );
  4025   4025         pNew->wsFlags |= WHERE_COLUMN_EQ;
  4026   4026         if( iCol<0  
  4027         -       || (pProbe->onError==OE_Abort && nInMul==1
         4027  +       || (pProbe->onError!=OE_None && nInMul==1
  4028   4028              && pNew->u.btree.nEq==pProbe->nColumn-1)
  4029   4029         ){
  4030   4030           testcase( pNew->wsFlags & WHERE_COLUMN_IN );
  4031   4031           pNew->wsFlags |= WHERE_ONEROW;
  4032   4032         }
  4033   4033         pNew->u.btree.nEq++;
  4034   4034         pNew->nOut = (double)iRowEst * nInMul;
................................................................................
  4717   4717                 rev = revIdx ^ pOrderBy->a[i].sortOrder;
  4718   4718                 if( rev ) *pRevMask |= MASKBIT(iLoop);
  4719   4719                 revSet = 1;
  4720   4720               }
  4721   4721             }
  4722   4722           }else{
  4723   4723             /* No match found */
  4724         -          if( j<nColumn || pIndex==0 || pIndex->onError!=OE_Abort ){
         4724  +          if( j<nColumn || pIndex==0 || pIndex->onError==OE_None ){
  4725   4725               isWellOrdered = 0;
  4726   4726             }
  4727   4727             break;
  4728   4728           }
  4729   4729         } /* end Loop over all index columns */
  4730   4730       } /* end-if not one-row */
  4731   4731