1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Move the 'busy-callback' logic to the pager layer. (CVS 1527)

FossilOrigin-Name: ff70b6d2b60c143e3ada0606ceff97571998c7e3
This commit is contained in:
danielk1977
2004-06-04 06:22:00 +00:00
parent 13adf8a071
commit 24162fe668
12 changed files with 140 additions and 111 deletions

View File

@@ -9,7 +9,7 @@
** May you share freely, never taking more than you give.
**
*************************************************************************
** $Id: btree.c,v 1.156 2004/06/03 16:08:41 danielk1977 Exp $
** $Id: btree.c,v 1.157 2004/06/04 06:22:01 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** For a detailed discussion of BTrees, refer to
@@ -977,7 +977,8 @@ int sqlite3BtreeOpen(
const char *zFilename, /* Name of the file containing the BTree database */
Btree **ppBtree, /* Pointer to new Btree object written here */
int nCache, /* Number of cache pages */
int flags /* Options */
int flags, /* Options */
void *pBusyHandler /* Busy callback info passed to pager layer */
){
Btree *pBt;
int rc;
@@ -1002,7 +1003,7 @@ int sqlite3BtreeOpen(
}
if( nCache<10 ) nCache = 10;
rc = sqlite3pager_open(&pBt->pPager, zFilename, nCache, EXTRA_SIZE,
(flags & BTREE_OMIT_JOURNAL)==0);
(flags & BTREE_OMIT_JOURNAL)==0, pBusyHandler);
if( rc!=SQLITE_OK ){
if( pBt->pPager ) sqlite3pager_close(pBt->pPager);
sqliteFree(pBt);