summaryrefslogtreecommitdiffstats
path: root/mptest/crash02.subtest
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:28:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 17:28:19 +0000
commit18657a960e125336f704ea058e25c27bd3900dcb (patch)
tree17b438b680ed45a996d7b59951e6aa34023783f2 /mptest/crash02.subtest
parentInitial commit. (diff)
downloadsqlite3-18657a960e125336f704ea058e25c27bd3900dcb.tar.xz
sqlite3-18657a960e125336f704ea058e25c27bd3900dcb.zip
Adding upstream version 3.40.1.upstream/3.40.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mptest/crash02.subtest')
-rw-r--r--mptest/crash02.subtest53
1 files changed, 53 insertions, 0 deletions
diff --git a/mptest/crash02.subtest b/mptest/crash02.subtest
new file mode 100644
index 0000000..86f64dd
--- /dev/null
+++ b/mptest/crash02.subtest
@@ -0,0 +1,53 @@
+/*
+** This script is called from crash01.test and config02.test and perhaps other
+** script. After the database file has been set up, make a big rollback
+** journal in client 1, then crash client 1.
+** Then in the other clients, do an integrity check.
+*/
+--task 1 leave-hot-journal
+ --sleep 5
+ --finish
+ PRAGMA cache_size=10;
+ BEGIN;
+ UPDATE t1 SET b=randomblob(20000);
+ UPDATE t2 SET b=randomblob(20000);
+ UPDATE t3 SET b=randomblob(20000);
+ UPDATE t4 SET b=randomblob(20000);
+ UPDATE t5 SET b=randomblob(20000);
+ UPDATE t1 SET b=NULL;
+ UPDATE t2 SET b=NULL;
+ UPDATE t3 SET b=NULL;
+ UPDATE t4 SET b=NULL;
+ UPDATE t5 SET b=NULL;
+ --print Task one crashing an incomplete transaction
+ --exit 1
+--end
+--task 2 integrity_check-2
+ SELECT count(*) FROM t1;
+ --match 64
+ --sleep 100
+ PRAGMA integrity_check(10);
+ --match ok
+--end
+--task 3 integrity_check-3
+ SELECT count(*) FROM t1;
+ --match 64
+ --sleep 100
+ PRAGMA integrity_check(10);
+ --match ok
+--end
+--task 4 integrity_check-4
+ SELECT count(*) FROM t1;
+ --match 64
+ --sleep 100
+ PRAGMA integrity_check(10);
+ --match ok
+--end
+--task 5 integrity_check-5
+ SELECT count(*) FROM t1;
+ --match 64
+ --sleep 100
+ PRAGMA integrity_check(10);
+ --match ok
+--end
+--wait all