diff options
-rw-r--r-- | mandocdb.c | 3 | ||||
-rw-r--r-- | mansearch.c | 10 |
2 files changed, 8 insertions, 5 deletions
@@ -1287,7 +1287,8 @@ names_check(void) "AND mlinks.name == names.name" ")" ") JOIN (" - "SELECT * FROM mlinks GROUP BY pageid" + "SELECT sec, arch, name, pageid FROM mlinks " + "GROUP BY pageid" ") USING (pageid);", -1, &stmt, NULL); diff --git a/mansearch.c b/mansearch.c index cbf2cec8..f7c99394 100644 --- a/mansearch.c +++ b/mansearch.c @@ -310,14 +310,15 @@ mansearch(const struct mansearch *search, sqlite3_finalize(s); c = sqlite3_prepare_v2(db, - "SELECT * FROM mlinks WHERE pageid=?" - " ORDER BY sec, arch, name", + "SELECT sec, arch, name, pageid FROM mlinks " + "WHERE pageid=? ORDER BY sec, arch, name", -1, &s, NULL); if (SQLITE_OK != c) fprintf(stderr, "%s\n", sqlite3_errmsg(db)); c = sqlite3_prepare_v2(db, - "SELECT * FROM keys WHERE pageid=? AND bits & ?", + "SELECT bits, key, pageid FROM keys " + "WHERE pageid=? AND bits & ?", -1, &s2, NULL); if (SQLITE_OK != c) fprintf(stderr, "%s\n", sqlite3_errmsg(db)); @@ -542,7 +543,8 @@ sql_statement(const struct expr *e) size_t sz; int needop; - sql = mandoc_strdup("SELECT * FROM mpages WHERE "); + sql = mandoc_strdup( + "SELECT desc, form, pageid FROM mpages WHERE "); sz = strlen(sql); for (needop = 0; NULL != e; e = e->next) { |