1
0
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:
drh
2011-12-15 02:22:16 +00:00
parent 0f2ab8db33
commit 2be25bffca
3 changed files with 11 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
C Merge\sthe\sVFSNAME\sfile-control\saddition\sinto\sthe\snx-devkit\sbranch. C In\sthe\smultiplexor,\sdo\snot\stry\sto\sdelete\soverflow\sfiles\sthat\sdo\snot\sexist.\nAnd\sassume\sall\sbut\sthe\slast\soverflow\sfile\sis\sthe\ssize\sof\sthe\schunk\ssize.
D 2011-12-14T18:28:18.920 D 2011-12-15T02:22:16.244
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5b4a3e12a850b021547e43daf886b25133b44c07 F Makefile.in 5b4a3e12a850b021547e43daf886b25133b44c07
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -214,7 +214,7 @@ F src/test_intarray.h 489edb9068bb926583445cb02589344961054207
F src/test_journal.c 03313c693cca72959dcaaf79f8d76f21c01e19ff F src/test_journal.c 03313c693cca72959dcaaf79f8d76f21c01e19ff
F src/test_loadext.c df586c27176e3c2cb2e099c78da67bf14379a56e F src/test_loadext.c df586c27176e3c2cb2e099c78da67bf14379a56e
F src/test_malloc.c 8d416f29ad8573f32601f6056c9d2b17472e9ad5 F src/test_malloc.c 8d416f29ad8573f32601f6056c9d2b17472e9ad5
F src/test_multiplex.c 80677a47c75ca6a035d1ac66fb59186ffd4cdd19 F src/test_multiplex.c cee2474efe6ee92732e43184f62422bc17623d1f
F src/test_multiplex.h e99c571bc4968b7a9363b661481f3934bfead61d F src/test_multiplex.h e99c571bc4968b7a9363b661481f3934bfead61d
F src/test_mutex.c a6bd7b9cf6e19d989e31392b06ac8d189f0d573e F src/test_mutex.c a6bd7b9cf6e19d989e31392b06ac8d189f0d573e
F src/test_onefile.c 40cf9e212a377a6511469384a64b01e6e34b2eec F src/test_onefile.c 40cf9e212a377a6511469384a64b01e6e34b2eec
@@ -978,7 +978,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
P 08bbbd8e38697908ab8ae0f6b512d01c32f7e4da cdbfb553af02d10767a905489d9dfc57fc6be54e P 08c1dc517c1340737a55ad9012b7b06f72899c6f
R d213e3c5e90076919d50d6149e76976e R 05ea69e1c214c57dec4ba569476ada26
U drh U drh
Z 8e788ffb68fb72b933914781f94a7874 Z 5b0957f1b7fd94c5b03cf783382a1410

View File

@@ -1 +1 @@
08c1dc517c1340737a55ad9012b7b06f72899c6f a822a80d3cfe42b2fca6f8c9ff11762993114a27

View File

@@ -365,7 +365,9 @@ static void multiplexSubClose(
sqlite3_file *pSubOpen = pGroup->aReal[iChunk].p; sqlite3_file *pSubOpen = pGroup->aReal[iChunk].p;
if( pSubOpen ){ if( pSubOpen ){
pSubOpen->pMethods->xClose(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].p);
} }
sqlite3_free(pGroup->aReal[iChunk].z); 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 ){ if( rc==SQLITE_OK && sz>pGroup->szChunk ){
rc = SQLITE_IOERR_FSTAT; rc = SQLITE_IOERR_FSTAT;
} }
*pSize += sz; *pSize = i*(sqlite3_int64)pGroup->szChunk + sz;
} }
} }
} }