diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-01-05 04:13:52 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-01-05 04:13:52 +0000 |
commit | 63d5c3e9200eefafcbced98f070c84e0ae4a4c0e (patch) | |
tree | 804c421031c50f3cdecb83d15f11e5c32cc2d997 /mandocdb.c | |
parent | 608a6c89c9426ab56ed7aed08e536320749c0734 (diff) | |
download | mandoc-63d5c3e9200eefafcbced98f070c84e0ae4a4c0e.tar.gz |
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.c | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -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 (?,?,?,?,?)"; |