]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
In the multiplexor shim, when using 8+3 filenames, begin numbering journal
authordrh <drh@noemail.net>
Sun, 11 Dec 2011 22:44:09 +0000 (22:44 +0000)
committerdrh <drh@noemail.net>
Sun, 11 Dec 2011 22:44:09 +0000 (22:44 +0000)
overflow files with 101 instead of 001 to avoid name collisions with the
main database file.

FossilOrigin-Name: 05bf8a0b17a13a581ac973dc84ceaf66532d7f92

manifest
manifest.uuid
src/test_multiplex.c

index 6a4599845f0cd7a708138662599b03bd5f20533a..74f366280012df39ed38a8bdb57063580b0dfd57 100644 (file)
--- a/manifest
+++ b/manifest
@@ -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
index 9f7b7a620846e2f2bc51a3e062d50f020a8f3cb9..cf701affa3c9119b3e0ab736dfe233f12f463a8c 100644 (file)
@@ -1 +1 @@
-dab4c137a852222f11179fa2ade52d17a4206dd2
\ No newline at end of file
+05bf8a0b17a13a581ac973dc84ceaf66532d7f92
\ No newline at end of file
index 2ca8bf8d5d45f4a98bb23b43e708c7406448a6a1..84c14f75753ed53650a7176251b9cae20a9c39c8 100644 (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);
     }