]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/sql_cmds.c
Tweak some comments and formatting.
[bacula/bacula] / bacula / src / cats / sql_cmds.c
index 3c91aa449c4431871b8b4d0d1aa50e217973e6d2..9a21b28ee759cf168634390d140ae5077883858d 100644 (file)
 
 #include "bacula.h"
 
+const char *get_restore_objects = 
+   "SELECT JobId,ObjectLength,ObjectFullLength,ObjectIndex,"
+           "ObjectType,ObjectCompression,FileIndex,ObjectName,"
+           "RestoreObject,PluginName "
+    "FROM RestoreObject "
+   "WHERE JobId IN (%s) "
+     "AND ObjectType = %d "
+   "ORDER BY ObjectIndex ASC";
+
 const char *cleanup_created_job =
    "UPDATE Job SET JobStatus='f', StartTime=SchedTime, EndTime=SchedTime "
    "WHERE JobStatus = 'C'";
@@ -249,7 +258,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 
@@ -995,13 +1004,13 @@ const char *batch_fill_filename_query[] = {
 
 const char *match_query[] = {
    /* Mysql */
-   "MATCH",
+   "REGEXP",
 
    /* Postgresql */
    "~",
 
    /* SQLite3 */
-   "MATCH",
+   "LIKE",                      /* MATCH doesn't seems to work anymore... */
 
    /* Ingres */
    "~"