1
0
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:
dan
2017-07-04 19:23:32 +00:00
parent 038af0bdc6
commit 431a53fde2
6 changed files with 21 additions and 16 deletions

View File

@ -3874,7 +3874,7 @@ static int mergeWorkerData(
int rc = LSM_OK; /* Return code */
int nRem = nWrite; /* Number of bytes still to write */
while( nRem>0 ){
while( rc==LSM_OK && nRem>0 ){
Merge *pMerge = pMW->pLevel->pMerge;
int nCopy; /* Number of bytes to copy */
u8 *aData; /* Pointer to buffer of current output page */
@ -5406,7 +5406,9 @@ int lsmSortedAutoWork(
lsmMCursorFreeCache(pDb);
lsmFreeSnapshot(pDb->pEnv, pDb->pClient);
pDb->pClient = 0;
rc = lsmCheckpointLoad(pDb, 0);
if( rc==LSM_OK ){
rc = lsmCheckpointLoad(pDb, 0);
}
if( rc==LSM_OK ){
rc = lsmCheckpointDeserialize(pDb, 0, pDb->aSnapshot, &pDb->pClient);
}