From: drh Date: Fri, 19 Aug 2005 01:07:15 +0000 (+0000) Subject: More test coverage enhancements. (CVS 2600) X-Git-Tag: version-3.6.10~3559 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc23314a0bb69b19861d309bb7d1418bd5625d06;p=thirdparty%2Fsqlite.git More test coverage enhancements. (CVS 2600) FossilOrigin-Name: 0b6cd5acc0ede3367623f40ccfaa96116e686824 --- diff --git a/manifest b/manifest index 317c83595e..bc516f3379 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Bring\stesting\scoverage\sof\sthe\sanalyze.c\sfile\sup\sto\s100%.\s\sBugs\sfound\sand\nfixed\sin\sthe\sprocess.\s(CVS\s2599) -D 2005-08-19T00:14:42 +C More\stest\scoverage\senhancements.\s(CVS\s2600) +D 2005-08-19T01:07:16 F Makefile.in b109ddb46a5550d0732dcd6caca01c123f6d5cdd F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -81,10 +81,10 @@ F src/utf.c bda5eb85039ef16f2d17004c1e18c96e1ab0a80c F src/util.c f66b47d937bde79d458a18665b67a98dbba5108f F src/vacuum.c 829d9e1a6d7c094b80e0899686670932eafd768c F src/vdbe.c 69f33e22c7d0a64b23fbb69e6da95a1bb6869032 -F src/vdbe.h 68e80f65658e7fd85561721f617bdebf8bb84b59 +F src/vdbe.h 3b29a9af6c7a64ed692bef1fc5f61338f40d2f67 F src/vdbeInt.h 9be9a6c43d38124bd03cc5cf05715605b1789fd9 F src/vdbeapi.c dc5b78cabf8d6e33318bd3d4ed25307d2aadce9a -F src/vdbeaux.c 6b2e54ac0b8ea95411029efff5404eb68d12d28c +F src/vdbeaux.c 874624698fad54a59c6a0bcccea9d5aaa8655ab6 F src/vdbefifo.c b8805850afe13b43f1de78d58088cb5d66f88e1e F src/vdbemem.c 89154caae3b8d4d0397e1235390fc4ff8aba4233 F src/where.c a8401eb8eb8db37996e4c835cd4373de875c1488 @@ -133,6 +133,7 @@ F test/corrupt2.test 88342570828f2b8cbbd8369eff3891f5c0bdd5ba F test/crash.test f38b980a0508655d08c957a6dd27d66bca776504 F test/crashtest1.c 09c1c7d728ccf4feb9e481671e29dda5669bbcc2 F test/date.test 30ca15e608a45d868fd419c901795382efe27020 +F test/default.test 648b12a9153095448f4d61aca73b273592673cb4 F test/delete.test 33e1670049364fc3604217a6c2eda042a47115ab F test/delete2.test e382b6a97787197eb8b93dd4ccd37797c3725ea3 F test/diskfull.test ba27afd587af1216f92d2bb00132cbc0e39354fc @@ -166,7 +167,7 @@ F test/lock.test 9b7afcb24f53d24da502abb33daaad2cd6d44107 F test/lock2.test 59c3dd7d9b24d1bf7ec91b2d1541c37e97939d5f F test/lock3.test 615111293cf32aa2ed16d01c6611737651c96fb9 F test/main.test 249f139ef2f75710db1b49bb79e8b27767eacae1 -F test/malloc.test b7bc72bb1627e09d6003f58de9bcd6e4be839753 +F test/malloc.test 06d8dd2ed854693fc4e63b3e7dfd0fd8981cd628 F test/malloc2.test 655b972372d2754a3f6c6ed54d7cfd18fde9bd32 F test/memdb.test 1860e060be810bf0775bc57408a5b7c4954bcaea F test/memleak.test df2b2b96e77f8ba159a332299535b1e5f18e49ac @@ -293,7 +294,7 @@ F www/tclsqlite.tcl 3df553505b6efcad08f91e9b975deb2e6c9bb955 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P b865e243ee772f009dbf466d69525f2cdef78c0e -R d80e488a663ed9391ee71a30f9bfe38b +P 2fe0ac4fa4d5911e266979021fa7e413d96c558d +R 31fa1affa5851be2627a9e42460d8a99 U drh -Z db420958562db69c6ce814b79165077a +Z 767cac511bcfeb21d48a46ba088681f1 diff --git a/manifest.uuid b/manifest.uuid index 4d505e707b..a0dc753b02 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -2fe0ac4fa4d5911e266979021fa7e413d96c558d \ No newline at end of file +0b6cd5acc0ede3367623f40ccfaa96116e686824 \ No newline at end of file diff --git a/src/vdbe.h b/src/vdbe.h index 4c93807a39..0da0299550 100644 --- a/src/vdbe.h +++ b/src/vdbe.h @@ -15,7 +15,7 @@ ** or VDBE. The VDBE implements an abstract machine that runs a ** simple program to access and modify the underlying database. ** -** $Id: vdbe.h,v 1.96 2005/08/12 22:56:09 drh Exp $ +** $Id: vdbe.h,v 1.97 2005/08/19 01:07:16 drh Exp $ */ #ifndef _SQLITE_VDBE_H_ #define _SQLITE_VDBE_H_ @@ -105,7 +105,6 @@ int sqlite3VdbeAddOpList(Vdbe*, int nOp, VdbeOpList const *aOp); void sqlite3VdbeChangeP1(Vdbe*, int addr, int P1); void sqlite3VdbeChangeP2(Vdbe*, int addr, int P2); void sqlite3VdbeChangeP3(Vdbe*, int addr, const char *zP1, int N); -int sqlite3VdbeFindOp(Vdbe*, int, int, int); VdbeOp *sqlite3VdbeGetOp(Vdbe*, int); int sqlite3VdbeMakeLabel(Vdbe*); void sqlite3VdbeDelete(Vdbe*); diff --git a/src/vdbeaux.c b/src/vdbeaux.c index e9a383ec9e..578f9a68d2 100644 --- a/src/vdbeaux.c +++ b/src/vdbeaux.c @@ -443,20 +443,6 @@ void sqlite3VdbeComment(Vdbe *p, const char *zFormat, ...){ } #endif -/* -** Search the current program starting at instruction addr for the given -** opcode and P2 value. Return the address plus 1 if found and 0 if not -** found. -*/ -int sqlite3VdbeFindOp(Vdbe *p, int addr, int op, int p2){ - int i; - assert( p->magic==VDBE_MAGIC_INIT ); - for(i=addr; inOp; i++){ - if( p->aOp[i].opcode==op && p->aOp[i].p2==p2 ) return i+1; - } - return 0; -} - /* ** Return the opcode for a given address. */ diff --git a/test/default.test b/test/default.test new file mode 100644 index 0000000000..06e9e36793 --- /dev/null +++ b/test/default.test @@ -0,0 +1,44 @@ +# 2005 August 18 +# +# The author disclaims copyright to this source code. In place of +# a legal notice, here is a blessing: +# +# May you do good and not evil. +# May you find forgiveness for yourself and forgive others. +# May you share freely, never taking more than you give. +# +#************************************************************************* +# This file implements regression tests for SQLite library. The +# focus of this file is testing corner cases of the DEFAULT syntax +# on table definitions. +# +# $Id: default.test,v 1.1 2005/08/19 01:07:16 drh Exp $ +# + +set testdir [file dirname $argv0] +source $testdir/tester.tcl + +ifcapable bloblit { + do_test default-1.1 { + execsql { + CREATE TABLE t1( + a INTEGER, + b BLOB DEFAULT x'6869' + ); + INSERT INTO t1(a) VALUES(1); + SELECT * from t1; + } + } {1 hi} +} +do_test default-1.2 { + execsql { + CREATE TABLE t2( + x INTEGER, + y INTEGER DEFAULT NULL + ); + INSERT INTO t2(x) VALUES(1); + SELECT * FROM t2; + } +} {1 {}} + +finish_test diff --git a/test/malloc.test b/test/malloc.test index 63652b24ac..420565f1d3 100644 --- a/test/malloc.test +++ b/test/malloc.test @@ -14,7 +14,7 @@ # special feature is used to see what happens in the library if a malloc # were to really fail due to an out-of-memory situation. # -# $Id: malloc.test,v 1.22 2005/01/22 03:39:39 danielk1977 Exp $ +# $Id: malloc.test,v 1.23 2005/08/19 01:07:16 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -131,7 +131,7 @@ do_test malloc-1.X { } {0} do_malloc_test 2 -sqlbody { - CREATE TABLE t1(a int, b int, c int); + CREATE TABLE t1(a int, b int default 'abc', c int default 1); CREATE INDEX i1 ON t1(a,b); INSERT INTO t1 VALUES(1,1,'99 abcdefghijklmnopqrstuvwxyz'); INSERT INTO t1 VALUES(2,4,'98 abcdefghijklmnopqrstuvwxyz');