aboutsummaryrefslogtreecommitdiff
path: root/test/shared_err.test
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2008-09-15 14:42:38 +0000
committerdanielk1977 <danielk1977@noemail.net>2008-09-15 14:42:38 +0000
commit78a906552dfed9be44df23a04de23f5d44f9c26d (patch)
treef03c023035a8c26a80308f65d973f8f3a138b847 /test/shared_err.test
parent92c4b8a2cadfc742747b6c684950b56583671d43 (diff)
downloadsqlite-78a906552dfed9be44df23a04de23f5d44f9c26d.tar.gz
sqlite-78a906552dfed9be44df23a04de23f5d44f9c26d.zip
Fix the shared_err.test script so that it works if the device supports SQLITE_IOCAP_SAFEAPPEND. (CVS 5699)
FossilOrigin-Name: 38e5ea070a38fe1656e0f5c3024f28ce67eae725
Diffstat (limited to 'test/shared_err.test')
-rw-r--r--test/shared_err.test23
1 files changed, 16 insertions, 7 deletions
diff --git a/test/shared_err.test b/test/shared_err.test
index 95e8c900a..7c8b5488a 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.21 2008/07/07 17:55:29 danielk1977 Exp $
+# $Id: shared_err.test,v 1.22 2008/09/15 14:42:38 danielk1977 Exp $
proc skip {args} {}
@@ -57,12 +57,13 @@ do_ioerr_test shared_ioerr-1 -tclprep {
set res [catchsql {
SELECT * FROM t1;
} db2]
- set possible_results [list \
- "1 {disk I/O error}" \
- "0 {1 2 3}" \
- "0 {1 2 3 1 2 3 4 5 6}" \
- "0 {1 2 3 1 2 3 4 5 6 1 2 3 4 5 6}" \
- "0 {}" \
+ set possible_results [list \
+ "1 {disk I/O error}" \
+ "0 {1 2 3}" \
+ "0 {1 2 3 1 2 3 4 5 6}" \
+ "0 {1 2 3 1 2 3 4 5 6 1 2 3 4 5 6}" \
+ "0 {}" \
+ "1 {database disk image is malformed}" \
]
set rc [expr [lsearch -exact $possible_results $res] >= 0]
if {$rc != 1} {
@@ -71,7 +72,15 @@ do_ioerr_test shared_ioerr-1 -tclprep {
}
set rc
} {1}
+
+ # The "database disk image is malformed" is a special case that can
+ # occur if an IO error occurs during a rollback in the {SELECT * FROM t1}
+ # statement above. This test is to make sure there is no real database
+ # corruption.
db2 close
+ do_test shared_ioerr-1.$n.cleanup.2 {
+ execsql {pragma integrity_check} db
+ } {ok}
}
do_ioerr_test shared_ioerr-2 -tclprep {