From 8e33b2308963ee9b39fff04585ef0d5a5cefcec1 Mon Sep 17 00:00:00 2001 From: drh Date: Wed, 4 Apr 2012 13:47:35 +0000 Subject: [PATCH] In the multiplexor extension, improve the error logging when a chunk fails to open. FossilOrigin-Name: e6806f0dc6a06796700d805952f95e2cc18f0ea3 --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/test_multiplex.c | 11 ++++++++++- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index beeec998c1..59052e4872 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Port\sthe\scommand-line\sshell\senhancements\sincluding\sthe\snew\s--cmd\soption\nto\sthe\snx-devkit\sbranch. -D 2012-02-07T14:22:18.660 +C In\sthe\smultiplexor\sextension,\simprove\sthe\serror\slogging\swhen\sa\schunk\sfails\nto\sopen. +D 2012-04-04T13:47:35.288 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 2c06e4be6584d51b935dc8b353980a9388de62ef F src/test_loadext.c df586c27176e3c2cb2e099c78da67bf14379a56e F src/test_malloc.c 8d416f29ad8573f32601f6056c9d2b17472e9ad5 -F src/test_multiplex.c 8e8a4211976291af4173b403728ac44e27126894 +F src/test_multiplex.c 7fce6176cea0cbe6ec18393458fb8ded65bbefe3 F src/test_multiplex.h e99c571bc4968b7a9363b661481f3934bfead61d F src/test_mutex.c a6bd7b9cf6e19d989e31392b06ac8d189f0d573e F src/test_onefile.c 40cf9e212a377a6511469384a64b01e6e34b2eec @@ -980,7 +980,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 -P 4f0997c7fab79cb7f12cf30f5ea5c87ce96bc266 -R 561353e13bf2215777cfa1f6329ca757 +P 81ce52afb1bdb55d4585f01e7fb3ab86f81b7512 +R 17f38e7f0f7e14f81cf4da549e51a4c8 U drh -Z 522078f8b1fa54d140d6d449ff1e7d5c +Z c78ff13de88580dd6f26c750ae3d3019 diff --git a/manifest.uuid b/manifest.uuid index 6cd1ed19bd..64bcbe9029 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -81ce52afb1bdb55d4585f01e7fb3ab86f81b7512 \ No newline at end of file +e6806f0dc6a06796700d805952f95e2cc18f0ea3 \ No newline at end of file diff --git a/src/test_multiplex.c b/src/test_multiplex.c index 34277361a1..da21e625a2 100644 --- a/src/test_multiplex.c +++ b/src/test_multiplex.c @@ -298,6 +298,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; } @@ -316,7 +317,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 ); @@ -328,6 +335,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; -- 2.47.2