-C Fix\sa\stest\sscript\sbug\s-\snot\sall\sdatabase\shandles\swere\sbeing\sclosed\sby\sioerr5.test.\s(CVS\s5133)
-D 2008-05-15T09:07:56
+C If\sa\spager\sis\salready\sin\sthe\serror-state\swhen\sCommitPhaseOne()\sis\scalled,\sexit\searly.\s(CVS\s5134)
+D 2008-05-15T11:08:08
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
F Makefile.in 79aeba12300a54903f1b1257c1e7c190234045dd
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F src/os_os2.c 0c3a5802bc4fdb7cb5f66771552b081c4e48a216
F src/os_unix.c a810e2aefdaddacf479407f76f8f4ca381d231b2
F src/os_win.c 3a60bddd07ea6f8adb2314dd5996ac97b988f403
-F src/pager.c eae53a807a85e6f68454e42a1a81754abe4216e3
+F src/pager.c 43f5f67ff211ed0f40ccd9a96c079e811a9ac601
F src/pager.h 4f051fd856de6fd3c19aef5f82eace54122b9173
F src/parse.y fc4bd35c6088901f7c8daead26c6fb11c87d22e7
F src/pragma.c 2e4bb2e76e48a32750529fdc4bfe86ac5f54e01b
F test/ioerr2.test b9c9a0491a812707762a7c002876553be54d9969
F test/ioerr3.test d3cec5e1a11ad6d27527d0d38573fbff14c71bdd
F test/ioerr4.test fc6eddfec2efc2f1ed217b9eae4c1c1d3516ce86
-F test/ioerr5.test 3efdada539683af68f7630b83843b53ed45818f1
+F test/ioerr5.test f44e30b4780b879bcceb2601aabae40d8a0a0b56
F test/join.test af0443185378b64878750aa1cf4b83c216f246b4
F test/join2.test f2171c265e57ee298a27e57e7051d22962f9f324
F test/join3.test 6f0c774ff1ba0489e6c88a3e77b9d3528fb4fda0
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 10ea8287d090ae610416b4754c0838f13b51fd78
-R d0ced0e9fffeaaa2b43426ebd729f2cc
+P 47652e7b169626e5f3d95f29e867a2e8f68c5025
+R d8f7609758174cb331cdc46a0cb952a9
U danielk1977
-Z 0bd221f8c209aa798908237921045fbf
+Z 7ea980f7a54707b1517ab40c9892ab63
# incorrectly write dirty pages out to the database (not safe to do
# once the pager is in error state).
#
-# $Id: ioerr5.test,v 1.2 2008/05/15 09:07:56 danielk1977 Exp $
+# $Id: ioerr5.test,v 1.3 2008/05/15 11:08:08 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set nRow [db one {SELECT count(*) FROM a}]
# Dirty (at least) one of the pages in the cache.
- do_test ioerr5-$locking_mode-$iFail.1 {
+ do_test ioerr5-1.$locking_mode-$iFail.1 {
execsql {
BEGIN EXCLUSIVE;
INSERT INTO a VALUES(1, 'ABCDEFGHIJKLMNOP');
#
set ::sqlite_io_error_persist 1
set ::sqlite_io_error_pending $iFail
- do_test ioerr5-$locking_mode-$iFail.2 {
+ do_test ioerr5-1.$locking_mode-$iFail.2 {
set rc [catchsql {COMMIT}]
list
} {}
# from the pager that is in error state. Including that associated
# with the dirty page.
#
- do_test ioerr5-$locking_mode-$iFail.3 {
+ do_test ioerr5-1.$locking_mode-$iFail.3 {
sqlite3_soft_heap_limit 1024
compilesql16 "SELECT 10"
set bt [btree_from_db db]
# Ensure that nothing was written to the database while reclaiming
# memory from the pager in error state.
#
- do_test ioerr5-$locking_mode-$iFail.4 {
+ do_test ioerr5-1.$locking_mode-$iFail.4 {
set fd [open test.db]
fconfigure $fd -translation binary -encoding binary
set zDatabase2 [read $fd]
} {1}
if {$rc eq [list 0 {}]} {
- do_test ioerr5-$locking_mode-$iFail.3 {
+ do_test ioerr5.1-$locking_mode-$iFail.3 {
execsql { SELECT count(*) FROM a }
} [expr $nRow+1]
break
}
}
+# Make sure this test script doesn't leave any files open.
+#
+do_test ioerr5-1.X {
+ catch { db close }
+ catch { db2 close }
+ set sqlite_open_file_count
+} 0
+
+do_test ioerr5-2.0 {
+ sqlite3 db test.db
+ execsql { CREATE INDEX i1 ON a(id, name); }
+} {}
+
+foreach locking_mode {exclusive normal} {
+ for {set iFail 1} {$iFail<200} {incr iFail} {
+ sqlite3_soft_heap_limit 1048576
+ opendatabases
+ execsql { pragma locking_mode=exclusive }
+ set nRow [db one {SELECT count(*) FROM a}]
+
+ do_test ioerr5-2.$locking_mode-$iFail.1 {
+ execsql {
+ BEGIN EXCLUSIVE;
+ INSERT INTO a VALUES(1, 'ABCDEFGHIJKLMNOP');
+ }
+ } {}
+
+ set ::sqlite_io_error_persist 1
+ set ::sqlite_io_error_pending $iFail
+
+ sqlite3_release_memory 10000
+
+ set error_hit $::sqlite_io_error_hit
+ set ::sqlite_io_error_hit 0
+ set ::sqlite_io_error_persist 0
+ set ::sqlite_io_error_pending 0
+ if {$error_hit} {
+ do_test ioerr5-2.$locking_mode-$iFail.3a {
+ catchsql COMMIT
+ } {1 {disk I/O error}}
+ } else {
+ do_test ioerr5-2.$locking_mode-$iFail.3b {
+ execsql COMMIT
+ } {}
+ break
+ }
+ }
+}
+
# Make sure this test script doesn't leave any files open.
#
do_test ioerr5-2.X {