/ Check-in [b2131e86]
Login

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

Overview
Comment:Make sure the MEM_Zero flags is cleared whenever removing MEM_Blob. (CVS 6111)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:b2131e868a3a948ba81f7458270493085da1ae60
User & Date: drh 2009-01-05 18:02:27
Context
2009-01-05
19:36
Reenable fuzz testing for all.test. Make sure the query flattener copies over aggregate information from expressions on outer query terms while flattening. (CVS 6112) check-in: e02323b3 user: drh tags: trunk
18:02
Make sure the MEM_Zero flags is cleared whenever removing MEM_Blob. (CVS 6111) check-in: b2131e86 user: drh tags: trunk
17:19
Include fuzz3.test in all.test. Get fuzz3.test working again. (CVS 6110) check-in: 77dc19cf user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

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.808 2009/01/02 21:08:09 drh Exp $
           46  +** $Id: vdbe.c,v 1.809 2009/01/05 18:02:27 drh Exp $
    47     47   */
    48     48   #include "sqliteInt.h"
    49     49   #include <ctype.h>
    50     50   #include "vdbeInt.h"
    51     51   
    52     52   /*
    53     53   ** The following global variable is incremented every time a cursor
................................................................................
  1499   1499   case OP_ToText: {                  /* same as TK_TO_TEXT, in1 */
  1500   1500     if( pIn1->flags & MEM_Null ) break;
  1501   1501     assert( MEM_Str==(MEM_Blob>>3) );
  1502   1502     pIn1->flags |= (pIn1->flags&MEM_Blob)>>3;
  1503   1503     applyAffinity(pIn1, SQLITE_AFF_TEXT, encoding);
  1504   1504     rc = ExpandBlob(pIn1);
  1505   1505     assert( pIn1->flags & MEM_Str || db->mallocFailed );
  1506         -  pIn1->flags &= ~(MEM_Int|MEM_Real|MEM_Blob);
         1506  +  pIn1->flags &= ~(MEM_Int|MEM_Real|MEM_Blob|MEM_Zero);
  1507   1507     UPDATE_MAX_BLOBSIZE(pIn1);
  1508   1508     break;
  1509   1509   }
  1510   1510   
  1511   1511   /* Opcode: ToBlob P1 * * * *
  1512   1512   **
  1513   1513   ** Force the value in register P1 to be a BLOB.

Changes to src/vdbeInt.h.

    11     11   *************************************************************************
    12     12   ** This is the header file for information that is private to the
    13     13   ** VDBE.  This information used to all be at the top of the single
    14     14   ** source code file "vdbe.c".  When that file became too big (over
    15     15   ** 6000 lines long) it was split up into several smaller files and
    16     16   ** this header information was factored out.
    17     17   **
    18         -** $Id: vdbeInt.h,v 1.160 2008/12/09 02:51:24 drh Exp $
           18  +** $Id: vdbeInt.h,v 1.161 2009/01/05 18:02:27 drh Exp $
    19     19   */
    20     20   #ifndef _VDBEINT_H_
    21     21   #define _VDBEINT_H_
    22     22   
    23     23   /*
    24     24   ** intToKey() and keyToInt() used to transform the rowid.  But with
    25     25   ** the latest versions of the design they are no-ops.
................................................................................
   169    169     #define MEM_Zero 0x0000
   170    170   #endif
   171    171   
   172    172   
   173    173   /*
   174    174   ** Clear any existing type flags from a Mem and replace them with f
   175    175   */
   176         -#define MemSetTypeFlag(p, f) ((p)->flags = ((p)->flags&~(MEM_TypeMask))|f)
          176  +#define MemSetTypeFlag(p, f) \
          177  +   ((p)->flags = ((p)->flags&~(MEM_TypeMask|MEM_Zero))|f)
   177    178   
   178    179   
   179    180   /* A VdbeFunc is just a FuncDef (defined in sqliteInt.h) that contains
   180    181   ** additional information about auxiliary information bound to arguments
   181    182   ** of the function.  This is used to implement the sqlite3_get_auxdata()
   182    183   ** and sqlite3_set_auxdata() APIs.  The "auxdata" is some auxiliary data
   183    184   ** that can be associated with a constant argument to a function.  This