From: Marco van Wieringen Date: Mon, 31 Jan 2011 20:56:16 +0000 (+0100) Subject: Removed old queries from sql_cmds.[ch] which are no longer referenced X-Git-Tag: Release-7.0.0~1187 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3f923ee0356b7f7afa4d48a4f0b5ff426b82119e;p=bacula%2Fbacula Removed old queries from sql_cmds.[ch] which are no longer referenced and thus polluting the namespace for no obvious reason. --- diff --git a/bacula/src/cats/sql_cmds.c b/bacula/src/cats/sql_cmds.c index 387621e4f3..1a0f80988e 100644 --- a/bacula/src/cats/sql_cmds.c +++ b/bacula/src/cats/sql_cmds.c @@ -83,36 +83,13 @@ const char *client_backups = " AND Job.FileSetId=FileSet.FileSetId" " ORDER BY Job.StartTime"; - /* ====== ua_prune.c */ -const char *del_File = "DELETE FROM File WHERE JobId=%s"; -const char *upd_Purged = "UPDATE Job Set PurgedFiles=1 WHERE JobId=%s"; -const char *cnt_DelCand = "SELECT count(*) FROM DelCandidates"; -const char *del_Job = "DELETE FROM Job WHERE JobId=%s"; -const char *del_JobMedia = "DELETE FROM JobMedia WHERE JobId=%s"; -const char *cnt_JobMedia = "SELECT count(*) FROM JobMedia WHERE MediaId=%s"; - const char *sel_JobMedia = "SELECT DISTINCT JobMedia.JobId FROM JobMedia,Job " "WHERE MediaId=%s AND Job.JobId=JobMedia.JobId " "AND Job.JobTDate<%s"; -/* Count Select JobIds for File deletion */ -const char *count_select_job = - "SELECT count(*) from Job " - "WHERE JobTDate<%s " - "AND ClientId=%s " - "AND PurgedFiles=0"; - - -/* Select JobIds for File deletion. */ -const char *select_job = - "SELECT DISTINCT JobId from Job " - "WHERE JobTDate<%s " - "AND ClientId=%s " - "AND PurgedFiles=0"; - /* Delete temp tables and indexes */ const char *drop_deltabs[] = { "DROP TABLE DelCandidates", diff --git a/bacula/src/cats/sql_cmds.h b/bacula/src/cats/sql_cmds.h index 332a3eab92..88db3d2c1b 100644 --- a/bacula/src/cats/sql_cmds.h +++ b/bacula/src/cats/sql_cmds.h @@ -31,17 +31,9 @@ extern const char CATS_IMP_EXP *client_backups; extern const char CATS_IMP_EXP *list_pool; extern const char CATS_IMP_EXP *drop_deltabs[]; extern const char CATS_IMP_EXP *create_delindex; -extern const char CATS_IMP_EXP *select_job; -extern const char CATS_IMP_EXP *count_select_job; -extern const char CATS_IMP_EXP *del_File; extern const char CATS_IMP_EXP *cnt_File; -extern const char CATS_IMP_EXP *cnt_DelCand; -extern const char CATS_IMP_EXP *del_Job; extern const char CATS_IMP_EXP *del_MAC; -extern const char CATS_IMP_EXP *del_JobMedia; -extern const char CATS_IMP_EXP *cnt_JobMedia; extern const char CATS_IMP_EXP *sel_JobMedia; -extern const char CATS_IMP_EXP *upd_Purged; extern const char CATS_IMP_EXP *cleanup_created_job; extern const char CATS_IMP_EXP *cleanup_running_job;