From f1078daa0860727b1607f3f32862c1dafdb2ff36 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 30 Apr 2008 12:45:03 +0200 Subject: [PATCH] Create indexes. --- src/csync_journal.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/csync_journal.c b/src/csync_journal.c index 814bc78d2..5c7da88bb 100644 --- a/src/csync_journal.c +++ b/src/csync_journal.c @@ -215,7 +215,20 @@ int csync_journal_create_tables(CSYNC *ctx) { "PRIMARY KEY(phash)" ");" ); + if (result == NULL) { + return -1; + } + c_strlist_destroy(result); + result = csync_journal_query(ctx, + "CREATE INDEX metadata_phash ON metadata(phash);"); + if (result == NULL) { + return -1; + } + c_strlist_destroy(result); + + result = csync_journal_query(ctx, + "CREATE INDEX metadata_inode ON metadata(inode);"); if (result == NULL) { return -1; }