summaryrefslogtreecommitdiffstats
path: root/third_party/sqlite/test/shared2.test
diff options
context:
space:
mode:
authormdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-18 18:27:25 +0000
committermdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-18 18:27:25 +0000
commit997e22224e1062a4cd39373057a68879a1d7a3ac (patch)
treea90a9ce4272fc78f2459b1b2c78b52a3f6d4e5d3 /third_party/sqlite/test/shared2.test
parent0d683c611a18dc6ea0e99f38c73b4fb96611041f (diff)
downloadchromium_src-997e22224e1062a4cd39373057a68879a1d7a3ac.zip
chromium_src-997e22224e1062a4cd39373057a68879a1d7a3ac.tar.gz
chromium_src-997e22224e1062a4cd39373057a68879a1d7a3ac.tar.bz2
Update sqlite to version 3.6.18, porting our patches.
Hopefully this will help to address some valgrind issues. BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26596 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/sqlite/test/shared2.test')
-rw-r--r--third_party/sqlite/test/shared2.test41
1 files changed, 40 insertions, 1 deletions
diff --git a/third_party/sqlite/test/shared2.test b/third_party/sqlite/test/shared2.test
index 5f18f8b..37f9516 100644
--- a/third_party/sqlite/test/shared2.test
+++ b/third_party/sqlite/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.8 2009/06/05 17:09:12 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -127,5 +127,44 @@ 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
+} {}
+
+# At one point, this was causing a crash.
+#
+do_test shared2-5.1 {
+ sqlite3 db test.db
+ sqlite3 db2 test.db
+ execsql { CREATE TABLE t2(a, b, c) }
+
+ # The following statement would crash when attempting to sqlite3_free()
+ # a pointer allocated from a lookaside buffer.
+ execsql { CREATE INDEX i1 ON t2(a) } db2
+} {}
+
+db close
+db2 close
+
sqlite3_enable_shared_cache $::enable_shared_cache
finish_test