The unified diff between revisions [83b5270b..] and [5587f68e..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'sqlite/attach.c'

#
#
# patch "sqlite/attach.c"
#  from [3615dbe960cbee4aa5ea300b8a213dad36527b0f]
#    to [4b21689700a72ae281fa85dbaff06b2a62bd49ee]
#
============================================================
--- sqlite/attach.c	3615dbe960cbee4aa5ea300b8a213dad36527b0f
+++ sqlite/attach.c	4b21689700a72ae281fa85dbaff06b2a62bd49ee
@@ -11,7 +11,7 @@
 *************************************************************************
 ** This file contains code used to implement the ATTACH and DETACH commands.
 **
-** $Id: attach.c,v 1.33 2005/03/16 12:15:21 danielk1977 Exp $
+** $Id: attach.c,v 1.34 2005/08/20 03:03:04 drh Exp $
 */
 #include "sqliteInt.h"

@@ -146,8 +146,8 @@ void sqlite3Attach(
       db->aDb[i].pBt = 0;
     }
     sqlite3ResetInternalSchema(db, 0);
-    if( 0==pParse->nErr ){
-      pParse->nErr++;
+    assert( pParse->nErr>0 );  /* Always set by sqlite3ReadSchema() */
+    if( pParse->rc==SQLITE_OK ){
       pParse->rc = SQLITE_ERROR;
     }
   }