From 287c2b80ab3ceef1965ec7aab8649db8e83ad18d Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Tue, 17 Feb 2009 12:45:58 +0000 Subject: [PATCH] ebl rename JobHistory to JobHisto git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8460 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/patches/testing/next-beta.patch | 164 +++++++++++++++++++------ 1 file changed, 125 insertions(+), 39 deletions(-) diff --git a/bacula/patches/testing/next-beta.patch b/bacula/patches/testing/next-beta.patch index a659250f5c..1a92ae97ba 100644 --- a/bacula/patches/testing/next-beta.patch +++ b/bacula/patches/testing/next-beta.patch @@ -1,6 +1,24 @@ +Index: ReleaseNotes +=================================================================== +--- ReleaseNotes (révision 8456) ++++ ReleaseNotes (copie de travail) +@@ -17,10 +17,9 @@ + + This BETA release of Bacula uses a new catalog format. We provide a set of + script that permit to convert a 2.4.x (version 10) catalog to 2.5.x (version +-11). If you are using already a 2.5 version, you need to drop the JobHistory +-table before upgrading your catalog (if you are using the new "long term +-statistics" module, you can upgrade this table like with the Job table, see +-upgrade__table script). ++11). If you are using already a 2.5 version, you can drop the JobHistory ++table (if you are using the new "long term statistics" module, you can copy ++data from this table to the JobHisto, see upgrade__table script). + + The upgrade operation will convert an essential field of the File table, and + this operation will take TIME and will DOUBLE THE SIZE of your Index: src/dird/job.c =================================================================== ---- src/dird/job.c (révision 8436) +--- src/dird/job.c (révision 8456) +++ src/dird/job.c (copie de travail) @@ -860,6 +860,7 @@ jcr->jr.JobStatus = jcr->JobStatus; @@ -10,10 +28,43 @@ Index: src/dird/job.c jcr->jr.VolSessionId = jcr->VolSessionId; jcr->jr.VolSessionTime = jcr->VolSessionTime; jcr->jr.JobErrors = jcr->Errors; +Index: src/dird/ua_prune.c +=================================================================== +--- src/dird/ua_prune.c (révision 8456) ++++ src/dird/ua_prune.c (copie de travail) +@@ -194,12 +194,12 @@ + utime_t now = (utime_t)time(NULL); + + db_lock(ua->db); +- Mmsg(query, "DELETE FROM JobHistory WHERE JobTDate < %s", ++ Mmsg(query, "DELETE FROM JobHisto WHERE JobTDate < %s", + edit_int64(now - retention, ed1)); + db_sql_query(ua->db, query.c_str(), NULL, NULL); + db_unlock(ua->db); + +- ua->info_msg(_("Pruned Jobs from JobHistory catalog.\n")); ++ ua->info_msg(_("Pruned Jobs from JobHisto catalog.\n")); + + return true; + } Index: src/cats/sql_update.c =================================================================== ---- src/cats/sql_update.c (révision 8436) +--- src/cats/sql_update.c (révision 8456) +++ src/cats/sql_update.c (copie de travail) +@@ -137,11 +137,11 @@ + edit_uint64(now - age, ed1); + + Mmsg(mdb->cmd, +- "INSERT INTO JobHistory " ++ "INSERT INTO JobHisto " + "SELECT * " + "FROM Job " + "WHERE JobStatus IN ('T', 'f', 'A', 'E') " +- "AND JobId NOT IN (SELECT JobId FROM JobHistory) " ++ "AND JobId NOT IN (SELECT JobId FROM JobHisto) " + "AND JobTDate < %s ", ed1); + QUERY_DB(jcr, mdb, mdb->cmd); /* TODO: get a message ? */ + return sql_affected_rows(mdb); @@ -161,7 +161,7 @@ time_t ttime; struct tm tm; @@ -38,31 +89,31 @@ Index: src/cats/sql_update.c rdt, Index: src/cats/update_postgresql_tables.in =================================================================== ---- src/cats/update_postgresql_tables.in (révision 8436) +--- src/cats/update_postgresql_tables.in (révision 8456) +++ src/cats/update_postgresql_tables.in (copie de travail) @@ -11,13 +11,24 @@ if $bindir/psql -f - -d ${db_name} $* <cmd, "SELECT VolSessionId,VolSessionTime," @@ -540,9 +613,22 @@ Index: src/cats/sql_get.c jr->StartTime = str_to_utime(jr->cStartTime); jr->SchedTime = str_to_utime(jr->cSchedTime); jr->EndTime = str_to_utime(jr->cEndTime); +Index: src/cats/drop_mysql_tables.in +=================================================================== +--- src/cats/drop_mysql_tables.in (révision 8456) ++++ src/cats/drop_mysql_tables.in (copie de travail) +@@ -16,7 +16,7 @@ + DROP TABLE IF EXISTS File; + DROP TABLE IF EXISTS Client; + DROP TABLE IF EXISTS Job; +-DROP TABLE IF EXISTS JobHistory; ++DROP TABLE IF EXISTS JobHisto; + DROP TABLE IF EXISTS Media; + DROP TABLE IF EXISTS JobMedia; + DROP TABLE IF EXISTS Pool; Index: src/cats/make_mysql_tables.in =================================================================== ---- src/cats/make_mysql_tables.in (révision 8436) +--- src/cats/make_mysql_tables.in (révision 8456) +++ src/cats/make_mysql_tables.in (copie de travail) @@ -29,7 +29,7 @@ @@ -566,7 +652,7 @@ Index: src/cats/make_mysql_tables.in -- Create a table like Job for long term statistics -CREATE TABLE JobHistory (LIKE Job); -+CREATE TABLE JobHistory ( ++CREATE TABLE JobHisto ( + JobId INTEGER UNSIGNED NOT NULL, + Job TINYBLOB NOT NULL, + Name TINYBLOB NOT NULL, @@ -616,7 +702,7 @@ Index: src/cats/make_mysql_tables.in then Index: src/bc_types.h =================================================================== ---- src/bc_types.h (révision 8436) +--- src/bc_types.h (révision 8456) +++ src/bc_types.h (copie de travail) @@ -57,7 +57,7 @@ * In principle, the only field that really should need to be -- 2.39.5