]> git.sur5r.net Git - bacula/bacula/commitdiff
Execute the Index creation for mysql in bvfs.c
authorMarco van Wieringen <mvw@planets.elm.net>
Sat, 2 Apr 2011 19:58:09 +0000 (21:58 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:44:32 +0000 (14:44 +0200)
bacula/src/cats/bvfs.c

index 1ad60ff65946bd63161e3bc2eec5aadb462de321..56d94c3663f5022e19ee729ce5550acea78350b3 100644 (file)
@@ -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;