summaryrefslogtreecommitdiffstats
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-01-06 03:52:13 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-01-06 03:52:13 +0000
commit64f5d2e4e90fd817523e78c27a8ca9e758dc909d (patch)
tree684f847525f82c95870dc245169276285547407d /mandocdb.c
parentbde6b6e5fe1b391dac65511440cb88c4501b17c6 (diff)
downloadmandoc-64f5d2e4e90fd817523e78c27a8ca9e758dc909d.tar.gz
Remove the redundant "file" column from the "mlinks" table.
The contents can easily be reconstructed from sec, arch, name, form. Shrinks the database by another 3% in standard mode and 9% in -Q mode.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 2c23c586..647129a6 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1756,7 +1756,6 @@ dbindex(const struct mpage *mpage, struct mchars *mc)
for (mlink = mpage->mlinks; mlink; mlink = mlink->next) {
i = 1;
- SQL_BIND_TEXT(stmts[STMT_INSERT_LINK], i, mlink->file);
SQL_BIND_TEXT(stmts[STMT_INSERT_LINK], i, mlink->dsec);
SQL_BIND_TEXT(stmts[STMT_INSERT_LINK], i, mlink->arch);
SQL_BIND_TEXT(stmts[STMT_INSERT_LINK], i, mlink->name);
@@ -1890,7 +1889,6 @@ dbopen(int real)
");\n"
"\n"
"CREATE TABLE \"mlinks\" (\n"
- " \"file\" TEXT NOT NULL,\n"
" \"sec\" TEXT NOT NULL,\n"
" \"arch\" TEXT NOT NULL,\n"
" \"name\" TEXT NOT NULL,\n"
@@ -1923,7 +1921,7 @@ prepare_statements:
"(form) VALUES (?)";
sqlite3_prepare_v2(db, sql, -1, &stmts[STMT_INSERT_PAGE], NULL);
sql = "INSERT INTO mlinks "
- "(file,sec,arch,name,pageid) VALUES (?,?,?,?,?)";
+ "(sec,arch,name,pageid) VALUES (?,?,?,?)";
sqlite3_prepare_v2(db, sql, -1, &stmts[STMT_INSERT_LINK], NULL);
sql = "INSERT INTO keys "
"(bits,key,pageid) VALUES (?,?,?)";