From: Marco van Wieringen Date: Sat, 2 Apr 2011 19:58:09 +0000 (+0200) Subject: Execute the Index creation for mysql in bvfs.c X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=641ea853aff271d3e4d538520cd9971dd620c79a;p=bacula%2Fbacula Execute the Index creation for mysql in bvfs.c --- 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;