From: dan Date: Mon, 12 Dec 2011 18:21:44 +0000 (+0000) Subject: Fix for the xFileSize method of test_multiplex.c when used on a file opened with... X-Git-Tag: version-3.7.10~19^2~62 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc8ac1dd76d377ec8bc6ec271fd0bcbbf14573b5;p=thirdparty%2Fsqlite.git Fix for the xFileSize method of test_multiplex.c when used on a file opened with the DELETEONCLOSE flag set. FossilOrigin-Name: 713071c493e9937a20c436b07299df428249e378 --- diff --git a/manifest b/manifest index 292db80228..11ca04ed64 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\smagic\scomments\sto\sshell.c\sto\smake\sit\seasier\sfor\sscripts\sto\s\ninsert\sadditional\sversion\sinformation\sdisplays\sfor\scustom\sbuilds. -D 2011-12-12T16:51:50.465 +C Fix\sfor\sthe\sxFileSize\smethod\sof\stest_multiplex.c\swhen\sused\son\sa\sfile\sopened\swith\sthe\sDELETEONCLOSE\sflag\sset. +D 2011-12-12T18:21:44.814 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 1bd9d0808771db7fec25dee46b78159e2aefeed2 +F src/test_multiplex.c affbe08d3c6f42d39490c022367ae3507b2fdf2f 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 05bf8a0b17a13a581ac973dc84ceaf66532d7f92 -R dc7f4a3f6a59dd72fbcaff2a94f8f7f6 -U drh -Z fc8e968ece5f7a1fbfb50f6ab74c295e +P 9b2691aa911289d74bfe3edf45937a33fb7eaa8d +R aecccf1f2de8d72e3aa2a9e170f720dc +U dan +Z 51500cb9c3cff96463190c290eed59f5 diff --git a/manifest.uuid b/manifest.uuid index 74d3ea9cbe..f48de61aec 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -9b2691aa911289d74bfe3edf45937a33fb7eaa8d \ No newline at end of file +713071c493e9937a20c436b07299df428249e378 \ No newline at end of file diff --git a/src/test_multiplex.c b/src/test_multiplex.c index 84c14f7575..675ed91028 100644 --- a/src/test_multiplex.c +++ b/src/test_multiplex.c @@ -814,8 +814,13 @@ static int multiplexFileSize(sqlite3_file *pConn, sqlite3_int64 *pSize){ int exists = 0; rc = multiplexSubFilename(pGroup, i); if( rc ) break; - rc2 = pOrigVfs->xAccess(pOrigVfs, pGroup->aReal[i].z, - SQLITE_ACCESS_EXISTS, &exists); + if( pGroup->flags & SQLITE_OPEN_DELETEONCLOSE ){ + exists = pGroup->nReal>=i && pGroup->aReal[i].p!=0; + rc2 = SQLITE_OK; + }else{ + rc2 = pOrigVfs->xAccess(pOrigVfs, pGroup->aReal[i].z, + SQLITE_ACCESS_EXISTS, &exists); + } if( rc2==SQLITE_OK && exists){ /* if it exists, open it */ pSubOpen = multiplexSubOpen(pGroup, i, &rc, NULL);