aboutsummaryrefslogtreecommitdiff
path: root/test/shared2.test
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2009-03-17 17:48:59 +0000
committerdanielk1977 <danielk1977@noemail.net>2009-03-17 17:48:59 +0000
commit21822c58b09547d28ef4061a5467efe4293aa50c (patch)
tree749f58b287a16f4164ce32e20d38ff1630ec1392 /test/shared2.test
parent3ded8d6f2a187a4e7df31433ed76a25319a23a63 (diff)
downloadsqlite-21822c58b09547d28ef4061a5467efe4293aa50c.tar.gz
sqlite-21822c58b09547d28ef4061a5467efe4293aa50c.zip
Fix a problem that could cause a crash when a shared-cache schema contains column default values. (CVS 6353)
FossilOrigin-Name: afadddc34eee3d6a39102b790ce1a869b33d4286
Diffstat (limited to 'test/shared2.test')
-rw-r--r--test/shared2.test27
1 files changed, 26 insertions, 1 deletions
diff --git a/test/shared2.test b/test/shared2.test
index 5f18f8b72..3f1418087 100644
--- a/test/shared2.test
+++ b/test/shared2.test
@@ -9,7 +9,7 @@
#
#***********************************************************************
#
-# $Id: shared2.test,v 1.5 2007/08/23 02:47:54 drh Exp $
+# $Id: shared2.test,v 1.6 2009/03/17 17:49:00 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -127,5 +127,30 @@ do_test shared2-3.2 {
sqlite3_enable_shared_cache 1
} {1}
+file delete -force test.db
+
+sqlite3 db test.db
+do_test shared2-4.1 {
+ execsql {
+ CREATE TABLE t0(a, b);
+ CREATE TABLE t1(a, b DEFAULT 'hello world');
+ }
+} {}
+db close
+
+sqlite3 db test.db
+sqlite3 db2 test.db
+
+do_test shared2-4.2 {
+ execsql { SELECT a, b FROM t0 } db
+ execsql { INSERT INTO t1(a) VALUES(1) } db2
+} {}
+
+do_test shared2-4.3 {
+ db2 close
+ db close
+} {}
+
sqlite3_enable_shared_cache $::enable_shared_cache
finish_test
+