mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Verify that the rollback-hook is invoked correctly when a malloc() failure occurs. (CVS 2824)
FossilOrigin-Name: 83c8ae5bee3b6bdb556d2e85fa260ba855742601
This commit is contained in:
14
src/btree.c
14
src/btree.c
@@ -9,7 +9,7 @@
|
||||
** May you share freely, never taking more than you give.
|
||||
**
|
||||
*************************************************************************
|
||||
** $Id: btree.c,v 1.274 2005/12/16 06:54:02 danielk1977 Exp $
|
||||
** $Id: btree.c,v 1.275 2005/12/16 15:24:29 danielk1977 Exp $
|
||||
**
|
||||
** This file implements a external (disk-based) database using BTrees.
|
||||
** For a detailed discussion of BTrees, refer to
|
||||
@@ -5818,15 +5818,3 @@ int sqlite3BtreeSync(Btree *pBt, const char *zMaster){
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
#ifndef SQLITE_OMIT_GLOBALRECOVER
|
||||
/*
|
||||
** Reset the btree and underlying pager after a malloc() failure. Any
|
||||
** transaction that was active when malloc() failed is rolled back.
|
||||
*/
|
||||
int sqlite3BtreeReset(Btree *pBt){
|
||||
if( pBt->pCursor ) return SQLITE_BUSY;
|
||||
pBt->inTrans = TRANS_NONE;
|
||||
unlockBtreeIfUnused(pBt);
|
||||
return sqlite3pager_reset(pBt->pPager);
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user