Improve coverage of pager.c and fix an IO error handling bug found in the process. (CVS 2995)
FossilOrigin-Name: 6ec8e6b7856a0b394b8497ab9166b882f98124ba
This commit is contained in:
+22
-2
@@ -11,7 +11,7 @@
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this script is page cache subsystem.
|
||||
#
|
||||
# $Id: pager.test,v 1.23 2005/01/22 03:39:39 danielk1977 Exp $
|
||||
# $Id: pager.test,v 1.24 2006/01/23 13:09:47 danielk1977 Exp $
|
||||
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
@@ -518,8 +518,28 @@ do_test pager-6.3 {
|
||||
}
|
||||
} {{CREATE TABLE abc(a, b, c)}}
|
||||
|
||||
do_test pager-6.4 {
|
||||
do_test pager-6.4.1 {
|
||||
execsql {
|
||||
BEGIN;
|
||||
SELECT sql FROM sqlite_master;
|
||||
}
|
||||
copy_file test2.db-journal test.db-journal;
|
||||
sqlite3 db3 test.db
|
||||
catchsql {
|
||||
BEGIN;
|
||||
SELECT sql FROM sqlite_master;
|
||||
} db3;
|
||||
} {1 {database is locked}}
|
||||
do_test pager-6.4.2 {
|
||||
file delete -force test.db-journal
|
||||
catchsql {
|
||||
SELECT sql FROM sqlite_master;
|
||||
} db3;
|
||||
} {0 {{CREATE TABLE abc(a, b, c)}}}
|
||||
|
||||
do_test pager-6.5 {
|
||||
db2 close
|
||||
db3 close
|
||||
} {}
|
||||
}
|
||||
finish_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.4 2006/01/23 05:50:58 danielk1977 Exp $
|
||||
# $Id: shared_err.test,v 1.5 2006/01/23 13:09:47 danielk1977 Exp $
|
||||
|
||||
proc skip {args} {}
|
||||
|
||||
@@ -250,7 +250,10 @@ do_ioerr_test shared_ioerr-3 -tclprep {
|
||||
|
||||
} -tclbody {
|
||||
execsql {
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES('201.201.201.201.201', NULL);
|
||||
UPDATE t1 SET a = '202.202.202.202.202' WHERE a LIKE '201%';
|
||||
COMMIT;
|
||||
}
|
||||
} -cleanup {
|
||||
do_test shared_ioerr-3.$n.cleanup.1 {
|
||||
|
||||
Reference in New Issue
Block a user