aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-01-05 04:13:52 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-01-05 04:13:52 +0000
commitb35727d655f29415823be44ca497ad971e401519 (patch)
treef31f4090c3f9712497ee5aae273f1c6b8efeed59 /mandocdb.c
parent42b944defba9613b4887c77042d426c2b784fac3 (diff)
downloadmandoc-b35727d655f29415823be44ca497ad971e401519.tar.gz
mandoc-b35727d655f29415823be44ca497ad971e401519.tar.zst
mandoc-b35727d655f29415823be44ca497ad971e401519.zip
Remove the obsolete file name column from the mpages table.
This column wasn't helpful because one manpage can have multiple MLINKS. Use the file name column in the mlinks table, instead.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 32aac2f6..6e5d991b 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.99 2014/01/05 03:25:51 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.100 2014/01/05 04:13:52 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -1818,12 +1818,6 @@ dbindex(const struct mpage *mpage, struct mchars *mc)
SQL_EXEC("BEGIN TRANSACTION");
i = 1;
- /*
- * XXX The following line is obsolete
- * and only kept for backward compatibility
- * until apropos(1) and friends have caught up.
- */
- SQL_BIND_TEXT(stmts[STMT_INSERT_PAGE], i, mpage->mlinks->file);
SQL_BIND_TEXT(stmts[STMT_INSERT_PAGE], i, desc);
SQL_BIND_INT(stmts[STMT_INSERT_PAGE], i, FORM_SRC == mpage->form);
SQL_STEP(stmts[STMT_INSERT_PAGE]);
@@ -1960,13 +1954,7 @@ dbopen(int real)
return(0);
}
- /*
- * XXX The first column in table mpages is obsolete
- * and only kept for backward compatibility
- * until apropos(1) and friends have caught up.
- */
sql = "CREATE TABLE \"mpages\" (\n"
- " \"file\" TEXT NOT NULL,\n"
" \"desc\" TEXT NOT NULL,\n"
" \"form\" INTEGER NOT NULL,\n"
" \"id\" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL\n"
@@ -2003,7 +1991,7 @@ prepare_statements:
sql = "DELETE FROM mpages where file=?";
sqlite3_prepare_v2(db, sql, -1, &stmts[STMT_DELETE_PAGE], NULL);
sql = "INSERT INTO mpages "
- "(file,desc,form) VALUES (?,?,?)";
+ "(desc,form) VALUES (?,?)";
sqlite3_prepare_v2(db, sql, -1, &stmts[STMT_INSERT_PAGE], NULL);
sql = "INSERT INTO mlinks "
"(file,sec,arch,name,pageid) VALUES (?,?,?,?,?)";