1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Prevent databases from being DETACHed while they are in use. Fix for #1873. (CVS 3312)

FossilOrigin-Name: 70a48b250bab99c5d9b4ad17c471663b8628e8d2
This commit is contained in:
danielk1977
2006-06-27 16:34:56 +00:00
parent c2e87a3e85
commit 2372c2b165
6 changed files with 93 additions and 13 deletions

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.324 2006/04/04 01:54:55 drh Exp $
** $Id: btree.c,v 1.325 2006/06/27 16:34:57 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** For a detailed discussion of BTrees, refer to
@@ -6558,6 +6558,13 @@ int sqlite3BtreeIsInStmt(Btree *p){
return (p->pBt && p->pBt->inStmt);
}
/*
** Return non-zero if a read (or write) transaction is active.
*/
int sqlite3BtreeIsInReadTrans(Btree *p){
return (p && (p->inTrans!=TRANS_NONE));
}
/*
** This call is a no-op if no write-transaction is currently active on pBt.
**