1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

A failed ATTACH leaves the database in a consistent state. Ticket #811. (CVS 1811)

FossilOrigin-Name: c22f9feb1bb00d1d54a8a87b557195573463fda9
This commit is contained in:
drh
2004-07-19 00:56:23 +00:00
parent 5f6a87b3dd
commit 755b6ba9f0
4 changed files with 29 additions and 16 deletions

View File

@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to implement the ATTACH and DETACH commands.
**
** $Id: attach.c,v 1.21 2004/06/30 09:49:23 danielk1977 Exp $
** $Id: attach.c,v 1.22 2004/07/19 00:56:24 drh Exp $
*/
#include "sqliteInt.h"
@@ -108,8 +108,7 @@ void sqlite3Attach(Parse *pParse, Token *pFilename, Token *pDbname, Token *pKey)
#endif
sqliteFree(zFile);
db->flags &= ~SQLITE_Initialized;
if( pParse->nErr ) return;
if( rc==SQLITE_OK ){
if( pParse->nErr==0 && rc==SQLITE_OK ){
rc = sqlite3ReadSchema(pParse);
}
if( rc ){