/ Check-in [514efc73]
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:Remove a NEVER() clause from a condition that is true at least once when running attachmalloc.test. (CVS 6585)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 514efc7312d725c3fe35741e8c000526f3bdb3a6
User & Date: danielk1977 2009-05-01 06:19:21
Context
2009-05-01
10:55
Change lock2.test so that it does not enter a busy loop if the child process exists unexpectedly. (CVS 6586) check-in: 164a7f5a user: danielk1977 tags: trunk
06:19
Remove a NEVER() clause from a condition that is true at least once when running attachmalloc.test. (CVS 6585) check-in: 514efc73 user: danielk1977 tags: trunk
05:23
Fix for tempdb.test so that it passes when running the inmemory_journal permutation test. (CVS 6584) check-in: 0256187b user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/attach.c.

     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains code used to implement the ATTACH and DETACH commands.
    13     13   **
    14         -** $Id: attach.c,v 1.89 2009/04/30 17:38:38 drh Exp $
           14  +** $Id: attach.c,v 1.90 2009/05/01 06:19:21 danielk1977 Exp $
    15     15   */
    16     16   #include "sqliteInt.h"
    17     17   
    18     18   #ifndef SQLITE_OMIT_ATTACH
    19     19   /*
    20     20   ** Resolve an expression that was part of an ATTACH or DETACH statement. This
    21     21   ** is slightly different from resolving a normal SQL expression, because simple
................................................................................
   198    198       if( db->aDb[iDb].pBt ){
   199    199         sqlite3BtreeClose(db->aDb[iDb].pBt);
   200    200         db->aDb[iDb].pBt = 0;
   201    201         db->aDb[iDb].pSchema = 0;
   202    202       }
   203    203       sqlite3ResetInternalSchema(db, 0);
   204    204       db->nDb = iDb;
   205         -    if( rc==SQLITE_NOMEM || NEVER(rc==SQLITE_IOERR_NOMEM) ){
          205  +    if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ){
   206    206         db->mallocFailed = 1;
   207    207         sqlite3DbFree(db, zErrDyn);
   208    208         zErrDyn = sqlite3MPrintf(db, "out of memory");
   209    209       }else if( zErrDyn==0 ){
   210    210         zErrDyn = sqlite3MPrintf(db, "unable to open database: %s", zFile);
   211    211       }
   212    212       goto attach_error;