From: Eric Bollengier Date: Mon, 20 Oct 2008 18:36:50 +0000 (+0000) Subject: ebl Rename JobStat to JobHistory X-Git-Tag: Release-3.0.0~751 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9782dc1e041f6b5c829c2894f58af1ccca900756;p=bacula%2Fbacula ebl Rename JobStat to JobHistory git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7847 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/cats/drop_mysql_tables.in b/bacula/src/cats/drop_mysql_tables.in index 4e543ea379..d9918940cb 100644 --- a/bacula/src/cats/drop_mysql_tables.in +++ b/bacula/src/cats/drop_mysql_tables.in @@ -16,7 +16,7 @@ DROP TABLE IF EXISTS MediaType; DROP TABLE IF EXISTS File; DROP TABLE IF EXISTS Client; DROP TABLE IF EXISTS Job; -DROP TABLE IF EXISTS JobStat; +DROP TABLE IF EXISTS JobHistory; DROP TABLE IF EXISTS Media; DROP TABLE IF EXISTS JobMedia; DROP TABLE IF EXISTS Pool; diff --git a/bacula/src/cats/drop_postgresql_tables.in b/bacula/src/cats/drop_postgresql_tables.in index 7bc4acfc42..bcbd1fdd18 100644 --- a/bacula/src/cats/drop_postgresql_tables.in +++ b/bacula/src/cats/drop_postgresql_tables.in @@ -11,7 +11,7 @@ drop table basefiles; drop table jobmedia; drop table file; drop table job; -drop table jobstat; +drop table jobhistory; drop table media; drop table client; drop table pool; diff --git a/bacula/src/cats/grant_postgresql_privileges.in b/bacula/src/cats/grant_postgresql_privileges.in index c3d6e106c8..e441ec3c64 100644 --- a/bacula/src/cats/grant_postgresql_privileges.in +++ b/bacula/src/cats/grant_postgresql_privileges.in @@ -32,7 +32,7 @@ grant all on status to ${db_user}; grant all on location to ${db_user}; grant all on locationlog to ${db_user}; grant all on log to ${db_user}; -grant all on jobstat to ${db_user}; +grant all on jobhistory to ${db_user}; -- for sequences on those tables diff --git a/bacula/src/cats/make_mysql_tables.in b/bacula/src/cats/make_mysql_tables.in index e8245c4a0a..6535ae3124 100644 --- a/bacula/src/cats/make_mysql_tables.in +++ b/bacula/src/cats/make_mysql_tables.in @@ -116,7 +116,7 @@ CREATE TABLE Job ( ); -- Create a table like Job for long term statistics -CREATE TABLE JobStat (LIKE Job); +CREATE TABLE JobHistory (LIKE Job); CREATE TABLE Location ( LocationId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, diff --git a/bacula/src/cats/make_postgresql_tables.in b/bacula/src/cats/make_postgresql_tables.in index 9e1518e767..45502175a4 100644 --- a/bacula/src/cats/make_postgresql_tables.in +++ b/bacula/src/cats/make_postgresql_tables.in @@ -82,7 +82,7 @@ CREATE TABLE job CREATE INDEX job_name_idx on job (name); -- Create a table like Job for long term statistics -CREATE TABLE jobstat (LIKE job); +CREATE TABLE JobHistory (LIKE Job); CREATE TABLE Location ( LocationId serial not null, diff --git a/bacula/src/cats/make_sqlite3_tables.in b/bacula/src/cats/make_sqlite3_tables.in index 0a1b75e5b1..3620fe8caa 100644 --- a/bacula/src/cats/make_sqlite3_tables.in +++ b/bacula/src/cats/make_sqlite3_tables.in @@ -76,7 +76,7 @@ CREATE TABLE Job ( CREATE INDEX inx6 ON Job (Name); -- Create a table like Job for long term statistics -CREATE TABLE JobStat ( +CREATE TABLE JobHistory ( JobId INTEGER, Job VARCHAR(128) NOT NULL, Name VARCHAR(128) NOT NULL, @@ -102,7 +102,7 @@ CREATE TABLE JobStat ( HasBase TINYINT DEFAULT 0, PRIMARY KEY(JobId) ); -CREATE INDEX inx61 ON JobStat (Name); +CREATE INDEX inx61 ON JobHistory (Name); CREATE TABLE Location ( LocationId INTEGER, diff --git a/bacula/src/cats/make_sqlite_tables.in b/bacula/src/cats/make_sqlite_tables.in index 77ba61b32f..0aece75e9f 100644 --- a/bacula/src/cats/make_sqlite_tables.in +++ b/bacula/src/cats/make_sqlite_tables.in @@ -76,7 +76,7 @@ CREATE TABLE Job ( CREATE INDEX inx6 ON Job (Name); -- Create a table like Job for long term statistics -CREATE TABLE JobStat ( +CREATE TABLE JobHistory ( JobId INTEGER, Job VARCHAR(128) NOT NULL, Name VARCHAR(128) NOT NULL, @@ -102,7 +102,7 @@ CREATE TABLE JobStat ( HasBase TINYINT DEFAULT 0, PRIMARY KEY(JobId) ); -CREATE INDEX inx61 ON JobStat (Name); +CREATE INDEX inx61 ON JobHistory (Name); CREATE TABLE Location ( LocationId INTEGER, diff --git a/bacula/src/cats/sql_update.c b/bacula/src/cats/sql_update.c index 0e0c8545bf..521a9cc8ad 100644 --- a/bacula/src/cats/sql_update.c +++ b/bacula/src/cats/sql_update.c @@ -137,11 +137,11 @@ db_update_stats(JCR *jcr, B_DB *mdb, utime_t age) edit_uint64(now - age, ed1); Mmsg(mdb->cmd, - "INSERT INTO JobStat " + "INSERT INTO JobHistory " "SELECT * " "FROM Job " "WHERE JobStatus IN ('T', 'f', 'A', 'E') " - "AND JobId NOT IN (SELECT JobId FROM JobStat) " + "AND JobId NOT IN (SELECT JobId FROM JobHistory) " "AND JobTDate < %s ", ed1); QUERY_DB(jcr, mdb, mdb->cmd); /* TODO: get a message ? */ return sql_affected_rows(mdb); diff --git a/bacula/src/cats/update_mysql_tables.in b/bacula/src/cats/update_mysql_tables.in index d262f24f4f..a66dc9c1fa 100644 --- a/bacula/src/cats/update_mysql_tables.in +++ b/bacula/src/cats/update_mysql_tables.in @@ -13,7 +13,7 @@ if $bindir/mysql $* -f <db); - Mmsg(query, "DELETE FROM JobStat WHERE JobTDate < %s", + Mmsg(query, "DELETE FROM JobHistory WHERE JobTDate < %s", edit_uint64(now - retention, ed1)); db_sql_query(ua->db, query.c_str(), NULL, NULL); db_unlock(ua->db); - ua->info_msg(_("Pruned Jobs from JobStat catalog.\n")); + ua->info_msg(_("Pruned Jobs from JobHistory catalog.\n")); return true; } diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 70856b2527..1ba26b6e8d 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -50,6 +50,8 @@ libtool on the configure command line with: General: +20Oct08 +ebl Rename JobStat table to JobHistory 19Oct08 kes Add Makefile dependency when using LIBTOOL_LINK so that any change in ./configure options will be accounted for.