/ Check-in [6e9140a7]
Login

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

Overview
Comment:Get the notify2.test running again by removing an ALWAYS() that was mistakenly inserted and by taking care not to report corruption following an SQLITE_LOCKED failure during schema parsing. (CVS 6815)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6e9140a729bd26dd102e603abf6ea16d67e8546e
User & Date: drh 2009-06-25 11:50:21
Context
2009-06-25
16:11
Fix a problem with a return code being ignored in insertCell(). (CVS 6816) check-in: bb5f1c01 user: danielk1977 tags: trunk
11:50
Get the notify2.test running again by removing an ALWAYS() that was mistakenly inserted and by taking care not to report corruption following an SQLITE_LOCKED failure during schema parsing. (CVS 6815) check-in: 6e9140a7 user: drh tags: trunk
09:40
Replace an "if" condition that is always true in btree.c with an assert(). (CVS 6814) check-in: daadbd9a 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.553 2009/06/23 20:28:54 drh Exp $
           25  +** $Id: build.c,v 1.554 2009/06/25 11:50:21 drh Exp $
    26     26   */
    27     27   #include "sqliteInt.h"
    28     28   
    29     29   /*
    30     30   ** This routine is called when a new SQL statement is beginning to
    31     31   ** be parsed.  Initialize the pParse structure as needed.
    32     32   */
................................................................................
   374    374   void sqlite3UnlinkAndDeleteIndex(sqlite3 *db, int iDb, const char *zIdxName){
   375    375     Index *pIndex;
   376    376     int len;
   377    377     Hash *pHash = &db->aDb[iDb].pSchema->idxHash;
   378    378   
   379    379     len = sqlite3Strlen30(zIdxName);
   380    380     pIndex = sqlite3HashInsert(pHash, zIdxName, len, 0);
   381         -  /* Justification of ALWAYS():  This routine is only called from the
   382         -  ** OP_DropIndex opcode.  And there is no way that opcode will ever run
   383         -  ** unless the corresponding index is in the symbol table. */
   384         -  if( ALWAYS(pIndex) ){
          381  +  if( pIndex ){
   385    382       if( pIndex->pTable->pIndex==pIndex ){
   386    383         pIndex->pTable->pIndex = pIndex->pNext;
   387    384       }else{
   388    385         Index *p;
   389    386         /* Justification of ALWAYS();  The index must be on the list of
   390    387         ** indices. */
   391    388         p = pIndex->pTable->pIndex;

Changes to src/prepare.c.

     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains the implementation of the sqlite3_prepare()
    13     13   ** interface, and routines that contribute to loading the database schema
    14     14   ** from disk.
    15     15   **
    16         -** $Id: prepare.c,v 1.124 2009/06/22 12:05:10 drh Exp $
           16  +** $Id: prepare.c,v 1.125 2009/06/25 11:50:21 drh Exp $
    17     17   */
    18     18   #include "sqliteInt.h"
    19     19   
    20     20   /*
    21     21   ** Fill the InitData structure with an error message that indicates
    22     22   ** that the database is corrupt.
    23     23   */
................................................................................
    83     83       rc = sqlite3_exec(db, argv[2], 0, 0, &zErr);
    84     84       db->init.iDb = 0;
    85     85       assert( rc!=SQLITE_OK || zErr==0 );
    86     86       if( SQLITE_OK!=rc ){
    87     87         pData->rc = rc;
    88     88         if( rc==SQLITE_NOMEM ){
    89     89           db->mallocFailed = 1;
    90         -      }else if( rc!=SQLITE_INTERRUPT ){
           90  +      }else if( rc!=SQLITE_INTERRUPT && rc!=SQLITE_LOCKED ){
    91     91           corruptSchema(pData, argv[0], zErr);
    92     92         }
    93     93         sqlite3DbFree(db, zErr);
    94     94       }
    95     95     }else if( argv[0]==0 ){
    96     96       corruptSchema(pData, 0, 0);
    97     97     }else{