/ Check-in [5cba8a51]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix two bugs that were causing lots of tests to fail. (CVS 1386)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:5cba8a510c0aeae740db695e960c60e5f6c303f5
User & Date: danielk1977 2004-05-16 11:57:28
Context
2004-05-16
16:24
Fix a bug in the BTree balancing routine. (CVS 1387) check-in: 6c73544b user: drh tags: trunk
11:57
Fix two bugs that were causing lots of tests to fail. (CVS 1386) check-in: 5cba8a51 user: danielk1977 tags: trunk
11:15
More changes to support the manifest type model. A few things are currently broken. (CVS 1385) check-in: a4af838f user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/build.c.

    19     19   **     DROP INDEX
    20     20   **     creating ID lists
    21     21   **     BEGIN TRANSACTION
    22     22   **     COMMIT
    23     23   **     ROLLBACK
    24     24   **     PRAGMA
    25     25   **
    26         -** $Id: build.c,v 1.184 2004/05/16 11:15:36 danielk1977 Exp $
           26  +** $Id: build.c,v 1.185 2004/05/16 11:57:28 danielk1977 Exp $
    27     27   */
    28     28   #include "sqliteInt.h"
    29     29   #include <ctype.h>
    30     30   
    31     31   /*
    32     32   ** This routine is called when a new SQL statement is beginning to
    33     33   ** be parsed.  Check to see if the schema for the database needs
................................................................................
   783    783       {"DOUBLE", 6, SQLITE_AFF_NUMERIC},
   784    784       {"NUM", 3, SQLITE_AFF_NUMERIC},
   785    785       {"CHAR", 4, SQLITE_AFF_TEXT},
   786    786       {"CLOB", 4, SQLITE_AFF_TEXT},
   787    787       {"TEXT", 4, SQLITE_AFF_TEXT}
   788    788     };
   789    789   
   790         -  for(n=0; n<(nType-3); n++){
          790  +  for(n=0; n<(nType-2); n++){
   791    791       for(i=0; i<sizeof(substrings)/sizeof(substrings[0]); i++){
   792    792         if( 0==sqlite3StrNICmp(zType, substrings[i].zSub, substrings[i].nSub) ){
   793    793           return substrings[i].affinity;
   794    794         }
   795    795       }
   796    796     }
   797    797   

Changes to src/expr.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains routines used for analyzing expressions and
    13     13   ** for generating VDBE code that evaluates expressions in SQLite.
    14     14   **
    15         -** $Id: expr.c,v 1.118 2004/05/16 11:15:37 danielk1977 Exp $
           15  +** $Id: expr.c,v 1.119 2004/05/16 11:57:28 danielk1977 Exp $
    16     16   */
    17     17   #include "sqliteInt.h"
    18     18   #include <ctype.h>
    19     19   
    20     20   static char exprAffinity(Expr *pExpr){
    21     21     if( pExpr->op==TK_AS ){
    22     22       return exprAffinity(pExpr->pLeft);
................................................................................
  1094   1094         break;
  1095   1095       }
  1096   1096       case TK_STRING:
  1097   1097       case TK_FLOAT:
  1098   1098       case TK_INTEGER: {
  1099   1099         if( pExpr->op==TK_INTEGER && sqlite3FitsIn32Bits(pExpr->token.z) ){
  1100   1100           sqlite3VdbeAddOp(v, OP_Integer, atoi(pExpr->token.z), 0);
  1101         -      }else if( pExpr->op==TK_FLOAT ){
         1101  +      }else if( pExpr->op==TK_FLOAT || pExpr->op==TK_INTEGER ){
  1102   1102           sqlite3VdbeAddOp(v, OP_Real, 0, 0);
  1103   1103         }else{
  1104   1104           sqlite3VdbeAddOp(v, OP_String, 0, 0);
  1105   1105         }
  1106   1106         assert( pExpr->token.z );
  1107   1107         sqlite3VdbeChangeP3(v, -1, pExpr->token.z, pExpr->token.n);
  1108   1108         sqlite3VdbeDequoteP3(v, -1);

Changes to src/vdbe.c.

    39     39   **
    40     40   ** Various scripts scan this source file in order to generate HTML
    41     41   ** documentation, headers files, or other derived files.  The formatting
    42     42   ** of the code in this file is, therefore, important.  See other comments
    43     43   ** in this file for details.  If in doubt, do not deviate from existing
    44     44   ** commenting and indentation practices when changing or adding code.
    45     45   **
    46         -** $Id: vdbe.c,v 1.294 2004/05/16 11:15:40 danielk1977 Exp $
           46  +** $Id: vdbe.c,v 1.295 2004/05/16 11:57:28 danielk1977 Exp $
    47     47   */
    48     48   #include "sqliteInt.h"
    49     49   #include "os.h"
    50     50   #include <ctype.h>
    51     51   #include "vdbeInt.h"
    52     52   
    53     53   /*
................................................................................
  1514   1514     /* If either value is a NULL P2 is not zero, take the jump if the least
  1515   1515     ** significant byte of P1 is true. If P2 is zero, then push a NULL onto
  1516   1516     ** the stack.
  1517   1517     */
  1518   1518     if( flags&MEM_Null ){
  1519   1519       popStack(&pTos, 2);
  1520   1520       if( pOp->p2 ){
  1521         -      if( pOp->p1 ) pc = pOp->p2-1;
         1521  +      if( (pOp->p1&0xFF) ) pc = pOp->p2-1;
  1522   1522       }else{
  1523   1523         pTos++;
  1524   1524         pTos->flags = MEM_Null;
  1525   1525       }
  1526   1526       break;
  1527   1527     }
  1528   1528