From 5423f4477a4c0724a2e5a56517662d9c31267634 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 26 Jan 2009 13:23:09 +0000 Subject: [PATCH] ebl Patch for next beta with catalog modifications git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8402 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/patches/testing/next-beta.patch | 328 +++++++++++++++++++++++++ 1 file changed, 328 insertions(+) create mode 100644 bacula/patches/testing/next-beta.patch diff --git a/bacula/patches/testing/next-beta.patch b/bacula/patches/testing/next-beta.patch new file mode 100644 index 0000000000..2920ff96f2 --- /dev/null +++ b/bacula/patches/testing/next-beta.patch @@ -0,0 +1,328 @@ +Index: src/dird/job.c +=================================================================== +--- src/dird/job.c (révision 8396) ++++ src/dird/job.c (copie de travail) +@@ -860,6 +860,7 @@ + jcr->jr.JobStatus = jcr->JobStatus; + jcr->jr.JobFiles = jcr->JobFiles; + jcr->jr.JobBytes = jcr->JobBytes; ++ jcr->jr.ReadBytes = jcr->ReadBytes; + jcr->jr.VolSessionId = jcr->VolSessionId; + jcr->jr.VolSessionTime = jcr->VolSessionTime; + jcr->jr.JobErrors = jcr->Errors; +Index: src/cats/sql_update.c +=================================================================== +--- src/cats/sql_update.c (révision 8396) ++++ src/cats/sql_update.c (copie de travail) +@@ -161,7 +161,7 @@ + time_t ttime; + struct tm tm; + int stat; +- char ed1[30], ed2[30], ed3[50]; ++ char ed1[30], ed2[30], ed3[50], ed4[50]; + btime_t JobTDate; + char PriorJobId[50]; + +@@ -187,10 +187,11 @@ + db_lock(mdb); + Mmsg(mdb->cmd, + "UPDATE Job SET JobStatus='%c',EndTime='%s'," +-"ClientId=%u,JobBytes=%s,JobFiles=%u,JobErrors=%u,VolSessionId=%u," ++"ClientId=%u,JobBytes=%s,ReadBytes=%s,JobFiles=%u,JobErrors=%u,VolSessionId=%u," + "VolSessionTime=%u,PoolId=%u,FileSetId=%u,JobTDate=%s," + "RealEndTime='%s',PriorJobId=%s WHERE JobId=%s", + (char)(jr->JobStatus), dt, jr->ClientId, edit_uint64(jr->JobBytes, ed1), ++ edit_uint64(jr->ReadBytes, ed4), + jr->JobFiles, jr->JobErrors, jr->VolSessionId, jr->VolSessionTime, + jr->PoolId, jr->FileSetId, edit_uint64(JobTDate, ed2), + rdt, +Index: src/cats/update_postgresql_tables.in +=================================================================== +--- src/cats/update_postgresql_tables.in (révision 8396) ++++ src/cats/update_postgresql_tables.in (copie de travail) +@@ -12,10 +12,15 @@ + if $bindir/psql -f - -d ${db_name} $* <cmd, "SELECT VolSessionId,VolSessionTime," + "PoolId,StartTime,EndTime,JobFiles,JobBytes,JobTDate,Job,JobStatus," + "Type,Level,ClientId,Name,PriorJobId,RealEndTime,JobId,FileSetId," +-"SchedTime,RealEndTime " ++"SchedTime,RealEndTime,ReadBytes " + "FROM Job WHERE Job='%s'", jr->Job); + } else { + Mmsg(mdb->cmd, "SELECT VolSessionId,VolSessionTime," + "PoolId,StartTime,EndTime,JobFiles,JobBytes,JobTDate,Job,JobStatus," + "Type,Level,ClientId,Name,PriorJobId,RealEndTime,JobId,FileSetId," +-"SchedTime,RealEndTime " ++"SchedTime,RealEndTime,ReadBytes " + "FROM Job WHERE JobId=%s", + edit_int64(jr->JobId, ed1)); + } +@@ -341,6 +341,7 @@ + jr->FileSetId = str_to_int64(row[17]); + bstrncpy(jr->cSchedTime, row[3]!=NULL?row[18]:"", sizeof(jr->cSchedTime)); + bstrncpy(jr->cRealEndTime, row[3]!=NULL?row[19]:"", sizeof(jr->cRealEndTime)); ++ jr->ReadBytes = str_to_int64(row[20]); + jr->StartTime = str_to_utime(jr->cStartTime); + jr->SchedTime = str_to_utime(jr->cSchedTime); + jr->EndTime = str_to_utime(jr->cEndTime); +Index: src/cats/make_mysql_tables.in +=================================================================== +--- src/cats/make_mysql_tables.in (révision 8396) ++++ src/cats/make_mysql_tables.in (copie de travail) +@@ -29,7 +29,7 @@ + + + CREATE TABLE File ( +- FileId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, ++ FileId BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, + FileIndex INTEGER UNSIGNED DEFAULT 0, + JobId INTEGER UNSIGNED NOT NULL REFERENCES Job, + PathId INTEGER UNSIGNED NOT NULL REFERENCES Path, +@@ -104,6 +104,7 @@ + VolSessionTime INTEGER UNSIGNED DEFAULT 0, + JobFiles INTEGER UNSIGNED DEFAULT 0, + JobBytes BIGINT UNSIGNED DEFAULT 0, ++ ReadBytes BIGINT UNSIGNED DEFAULT 0, + JobErrors INTEGER UNSIGNED DEFAULT 0, + JobMissingFiles INTEGER UNSIGNED DEFAULT 0, + PoolId INTEGER UNSIGNED DEFAULT 0 REFERENCES Pool, +@@ -269,7 +270,7 @@ + BaseId INTEGER UNSIGNED AUTO_INCREMENT, + BaseJobId INTEGER UNSIGNED NOT NULL REFERENCES Job, + JobId INTEGER UNSIGNED NOT NULL REFERENCES Job, +- FileId INTEGER UNSIGNED NOT NULL REFERENCES File, ++ FileId BIGINT UNSIGNED NOT NULL REFERENCES File, + FileIndex INTEGER UNSIGNED, + PRIMARY KEY(BaseId) + ); -- 2.39.5