[yum-commits] db.c
James Antill
james at osuosl.org
Mon Nov 2 18:46:13 UTC 2009
db.c | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 70c1a1a4946e6f6c1af379cfec635da23105d77f
Author: James Antill <james at and.org>
Date: Mon Nov 2 12:26:14 2009 -0500
Add an index on files.pkgKey ... needed for .simpleFiles() to not suck
diff --git a/db.c b/db.c
index a1e4fe8..4d49595 100644
--- a/db.c
+++ b/db.c
@@ -455,6 +455,15 @@ yum_db_index_primary_tables (sqlite3 *db, GError **err)
return;
}
+ sql = "CREATE INDEX IF NOT EXISTS pkgfiles ON files (pkgKey)";
+ rc = sqlite3_exec (db, sql, NULL, NULL, NULL);
+ if (rc != SQLITE_OK) {
+ g_set_error (err, YUM_DB_ERROR, YUM_DB_ERROR,
+ "Can not create index on files table: %s",
+ sqlite3_errmsg (db));
+ return;
+ }
+
const char *deps[] = { "requires", "provides", "conflicts", "obsoletes", NULL };
int i;
More information about the Yum-commits
mailing list