| OLD | NEW |
| (Empty) | |
| 1 #!/bin/sh |
| 2 |
| 3 ./build/sqlite3 build/my.db <<EOF |
| 4 DROP TABLE IF EXISTS leaf; |
| 5 DROP TABLE IF EXISTS interior; |
| 6 DROP TABLE IF EXISTS interior2; |
| 7 EOF |
| 8 |
| 9 # A small leaf-only table. |
| 10 cat >afile <<EOF |
| 11 This is a small file. |
| 12 Just a couple lines. |
| 13 Ending soon. |
| 14 EOF |
| 15 ls afile | xargs ./interior.pl --table=leaf | ./build/sqlite3 build/my.db |
| 16 rm afile |
| 17 |
| 18 # Table with enough items to create an interior node. |
| 19 ls src/corrupt.c | xargs ./interior.pl --table=interior | ./build/sqlite3 build/
my.db |
| 20 |
| 21 # Table with enough items to create multiple levels of interior node. |
| 22 find src -name "*.[hc]" | xargs ./interior.pl --table=interior2 | ./build/sqlite
3 build/my.db |
| 23 |
| 24 ./build/sqlite3 build/my.db <<EOF |
| 25 .schema leaf |
| 26 SELECT "row:", COUNT(*) FROM leaf; |
| 27 .schema interior |
| 28 SELECT "rows:", COUNT(*) FROM interior; |
| 29 .schema interior2 |
| 30 SELECT "rows:", COUNT(*) FROM interior2; |
| 31 EOF |
| OLD | NEW |