Yeah, Oracle are making changes alright - not all
of them are good :-(
It's a relatively easy to fix, and actually, it's
probably something that should be changed in the
"make_mysql_tables" file supplied with Bacula (as it's
backwards compatible with older MySQL and MariaDBs).
The change is a search and replace for:
DATETIME DEFAULT 0,
...to...
DATETIME DEFAULT '0000-00-00 00:00:00',
(There is additionally some way of setting a few config
variables and restarting mysql to get the old behavior,
but I can't remember them off-hand)
Just by way of example, here's a "SHOW CREATE TABLE Job" on
my DB:
| Job | CREATE TABLE `Job` (
`JobId` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Job` tinyblob NOT NULL,
`Name` tinyblob NOT NULL,
`Type` binary(1) NOT NULL,
`Level` binary(1) NOT NULL,
`ClientId` int(11) DEFAULT '0',
`JobStatus` binary(1) NOT NULL,
`SchedTime` datetime DEFAULT '0000-00-00 00:00:00',
`StartTime` datetime DEFAULT '0000-00-00 00:00:00',
`EndTime` datetime DEFAULT '0000-00-00 00:00:00',
`RealEndTime` datetime DEFAULT '0000-00-00 00:00:00',
`JobTDate` bigint(20) unsigned DEFAULT '0',
`VolSessionId` int(10) unsigned DEFAULT '0',
`VolSessionTime` int(10) unsigned DEFAULT '0',
`JobFiles` int(10) unsigned DEFAULT '0',
`JobBytes` bigint(20) unsigned DEFAULT '0',
`ReadBytes` bigint(20) unsigned DEFAULT '0',
`JobErrors` int(10) unsigned DEFAULT '0',
`JobMissingFiles` int(10) unsigned DEFAULT '0',
`PoolId` int(10) unsigned DEFAULT '0',
`FileSetId` int(10) unsigned DEFAULT '0',
`PriorJobId` int(10) unsigned DEFAULT '0',
`PurgedFiles` tinyint(4) DEFAULT '0',
`HasBase` tinyint(4) DEFAULT '0',
`HasCache` tinyint(4) DEFAULT '0',
`Reviewed` tinyint(4) DEFAULT '0',
`Comment` blob,
PRIMARY KEY (`JobId`),
KEY `Name` (`Name`(128))
) ENGINE=InnoDB AUTO_INCREMENT=5076 DEFAULT CHARSET=latin1 |