diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/func.c | 3 | ||||
-rw-r--r-- | src/where.c | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/func.c b/src/func.c index 542d71a23..8382e4a5c 100644 --- a/src/func.c +++ b/src/func.c @@ -1764,11 +1764,10 @@ static void sumStep(sqlite3_context *context, int argc, sqlite3_value **argv){ p->ovrfl = 1; kahanBabuskaNeumaierInit(p, p->iSum); p->approx = 1; - kahanBabuskaNeumaierStep(p, sqlite3_value_double(argv[0])); + kahanBabuskaNeumaierStepInt64(p, sqlite3_value_int64(argv[0])); } } }else{ - p->approx = 1; if( type==SQLITE_INTEGER ){ kahanBabuskaNeumaierStepInt64(p, sqlite3_value_int64(argv[0])); }else{ diff --git a/src/where.c b/src/where.c index 858e33c8a..35b9056ff 100644 --- a/src/where.c +++ b/src/where.c @@ -5122,9 +5122,10 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){ /* TUNING: A full-scan of a VIEW or subquery in the outer loop ** is not so bad. */ - if( iLoop==0 && (pWLoop->wsFlags & WHERE_VIEWSCAN)!=0 ){ + if( iLoop==0 && (pWLoop->wsFlags & WHERE_VIEWSCAN)!=0 && nLoop>1 ){ rCost += -10; nOut += -30; + WHERETRACE(0x80,("VIEWSCAN cost reduction for %c\n",pWLoop->cId)); } /* Check to see if pWLoop should be added to the set of |