/ Check-in [d2105f61]
Login

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

Overview
Comment:Fix an OOM problem in where.c. (CVS 6060)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d2105f617eeb04c8177546c45bf6c63e72757f91
User & Date: drh 2008-12-23 16:23:05
Context
2008-12-23
19:15
Fix a problem with the savepoint code and in-memory journals. (CVS 6061) check-in: 26ceebf3 user: danielk1977 tags: trunk
16:23
Fix an OOM problem in where.c. (CVS 6060) check-in: d2105f61 user: drh tags: trunk
15:58
Make sure nOverflow is always cleared when a page is released. (CVS 6059) check-in: 8d0f7244 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/where.c.

    12     12   ** This module contains C code that generates VDBE code used to process
    13     13   ** the WHERE clause of SQL statements.  This module is responsible for
    14     14   ** generating the code that loops through a table looking for applicable
    15     15   ** rows.  Indices are selected and used to speed the search when doing
    16     16   ** so is applicable.  Because this module is responsible for selecting
    17     17   ** indices, you might also think of this module as the "query optimizer".
    18     18   **
    19         -** $Id: where.c,v 1.341 2008/12/23 13:35:23 drh Exp $
           19  +** $Id: where.c,v 1.342 2008/12/23 16:23:05 drh Exp $
    20     20   */
    21     21   #include "sqliteInt.h"
    22     22   
    23     23   /*
    24     24   ** Trace output macros
    25     25   */
    26     26   #if defined(SQLITE_TEST) || defined(SQLITE_DEBUG)
................................................................................
  3016   3016            || bestPlan.plan.u.pIdx!=pIdx)
  3017   3017       ){
  3018   3018         sqlite3ErrorMsg(pParse, "cannot use index: %s", pIdx->zName);
  3019   3019         goto whereBeginError;
  3020   3020       }
  3021   3021     }
  3022   3022     WHERETRACE(("*** Optimizer Finished ***\n"));
         3023  +  if( db->mallocFailed ) goto whereBeginError;
  3023   3024   
  3024   3025     /* If the total query only selects a single row, then the ORDER BY
  3025   3026     ** clause is irrelevant.
  3026   3027     */
  3027   3028     if( (andFlags & WHERE_UNIQUE)!=0 && ppOrderBy ){
  3028   3029       *ppOrderBy = 0;
  3029   3030     }