aboutsummaryrefslogtreecommitdiff
path: root/test/shared_err.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/shared_err.test')
-rw-r--r--test/shared_err.test19
1 files changed, 5 insertions, 14 deletions
diff --git a/test/shared_err.test b/test/shared_err.test
index 457c987e5..95e8c900a 100644
--- a/test/shared_err.test
+++ b/test/shared_err.test
@@ -13,7 +13,7 @@
# cache context. What happens to connection B if one connection A encounters
# an IO-error whilst reading or writing the file-system?
#
-# $Id: shared_err.test,v 1.20 2008/07/07 14:56:57 danielk1977 Exp $
+# $Id: shared_err.test,v 1.21 2008/07/07 17:55:29 danielk1977 Exp $
proc skip {args} {}
@@ -291,17 +291,6 @@ do_ioerr_test shared_ioerr-3rev -tclprep {
db2 close
}
-# Only run these tests if memory debugging is turned on.
-#
-ifcapable !memdebug {
- puts "Skipping tests shared_err-4 through -9:\
- not compiled with -DSQLITE_MEMDEBUG..."
- db close
- sqlite3_enable_shared_cache $::enable_shared_cache
- finish_test
- return
-}
-
# Provoke a malloc() failure when a cursor position is being saved. This
# only happens with index cursors (because they malloc() space to save the
# current key value). It does not happen with tables, because an integer
@@ -416,7 +405,7 @@ do_malloc_test shared_err-8 -tclprep {
set res [catchsql {SELECT a FROM t1} db2]
set ans [lindex $res 1]
if {[lindex $res 0]} {
- set r [expr {$ans=="disk I/O error"}]
+ set r [expr {$ans=="disk I/O error" || $ans=="out of memory"}]
} else {
set r [expr {[lrange $ans 0 1]=="0000000000 1111111111"}]
}
@@ -441,7 +430,6 @@ do_test shared_malloc-8.X {
expr $::aborted>=1
} {1}
-
# This test is designed to catch a specific bug that was present during
# development of 3.5.0. If a malloc() failed while setting the page-size,
# a buffer (Pager.pTmpSpace) was being freed. This could cause a seg-fault
@@ -499,6 +487,9 @@ do_malloc_test shared_err-11 -tclprep {
execsql { SELECT * FROM sqlite_master }
}
+catch {db close}
+catch {db2 close}
+
do_malloc_test shared_err-12 -sqlbody {
CREATE TABLE abc(a, b, c);
INSERT INTO abc VALUES(1, 2, 3);