You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Conor Molloy (JIRA)" <ji...@apache.org> on 2018/12/05 10:29:00 UTC
[jira] [Created] (AIRFLOW-3445) MariaDB
explicit_defaults_for_timestamp = 1 Does not work.
Conor Molloy created AIRFLOW-3445:
-------------------------------------
Summary: MariaDB explicit_defaults_for_timestamp = 1 Does not work.
Key: AIRFLOW-3445
URL: https://issues.apache.org/jira/browse/AIRFLOW-3445
Project: Apache Airflow
Issue Type: Bug
Components: database
Affects Versions: 1.10.1
Environment: Hosted VM on the Google Cloud Platform, Compute Engine:
Machine type: n1-standard-2 (2 vCPUs, 7.5 GB memory)
Operating System CentOS
Reporter: Conor Molloy
Fix For: 1.10.2
{{Running into an issue when running }}
{{`airflow upgradedb`}}
{{ going from `1.9` -> `1.10.1`}}
{{}}
{code:java}
`sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1193, "Unknown system variable 'explicit_defaults_for_timestamp'") [SQL: 'SELECT @@explicit_defaults_for_timestamp']`{code}
{{I saw this link on the airflow website.}}
{{[https://airflow.readthedocs.io/en/stable/faq.html#how-to-fix-exception-global-variable-explicit-defaults-for-timestamp-needs-to-be-on-1|http://example.com]}}
{{Here it says you can set}}
{code:java}
`explicit_defaults_for_timestamp = 1`{code}
{{in the _my.cnf_ file. However I am using Mariadb and when I add this to the _my.cnf_ file the}}
{noformat}
mariadb.service{noformat}
{{fails to start up. Has anyone else come across this issue?}}
The output from
{code:java}
`SHOW VARIABLES like '%version%'`{code}
was
{code:java}
`+-------------------------+----------------------+`
`| Variable_name | Value |`
`+-------------------------+----------------------+`
`| innodb_version | 5.5.59-MariaDB-38.11 |`
`| protocol_version | 10 |`
`| slave_type_conversions | |`
`| version | 5.5.60-MariaDB |`
`| version_comment | MariaDB Server |`
`| version_compile_machine | x86_64 |`
`| version_compile_os | Linux |`
`+-------------------------+----------------------+`{code}
The MariaDB does not have the argument as it is a MySQL only feature.
[https://mariadb.com/kb/en/library/system-variable-differences-between-mariadb-100-and-mysql-56/|http://example.com]
There may need to be a check for MariaDB before upgrading, as mentioned by Ash in this Slack thread.
[https://apache-airflow.slack.com/archives/CCQB40SQJ/p1543918149008100|http://example.com]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)