diff --git a/manifest b/manifest index 5098148981..3b9bf6dc40 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Changes\sto\sallow\sa\sclean\scompile\swith\sno\sfloating-point\sinstructions\ngenerated\swhen\sSQLITE_OMIT_FLOATING_POINT\sis\sused.\s(CVS\s6763) -D 2009-06-15T20:45:35 +C Additional\supdates\sto\sthe\ssymbol\sresolver\sand\sexpression\stree\swalker\sto\nfacilitate\stest\scoverage.\s(CVS\s6764) +D 2009-06-15T23:15:59 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 8b8fb7823264331210cddf103831816c286ba446 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -156,7 +156,7 @@ F src/pragma.c 06b3a4b93a5e587f1c04b4a40016eb360792cdf3 F src/prepare.c 889208e3567a98bb3d345a30f63240beb9ac90f9 F src/printf.c 508a1c59433353552b6553cba175eaa7331f8fc1 F src/random.c 676b9d7ac820fe81e6fb2394ac8c10cff7f38628 -F src/resolve.c 34c5b59db6d5ae901558225facabc5833693f9b4 +F src/resolve.c 4a61d03e49b15440878096e6030863fc628828f0 F src/rowset.c c64dafba1f9fd876836c8db8682966b9d197eb1f F src/select.c 71748b8e244112cf73df9446c4246c192276c30d F src/shell.c db2643650b9268df89a4bedca3f1c6d9e786f1bb @@ -211,7 +211,7 @@ F src/vdbeaux.c 14e1c6065172530a14648292371ccd3c1ea0d490 F src/vdbeblob.c c25d7e7bc6d5917feeb17270bd275fa771f26e5c F src/vdbemem.c 05183d46094aa99b8f8350e5761b9369dbef35a8 F src/vtab.c 98fbffc5efe68d8107511dec0a650efc7daa9446 -F src/walker.c ec4b9742a4077ef80346e2f9aaf0f44c2d95087a +F src/walker.c 1edca756275f158b80f20eb6f104c8d3fcc96a04 F src/where.c 658d99d9a2be77ebea35bfaa581d5ec9b0a11af9 F test/aggerror.test a867e273ef9e3d7919f03ef4f0e8c0d2767944f2 F test/alias.test 4529fbc152f190268a15f9384a5651bbbabc9d87 @@ -734,7 +734,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746 -P c50f0f28df1dfdccf1d159c983b616cd9b823955 -R db51201c6b75745e45f26c2051924884 +P 1591b8322babebc45df3b799cc5e457288f28594 +R 470d1cef74e62b42973a2d3f18571011 U drh -Z 8eaaa61e108cd5d3c53358e0864b8d9c +Z 9d5cb86b471f22bb23ed8e81d595d871 diff --git a/manifest.uuid b/manifest.uuid index 601ffad2b8..72f0d877b4 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -1591b8322babebc45df3b799cc5e457288f28594 \ No newline at end of file +a49c2d4befcc33dd98543fe7b4d4f0bae56f1a90 \ No newline at end of file diff --git a/src/resolve.c b/src/resolve.c index 666bbf226b..9ba7567659 100644 --- a/src/resolve.c +++ b/src/resolve.c @@ -14,7 +14,7 @@ ** resolve all identifiers by associating them with a particular ** table and column. ** -** $Id: resolve.c,v 1.29 2009/06/15 18:32:36 drh Exp $ +** $Id: resolve.c,v 1.30 2009/06/15 23:15:59 drh Exp $ */ #include "sqliteInt.h" #include @@ -119,7 +119,7 @@ static void resolveAlias( ** can be used. ** ** If the name cannot be resolved unambiguously, leave an error message -** in pParse and return non-zero. Return zero on success. +** in pParse and return WRC_Abort. Return WRC_Prune on success. */ static int lookupName( Parse *pParse, /* The parsing context */ @@ -295,7 +295,7 @@ static int lookupName( pOrig = pEList->a[j].pExpr; if( !pNC->allowAgg && ExprHasProperty(pOrig, EP_Agg) ){ sqlite3ErrorMsg(pParse, "misuse of aliased aggregate %s", zAs); - return 2; + return WRC_Abort; } resolveAlias(pParse, pEList, j, pExpr, ""); cnt = 1; @@ -327,7 +327,7 @@ static int lookupName( if( cnt==0 && zTab==0 && ExprHasProperty(pExpr,EP_DblQuoted) ){ pExpr->op = TK_STRING; pExpr->pTab = 0; - return 0; + return WRC_Prune; } /* @@ -382,9 +382,9 @@ lookupname_end: if( pTopNC==pNC ) break; pTopNC = pTopNC->pNext; } - return 0; + return WRC_Prune; } else { - return 1; + return WRC_Abort; } } @@ -443,8 +443,7 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){ /* A lone identifier is the name of a column. */ case TK_ID: { - lookupName(pParse, 0, 0, pExpr->u.zToken, pNC, pExpr); - return WRC_Prune; + return lookupName(pParse, 0, 0, pExpr->u.zToken, pNC, pExpr); } /* A table name and column name: ID.ID @@ -468,8 +467,7 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){ zTable = pRight->pLeft->u.zToken; zColumn = pRight->pRight->u.zToken; } - lookupName(pParse, zDb, zTable, zColumn, pNC, pExpr); - return WRC_Prune; + return lookupName(pParse, zDb, zTable, zColumn, pNC, pExpr); } /* Resolve function names diff --git a/src/walker.c b/src/walker.c index f565bc55f9..2700630391 100644 --- a/src/walker.c +++ b/src/walker.c @@ -12,7 +12,7 @@ ** This file contains routines used for walking the parser tree for ** an SQL statement. ** -** $Id: walker.c,v 1.6 2009/05/28 01:00:55 drh Exp $ +** $Id: walker.c,v 1.7 2009/06/15 23:15:59 drh Exp $ */ #include "sqliteInt.h" #include @@ -62,14 +62,14 @@ int sqlite3WalkExpr(Walker *pWalker, Expr *pExpr){ ** an abort request is seen. */ int sqlite3WalkExprList(Walker *pWalker, ExprList *p){ - int i, rc = WRC_Continue; + int i; struct ExprList_item *pItem; if( p ){ for(i=p->nExpr, pItem=p->a; i>0; i--, pItem++){ if( sqlite3WalkExpr(pWalker, pItem->pExpr) ) return WRC_Abort; } } - return rc & WRC_Continue; + return WRC_Continue; } /* @@ -102,7 +102,7 @@ int sqlite3WalkSelectFrom(Walker *pWalker, Select *p){ struct SrcList_item *pItem; pSrc = p->pSrc; - if( pSrc ){ + if( ALWAYS(pSrc) ){ for(i=pSrc->nSrc, pItem=pSrc->a; i>0; i--, pItem++){ if( sqlite3WalkSelect(pWalker, pItem->pSelect) ){ return WRC_Abort;