* Version $Id$
*/
/*
- Copyright (C) 2002-2005 Kern Sibbald
+ Copyright (C) 2002-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
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_MAC = "DELETE FROM MAC 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 JobId FROM JobMedia WHERE MediaId=%s";
/* List of SQL commands to create temp table and indicies */
const char *create_deltabs[] = {
- "CREATE TABLE DelCandidates ("
+ "CREATE TEMPORARY TABLE DelCandidates ("
#ifdef HAVE_MYSQL
"JobId INTEGER UNSIGNED NOT NULL, "
"PurgedFiles TINYINT, "
const char *uar_del_temp1 = "DROP TABLE temp1";
const char *uar_create_temp =
- "CREATE TABLE temp ("
+ "CREATE TEMPORARY TABLE temp ("
#ifdef HAVE_POSTGRESQL
"JobId INTEGER NOT NULL,"
"JobTDate BIGINT,"
#endif
const char *uar_create_temp1 =
- "CREATE TABLE temp1 ("
+ "CREATE TEMPORARY TABLE temp1 ("
#ifdef HAVE_POSTGRESQL
"JobId INTEGER NOT NULL,"
"JobTDate BIGINT)";
"GROUP BY File.FileIndex ";
#endif
+/* 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";