mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Add some tests to e_expr.test and pagerfault.test. No code changes.
FossilOrigin-Name: 44de3cab9c89eb28485c0dc36d791b1c61d56b34
This commit is contained in:
@ -1196,5 +1196,41 @@ do_faultsim_test pagerfault-26 -prep {
|
||||
}
|
||||
}
|
||||
|
||||
do_test pagerfault-27-pre {
|
||||
faultsim_delete_and_reopen
|
||||
db func a_string a_string
|
||||
execsql {
|
||||
PRAGMA page_size = 1024;
|
||||
CREATE TABLE t1(a, b);
|
||||
CREATE TABLE t2(a UNIQUE, b UNIQUE);
|
||||
INSERT INTO t2 VALUES( a_string(800), a_string(800) );
|
||||
INSERT INTO t2 SELECT a_string(800), a_string(800) FROM t2;
|
||||
INSERT INTO t2 SELECT a_string(800), a_string(800) FROM t2;
|
||||
INSERT INTO t2 SELECT a_string(800), a_string(800) FROM t2;
|
||||
INSERT INTO t2 SELECT a_string(800), a_string(800) FROM t2;
|
||||
INSERT INTO t2 SELECT a_string(800), a_string(800) FROM t2;
|
||||
INSERT INTO t2 SELECT a_string(800), a_string(800) FROM t2;
|
||||
INSERT INTO t1 VALUES (a_string(20000), a_string(20000));
|
||||
}
|
||||
faultsim_save_and_close
|
||||
} {}
|
||||
do_faultsim_test pagerfault-27 -faults ioerr-persistent -prep {
|
||||
faultsim_restore_and_reopen
|
||||
db func a_string a_string
|
||||
execsql {
|
||||
PRAGMA cache_size = 10;
|
||||
BEGIN EXCLUSIVE;
|
||||
}
|
||||
set ::channel [db incrblob t1 a 1]
|
||||
} -body {
|
||||
puts $::channel [string repeat abc 6000]
|
||||
flush $::channel
|
||||
} -test {
|
||||
puts [catchsql { UPDATE t2 SET a = a_string(800), b = a_string(800) }]
|
||||
catch { close $::channel }
|
||||
puts [catchsql { ROLLBACK }]
|
||||
faultsim_integrity_check
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
|
Reference in New Issue
Block a user