mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-08 03:22:21 +03:00
Make sure the chunksize in test_multiplex does not cause the pending byte
to fall near the end of a chunk. Adjust the chunksize upward as necessary to prevent this. FossilOrigin-Name: e05f8a2998f4f4cbdb65702baa65893c538b3d38
This commit is contained in:
14
manifest
14
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Fix\ssome\sproblems\swith\sdropped\serror\scodes\sin\smultiplexOpen().
|
C Make\ssure\sthe\schunksize\sin\stest_multiplex\sdoes\snot\scause\sthe\spending\sbyte\nto\sfall\snear\sthe\send\sof\sa\schunk.\s\sAdjust\sthe\schunksize\supward\sas\snecessary\nto\sprevent\sthis.
|
||||||
D 2011-12-15T11:45:19.350
|
D 2011-12-15T13:29:12.575
|
||||||
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 7e8d8303b8ba74ff50fbb40502522e576760266e
|
F src/test_multiplex.c 7b65eea8b390dd223bd6e0ba9d7879389bd075c0
|
||||||
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 a822a80d3cfe42b2fca6f8c9ff11762993114a27
|
P 2d50f78188e3297e8cefdf73cff51fa0a3b36e65
|
||||||
R 4637baef8720406f37351464996699d4
|
R db6d46332c6333123f8fa60ccb204a1d
|
||||||
U dan
|
U drh
|
||||||
Z a1536baba57190ddd9d59e1c01fe9761
|
Z f65d5d73aa828ce8ac2cca0eb8289aa5
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2d50f78188e3297e8cefdf73cff51fa0a3b36e65
|
e05f8a2998f4f4cbdb65702baa65893c538b3d38
|
||||||
@@ -462,6 +462,16 @@ static int multiplexOpen(
|
|||||||
memcpy(pGroup->zName, zName, nName+1);
|
memcpy(pGroup->zName, zName, nName+1);
|
||||||
pGroup->nName = nName;
|
pGroup->nName = nName;
|
||||||
}
|
}
|
||||||
|
if( pGroup->bEnabled ){
|
||||||
|
/* Make sure that the chunksize is not such that the pending byte
|
||||||
|
** falls at the end of a chunk. A region of up to 64K following
|
||||||
|
** the pending byte is never written, so if the pending byte occurs
|
||||||
|
** near the end of a chunk, that chunk will be too small. */
|
||||||
|
extern int sqlite3PendingByte;
|
||||||
|
while( (sqlite3PendingByte % pGroup->szChunk)>=(pGroup->szChunk-65536) ){
|
||||||
|
pGroup->szChunk += 65536;
|
||||||
|
}
|
||||||
|
}
|
||||||
pGroup->flags = flags;
|
pGroup->flags = flags;
|
||||||
rc = multiplexSubFilename(pGroup, 1);
|
rc = multiplexSubFilename(pGroup, 1);
|
||||||
if( rc==SQLITE_OK ){
|
if( rc==SQLITE_OK ){
|
||||||
|
|||||||
Reference in New Issue
Block a user