From: drh Date: Sat, 20 Aug 2005 13:47:41 +0000 (+0000) Subject: More test coverage improvements. (CVS 2605) X-Git-Tag: version-3.6.10~3554 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f0bce09cdd67bd1ced0908923950d9badd029af6;p=thirdparty%2Fsqlite.git More test coverage improvements. (CVS 2605) FossilOrigin-Name: e559e810a51427def6928763ae0d6f7347366d04 --- diff --git a/manifest b/manifest index 7f8d7e7818..b8dd6427d6 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Increased\stest\scoverage.\s\sSome\smalloc\stests\snow\sfail\sthough\sthis\sis\sbelieved\nto\sbe\san\sinstrumentation\sproblem\snot\sa\sreal\serror.\s(CVS\s2604) -D 2005-08-20T03:03:04 +C More\stest\scoverage\simprovements.\s(CVS\s2605) +D 2005-08-20T13:47:42 F Makefile.in b109ddb46a5550d0732dcd6caca01c123f6d5cdd F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -86,7 +86,7 @@ F src/vdbeInt.h 9be9a6c43d38124bd03cc5cf05715605b1789fd9 F src/vdbeapi.c dc5b78cabf8d6e33318bd3d4ed25307d2aadce9a F src/vdbeaux.c 874624698fad54a59c6a0bcccea9d5aaa8655ab6 F src/vdbefifo.c b8805850afe13b43f1de78d58088cb5d66f88e1e -F src/vdbemem.c 89154caae3b8d4d0397e1235390fc4ff8aba4233 +F src/vdbemem.c 4732fd4d1a75dc38549493d7f9a81d02bf7c59b5 F src/where.c 8392d521f901f83f95bf32e52255a0efe98677af F tclinstaller.tcl 046e3624671962dc50f0481d7c25b38ef803eb42 F test/all.test 7f0988442ab811dfa41793b5b550f5828ce316f3 @@ -155,7 +155,7 @@ F test/insert2.test 792ad079f59c7e14cf9397712725224e2112c838 F test/insert3.test c67f0240b1c17e71fa2ed8bb6de064928f549f95 F test/interrupt.test 170f87c2819f0e56c76e0a754949ea103d05009c F test/intpkey.test af4fd826c4784ec5c93b444de07adea0254d0d30 -F test/ioerr.test b27540c5873d28c0e77f02ce85b15f904d5b03a6 +F test/ioerr.test c3f71a60be73404bc5ae344e171b505d9af49320 F test/join.test db3802739fb695bdfa2e88805e3d64ec5ffbebd1 F test/join2.test f2171c265e57ee298a27e57e7051d22962f9f324 F test/join3.test 6f0c774ff1ba0489e6c88a3e77b9d3528fb4fda0 @@ -297,7 +297,7 @@ F www/tclsqlite.tcl 3df553505b6efcad08f91e9b975deb2e6c9bb955 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P b550d04d43a92f33a01438ae03df14678db3cdee -R 67d7b59d35705cacc80cadb289e8be20 +P f786f37a5e31f42aaf81b3ad4a734f12855da69e +R 8a15af26b28b220d34fe78d4c401858c U drh -Z 534f3c24965d5feaf73a5d09d58f869d +Z 75ad334b79c984175a505eccf09879ca diff --git a/manifest.uuid b/manifest.uuid index af83769d56..7abd45e9ba 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -f786f37a5e31f42aaf81b3ad4a734f12855da69e \ No newline at end of file +e559e810a51427def6928763ae0d6f7347366d04 \ No newline at end of file diff --git a/src/vdbemem.c b/src/vdbemem.c index 630cb22019..416beb6c78 100644 --- a/src/vdbemem.c +++ b/src/vdbemem.c @@ -669,9 +669,9 @@ void sqlite3VdbeMemSanity(Mem *pMem, u8 db_enc){ /* MEM_Null excludes all other types */ assert( (pMem->flags&(MEM_Str|MEM_Int|MEM_Real|MEM_Blob))==0 || (pMem->flags&MEM_Null)==0 ); - if( (pMem->flags & (MEM_Int|MEM_Real))==(MEM_Int|MEM_Real) ){ - assert( pMem->r==pMem->i ); - } + /* If the MEM is both real and integer, the values are equal */ + assert( (pMem->flags & (MEM_Int|MEM_Real))!=(MEM_Int|MEM_Real) + || pMem->r==pMem->i ); } #endif diff --git a/test/ioerr.test b/test/ioerr.test index 5f82a32f31..e8aca20da3 100644 --- a/test/ioerr.test +++ b/test/ioerr.test @@ -15,11 +15,12 @@ # The tests in this file use special facilities that are only # available in the SQLite test fixture. # -# $Id: ioerr.test,v 1.20 2005/03/10 12:58:22 drh Exp $ +# $Id: ioerr.test,v 1.21 2005/08/20 13:47:42 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl + # If SQLITE_DEFAULT_AUTOVACUUM is set to true, then a simulated IO error # on the 8th IO operation in the SQL script below doesn't report an error. # @@ -185,4 +186,19 @@ if {$tcl_platform(platform)!="windows"} { } -exclude 1 } +# For test coverage: Cause an I/O failure while trying to read a +# short field (one that fits into a Mem buffer without mallocing +# for space). +# +do_ioerr_test ioerr-8 -tclprep { + execsql { + CREATE TABLE t1(a,b,c); + INSERT INTO t1 VALUES(randstr(200,200), randstr(1000,1000), 2); + } + db close + sqlite3 db test.db +} -sqlbody { + SELECT c FROM t1; +} + finish_test