Re: Invalid default value
Thanks for responding! I'm running 5.7.3. Given the three scenarios you describe...
1. The error occurs on CREATE TABLE. No data is being written, null or otherwise. However, it is the SECOND timestamp column where the error occurs, but what would be invalid in the autoassigned DEFAULT ‘0000-00-00 00:00:00’? And if that only applies to pre-5.6.5, would it be relevant?
2. We're not explicitly defining DEFAULTs for either timestamp column. And again, we're dealing with a CREATE TABLE error, so it doesn't seem like this is the right one.
3. explicit_defaults_for_timestamp is OFF on a system where the create succeeds; I'm inquiring about the value on systems where it fails. But this still seems to apply to INSERT and UPDATE, not CREATE TABLE. However, this seems to be close to the problem, as on one system wehere the CREATE TABLE failed, it was reported that removing STRICT_TRANS_TABLES from sql-mode fixed the problem.
So I still don't know exactly what the problem is, but it looks like a simple workaround will be to declare explicit DEFAULT clauses.
Subject
Views
Written By
Posted
3118
August 13, 2014 12:34PM
1079
August 13, 2014 12:40PM
1774
August 13, 2014 01:01PM
Re: Invalid default value
1412
August 13, 2014 02:12PM
966
August 14, 2014 11:31AM
1019
August 14, 2014 12:29PM
1021
August 14, 2014 02:43PM
949
August 15, 2014 09:58PM
1529
August 15, 2014 10:39PM
988
August 16, 2014 05:15AM
1073
August 16, 2014 07:56AM
954
August 16, 2014 05:18AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.