-C Simplifications\sto\sthe\sexpr.c\ssource\smodule\sresulting\sfrom\sstructural\ntesting.\s(CVS\s6694)
-D 2009-05-30T20:49:20
+C Fix\stypo\sreported\sby\sticket\s#3888.\s\sOther\sminor\sedits\sto\sfacilitate\ncoverage\stesting.\s(CVS\s6695)
+D 2009-05-30T23:35:43
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/complete.c 5ad5c6cd4548211867c204c41a126d73a9fbcea0
F src/date.c ab5f7137656652a48434d64f96bdcdc823bb23b3
F src/delete.c cb791855c7948cecc96def9d97989879ca26f257
-F src/expr.c f0b46b992f5e371706e91205fe3b8aea199d8766
+F src/expr.c ac7ebc41433d177dfbc21780c9cce790bbdbecaf
F src/fault.c dc88c821842157460750d2d61a8a8b4197d047ff
F src/func.c 9d7b47729c337c5e4b78d795922ed34eec4aef67
F src/global.c 448419c44ce0701104c2121b0e06919b44514c0c
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 00e7250f11e190cd915870438d172f574d110e6d
-R eed238d5c207fcace25a1d14a8d7836f
+P f760bb7a0372d11ac7e3287b8a56fc4261e6371c
+R 27b6ce0fb3260e877dc964dee964de13
U drh
-Z b1372e359ebf0d19a0cf7f52aedf055c
+Z 03718f2f6b19c22e54c0a99a910d7f35
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
-** $Id: expr.c,v 1.443 2009/05/30 20:49:20 drh Exp $
+** $Id: expr.c,v 1.444 2009/05/30 23:35:43 drh Exp $
*/
#include "sqliteInt.h"
}
nextCase = sqlite3VdbeMakeLabel(v);
testcase( pTest->op==TK_COLUMN );
- testcase( pTest->op==TK_COLUMN );
sqlite3ExprIfFalse(pParse, pTest, nextCase, SQLITE_JUMPIFNULL);
testcase( aListelem[i+1].pExpr->op==TK_COLUMN );
testcase( aListelem[i+1].pExpr->op==TK_REGISTER );
int inReg;
inReg = sqlite3ExprCode(pParse, pExpr, target);
assert( target>0 );
- if( pExpr->op!=TK_REGISTER ){
+ /* This routine is called for terms to INSERT or UPDATE. And the only
+ ** other place where expressions can be converted into TK_REGISTER is
+ ** in WHERE clause processing. So as currently implemented, there is
+ ** no way for a TK_REGISTER to exist here. But it seems prudent to
+ ** keep the ALWAYS() in case the conditions above change with future
+ ** modifications or enhancements. */
+ if( ALWAYS(pExpr->op!=TK_REGISTER) ){
int iMem;
iMem = ++pParse->nMem;
sqlite3VdbeAddOp2(v, OP_Copy, inReg, iMem);
return 0;
}
case TK_UMINUS: {
- if( p->pLeft->op==TK_FLOAT || p->pLeft->op==TK_INTEGER ){
- return 0;
- }
- break;
+ if( p->pLeft->op==TK_FLOAT || p->pLeft->op==TK_INTEGER ){
+ return 0;
+ }
+ break;
}
default: {
break;
return 0;
}
}else if( pA->op!=TK_COLUMN && pA->u.zToken ){
- if( ExprHasProperty(pB, EP_IntValue) || pB->u.zToken==0 ) return 0;
+ if( ExprHasProperty(pB, EP_IntValue) || NEVER(pB->u.zToken==0) ) return 0;
if( sqlite3StrICmp(pA->u.zToken,pB->u.zToken)!=0 ){
return 0;
}
testcase( pExpr->op==TK_COLUMN );
/* Check to see if the column is in one of the tables in the FROM
** clause of the aggregate query */
- if( pSrcList ){
+ if( ALWAYS(pSrcList!=0) ){
struct SrcList_item *pItem = pSrcList->a;
for(i=0; i<pSrcList->nSrc; i++, pItem++){
struct AggInfo_col *pCol;
w.xExprCallback = analyzeAggregate;
w.xSelectCallback = analyzeAggregatesInSelect;
w.u.pNC = pNC;
+ assert( pNC->pSrcList!=0 );
sqlite3WalkExpr(&w, pExpr);
}