From 6d681a546826e811b148e2e5f14b5ce36e26935f Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Fri, 16 Dec 2011 17:29:38 +0100 Subject: [PATCH] Fix #3210 about slow restore with bvfs The BSR creation procedure is expecting to have ordered FileIndex, this is now done with an extra SORT. --- bacula/src/cats/sql_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bacula/src/cats/sql_cmds.c b/bacula/src/cats/sql_cmds.c index ee7724f416..d7b93211b3 100644 --- a/bacula/src/cats/sql_cmds.c +++ b/bacula/src/cats/sql_cmds.c @@ -249,7 +249,7 @@ const char *uar_jobids_fileindex = /* Query to get list of files from table -- presuably built by an external program */ const char *uar_jobid_fileindex_from_table = - "SELECT JobId,FileIndex FROM %s"; + "SELECT JobId,FileIndex FROM %s ORDER BY JobId, FileIndex ASC"; /* Get the list of the last recent version per Delta with a given jobid list * This is a tricky part because with SQL the result of -- 2.39.2