From 2c141deef33016fb873f2b822ec1850b227f42f9 Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Sat, 2 Apr 2011 21:58:09 +0200 Subject: [PATCH] Execute the Index creation for mysql in bvfs.c --- bacula/src/cats/bvfs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bacula/src/cats/bvfs.c b/bacula/src/cats/bvfs.c index 1ad60ff659..56d94c3663 100644 --- a/bacula/src/cats/bvfs.c +++ b/bacula/src/cats/bvfs.c @@ -974,6 +974,11 @@ bool Bvfs::compute_restore_list(char *fileid, char *dirid, char *hardlink, if (db_get_type_index(db) == SQL_TYPE_MYSQL) { Mmsg(query, "CREATE INDEX idx_%s ON b2%s (JobId)", output_table, output_table); + Dmsg1(dbglevel_sql, "q=%s\n", query.c_str()); + if (!db_sql_query(db, query.c_str(), NULL, NULL)) { + Dmsg0(dbglevel, "Can't execute q\n"); + goto bail_out; + } } ret = true; -- 2.39.5