Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: third_party/sqlite/src/create_tables

Issue 9144001: The complete work-in-progress SQLite recover virtual table. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sigh, forgot to specify baseline. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/Makefile.linux-gcc ('k') | third_party/sqlite/src/interior.pl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « third_party/sqlite/src/Makefile.linux-gcc ('k') | third_party/sqlite/src/interior.pl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698