/ Check-in [24683f1d]
Login

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

Overview
Comment:Fix an assertion failure caused by (3851). (CVS 3852)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 24683f1d29c5d312d6cabe2dde52d7c0424f629a
User & Date: danielk1977 2007-04-18 14:47:24
Context
2007-04-18
15:33
Version 3.3.16 (CVS 3853) check-in: 8c6b5adb user: drh tags: trunk
14:47
Fix an assertion failure caused by (3851). (CVS 3852) check-in: 24683f1d user: danielk1977 tags: trunk
14:24
Minor changes (mainly to assert() macros) to handle malloc failure in vtab operations. (CVS 3851) check-in: 175156d1 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/build.c.

    18     18   **     CREATE INDEX
    19     19   **     DROP INDEX
    20     20   **     creating ID lists
    21     21   **     BEGIN TRANSACTION
    22     22   **     COMMIT
    23     23   **     ROLLBACK
    24     24   **
    25         -** $Id: build.c,v 1.420 2007/04/16 15:06:25 danielk1977 Exp $
           25  +** $Id: build.c,v 1.421 2007/04/18 14:47:24 danielk1977 Exp $
    26     26   */
    27     27   #include "sqliteInt.h"
    28     28   #include <ctype.h>
    29     29   
    30     30   /*
    31     31   ** This routine is called when a new SQL statement is beginning to
    32     32   ** be parsed.  Initialize the pParse structure as needed.
................................................................................
  2199   2199       int addr2 = curaddr+4;
  2200   2200       sqlite3VdbeChangeP2(v, curaddr-1, addr2);
  2201   2201       sqlite3VdbeAddOp(v, OP_Rowid, iTab, 0);
  2202   2202       sqlite3VdbeAddOp(v, OP_AddImm, 1, 0);
  2203   2203       sqlite3VdbeAddOp(v, OP_IsUnique, iIdx, addr2);
  2204   2204       sqlite3VdbeOp3(v, OP_Halt, SQLITE_CONSTRAINT, OE_Abort,
  2205   2205                       "indexed columns are not unique", P3_STATIC);
  2206         -    assert( addr2==sqlite3VdbeCurrentAddr(v) );
         2206  +    assert( sqlite3MallocFailed() || addr2==sqlite3VdbeCurrentAddr(v) );
  2207   2207     }
  2208   2208     sqlite3VdbeAddOp(v, OP_IdxInsert, iIdx, 0);
  2209   2209     sqlite3VdbeAddOp(v, OP_Next, iTab, addr1+1);
  2210   2210     sqlite3VdbeJumpHere(v, addr1);
  2211   2211     sqlite3VdbeAddOp(v, OP_Close, iTab, 0);
  2212   2212     sqlite3VdbeAddOp(v, OP_Close, iIdx, 0);
  2213   2213   }