On 08/02/18 17:19, Tilman Schmidt wrote: > Alright, here's the details I promised: > > openSUSE Leap 42.3 > mysql-community-server 5.6.40-36.1 > Bacula 9.0.8-1.1 from extra repo obs://build.opensuse.org/home:cristyde > > The error: > > Sending relabel command from "Oktober-2" to "Nessy" ... > 3000 OK label. VolBytes=64512 VolABytes=0 VolType=0 Volume="Nessy" > Device="LTO-2" (/dev/nst0) > sql_create.c:439 Create DB Media record INSERT INTO Media > (VolumeName,MediaType,MediaTypeId,PoolId,MaxVolBytes,VolCapacityBytes,Recycle,VolRetention,VolUseDuration,MaxVolJobs,MaxVolFiles,VolStatus,Slot,VolBytes,InChanger,VolReadTime,VolWriteTime,VolType,VolParts,VolCloudParts,LastPartBytes,EndFile,EndBlock,LabelType,StorageId,DeviceId,LocationId,ScratchPoolId,RecyclePoolId,Enabled,ActionOnPurge,CacheRetention)VALUES > ('Nessy','LTO-2',0,5,53687091200,0,1,31536000,0,0,0,'Append',0,64512,0,0,0,0,0,0,'0',0,0,0,4,0,0,0,0,1,0,0) > failed. ERR=Field 'FirstWritten' doesn't have a default value > Label command failed for Volume Nessy. > > Minimal fix:
ALTER TABLE Media MODIFY FirstWritten datetime DEFAULT NULL; You could also set it to 'DEFAULT 1970-01-01 00:00:00', which is the SQL99 canonical DEFAULT datetime, but DEFAULT NULL is Kern's change and is presumably safer (I am assuming Kern knows the code much better than I do). -- Phil Stracchino Babylon Communications ph...@caerllewys.net p...@co.ordinate.org Landline: +1.603.293.8485 Mobile: +1.603.998.6958 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users