From: Michal Rakowski Date: Fri, 10 Dec 2021 14:54:03 +0000 (+0100) Subject: catalog: small MySQL tweaks for RestoreObject and Object tables X-Git-Tag: Beta-15.0.0~722 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=551417c2a08bbad8262328964c7055b6c3b10b52;p=thirdparty%2Fbacula.git catalog: small MySQL tweaks for RestoreObject and Object tables --- diff --git a/bacula/src/cats/make_mysql_tables.in b/bacula/src/cats/make_mysql_tables.in index 6c7004404..176ae7fae 100644 --- a/bacula/src/cats/make_mysql_tables.in +++ b/bacula/src/cats/make_mysql_tables.in @@ -128,7 +128,7 @@ CREATE TABLE Object JobId INTEGER UNSIGNED NOT NULL, Path BLOB NOT NULL, Filename BLOB NOT NULL, - PluginName TINYBLOB NOT NULL, + PluginName BLOB NOT NULL, ObjectCategory TINYBLOB NOT NULL, ObjectType TINYBLOB NOT NULL, @@ -200,9 +200,9 @@ CREATE TABLE File ( CREATE TABLE RestoreObject ( RestoreObjectId INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, - ObjectName BLOB NOT NULL, + ObjectName MEDIUMBLOB NOT NULL, RestoreObject LONGBLOB NOT NULL, - PluginName TINYBLOB NOT NULL, + PluginName BLOB NOT NULL, ObjectLength INTEGER DEFAULT 0, ObjectFullLength INTEGER DEFAULT 0, ObjectIndex INTEGER DEFAULT 0, diff --git a/bacula/src/cats/update_mysql_tables.in b/bacula/src/cats/update_mysql_tables.in index e29e4e011..59a292f03 100644 --- a/bacula/src/cats/update_mysql_tables.in +++ b/bacula/src/cats/update_mysql_tables.in @@ -634,6 +634,10 @@ INSERT INTO Status (JobStatus,JobStatusLong,Severity) VALUES ('q', 'Queued waiting for device',15), ('W', 'Terminated normally with warnings',25); +ALTER TABLE RestoreObject MODIFY ObjectName MEDIUMBLOB; +ALTER TABLE RestoreObject MODIFY PluginName BLOB; +ALTER TABLE Object MODIFY PluginName BLOB; + UPDATE Version SET VersionId=1025; END-OF-DATA then diff --git a/bacula/updatedb/update_mysql_tables_1024_to_1025.in b/bacula/updatedb/update_mysql_tables_1024_to_1025.in index f5eb53d7f..293f68106 100644 --- a/bacula/updatedb/update_mysql_tables_1024_to_1025.in +++ b/bacula/updatedb/update_mysql_tables_1024_to_1025.in @@ -97,6 +97,10 @@ INSERT INTO Status (JobStatus,JobStatusLong,Severity) VALUES ('q', 'Queued waiting for device',15), ('W', 'Terminated normally with warnings',25); +ALTER TABLE RestoreObject MODIFY ObjectName MEDIUMBLOB; +ALTER TABLE RestoreObject MODIFY PluginName BLOB; +ALTER TABLE Object MODIFY PluginName BLOB; + UPDATE Version SET VersionId=1025; END-OF-DATA then