aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2009-01-08 21:00:02 +0000
committerdrh <drh@noemail.net>2009-01-08 21:00:02 +0000
commit103bd88cf77e70867eb6937f5c949bf5315a17d5 (patch)
tree52ab8033930c2560578c5d4c88c1b833e39d5b1c /src
parentad0ea2280ae1a1d29a57d47ac232476a16bd1bdd (diff)
downloadsqlite-103bd88cf77e70867eb6937f5c949bf5315a17d5.tar.gz
sqlite-103bd88cf77e70867eb6937f5c949bf5315a17d5.zip
Increased test coverage in where.c. (CVS 6146)
FossilOrigin-Name: 1e5725c5179660277c2e8c321877d7ee3ca21808
Diffstat (limited to 'src')
-rw-r--r--src/where.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/where.c b/src/where.c
index 000fd435a..5c6ae3100 100644
--- a/src/where.c
+++ b/src/where.c
@@ -16,7 +16,7 @@
** so is applicable. Because this module is responsible for selecting
** indices, you might also think of this module as the "query optimizer".
**
-** $Id: where.c,v 1.360 2009/01/08 03:11:19 drh Exp $
+** $Id: where.c,v 1.361 2009/01/08 21:00:03 drh Exp $
*/
#include "sqliteInt.h"
@@ -1859,12 +1859,9 @@ static void bestIndex(
}else{
continue;
}
- if( sTermCost.plan.wsFlags==0 ){
- rTotal = pCost->rCost;
- break;
- }
rTotal += sTermCost.rCost;
nRow += sTermCost.nRow;
+ if( rTotal>=pCost->rCost ) break;
}
WHERETRACE(("... multi-index OR cost=%.9g nrow=%.9g\n",
rTotal, nRow));