aboutsummaryrefslogtreecommitdiff
path: root/src/attach.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/attach.c')
-rw-r--r--src/attach.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/attach.c b/src/attach.c
index 2a7525ae9..bf2683fb3 100644
--- a/src/attach.c
+++ b/src/attach.c
@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to implement the ATTACH and DETACH commands.
**
-** $Id: attach.c,v 1.81 2008/12/10 16:45:51 drh Exp $
+** $Id: attach.c,v 1.82 2009/02/03 16:51:25 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -265,7 +265,7 @@ static void detachFunc(
"cannot DETACH database within transaction");
goto detach_error;
}
- if( sqlite3BtreeIsInReadTrans(pDb->pBt) ){
+ if( sqlite3BtreeIsInReadTrans(pDb->pBt) || sqlite3BtreeIsInBackup(pDb->pBt) ){
sqlite3_snprintf(sizeof(zErr),zErr, "database %s is locked", zName);
goto detach_error;
}