diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/expr.c | 11 | ||||
-rw-r--r-- | src/where.c | 4 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/expr.c b/src/expr.c index 60787faa2..0ff234ee9 100644 --- a/src/expr.c +++ b/src/expr.c @@ -1708,13 +1708,10 @@ static void codeReal(Vdbe *v, const char *z, int negateFlag, int iMem){ double value; char *zV; sqlite3AtoF(z, &value); - if( sqlite3IsNaN(value) ){ - sqlite3VdbeAddOp2(v, OP_Null, 0, iMem); - }else{ - if( negateFlag ) value = -value; - zV = dup8bytes(v, (char*)&value); - sqlite3VdbeAddOp4(v, OP_Real, 0, iMem, 0, zV, P4_REAL); - } + assert( !sqlite3IsNaN(value) ); /* The new AtoF never returns NaN */ + if( negateFlag ) value = -value; + zV = dup8bytes(v, (char*)&value); + sqlite3VdbeAddOp4(v, OP_Real, 0, iMem, 0, zV, P4_REAL); } } diff --git a/src/where.c b/src/where.c index 7d8f05de3..836324156 100644 --- a/src/where.c +++ b/src/where.c @@ -3558,7 +3558,9 @@ WhereInfo *sqlite3WhereBegin( ** FROM clause entry that permits the lowest-cost, "optimal" scan. In ** this context an optimal scan is one that uses the same strategy ** for the given FROM clause entry as would be selected if the entry - ** were used as the innermost nested loop. + ** were used as the innermost nested loop. In other words, a table + ** is chosen such that the cost of running that table cannot be reduced + ** by waiting for other tables to run first. ** ** The second iteration is only performed if no optimal scan strategies ** were found by the first. This iteration is used to search for the |