/ Check-in [8fb0c6d5]
Login

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

Overview
Comment:Fix an assert() that [28196d89] caused to fail.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8fb0c6d5a38e77aa4c5f394fb8af1b0c7c6a4790e932aabc213a3078ee9acaf6
User & Date: dan 2019-07-08 13:45:02
Context
2019-07-08
18:35
Fix dbfuzz2 so that it will compile on systems that do not support getrlimit(). check-in: 36295dce user: drh tags: trunk
13:45
Fix an assert() that [28196d89] caused to fail. check-in: 8fb0c6d5 user: dan tags: trunk
12:01
Ensure collation sequences and affinities work in window function queries. Fix for [9ece23d2]. check-in: 28196d89 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/build.c.

   614    614   ** used by the Table object.
   615    615   */
   616    616   static void SQLITE_NOINLINE deleteTable(sqlite3 *db, Table *pTable){
   617    617     Index *pIndex, *pNext;
   618    618   
   619    619   #ifdef SQLITE_DEBUG
   620    620     /* Record the number of outstanding lookaside allocations in schema Tables
   621         -  ** prior to doing any free() operations.  Since schema Tables do not use
   622         -  ** lookaside, this number should not change. */
          621  +  ** prior to doing any free() operations. Since schema Tables do not use
          622  +  ** lookaside, this number should not change. 
          623  +  **
          624  +  ** If malloc has already failed, it may be that it failed while allocating
          625  +  ** a Table object that was going to be marked ephemeral. So do not check
          626  +  ** that no lookaside memory is used in this case either. */
   623    627     int nLookaside = 0;
   624         -  if( db && (pTable->tabFlags & TF_Ephemeral)==0 ){
          628  +  if( db && !db->mallocFailed && (pTable->tabFlags & TF_Ephemeral)==0 ){
   625    629       nLookaside = sqlite3LookasideUsed(db, 0);
   626    630     }
   627    631   #endif
   628    632   
   629    633     /* Delete all indices associated with this table. */
   630    634     for(pIndex = pTable->pIndex; pIndex; pIndex=pNext){
   631    635       pNext = pIndex->pNext;