In the multiplexor shim, when using 8+3 filenames, begin numbering journal

overflow files with 101 instead of 001 to avoid name collisions with the
main database file.

FossilOrigin-Name: 05bf8a0b17a13a581ac973dc84ceaf66532d7f92
This commit is contained in:
drh
2011-12-11 22:44:09 +00:00
parent 630d296c57
commit 58cd3c6162
3 changed files with 14 additions and 7 deletions
+6 -6
View File
@@ -1,5 +1,5 @@
C Update\scomments\sdescribing\sthe\sflattening\soptimization\sin\sselect.c.
D 2011-12-11T21:51:04.519
C In\sthe\smultiplexor\sshim,\swhen\susing\s8+3\sfilenames,\sbegin\snumbering\sjournal\noverflow\sfiles\swith\s101\sinstead\sof\s001\sto\savoid\sname\scollisions\swith\sthe\nmain\sdatabase\sfile.
D 2011-12-11T22:44:09.610
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5b4a3e12a850b021547e43daf886b25133b44c07
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -214,7 +214,7 @@ F src/test_intarray.h 489edb9068bb926583445cb02589344961054207
F src/test_journal.c 03313c693cca72959dcaaf79f8d76f21c01e19ff
F src/test_loadext.c df586c27176e3c2cb2e099c78da67bf14379a56e
F src/test_malloc.c 8d416f29ad8573f32601f6056c9d2b17472e9ad5
F src/test_multiplex.c 185378cade15fa9012bd17d9d5b04783d4478f79
F src/test_multiplex.c 1bd9d0808771db7fec25dee46b78159e2aefeed2
F src/test_multiplex.h e99c571bc4968b7a9363b661481f3934bfead61d
F src/test_mutex.c a6bd7b9cf6e19d989e31392b06ac8d189f0d573e
F src/test_onefile.c 40cf9e212a377a6511469384a64b01e6e34b2eec
@@ -978,7 +978,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
P d11a57985c394772043c63d4c2b534944be0a664
R db74426b5ff988e285b71512d50b85b4
P dab4c137a852222f11179fa2ade52d17a4206dd2
R 425d0660e438f7370e2c896a15db7167
U drh
Z fcdcb7d7647c15fa01d78b530015f5fb
Z 9892a9e7f3941ba5e32798c1f4a7624c
+1 -1
View File
@@ -1 +1 @@
dab4c137a852222f11179fa2ade52d17a4206dd2
05bf8a0b17a13a581ac973dc84ceaf66532d7f92
+7
View File
@@ -304,6 +304,13 @@ static int multiplexSubFilename(multiplexGroup *pGroup, int iChunk){
int i;
for(i=n-1; i>0 && i>=n-4 && z[i]!='.'; i--){}
if( i>=n-4 ) n = i+1;
if( pGroup->flags & (SQLITE_OPEN_MAIN_JOURNAL|SQLITE_OPEN_TEMP_JOURNAL) ){
/* The extensions on overflow files for main databases are 001, 002,
** 003 and so forth. To avoid name collisions, add 100 to the
** extensions of journal files so that they are 101, 102, 103, ....
*/
iChunk += 100;
}
#endif
sqlite3_snprintf(4,&z[n],"%03d",iChunk);
}