| Index: third_party/sqlite/src/create_tables
|
| diff --git a/third_party/sqlite/src/create_tables b/third_party/sqlite/src/create_tables
|
| new file mode 100755
|
| index 0000000000000000000000000000000000000000..800a382d992d6cdd5b46d527c3bd4ef75f2e5f2d
|
| --- /dev/null
|
| +++ b/third_party/sqlite/src/create_tables
|
| @@ -0,0 +1,31 @@
|
| +#!/bin/sh
|
| +
|
| +./build/sqlite3 build/my.db <<EOF
|
| +DROP TABLE IF EXISTS leaf;
|
| +DROP TABLE IF EXISTS interior;
|
| +DROP TABLE IF EXISTS interior2;
|
| +EOF
|
| +
|
| +# A small leaf-only table.
|
| +cat >afile <<EOF
|
| +This is a small file.
|
| +Just a couple lines.
|
| +Ending soon.
|
| +EOF
|
| +ls afile | xargs ./interior.pl --table=leaf | ./build/sqlite3 build/my.db
|
| +rm afile
|
| +
|
| +# Table with enough items to create an interior node.
|
| +ls src/corrupt.c | xargs ./interior.pl --table=interior | ./build/sqlite3 build/my.db
|
| +
|
| +# Table with enough items to create multiple levels of interior node.
|
| +find src -name "*.[hc]" | xargs ./interior.pl --table=interior2 | ./build/sqlite3 build/my.db
|
| +
|
| +./build/sqlite3 build/my.db <<EOF
|
| +.schema leaf
|
| +SELECT "row:", COUNT(*) FROM leaf;
|
| +.schema interior
|
| +SELECT "rows:", COUNT(*) FROM interior;
|
| +.schema interior2
|
| +SELECT "rows:", COUNT(*) FROM interior2;
|
| +EOF
|
|
|