Index: third_party/sqlite/src/test/shared3.test |
diff --git a/third_party/sqlite/src/test/shared3.test b/third_party/sqlite/src/test/shared3.test |
index 8f9eae9b7a33174d26bc9a8b34bee88260bd05ca..acc86d2a07c1f846798a9b067549cad1c8bd3ea3 100644 |
--- a/third_party/sqlite/src/test/shared3.test |
+++ b/third_party/sqlite/src/test/shared3.test |
@@ -13,6 +13,7 @@ |
set testdir [file dirname $argv0] |
source $testdir/tester.tcl |
+set testprefix shared3 |
db close |
ifcapable !shared_cache { |
@@ -24,7 +25,7 @@ set ::enable_shared_cache [sqlite3_enable_shared_cache 1] |
# Ticket #1824 |
# |
do_test shared3-1.1 { |
- file delete -force test.db test.db-journal |
+ forcedelete test.db test.db-journal |
sqlite3 db1 test.db |
db1 eval { |
PRAGMA encoding=UTF16; |
@@ -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 |
+ |