diff options
author | drh <drh@noemail.net> | 2011-12-15 02:22:16 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2011-12-15 02:22:16 +0000 |
commit | 2be25bffcad4002b02a08a84eccb6bf72037721d (patch) | |
tree | 2c84b7ec41c62720c9306499c310730691c8d354 /src/test_multiplex.c | |
parent | 0f2ab8db33f82743ea49b5b11e5f10a8923ed6fb (diff) | |
download | sqlite-2be25bffcad4002b02a08a84eccb6bf72037721d.tar.gz sqlite-2be25bffcad4002b02a08a84eccb6bf72037721d.zip |
In the multiplexor, do not try to delete overflow files that do not exist.
And assume all but the last overflow file is the size of the chunk size.
FossilOrigin-Name: a822a80d3cfe42b2fca6f8c9ff11762993114a27
Diffstat (limited to 'src/test_multiplex.c')
-rw-r--r-- | src/test_multiplex.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test_multiplex.c b/src/test_multiplex.c index f6540d82d..b9688e34d 100644 --- a/src/test_multiplex.c +++ b/src/test_multiplex.c @@ -365,7 +365,9 @@ static void multiplexSubClose( sqlite3_file *pSubOpen = pGroup->aReal[iChunk].p; if( pSubOpen ){ pSubOpen->pMethods->xClose(pSubOpen); - if( pOrigVfs ) pOrigVfs->xDelete(pOrigVfs, pGroup->aReal[iChunk].z, 0); + if( pOrigVfs && pGroup->aReal[iChunk].z ){ + pOrigVfs->xDelete(pOrigVfs, pGroup->aReal[iChunk].z, 0); + } sqlite3_free(pGroup->aReal[iChunk].p); } sqlite3_free(pGroup->aReal[iChunk].z); @@ -768,7 +770,7 @@ static int multiplexFileSize(sqlite3_file *pConn, sqlite3_int64 *pSize){ if( rc==SQLITE_OK && sz>pGroup->szChunk ){ rc = SQLITE_IOERR_FSTAT; } - *pSize += sz; + *pSize = i*(sqlite3_int64)pGroup->szChunk + sz; } } } |