/ Check-in [08e71b11]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix a segfault that followed a malloc failure introduced by (6527). (CVS 6532)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 08e71b114087cfddd36c066265982172fcb41c9a
User & Date: danielk1977 2009-04-21 17:23:05
Context
2009-04-21
18:20
Move RowHashBlock.nUsed to RowHash.nUsed. Fix a typo in a comment in test_async.c. (CVS 6533) check-in: 799d31d9 user: danielk1977 tags: trunk
17:23
Fix a segfault that followed a malloc failure introduced by (6527). (CVS 6532) check-in: 08e71b11 user: danielk1977 tags: trunk
17:13
Adjust the rowhash.test module so that it recovers gracefully in the rare event of a rowid collision. (CVS 6531) check-in: 72e16809 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.383 2009/04/21 09:02:47 danielk1977 Exp $
           19  +** $Id: where.c,v 1.384 2009/04/21 17:23:05 danielk1977 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)
................................................................................
  1750   1750   
  1751   1751     /* If the sqlite3_index_info structure has not been previously
  1752   1752     ** allocated and initialized, then allocate and initialize it now.
  1753   1753     */
  1754   1754     pIdxInfo = *ppIdxInfo;
  1755   1755     if( pIdxInfo==0 ){
  1756   1756       *ppIdxInfo = pIdxInfo = allocateIndexInfo(pParse, pWC, pSrc, pOrderBy);
         1757  +  }
         1758  +  if( pIdxInfo==0 ){
         1759  +    return;
  1757   1760     }
  1758   1761   
  1759   1762     /* At this point, the sqlite3_index_info structure that pIdxInfo points
  1760   1763     ** to will have been initialized, either during the current invocation or
  1761   1764     ** during some prior invocation.  Now we just have to customize the
  1762   1765     ** details of pIdxInfo for the current invocation and pass it to
  1763   1766     ** xBestIndex.