Bacula-users

Re: [Bacula-users] 'Incorrect datetime value' after database update from 12 to 15

2016-09-30 08:32:11
Subject: Re: [Bacula-users] 'Incorrect datetime value' after database update from 12 to 15
From: Kern Sibbald <kern AT sibbald DOT com>
To: Andreas Nastke <nastke AT gdp-group DOT com>, Daniel Heitepriem <daniel.heitepriem AT pribas DOT com>
Date: Fri, 30 Sep 2016 14:31:22 +0200
On 09/30/2016 10:49 AM, Andreas Nastke wrote:
> looks to me as if this toy (mysql) finally handles invalid
> timestamps as erroneous.

Yes, MySQL now treats 0 timestamps as erroneous, which is rather simple 
minded, since 0 is a perfectly valid Unix timestamp value.
>
>
>
> Daniel Heitepriem schrieb:
>> Hi guys,
>>
>> any thoughts on this ?
>>
>> Thanks and regards,
>> Daniel Heitepriem
>>
>> Am 20.09.16 um 12:01 schrieb Daniel Heitepriem:
>>
>>     Hello everyone,
>>
>>     I updated my old bacula database from version 12 (Bacula version 5.0.0)
>>     to version 15 (Bacula version 7.4.2) which went more or less without
>>     errors (see below):
>>
>>     bacula@...:~/etc$ ./update_mysql_tables -u bacula -p
>>
>>     This script will update a Bacula MySQL database from version 12-14 to 15
>>
>>     Depending on the current version of your catalog,
>>     you may have to run this script multiple times.
>>
>>     Enter password:
>>     Enter password:
>>     ERROR 1067 (42000) at line 19: Invalid default value for 'SchedTime'
>>     Update of Bacula MySQL tables from 12 to 13 succeeded.
>>     Enter password:
>>     Enter password:
>>
>>     Update of Bacula MySQL tables from 13 to 14 succeeded.
>>     Enter password:
>>     Enter password:
>>     ERROR 1067 (42000) at line 5: Invalid default value for 'FirstWritten'
>>     ERROR 1067 (42000) at line 6: Invalid default value for 'FirstWritten'
>>     ERROR 1067 (42000) at line 7: Invalid default value for 'FirstWritten'
>>     ERROR 1067 (42000) at line 8: Invalid default value for 'FirstWritten'
>>     ERROR 1067 (42000) at line 9: Invalid default value for 'FirstWritten'
>>     ERROR 1067 (42000) at line 29: Invalid default value for 'SchedTime'
>>     Update of Bacula MySQL tables from 14 to 15 succeeded.
>>     Enter password:
>>     bacula@...:~/etc$
>>
>>     After that I tried to restore a file which gave me this error in
>> bconsole:
>>     20-Sep 13:13 backup-host-dir JobId 0: Fatal error: sql_create.c:86
>>     Create DB Job record INSERT INTO Job
>>     (Job,Name,Type,Level,JobStatus,SchedTime,JobTDate,ClientId,Comment)
>>     VALUES
>>     
>> ('RestoreFiles.2016-09-20_13.13.49_03','RestoreFiles','R','F','C','2016-09-20
>>
>>     13:13:43',1474370023,128,'') failed. ERR=Incorrect datetime value:
>>     '0000-00-00 00:00:00' for column 'StartTime' at row 1
>>
>>     How can I fix this?
>>     Thanks you very much.
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> ------------------------------------------------------------------------------
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Bacula-users mailing list
>> Bacula-users AT lists.sourceforge DOT net
>> https://lists.sourceforge.net/lists/listinfo/bacula-users



------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users