Fix multiple performance regressions (ticket #2298 among them)

and add tests to make sure they do not come back. (CVS 3839)

FossilOrigin-Name: 32bb2d5859906b4fb0f6083eedd7f3a81b9cf5e2
This commit is contained in:
drh
2007-04-13 02:14:30 +00:00
parent 994c80af27
commit 538f570cd1
9 changed files with 339 additions and 98 deletions
+14 -2
View File
@@ -15,7 +15,7 @@
# The tests in this file use special facilities that are only
# available in the SQLite test fixture.
#
# $Id: ioerr2.test,v 1.3 2007/04/09 12:45:03 drh Exp $
# $Id: ioerr2.test,v 1.4 2007/04/13 02:14:30 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -82,10 +82,11 @@ set sql {
ROLLBACK;
}
breakpoint
foreach bPersist [list 0 1] {
set ::go 1
for {set ::N 1} {$::go} {incr ::N} {
db close
sqlite3 db test.db
set ::sqlite_io_error_hit 0
set ::sqlite_io_error_persist $bPersist
set ::sqlite_io_error_pending $::N
@@ -94,5 +95,16 @@ foreach bPersist [list 0 1] {
check_db ioerr2-3.$bPersist.$::N
}
}
foreach bPersist [list 0 1] {
set ::go 1
for {set ::N 1} {$::go} {incr ::N} {
set ::sqlite_io_error_hit 0
set ::sqlite_io_error_persist $bPersist
set ::sqlite_io_error_pending $::N
foreach {::go res} [catchsql $sql] {}
check_db ioerr2-3.[expr {$bPersist+2}].$::N
}
}
finish_test