aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lock_common.tcl1
-rw-r--r--test/savepoint.test1
-rw-r--r--test/shared2.test11
3 files changed, 13 insertions, 0 deletions
diff --git a/test/lock_common.tcl b/test/lock_common.tcl
index 0b7c5f922..672f9a5f9 100644
--- a/test/lock_common.tcl
+++ b/test/lock_common.tcl
@@ -58,6 +58,7 @@ proc do_multiclient_test {varname script} {
code3 { db3 close }
catch { close $::code2_chan }
catch { close $::code3_chan }
+ catch { db close }
}
}
diff --git a/test/savepoint.test b/test/savepoint.test
index 5b41c4579..3ff0f9243 100644
--- a/test/savepoint.test
+++ b/test/savepoint.test
@@ -1026,6 +1026,7 @@ do_multiclient_test tn {
# (even though it had been removed from the database by the ROLLBACK
# command).
#
+sqlite3 db test.db
do_execsql_test savepoint-17.1 {
BEGIN;
CREATE TABLE t6(a, b);
diff --git a/test/shared2.test b/test/shared2.test
index 37f9516f6..d2a0d1b0f 100644
--- a/test/shared2.test
+++ b/test/shared2.test
@@ -13,6 +13,8 @@
set testdir [file dirname $argv0]
source $testdir/tester.tcl
+source $testdir/lock_common.tcl
+source $testdir/malloc_common.tcl
db close
ifcapable !shared_cache {
@@ -166,5 +168,14 @@ do_test shared2-5.1 {
db close
db2 close
+# The following test verifies that shared-cache mode does not automatically
+# turn on exclusive-locking mode for some reason.
+do_multiclient_test {tn} {
+ sql1 { CREATE TABLE t1(a, b) }
+ sql2 { CREATE TABLE t2(a, b) }
+ do_test shared2-6.$tn.1 { sql1 { SELECT * FROM t2 } } {}
+ do_test shared2-6.$tn.2 { sql2 { SELECT * FROM t1 } } {}
+}
+
sqlite3_enable_shared_cache $::enable_shared_cache
finish_test