Test coverage improvements. (CVS 2215)

FossilOrigin-Name: 92f9d2b2f480fccfa6e8b70a1d19058b92a4ea8f
diff --git a/src/date.c b/src/date.c
index dea047d..d472e58 100644
--- a/src/date.c
+++ b/src/date.c
@@ -16,7 +16,7 @@
 ** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
 ** All other code has file scope.
 **
-** $Id: date.c,v 1.42 2004/11/14 21:56:30 drh Exp $
+** $Id: date.c,v 1.43 2005/01/15 01:52:32 drh Exp $
 **
 ** NOTES:
 **
@@ -315,12 +315,10 @@
     return 0;
   }else if( sqlite3StrICmp(zDate,"now")==0){
     double r;
-    if( sqlite3OsCurrentTime(&r)==0 ){
-      p->rJD = r;
-      p->validJD = 1;
-      return 0;
-    }
-    return 1;
+    sqlite3OsCurrentTime(&r);
+    p->rJD = r;
+    p->validJD = 1;
+    return 0;
   }else if( sqlite3IsNumber(zDate, 0, SQLITE_UTF8) ){
     p->rJD = sqlite3AtoF(zDate, 0);
     p->validJD = 1;
diff --git a/src/expr.c b/src/expr.c
index cc753be..8e12562 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -12,7 +12,7 @@
 ** This file contains routines used for analyzing expressions and
 ** for generating VDBE code that evaluates expressions in SQLite.
 **
-** $Id: expr.c,v 1.177 2005/01/13 02:14:25 danielk1977 Exp $
+** $Id: expr.c,v 1.178 2005/01/15 01:52:32 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -614,16 +614,6 @@
       }
       break;
     }
-    case TK_STRING: {
-      const u8 *z = (u8*)p->token.z;
-      int n = p->token.n;
-      if( n>0 && z[0]=='-' ){ z++; n--; }
-      while( n>0 && *z && isdigit(*z) ){ z++; n--; }
-      if( n==0 && sqlite3GetInt32(p->token.z, pValue) ){
-        return 1;
-      }
-      break;
-    }
     case TK_UPLUS: {
       return sqlite3ExprIsInteger(p->pLeft, pValue);
     }
diff --git a/src/select.c b/src/select.c
index aa0f920..ac12ff4 100644
--- a/src/select.c
+++ b/src/select.c
@@ -12,7 +12,7 @@
 ** This file contains C code routines that are called by the parser
 ** to handle SELECT statements in SQLite.
 **
-** $Id: select.c,v 1.220 2005/01/03 02:26:55 drh Exp $
+** $Id: select.c,v 1.221 2005/01/15 01:52:32 drh Exp $
 */
 #include "sqliteInt.h"
 
@@ -670,14 +670,18 @@
       }
       break;
     }
-    case TK_AS:
-      zType = columnType(pParse, pTabList, pExpr->pLeft); 
-      break;
     case TK_SELECT: {
       Select *pS = pExpr->pSelect;
       zType = columnType(pParse, pS->pSrc, pS->pEList->a[0].pExpr); 
       break;
     }
+    case TK_AS:
+      /* The TK_AS operator can only occur in ORDER BY, GROUP BY, HAVING,
+      ** and LIMIT clauses.  But pExpr originates in the result set of a
+      ** SELECT.  So pExpr can never contain an AS operator.
+      */
+      assert( 0 );
+      /* Fall thru */
     default:
       zType = 0;
   }