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

2016-12-29 Thread Phil Stracchino
On 12/29/16 13:25, asari wrote: > It looks like you are using relatively new MySQL server which has stricter > policies. > > http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-changes > > My workaround was to dump, sed and restore from backup, i.e.: > > $ sed -e 's/-00-00 00:00:00

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

2016-12-29 Thread asari
It looks like you are using relatively new MySQL server which has stricter policies. http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-changes My workaround was to dump, sed and restore from backup, i.e.: $ sed -e 's/-00-00 00:00:00/1970-01-01 00:00:00/g' \ ... < /tmp/var/lib/ba

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

2016-10-04 Thread Phil Stracchino
On 10/03/16 17:23, Kern Sibbald wrote: > Gee, and I thought that Bacula is too overwhelming (complicated) with > too many directives! :-) > > Thanks for the explanation. A lot of what's going on here is that since Oracle took over MySQL when they bought out Sun, they have been doing huge amoun

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

2016-10-03 Thread Daniel Heitepriem
Hello everyone, I also found out that MySQL got stricter. As a workaround to get around error messages like ERROR 1067 (42000) at line 19: Invalid default value for 'SchedTime' I have to edit my dump of the old bacula database (version 12) to adjust every 0 timestamp to a valid date before i

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

2016-10-03 Thread Kern Sibbald
Gee, and I thought that Bacula is too overwhelming (complicated) with too many directives! :-) Thanks for the explanation. Kern On 10/03/2016 05:39 PM, Phil Stracchino wrote: > On 10/03/16 10:52, Kern Sibbald wrote: >> On 10/03/2016 02:52 PM, Phil Stracchino wrote: >>> On 10/03/16 05:19, Ralph

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

2016-10-03 Thread Phil Stracchino
On 10/03/16 10:52, Kern Sibbald wrote: > On 10/03/2016 02:52 PM, Phil Stracchino wrote: >> On 10/03/16 05:19, Ralph Bolton wrote: >>> 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 b

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

2016-10-03 Thread Kern Sibbald
On 10/03/2016 02:52 PM, Phil Stracchino wrote: > On 10/03/16 05:19, Ralph Bolton wrote: >> 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 supp

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

2016-10-03 Thread Phil Stracchino
On 10/03/16 05:19, Ralph Bolton wrote: > 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 wit

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

2016-10-03 Thread Kern Sibbald
Please just remove all DEFAULT 0 from all DATETIME fields in the make_mysql_tables.in file.  This is the fix I added to 7.4.3 (I think).  Bacula sets (and has done so for a long time) the value to zero when it needs to. Bottom line -- even simpler.  Search

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

2016-10-03 Thread Ralph Bolton
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 sear

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

2016-09-30 Thread Kern Sibbald
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 schrie

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

2016-09-30 Thread Kern Sibbald
This is due to a change in MySQL.  There are various workarounds, the first one to start with is to get the latest 7.4.4 release. I thought it was fixed in 7.4.2 but maybe it was 7.4.3.  If that does not resolve the problem there are other ways to get

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

2016-09-30 Thread Daniel Heitepriem
Im not a MySQL crack but "EXPLAIN Job;" results in [...] Field | Type| Null |Key| Default| Extra | SchedTime | datetime| YES | | -00-00 00:00:00 || StartTime | datetime|

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

2016-09-30 Thread Andreas Nastke
looks to me as if this toy (mysql) finally handles invalid timestamps as erroneous. 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

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

2016-09-29 Thread Daniel Heitepriem
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