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 importing it to my MySQL
database. After that the update to version 15 should be working without
any major issues.
Am 03.10.16 um 23:23 schrieb 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 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 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',
Hmm. It doesn't surprise me, but I have not run into the problem you
mention below on any of the MySQL versions that
are currently in the most popular distros. What MySQL version has that
change?
MySQL 5.6 started the stricter enforcement of fully compliant SQL DDL.
However, whether it is enforced or not depends upon a number of MySQL
settings, including SQL_MODE. In 5.5 and older MySQL releases, SQL_MODE
is empty by default, and installations that have been updated in place
will continue to have whatever SQL_MODE was set in the old
configuration, if set. If not set by the configuration files, MySQL
5.6.6 and later default to NO_ENGINE_SUBSTITUTION. MySQL 5.7.5 added
ONLY_FULL_GROUP_BY and STRICT_TRANS_TABLES to the default SQL_MODE;
MySQL 5.7.7 added NO_AUTO_CREATE_USER; MySQL 5.7.8 added
ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE. So a
clean new install of a current MySQL 5.6 release (or an updated one with
no explicitly set SQL_MODE) will use SQL_MODE = NO_ENGINE_SUBSTITUTION,
while a current MySQL 5.7 clean installation (or, again, an updated one
with no explicitly set SQL_MODE) will use NO_ENGINE_SUBSTITUTION,
NO_AUTO_CREATE_USER, ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES,
NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO.
ONLY_FULL_GROUP_BY is not part of the default SQL mode prior to 5.7.5
because versions prior to 5.7.5 do not detect functional dependency,
which is required to properly implement it. It's not really relevant
here and causes no issues with Bacula.
NO_ZERO_DATE controls whether '0000-00-00' is considered a valid date.
NO_ZERO_IN_DATE controls whether a DATETIME value is considered valid if
the YEAR is specified but either MONTH or DAY is zero. (For example,
2016-00-01 or 2016-01-00 are invalid with NO_ZERO_IN_DATE.) Both of
these and ERROR_FOR_DIVISION_BY_ZERO are oddly inconsistent in their
pattern of support. All three were deprecated in 5.7.4, then supported
in 5.7.5 through 5.7.7 but did nothing, supported in 5.7.8 and up but
only do anything in combination with STRICT, and are scheduled to be
deprecated again and removed in some future version when their
functionality is fully rolled into STRICT.
I'm currently using:
NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,STRICT_ALL_TABLES
but NO_AUTO_CREATE USER is also scheduled for future removal (and will
then be on all the time).
------------------------------------------------------------------------------
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
--
Mit freundlichen Gruessen / Best regards
Daniel Heitepriem
pribas GmbH
Valterweg 24-25
65817 Eppstein-Bremthal
Germany
Phone +49 (0) 6198 57146400
Fax +49 (0) 6198 57146433
eMail daniel.heitepr...@pribas.com
Corporate Headquarters: Huenfelden-Dauborn Managing Director: Arnulf Pribas
Registration: Amtsgericht Limburg a. d. Lahn 7HRB874 Tax ID: DE113840457
________________________________________________________________________
This e-mail is confidential. Information in this e-mail is intended for
the exclusive use of the individual or entity named above and may
constitute information that is privileged or confidential or otherwise
protected from disclosure. The information in this e-mail may be read,
published, copied and/or forwarded only by the individual or entity
named above. Dissemination, distribution, forwarding or copying of this
e-mail by anyone other than the intended recipient is prohibited. If you
have received this e-mail in error, please notify us immediately by
telephone or e-mail and completely delete or destroy any and all
disseminated, distributed, forwarded electronic or other copies of the
original message and any attachments.
------------------------------------------------------------------------------
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