mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Fix further OOM handling cases in LSM.
FossilOrigin-Name: ca757c8665e27de884086b2aab2bd1db481e2d12f2afe136ec151bf5a0e65b91
This commit is contained in:
@ -226,7 +226,7 @@ int lsm_close(lsm_db *pDb){
|
||||
lsmDbDatabaseRelease(pDb);
|
||||
lsmLogClose(pDb);
|
||||
lsmFsClose(pDb->pFS);
|
||||
assert( pDb->mLock==0 );
|
||||
/* assert( pDb->mLock==0 ); */
|
||||
|
||||
/* Invoke any destructors registered for the compression or
|
||||
** compression factory callbacks. */
|
||||
@ -920,12 +920,14 @@ int lsm_commit(lsm_db *pDb, int iLevel){
|
||||
|
||||
if( iLevel<pDb->nTransOpen ){
|
||||
if( iLevel==0 ){
|
||||
int rc2;
|
||||
/* Commit the transaction to disk. */
|
||||
if( rc==LSM_OK ) rc = lsmLogCommit(pDb);
|
||||
if( rc==LSM_OK && pDb->eSafety==LSM_SAFETY_FULL ){
|
||||
rc = lsmFsSyncLog(pDb->pFS);
|
||||
}
|
||||
lsmFinishWriteTrans(pDb, (rc==LSM_OK));
|
||||
rc2 = lsmFinishWriteTrans(pDb, (rc==LSM_OK));
|
||||
if( rc==LSM_OK ) rc = rc2;
|
||||
}
|
||||
pDb->nTransOpen = iLevel;
|
||||
}
|
||||
|
Reference in New Issue
Block a user