mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-08 03:22:21 +03:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user