>>>>> On Thu, 9 May 2024 14:45:31 -0400, Phil Stracchino said: > > I have noticed, or stumbled across, a lot of issues with column > definitions. One such is FileIndex, which is not consistently defined: > > > > MySQL epsilon3> SELECT TABLE_NAME, COLUMN_TYPE, IS_NULLABLE, > COLUMN_DEFAULT FROM information_schema.columns WHERE TABLE_SCHEMA = > 'bacula' AND column_name = 'FileIndex'; > +----------------+------------------+-------------+----------------+ > | TABLE_NAME | COLUMN_TYPE | IS_NULLABLE | COLUMN_DEFAULT | > +----------------+------------------+-------------+----------------+ > | BaseFiles | int(11) | YES | 0 | > | File | int(11) | YES | 0 | > | FileEvents | int(11) | YES | NULL | > | FileMedia | int(10) unsigned | NO | NULL | > | MetaAttachment | int(11) | YES | NULL | > | MetaEmail | int(11) | YES | NULL | > | Object | int(11) | NO | 0 | > | RestoreObject | int(11) | YES | 0 | > +----------------+------------------+-------------+----------------+ > 8 rows in set (0.005 sec) > > > It is an INT UNSIGNED NOT NULL (with no DEFAULT specified) in FileMedia, > but it is a signed INT(11) in every other table where it exists. It is > inconsistently allowed to be NULL, has a DEFAULT specified in BaseFiles > but is allowed to be NULL there, is NOT NULL DEFAULT 0 in Object but > NULL DEFAULT 0 in RestoreObject, ... > > > Is this column *SUPPOSED* to be INT UNSIGNED NOT NULL DEFAULT 0 wherever > it exists?
No, FileIndex is signed in the File table at least (-ve is used to mark deleted files in an accurate backup). __Martin _______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel