aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2009-08-21 13:22:25 +0000
committerdrh <drh@noemail.net>2009-08-21 13:22:25 +0000
commitd00151613a780df55536fe77ffbcc1a879fb929e (patch)
tree29360dcb0217edc80491d7aed95fccd2a3e17d2a /src
parent9359c7b7abeb8f56b3038f2ef5c8a6632b16fb14 (diff)
downloadsqlite-d00151613a780df55536fe77ffbcc1a879fb929e.tar.gz
sqlite-d00151613a780df55536fe77ffbcc1a879fb929e.zip
Change the expression code generator to account for the fact that the new
sqlite3AtoF() never returns NaN. Also, clarification of a comment in where.c. FossilOrigin-Name: 75f596a04a74eb3a538c7be5b41756c970a21a1b
Diffstat (limited to 'src')
-rw-r--r--src/expr.c11
-rw-r--r--src/where.c4
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