drh | 6adab7a | 2013-04-08 18:58:00 +0000 | [diff] [blame] | 1 | /* |
| 2 | ** This script is called from crash01.test and config02.test and perhaps other |
| 3 | ** script. After the database file has been set up, make a big rollback |
| 4 | ** journal in client 1, then crash client 1. |
| 5 | ** Then in the other clients, do an integrity check. |
| 6 | */ |
drh | 4c5298f | 2013-04-10 12:01:21 +0000 | [diff] [blame] | 7 | --task 1 leave-hot-journal |
drh | 6adab7a | 2013-04-08 18:58:00 +0000 | [diff] [blame] | 8 | --sleep 5 |
| 9 | --finish |
| 10 | PRAGMA cache_size=10; |
| 11 | BEGIN; |
| 12 | UPDATE t1 SET b=randomblob(20000); |
| 13 | UPDATE t2 SET b=randomblob(20000); |
| 14 | UPDATE t3 SET b=randomblob(20000); |
| 15 | UPDATE t4 SET b=randomblob(20000); |
| 16 | UPDATE t5 SET b=randomblob(20000); |
| 17 | UPDATE t1 SET b=NULL; |
| 18 | UPDATE t2 SET b=NULL; |
| 19 | UPDATE t3 SET b=NULL; |
| 20 | UPDATE t4 SET b=NULL; |
| 21 | UPDATE t5 SET b=NULL; |
| 22 | --print Task one crashing an incomplete transaction |
| 23 | --exit 1 |
| 24 | --end |
drh | 4c5298f | 2013-04-10 12:01:21 +0000 | [diff] [blame] | 25 | --task 2 integrity_check-2 |
drh | 6adab7a | 2013-04-08 18:58:00 +0000 | [diff] [blame] | 26 | SELECT count(*) FROM t1; |
| 27 | --match 64 |
| 28 | --sleep 100 |
drh | 7de96f7 | 2013-04-09 20:04:09 +0000 | [diff] [blame] | 29 | PRAGMA integrity_check(10); |
drh | 6adab7a | 2013-04-08 18:58:00 +0000 | [diff] [blame] | 30 | --match ok |
| 31 | --end |
drh | 4c5298f | 2013-04-10 12:01:21 +0000 | [diff] [blame] | 32 | --task 3 integrity_check-3 |
drh | 6adab7a | 2013-04-08 18:58:00 +0000 | [diff] [blame] | 33 | SELECT count(*) FROM t1; |
| 34 | --match 64 |
| 35 | --sleep 100 |
drh | 7de96f7 | 2013-04-09 20:04:09 +0000 | [diff] [blame] | 36 | PRAGMA integrity_check(10); |
drh | 6adab7a | 2013-04-08 18:58:00 +0000 | [diff] [blame] | 37 | --match ok |
| 38 | --end |
drh | 4c5298f | 2013-04-10 12:01:21 +0000 | [diff] [blame] | 39 | --task 4 integrity_check-4 |
drh | 6adab7a | 2013-04-08 18:58:00 +0000 | [diff] [blame] | 40 | SELECT count(*) FROM t1; |
| 41 | --match 64 |
| 42 | --sleep 100 |
drh | 7de96f7 | 2013-04-09 20:04:09 +0000 | [diff] [blame] | 43 | PRAGMA integrity_check(10); |
drh | 6adab7a | 2013-04-08 18:58:00 +0000 | [diff] [blame] | 44 | --match ok |
| 45 | --end |
drh | 4c5298f | 2013-04-10 12:01:21 +0000 | [diff] [blame] | 46 | --task 5 integrity_check-5 |
drh | 6adab7a | 2013-04-08 18:58:00 +0000 | [diff] [blame] | 47 | SELECT count(*) FROM t1; |
| 48 | --match 64 |
| 49 | --sleep 100 |
drh | 7de96f7 | 2013-04-09 20:04:09 +0000 | [diff] [blame] | 50 | PRAGMA integrity_check(10); |
drh | 6adab7a | 2013-04-08 18:58:00 +0000 | [diff] [blame] | 51 | --match ok |
| 52 | --end |
| 53 | --wait all |