summaryrefslogtreecommitdiff
path: root/test/shared3.test
diff options
context:
space:
mode:
authorHans-Christoph Steiner <hans@eds.org>2014-10-16 22:51:43 -0400
committerHans-Christoph Steiner <hans@eds.org>2014-10-16 22:51:43 -0400
commit9f67c0520ea0d5f11a190197cdf746c512db4ce4 (patch)
treec88a33f01f20a3d13a09594f114fffacebd0d1a4 /test/shared3.test
parentee20336e9c78d2e3782c8d096b9ab4f6ca8ce95f (diff)
parent569c6676a6ddb0ff73821d7693b5e18ddef809b9 (diff)
Merge tag 'upstream/3.2.0'
Upstream version 3.2.0 # gpg: Signature made Thu 16 Oct 2014 10:51:39 PM EDT using RSA key ID 374BBE81 # gpg: Good signature from "Hans-Christoph Steiner <hans@guardianproject.info>" # gpg: aka "Hans-Christoph Steiner <hans@eds.org>" # gpg: aka "Hans-Christoph Steiner <hans@at.or.at>" # gpg: aka "[jpeg image of size 5408]"
Diffstat (limited to 'test/shared3.test')
-rw-r--r--test/shared3.test35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/shared3.test b/test/shared3.test
index 783ae6a..acc86d2 100644
--- a/test/shared3.test
+++ b/test/shared3.test
@@ -13,6 +13,7 @@
set testdir [file dirname $argv0]
source $testdir/tester.tcl
+set testprefix shared3
db close
ifcapable !shared_cache {
@@ -103,5 +104,39 @@ db1 close
db2 close
db3 close
+#-------------------------------------------------------------------------
+# At one point this was causing a faulty assert to fail.
+#
+forcedelete test.db
+sqlite3 db test.db
+sqlite3 db2 test.db
+do_execsql_test 3.1 {
+ PRAGMA auto_vacuum = 2;
+ CREATE TABLE t1(x, y);
+ INSERT INTO t1 VALUES(randomblob(500), randomblob(500));
+ INSERT INTO t1 SELECT randomblob(500), randomblob(500) FROM t1;
+ INSERT INTO t1 SELECT randomblob(500), randomblob(500) FROM t1;
+ INSERT INTO t1 SELECT randomblob(500), randomblob(500) FROM t1;
+ INSERT INTO t1 SELECT randomblob(500), randomblob(500) FROM t1;
+ INSERT INTO t1 SELECT randomblob(500), randomblob(500) FROM t1;
+ INSERT INTO t1 SELECT randomblob(500), randomblob(500) FROM t1;
+ INSERT INTO t1 SELECT randomblob(500), randomblob(500) FROM t1;
+}
+do_test 3.2 {
+ execsql { SELECT count(*) FROM sqlite_master } db2
+} {1}
+do_execsql_test 3.3 {
+ BEGIN;
+ DELETE FROM t1 WHERE 1;
+ PRAGMA incremental_vacuum;
+} {}
+do_test 3.4 {
+ execsql { SELECT count(*) FROM sqlite_master } db2
+} {1}
+do_test 3.5 {
+ execsql { COMMIT }
+} {}
+
sqlite3_enable_shared_cache $::enable_shared_cache
finish_test
+