]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
More test coverage enhancements. (CVS 2600)
authordrh <drh@noemail.net>
Fri, 19 Aug 2005 01:07:15 +0000 (01:07 +0000)
committerdrh <drh@noemail.net>
Fri, 19 Aug 2005 01:07:15 +0000 (01:07 +0000)
FossilOrigin-Name: 0b6cd5acc0ede3367623f40ccfaa96116e686824

manifest
manifest.uuid
src/vdbe.h
src/vdbeaux.c
test/default.test [new file with mode: 0644]
test/malloc.test

index 317c83595e6b4acf9fa21af335b4a766f4a630e4..bc516f3379a10a22477d6dca8826cca06bcae57c 100644 (file)
--- 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
index 4d505e707b8b659fdd10f7e5109617eb8e8da0b1..a0dc753b02b5d3a52d931a078eb013c1201c31bc 100644 (file)
@@ -1 +1 @@
-2fe0ac4fa4d5911e266979021fa7e413d96c558d
\ No newline at end of file
+0b6cd5acc0ede3367623f40ccfaa96116e686824
\ No newline at end of file
index 4c93807a390ab427e461c29f9c250f99efd53f0b..0da0299550fcc2b3dafb1620e633a6fd79dd352e 100644 (file)
@@ -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*);
index e9a383ec9e6e6af603a289a88c14f557dfa9fc3a..578f9a68d27b3ce8ac2645d2f5b4373ede08785a 100644 (file)
@@ -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; i<p->nOp; 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 (file)
index 0000000..06e9e36
--- /dev/null
@@ -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
index 63652b24acf73897cde1e33ea64939db876c5c05..420565f1d33c853a11c82776730acfd893a979f1 100644 (file)
@@ -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');