]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix bug #1946 Fix problem with MySQL with big Base jobs.
authorMarco van Wieringen <mvw@planets.elm.net>
Tue, 6 Nov 2012 13:29:19 +0000 (14:29 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:51:02 +0000 (14:51 +0200)
This patch adds an index on the temporary table "basefilesXXX",
where XXX is the JobId. This index reduce heavily the time for full
backups with big BaseJobs with bacula 5.2 and MySQL backend.

bacula/src/cats/sql_cmds.c

index 65354d6a7fa8645cc72a0585291af2ddf261d18d..6ebcb6280b43f6411ca1d9850d1b497b432bcee0 100644 (file)
@@ -465,7 +465,8 @@ const char *create_temp_basefile[] = {
    /* Mysql */
    "CREATE TEMPORARY TABLE basefile%lld ("
    "Path BLOB NOT NULL,"
-   "Name BLOB NOT NULL)",
+   "Name BLOB NOT NULL,"
+   "INDEX (Path(255), Name(255)))",
 
    /* Postgresql */
    "CREATE TEMPORARY TABLE basefile%lld ("