]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
In the multiplexor extension, improve the error logging when a chunk fails
authordrh <drh@noemail.net>
Wed, 4 Apr 2012 13:43:13 +0000 (13:43 +0000)
committerdrh <drh@noemail.net>
Wed, 4 Apr 2012 13:43:13 +0000 (13:43 +0000)
to open.

FossilOrigin-Name: 781453c686656a7bd4a274a3b3204ceb6ecae8df

manifest
manifest.uuid
src/test_multiplex.c

index c9deb0c9af3134f9042bb64df93e30586ca8f8a3..9c37e509fb61d71d979ec92cd80ff499c4802fb9 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Do\snot\srun\sattempt\sto\srun\stest\sfile\sfts4merge3.test\sunless\sthe\sbuild\sincludes\sFTS.
-D 2012-04-03T18:34:24.492
+C In\sthe\smultiplexor\sextension,\simprove\sthe\serror\slogging\swhen\sa\schunk\sfails\nto\sopen.
+D 2012-04-04T13:43:13.686
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 2f37e468503dbe79d35c9f6dffcf3fae1ae9ec20
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -215,7 +215,7 @@ F src/test_intarray.h 489edb9068bb926583445cb02589344961054207
 F src/test_journal.c b964473ff1b7a65626763f068fa6a810385d1fbf
 F src/test_loadext.c df586c27176e3c2cb2e099c78da67bf14379a56e
 F src/test_malloc.c 3f5903a1528fd32fe4c472a3bd0259128d8faaef
-F src/test_multiplex.c 30ca0348953abd3add46fe4ee19e3f9e669b7e56
+F src/test_multiplex.c 151f66e79b4a7e2cf66e6149deace77b461e0360
 F src/test_multiplex.h e99c571bc4968b7a9363b661481f3934bfead61d
 F src/test_mutex.c a6bd7b9cf6e19d989e31392b06ac8d189f0d573e
 F src/test_onefile.c 5e1382e7844c703c77c4c2aee82f8359555b5a8e
@@ -1000,7 +1000,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
 F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
-P 1d5e744cc645150ccaa7256663146fc7b8540bd5
-R 1f313aea8b457ed25b447b7c1422a6b5
-U dan
-Z 3c559de9db801435fc52303089f6fab9
+P 0506bf86d31e821a905e3a8a03c4817e326f7f44
+R fbd3d19fe8454971555d508563f6c5ba
+U drh
+Z a9ed2607a4279c682b012061bc35b79f
index 136f7e72d97ad330f3f7352c17161c9cf1fffa09..93bc4fa1e08388a007a53e9a0d668ea623cfe040 100644 (file)
@@ -1 +1 @@
-0506bf86d31e821a905e3a8a03c4817e326f7f44
\ No newline at end of file
+781453c686656a7bd4a274a3b3204ceb6ecae8df
\ No newline at end of file
index 32dd8e33e84226e7b2f996df1b424d1284f47225..f87f6a9be6cd646ee466017d67c8963a40795b27 100644 (file)
@@ -329,6 +329,7 @@ static sqlite3_file *multiplexSubOpen(
   ** database may therefore not grow to larger than 400 chunks. Attempting
   ** to open chunk 401 indicates the database is full. */
   if( iChunk>=SQLITE_MULTIPLEX_JOURNAL_8_3_OFFSET ){
+    sqlite3_log(SQLITE_FULL, "multiplexed chunk overflow: %s", zName);
     *rc = SQLITE_FULL;
     return 0;
   }
@@ -347,7 +348,13 @@ static sqlite3_file *multiplexSubOpen(
     }else{
       *rc = pOrigVfs->xAccess(pOrigVfs, pGroup->aReal[iChunk].z,
                               SQLITE_ACCESS_EXISTS, &bExists);
-      if( *rc || !bExists ) return 0;
+     if( *rc || !bExists ){
+        if( *rc ){
+          sqlite3_log(*rc, "multiplexor.xAccess failure on %s",
+                      pGroup->aReal[iChunk].z);
+        }
+        return 0;
+      }
       flags &= ~SQLITE_OPEN_CREATE;
     }
     pSubOpen = sqlite3_malloc( pOrigVfs->szOsFile );
@@ -359,6 +366,8 @@ static sqlite3_file *multiplexSubOpen(
     *rc = pOrigVfs->xOpen(pOrigVfs, pGroup->aReal[iChunk].z, pSubOpen,
                           flags, pOutFlags);
     if( (*rc)!=SQLITE_OK ){
+      sqlite3_log(*rc, "multiplexor.xOpen failure on %s",
+                  pGroup->aReal[iChunk].z);
       sqlite3_free(pSubOpen);
       pGroup->aReal[iChunk].p = 0;
       return 0;